Module: nagvis Branch: master Commit: 1f1e6f0dc32c3ab81862f2cba2e5b877fb85e106 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=1f1e6f0dc32c3ab81862f2cba2e5b877fb85e106
Author: LaMi <[email protected]> Date: Sun Nov 8 13:40:05 2009 +0100 Rotation enabling/disabling is now working again --- .../nagvis-js/classes/FrontendModAutoMap.php | 12 ++++++-- .../nagvis-js/classes/FrontendModOverview.php | 31 +++++++++++++------ .../frontend/nagvis-js/classes/FrontendModUrl.php | 7 ++++- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/share/frontend/nagvis-js/classes/FrontendModAutoMap.php b/share/frontend/nagvis-js/classes/FrontendModAutoMap.php index 654d138..2228eb4 100644 --- a/share/frontend/nagvis-js/classes/FrontendModAutoMap.php +++ b/share/frontend/nagvis-js/classes/FrontendModAutoMap.php @@ -75,10 +75,16 @@ class FrontendModAutoMap extends FrontendModule { // Need to parse the header menu? if($MAPCFG->getValue('global',0 ,'header_menu')) { - // Parse the header menu - $HEADER = new GlobalHeaderMenu($this->CORE, $this->AUTHORISATION, $MAPCFG->getValue('global',0 ,'header_template'), $MAPCFG); + // Parse the header menu + $HEADER = new GlobalHeaderMenu($this->CORE, $this->AUTHORISATION, $MAPCFG->getValue('global',0 ,'header_template'), $MAPCFG); + + // Put rotation information to header menu + if($this->rotation != '') { + $HEADER->setRotationEnabled(); + } + $INDEX->setHeaderMenu($HEADER->__toString()); - } + } // Initialize map view $this->VIEW = new NagVisAutoMapView($this->CORE, $MAPCFG->getName()); diff --git a/share/frontend/nagvis-js/classes/FrontendModOverview.php b/share/frontend/nagvis-js/classes/FrontendModOverview.php index 3f6645d..f387df9 100644 --- a/share/frontend/nagvis-js/classes/FrontendModOverview.php +++ b/share/frontend/nagvis-js/classes/FrontendModOverview.php @@ -27,19 +27,30 @@ class FrontendModOverview extends FrontendModule { private function showViewDialog() { // Build index template $INDEX = new NagVisIndexView($this->CORE); - - //FIXME: Rotation properties not supported atm - //$FRONTEND->addBodyLines($FRONTEND->parseJs('oRotationProperties = '.$FRONTEND->getRotationPropertiesJson(0).';')); - - // Need to parse the header menu? - if($this->CORE->getMainCfg()->getValue('index','headermenu')) { - // Parse the header menu - $HEADER = new GlobalHeaderMenu($this->CORE, $this->AUTHORISATION, $this->CORE->getMainCfg()->getValue('index', 'headertemplate'), ''); - $INDEX->setHeaderMenu($HEADER->__toString()); - } + + // Need to parse the header menu? + if($this->CORE->getMainCfg()->getValue('index','headermenu')) { + // Parse the header menu + $HEADER = new GlobalHeaderMenu($this->CORE, $this->AUTHORISATION, $this->CORE->getMainCfg()->getValue('index', 'headertemplate'), ''); + + // Put rotation information to header menu + if($this->rotation != '') { + $HEADER->setRotationEnabled(); + } + + $INDEX->setHeaderMenu($HEADER->__toString()); + } // Initialize map view $this->VIEW = new NagVisOverviewView($this->CORE); + + // Maybe it is needed to handle the requested rotation + if($this->rotation != '') { + $ROTATION = new FrontendRotation($this->CORE, $this->rotation); + $ROTATION->setStep('overview', ''); + $this->VIEW->setRotation($ROTATION->getRotationProperties()); + } + $INDEX->setContent($this->VIEW->parse()); return $INDEX->parse(); diff --git a/share/frontend/nagvis-js/classes/FrontendModUrl.php b/share/frontend/nagvis-js/classes/FrontendModUrl.php index 64f910c..0f542e9 100644 --- a/share/frontend/nagvis-js/classes/FrontendModUrl.php +++ b/share/frontend/nagvis-js/classes/FrontendModUrl.php @@ -50,6 +50,12 @@ class FrontendModUrl extends FrontendModule { if($this->CORE->getMainCfg()->getValue('index','headermenu')) { // Parse the header menu $HEADER = new GlobalHeaderMenu($this->CORE, $this->AUTHORISATION, $this->CORE->getMainCfg()->getValue('index', 'headertemplate')); + + // Put rotation information to header menu + if($this->rotation != '') { + $HEADER->setRotationEnabled(); + } + $INDEX->setHeaderMenu($HEADER->__toString()); } @@ -57,7 +63,6 @@ class FrontendModUrl extends FrontendModule { $this->VIEW = new NagVisUrlView($this->CORE, $this->url); // Maybe it is needed to handle the requested rotation - // Maybe it is needed to handle the requested rotation if($this->rotation != '') { $ROTATION = new FrontendRotation($this->CORE, $this->rotation); $ROTATION->setStep('url', $this->url); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
