← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4511: Fixed bug in ouwt

 

------------------------------------------------------------
revno: 4511
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-09-03 17:50:32 +0200
message:
  Fixed bug in ouwt
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js


--
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-28 12:17:29 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2011-09-03 15:50:32 +0000
@@ -85,7 +85,7 @@
         function update_required( remoteVersion, remoteRoots )
         {
             var localVersion = localStorage[getTagId( "Version" )] ? localStorage[getTagId( "Version" )] : 0;
-            var localRoots = localStorage[getTagId( "Roots" )] ? localStorage[getTagId( "Roots" )] : [];
+            var localRoots = localStorage[getTagId( "Roots" )] ? JSON.parse( localStorage[getTagId( "Roots" )] ) : [];
 
             if ( localVersion != remoteVersion )
             {
@@ -115,7 +115,7 @@
             if ( data.indexOf( "<!DOCTYPE" ) != 0 )
             {
                 data = JSON.parse( data );
-              	should_update = update_required();
+              	should_update = update_required( data.version, data.roots );
             }
         }, "text" ).complete(
                 function()