← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11680: Impl user interface function for extending the width of the left side menu and org unit tree. Use...

 

------------------------------------------------------------
revno: 11680
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-08-16 14:29:21 +0200
message:
  Impl user interface function for extending the width of the left side menu and org unit tree. Useful when having very large hierarchies or very long org unit names
removed:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuHiddenAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuVisibleAction.java
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/extend_menu.png
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuStateAction.java
modified:
  dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm
  dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/MenuState.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm	2013-06-10 15:15:17 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated();
-        autoUpload();
-});
-</script>
 <style type="text/css">
 #uploadArea {
     border: 1px solid #ccc; 

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm	2013-06-10 16:36:36 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-appmanager" ) #*openHelp( "appManager" )*#</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2013-08-09 10:57:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2013-08-16 12:29:21 +0000
@@ -210,7 +210,7 @@
   padding-top: 4px;
 }
 
-#leftBarContents div#orgUnitTree 
+div#orgUnitTree 
 {
   font-size: 9pt;
   background-color: white;
@@ -269,7 +269,7 @@
 
 div#orgUnitTree a.selected 
 {
-  color: #000000;
+  color: #000;
   font-family: LiberationSansBold, arial;
   font-size: 13px;
 }

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/extend_menu.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/extend_menu.png	1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/extend_menu.png	2013-08-16 12:29:21 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2013-08-12 11:35:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2013-08-16 12:29:21 +0000
@@ -140,46 +140,72 @@
 // Leftbar
 // -----------------------------------------------------------------------------
 
-var leftBar = new LeftBar();
-
-function LeftBar()
-{    
-    this.showAnimated = function()
-    {
-        setMenuVisible();
-        $( '#mainPage' ).removeAttr( 'style' );
-        $( '#leftBar' ).show( 'slide', { direction: 'left', duration: 200 } );
-        $( '#showLeftBar' ).hide();
-    };
-    
-    this.hideAnimated = function()
-    {
-        setMenuHidden();
-        $( '#mainPage' ).attr( 'style', 'margin-left:20px' );
-        $( '#leftBar' ).hide( 'slide', { direction: 'left', duration: 200 } );
-        $( '#showLeftBar' ).delay( 200 ).fadeIn( 'fast' );
-    };
-    
-    this.hide = function()
-    {
-        setMenuHidden();
-        $( '#mainPage' ).attr( 'style', 'margin-left:20px' );
-        $( '#leftBar' ).hide();
-        $( '#showLeftBar' ).show();
-    };
-
-    function setMenuVisible()
-    {
-        $.get( '../dhis-web-commons/menu/setMenuVisible.action' );        
-    }
-    
-    function setMenuHidden()
-    {        
-        $.get( '../dhis-web-commons/menu/setMenuHidden.action' );        
-    }    
-    
-    this.openHelpForm = function( id )
-    {
-		window.open( "../dhis-web-commons/help/viewDynamicHelp.action?id=" + id, "Help", "width=800,height=600,scrollbars=yes" );
-    }
+dhis2.util.namespace( 'dhis2.leftBar' );
+
+dhis2.leftBar.setLinks = function( showLeftBarLink, showExtendMenuLink )
+{
+	$( '#showLeftBar' ).css( 'display', ( showLeftBarLink ? 'inline' : 'none' ) );
+	$( '#extendMainMenuLink' ).css( 'display', ( showExtendMenuLink ? 'inline' : 'none' ) );
+};
+
+dhis2.leftBar.showAnimated = function()
+{
+	dhis2.leftBar.setMenuVisible();
+	dhis2.leftBar.setLinks( false, true );
+	$( '#leftBar, #orgUnitTree' ).css( 'width', '' ).show( 'slide', { direction: 'left', duration: 200 } );
+	$( '#mainPage' ).css( 'margin-left', '' );
+};
+
+dhis2.leftBar.extend = function()
+{
+	dhis2.leftBar.setMenuExtended();
+	dhis2.leftBar.setLinks( false, false );
+    $( '#leftBar, #orgUnitTree' ).show().animate( { direction: 'left', width: '+=150px', duration: 20 } );
+    $( '#mainPage' ).animate( { direction: 'left', marginLeft: '+=150px', duration: 20 } );
+    $( '#hideMainMenuLink' ).attr( 'href', 'javascript:dhis2.leftBar.retract()' );
+};
+
+dhis2.leftBar.retract = function()
+{
+	dhis2.leftBar.setMenuVisible();
+	dhis2.leftBar.setLinks( false, true );
+    $( '#leftBar, #orgUnitTree' ).show().animate( { direction: 'right', width: '-=150px', duration: 20 } );
+    $( '#mainPage' ).animate( { direction: 'right', marginLeft: '-=150px', duration: 20 } );
+    $( '#hideMainMenuLink' ).attr( 'href', 'javascript:javascript:dhis2.leftBar.hideAnimated()' );
 }
+
+dhis2.leftBar.hideAnimated = function()
+{
+	dhis2.leftBar.setMenuHidden();
+	dhis2.leftBar.setLinks( true, false );
+    $( '#leftBar' ).hide( 'slide', { direction: 'left', duration: 200 } );
+    $( '#mainPage' ).animate( { direction: 'right', marginLeft: '20px', duration: 200 } );
+};
+
+dhis2.leftBar.hide = function()
+{
+	dhis2.leftBar.setMenuHidden();
+	dhis2.leftBar.setLinks( true, false );
+    $( '#leftBar' ).hide();
+    $( '#mainPage' ).css( 'margin-left', '20px' );
+};
+
+dhis2.leftBar.setMenuVisible = function()
+{
+    $.get( '../dhis-web-commons/menu/setMenuState.action?state=VISIBLE' );        
+};
+    
+dhis2.leftBar.setMenuExtended = function()
+{
+	$.get( '../dhis-web-commons/menu/setMenuState.action?state=EXTENDED' );
+};
+    
+dhis2.leftBar.setMenuHidden = function()
+{        
+    $.get( '../dhis-web-commons/menu/setMenuState.action?state=HIDDEN' );
+};
+    
+dhis2.leftBar.openHelpForm = function( id )
+{
+	window.open( "../dhis-web-commons/help/viewDynamicHelp.action?id=" + id, "Help", "width=800,height=600,scrollbars=yes" );
+};

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2013-07-17 16:50:42 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2013-08-16 12:29:21 +0000
@@ -121,7 +121,7 @@
       </span>
       
       <span id="showLeftBar">
-        <a href="javascript:leftBar.showAnimated()" title="$i18n.getString( 'show_menu' )">
+        <a href="javascript:dhis2.leftBar.showAnimated()" title="$i18n.getString( 'show_menu' )">
           <img src="../images/show_menu.png" width="16" height="16" alt="$i18n.getString( 'show_menu' )"/></a>
       </span>
     </div>
@@ -134,9 +134,11 @@
     <div id="leftBar">
       <div id="hideLeftBar">
         <a href="index.action" title="$i18n.getString( 'show_main_menu' )" id="showMainMenuLink">
-          <img src="../images/home_small.png" width="16" height="16" title="$i18n.getString( 'show_main_menu' )"/></a>
-        <a href="javascript:leftBar.hideAnimated()" title="$i18n.getString( 'hide_menu' )" id="hideMainMenuLink">
-          <img src="../images/hide_menu.png" width="16" height="16" title="$i18n.getString( 'hide_menu' )"/></a>
+          <img src="../images/home_small.png" width="16" height="16" /></a>
+        <a href="javascript:dhis2.leftBar.hideAnimated()" title="$i18n.getString( 'hide_menu' )" id="hideMainMenuLink">
+          <img src="../images/hide_menu.png" width="16" height="16" /></a>
+        <a href="javascript:dhis2.leftBar.extend()" title="$i18n.getString( 'extend_menu' )" id="extendMainMenuLink">
+          <img src="../images/extend_menu.png" width="16" height="16" /></a>
       </div>
 
       <div id="leftBarContents">
@@ -154,12 +156,14 @@
         #parse( $page )
       #end
     </div>
-    #if( !$menuState.visible )
-      <script type="text/javascript">
-        leftBar.hide();
-      </script>
+    <script type="text/javascript">
+    #if( $!menuState == "HIDDEN" )
+      dhis2.leftBar.hide();
+    #elseif ( $!menuState == "EXTENDED" )
+      dhis2.leftBar.extend();
     #end
-
+    </script>
+    
     <div id="rightBar">
       <span id="hideRightBar"><a href="javascript:hideHelpContent()" title="$i18n.getString( 'close' )">
         <img id="hideRightBarImg" src="../images/hide.png" alt="$i18n.getString( 'close' )"/></a>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/MenuState.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/MenuState.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/MenuState.java	2013-08-16 12:29:21 +0000
@@ -31,38 +31,7 @@
  * @author Torgeir Lorange Ostby
  * @version $Id: MenuState.java 2869 2007-02-20 14:26:09Z andegje $
  */
-public class MenuState
+public enum MenuState
 {
-    public static final MenuState VISIBLE = new MenuState( true );
-
-    public static final MenuState HIDDEN = new MenuState( false );
-
-    private boolean visible;
-
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public MenuState()
-    {
-    }
-
-    public MenuState( boolean visible )
-    {
-        this.visible = visible;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public boolean isVisible()
-    {
-        return visible;
-    }
-
-    public void setVisible( boolean visible )
-    {
-        this.visible = visible;
-    }
+    HIDDEN, VISIBLE, EXTENDED
 }

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuHiddenAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuHiddenAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuHiddenAction.java	1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-package org.hisp.dhis.webportal.menu.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.webportal.menu.MenuState;
-import org.hisp.dhis.webportal.menu.MenuStateManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Torgeir Lorange Ostby
- * @version $Id: SetMenuHiddenAction.java 2869 2007-02-20 14:26:09Z andegje $
- */
-public class SetMenuHiddenAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private MenuStateManager menuStateManager;
-
-    public void setMenuStateManager( MenuStateManager menuStateManager )
-    {
-        this.menuStateManager = menuStateManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute() throws Exception
-    {
-        menuStateManager.setMenuState( MenuState.HIDDEN );
-
-        return SUCCESS;
-    }
-}

=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuStateAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuStateAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuStateAction.java	2013-08-16 12:29:21 +0000
@@ -0,0 +1,68 @@
+package org.hisp.dhis.webportal.menu.action;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.webportal.menu.MenuState;
+import org.hisp.dhis.webportal.menu.MenuStateManager;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.Action;
+
+public class SetMenuStateAction
+    implements Action
+{
+    @Autowired
+    private MenuStateManager manager;
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private String state;
+
+    public void setState( String state )
+    {
+        this.state = state;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute() throws Exception
+    {
+        if ( state != null )
+        {
+            MenuState menuState = MenuState.valueOf( state.toUpperCase() );
+            
+            manager.setMenuState( menuState );
+        }
+        
+        return SUCCESS;
+    }
+}

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuVisibleAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuVisibleAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/SetMenuVisibleAction.java	1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-package org.hisp.dhis.webportal.menu.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.webportal.menu.MenuState;
-import org.hisp.dhis.webportal.menu.MenuStateManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Torgeir Lorange Ostby
- * @version $Id: SetMenuVisibleAction.java 2869 2007-02-20 14:26:09Z andegje $
- */
-public class SetMenuVisibleAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private MenuStateManager menuStateManager;
-
-    public void setMenuStateManager( MenuStateManager menuStateManager )
-    {
-        this.menuStateManager = menuStateManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute() throws Exception
-    {
-        menuStateManager.setMenuState( MenuState.VISIBLE );
-
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2013-07-02 18:21:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2013-08-16 12:29:21 +0000
@@ -74,17 +74,7 @@
 
   <bean id="org.hisp.dhis.webportal.menu.MenuStateManager" class="org.hisp.dhis.webportal.menu.SessionMenuStateManager" />
 
-  <bean id="org.hisp.dhis.webportal.menu.action.SetMenuHiddenAction" class="org.hisp.dhis.webportal.menu.action.SetMenuHiddenAction">
-    <property name="menuStateManager">
-      <ref local="org.hisp.dhis.webportal.menu.MenuStateManager" />
-    </property>
-  </bean>
-
-  <bean id="org.hisp.dhis.webportal.menu.action.SetMenuVisibleAction" class="org.hisp.dhis.webportal.menu.action.SetMenuVisibleAction">
-    <property name="menuStateManager">
-      <ref local="org.hisp.dhis.webportal.menu.MenuStateManager" />
-    </property>
-  </bean>
+  <bean id="org.hisp.dhis.webportal.menu.action.SetMenuStateAction" class="org.hisp.dhis.webportal.menu.action.SetMenuStateAction"/>
 
   <bean id="org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor"
     class="org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor">

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2013-07-02 18:21:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2013-08-16 12:29:21 +0000
@@ -270,14 +270,7 @@
 
   <package name="dhis-web-commons-menu" extends="dhis-web-commons" namespace="/dhis-web-commons/menu">
 
-    <action name="setMenuVisible" class="org.hisp.dhis.webportal.menu.action.SetMenuVisibleAction">
-      <result name="success" type="httpheader">
-        <param name="status">204</param>
-      </result>
-      <param name="onExceptionReturn">plainTextError</param>
-    </action>
-
-    <action name="setMenuHidden" class="org.hisp.dhis.webportal.menu.action.SetMenuHiddenAction">
+    <action name="setMenuState" class="org.hisp.dhis.webportal.menu.action.SetMenuStateAction">
       <result name="success" type="httpheader">
         <param name="status">204</param>
       </result>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2013-08-13 16:25:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2013-08-16 12:29:21 +0000
@@ -126,6 +126,7 @@
 change_password=Change password
 date_selector=Choose a date
 hide_menu=Hide menu
+extend_menu=Extend menu
 show_menu=Show menu
 show_main_menu=Show main menu
 view_home_page=View home page

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2013-05-25 05:54:08 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-importexport" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm	2013-04-30 08:03:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "data_administration" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/index.vm	2013-06-30 16:51:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-datadictionary" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2013-07-25 09:37:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2013-08-16 12:29:21 +0000
@@ -177,6 +177,7 @@
         ../dhis-web-commons/ckeditor/adapters/jquery.js,
         javascript/dataEntryForm.js
       </param>
+      <param name="hideMenu">true</param>
       <param name="anyAuthorities">F_DATASET_PUBLIC_ADD, F_DATASET_PRIVATE_ADD</param>
     </action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm	2013-06-30 18:33:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-dataset" ) #openHelp( "datasets" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2013-07-20 12:35:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2013-08-16 12:29:21 +0000
@@ -3,8 +3,6 @@
 
 $( document ).ready( function() {
 	
-	leftBar.hideAnimated();
-
 	$("#selectionDialog").dialog({
 		minWidth: 595,
 		minHeight: 263,

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/index.vm	2013-06-30 16:51:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "mobile_configuration" ) </h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm	2013-06-30 16:51:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-organisationunit" ) #openHelp( "ou_hierarchy" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm	2013-05-24 09:10:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-patient" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm	2012-10-22 18:48:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-settings" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm	2013-03-12 06:51:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-maintenance-user" ) #openHelp( "users" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm	2013-05-24 11:59:41 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-reporting" )</h3>
 
 <ul class="introList">

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm	2012-07-20 07:29:46 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm	2013-08-16 12:29:21 +0000
@@ -1,10 +1,3 @@
-<script type="text/javascript">
-jQuery(function() {
-	/* make sure that the leftBar is always visible when entering page. */
-	leftBar.showAnimated()
-});
-</script>
-
 <h3>$i18n.getString( "dhis-web-validationrule" )</h3>
 
 <ul class="introList">