dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13383
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4271: made ouwt work offline, also added missing files to cacheManifest
------------------------------------------------------------
revno: 4271
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-08-10 11:35:18 +0200
message:
made ouwt work offline, also added missing files to cacheManifest
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
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/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2011-08-09 09:48:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2011-08-10 09:35:18 +0000
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# 2.4-SNAPSHOT Version 6
+# 2.4-SNAPSHOT Version 9
NETWORK:
*
CACHE:
@@ -12,6 +12,7 @@
css/light_blue/logo_right.png
css/light_blue/logo_separator.png
css/widgets.css
+../dhis-web-dataentry/style/dhis-web-dataentry.css
javascripts/jQuery/jquery-1.6.1.min.js
javascripts/jQuery/jquery.metadata.js
javascripts/jQuery/jquery.glob.js
@@ -36,9 +37,12 @@
../images/hide_menu.png
../images/search.png
../images/colapse.png
+../images/expand.png
+../images/transparent.gif
../images/help.png
../images/hide.png
../images/ajax-loader-circle.gif
+../images/ajax-loader-bar.gif
../dhis-web-dataentry/javascript/form.js
../dhis-web-dataentry/javascript/entry.js
../dhis-web-dataentry/javascript/history.js
\ No newline at end of file
=== 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-10 07:45:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2011-08-10 09:35:18 +0000
@@ -62,6 +62,9 @@
}
localStorage[getTagId( "Roots" )] = JSON.stringify( roots );
+ } ).complete( function()
+ {
+ var roots = JSON.parse( localStorage[getTagId( "Roots" )] );
if ( sessionStorage[getTagId( "Selected" )] == null )
{
@@ -75,12 +78,9 @@
}
}
- if ( data["organisationUnits"].length > 0 )
- {
- subtree.reloadTree();
- }
-
- //selection.sync();
+ selection.sync();
+ subtree.reloadTree();
+ selection.responseReceived();
$( "#ouwt_loader" ).hide();
} );
@@ -89,7 +89,7 @@
// server = true : sync from server
// server = false : sync to server
this.sync = function( server )
- {
+ {
if ( server )
{
sessionStorage.removeItem( getTagId( "Selected" ) );
@@ -130,7 +130,7 @@
}
var selected = JSON.parse( sessionStorage[getTagId( "Selected" )] );
-
+
if ( multipleSelectionAllowed )
{
if ( !$.isArray( selected ) )
@@ -142,8 +142,8 @@
{
$.post( organisationUnitTreePath + "addorgunit.action", {
id : item
- } )
- } );
+ } );
+ } ).complete( this.responseReceived );
}
else
{
@@ -152,18 +152,16 @@
selected = selected[0];
}
- $.post( organisationUnitTreePath + "setorgunit.action", {
- id : selected
- },this.responseReceived );
- }
- });
-
+ $.post( organisationUnitTreePath + "setorgunit.action", {
+ id : selected
+ } ).complete( this.responseReceived );
+ }
+ } );
}
}
this.clear = function()
{
- $.post( organisationUnitTreePath + "clearselected.action", this.responseReceived );
sessionStorage.removeItem( getTagId( "Selected" ) );
var roots = JSON.parse( localStorage[getTagId( "Roots" )] );
@@ -178,6 +176,8 @@
}
subtree.reloadTree();
+
+ $.post( organisationUnitTreePath + "clearselected.action" ).complete( this.responseReceived );
}
function store_ou( ou )
@@ -231,7 +231,7 @@
$.post( organisationUnitTreePath + "removeorgunit.action", {
id : unitId
- }, this.responseReceived );
+ } ).complete( this.responseReceived );
$linkTag.removeClass( "selected" );
}
@@ -265,7 +265,7 @@
$.post( organisationUnitTreePath + "addorgunit.action", {
id : unitId
- }, this.responseReceived );
+ } ).complete( this.responseReceived );
$linkTag.addClass( "selected" );
}
@@ -275,7 +275,7 @@
$.post( organisationUnitTreePath + "setorgunit.action", {
id : unitId
- }, this.responseReceived );
+ } ).complete( this.responseReceived );
$( "#orgUnitTree" ).find( "a" ).removeClass( "selected" );
$linkTag.addClass( "selected" );