← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4284: fixed ouwt bug; correctly unbind ajaxComplete handler

 

------------------------------------------------------------
revno: 4284
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-12 18:09:52 +0200
message:
  fixed ouwt bug; correctly unbind ajaxComplete handler
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2011-08-12 15:07:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2011-08-12 16:09:52 +0000
@@ -40,10 +40,10 @@
         {
             jQuery( "body" ).bind( "ajaxComplete", function( e, xhr, settings )
             {
-                if ( settings.url.indexOf( "getOrganisationUnitTree" ) )
+                if ( settings.url.indexOf( "getOrganisationUnitTree" ) && settings.data === undefined )
                 {
                     selection.responseReceived();
-                    jQuery( "body" ).unbind( "ajaxSuccess" );
+                    jQuery( "body" ).unbind( "ajaxComplete" );
                 }
             } );
         }

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2011-08-08 17:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2011-08-12 16:09:52 +0000
@@ -16,7 +16,7 @@
       <param name="menuTreeHeight">420</param>
       <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/form.js,javascript/entry.js,javascript/history.js</param>
       <param name="stylesheets">style/dhis-web-dataentry.css</param>
-      <param name="offline">true</param>
+      <param name="offline">false</param>
     </action>
 
     <action name="getDataValues" class="org.hisp.dhis.de.action.GetDataValuesForDataSetAction">