← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1517: Added accordion to help center menu.

 

------------------------------------------------------------
revno: 1517
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-02-27 20:45:18 +0100
message:
  Added accordion to help center menu.
modified:
  dhis-2/dhis-options/src/main/resources/helpitems_stylesheet.xsl
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml


--
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-options/src/main/resources/helpitems_stylesheet.xsl'
--- dhis-2/dhis-options/src/main/resources/helpitems_stylesheet.xsl	2010-02-25 18:35:33 +0000
+++ dhis-2/dhis-options/src/main/resources/helpitems_stylesheet.xsl	2010-02-27 19:45:18 +0000
@@ -2,8 +2,10 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 
 <xsl:template match="chapter">
-  <h4><xsl:value-of select="title"/></h4>
-  <ul><xsl:apply-templates select="descendant::section[@id]"/></ul>
+  <h5><xsl:value-of select="title"/></h5>
+  <div>
+    <ul><xsl:apply-templates select="descendant::section[@id]"/></ul>
+  </div>
 </xsl:template>
 
 <xsl:template match="section">

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js	2010-02-25 18:35:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js	2010-02-27 19:45:18 +0000
@@ -1,18 +1,19 @@
 
 $( document ).ready( function()
-{
+{	
     $.get( 
-       '../dhis-web-commons-help/getHelpItems.action',
+       'getHelpItems.action',
        function( data )
        {
            $( "div#helpMenu" ).html( data );
+           $( "div#helpMenu" ).accordion();
        } );
 } );
 
 function getHelpItemContent( id )
 {
 	$.get( 
-       '../dhis-web-commons-help/getHelpContent.action',
+       'getHelpContent.action',
        { "id": id },
        function( data )
        {

=== 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	2010-02-25 18:35:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2010-02-27 19:45:18 +0000
@@ -72,6 +72,11 @@
   text-decoration: none;
 }
 
+div#helpMenu h5
+{
+  cursor:pointer;
+}
+
 div#helpContent
 {
   padding-left: 20px;

=== 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	2010-02-25 18:35:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2010-02-27 19:45:18 +0000
@@ -223,27 +223,6 @@
 
 	</package>
 
-	<!-- Help -->
-
-	<package name="dhis-web-commons-help" extends="dhis-web-commons"
-		namespace="/dhis-web-commons-help">
-
-		<action name="help" class="org.hisp.dhis.commons.action.NoAction">
-			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">/dhis-web-commons/about/help.vm</param>
-			<param name="javascripts">../dhis-web-commons/about/help.js</param>
-		</action>
-
-		<action name="getHelpContent" class="org.hisp.dhis.help.action.GetHelpContentAction">
-			<result name="success" type="outputStreamResult"></result>
-		</action>
-
-        <action name="getHelpItems" class="org.hisp.dhis.help.action.GetHelpItemsAction">
-            <result name="success" type="outputStreamResult"></result>
-        </action>
-
-	</package>
-
 	<!-- Security -->
 
 	<package name="dhis-web-commons-security" extends="dhis-web-commons"
@@ -484,7 +463,15 @@
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-commons/about/help.vm</param>
             <param name="menu">/dhis-web-commons/about/menu.vm</param>
-            <param name="javascripts">../dhis-web-commons/about/help.js</param>
+            <param name="javascripts">../dhis-web-commons/util/jquery-ui.js,../dhis-web-commons/about/help.js</param>
+        </action>
+
+        <action name="getHelpContent" class="org.hisp.dhis.help.action.GetHelpContentAction">
+            <result name="success" type="outputStreamResult"></result>
+        </action>
+
+        <action name="getHelpItems" class="org.hisp.dhis.help.action.GetHelpItemsAction">
+            <result name="success" type="outputStreamResult"></result>
         </action>
 
 		<action name="displayChangeLog" class="org.hisp.dhis.commons.action.NoAction">