dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25197
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12430: (Anonymous Entry) adding another deferred chain to help with async-async calls. added message not...
------------------------------------------------------------
revno: 12430
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-10-04 15:06:47 +0200
message:
(Anonymous Entry) adding another deferred chain to help with async-async calls. added message notification while loading.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-10-03 14:11:59 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-10-04 13:06:47 +0000
@@ -698,4 +698,5 @@
both = both
column = Column
row = Row
-show = Show
\ No newline at end of file
+show = Show
+please_wait_loading=Loading.. please wait
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2013-07-16 04:04:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2013-10-04 13:06:47 +0000
@@ -232,6 +232,8 @@
var i18n_offline_notification = '$encoder.jsEscape( $i18n.getString( "offline_notification" ) , "'")';
var i18n_operation_not_available_offline = '$encoder.jsEscape( $i18n.getString( "operation_not_available_offline" ) , "'")';
+ var i18n_please_wait_loading = '$encoder.jsEscape( $i18n.getString( "please_wait_loading" ) , "'")';
+
isAjax = true;
contentDiv = '';
var unSave = false;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-10-04 12:54:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-10-04 13:06:47 +0000
@@ -70,6 +70,9 @@
return;
}
+ var mainDef = $.Deferred();
+ var mainPromise = mainDef.promise();
+
var def = $.Deferred();
var promise = def.promise();
@@ -97,17 +100,16 @@
}
build.done(function() {
- def.resolve( metaData );
+ def.resolve();
promise = promise.done( function () {
- console.log(promise);
- console.log('done');
+ mainDef.resolve( metaData );
} );
});
builder.resolve();
- return promise;
+ return mainPromise;
}
function makeUsernameRequest() {
@@ -252,6 +254,8 @@
cache: false
} );
+ setHeaderWaitMessage(i18n_please_wait_loading);
+
$("#programId").attr('disabled', true);
$( "#orgUnitTree" ).one( "ouwtLoaded", function () {