← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4372: minor ouwt bugfix

 

------------------------------------------------------------
revno: 4372
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 12:36:08 +0200
message:
  minor ouwt bugfix
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-18 10:12:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2011-08-19 10:36:08 +0000
@@ -89,11 +89,16 @@
             "versionOnly" : true
         }, function( data, textStatus, jqXHR )
         {
-            if ( version != data.version )
+            if ( data.indexOf( "<!DOCTYPE" ) != 0 )
             {
-                should_update = true;
+                data = JSON.parse( data );
+
+                if ( version != data.version )
+                {
+                    should_update = true;
+                }
             }
-        } ).complete(
+        }, "text" ).complete(
                 function()
                 {
                     if ( should_update )