dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34570
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17725: disable clicks for ou selection until metadata has downloaded
------------------------------------------------------------
revno: 17725
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-12-17 15:21:45 +0100
message:
disable clicks for ou selection until metadata has downloaded
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css
--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-12-15 14:00:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-12-17 14:21:45 +0000
@@ -29,29 +29,7 @@
dhis2.ec.store = new dhis2.storage.Store({
name: 'dhis2ec',
adapters: [dhis2.storage.IndexedDBAdapter, dhis2.storage.DomSessionStorageAdapter, dhis2.storage.InMemoryAdapter],
- objectStores: ['programs', 'programStages', 'geoJsons', 'optionSets', 'events']
- /*objectStores: [
- {
- name: 'programs',
- adapters: adapters
- },
- {
- name: 'programStages',
- adapters: adapters
- },
- {
- name: 'geoJsons',
- adapters: adapters
- },
- {
- name: 'optionSets',
- adapters: adapters
- },
- {
- name: 'events',
- adapters: adapters
- }
- ]*/
+ objectStores: ['programs', 'programStages', 'geoJsons', 'optionSets', 'events']
});
(function($) {
@@ -171,7 +149,10 @@
promise = promise.then( getPrograms );
promise = promise.then( getProgramStages );
promise = promise.then( getOptionSets );
- promise.done( function() {
+ promise.done( function() {
+ //Enable ou selection after meta-data has downloaded
+ $( "#orgUnitTree" ).removeClass( "disable-clicks" );
+
console.log( 'Finished loading meta-data' );
dhis2.availability.startAvailabilityCheck();
console.log( 'Started availability check' );
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2014-12-16 15:44:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2014-12-17 14:21:45 +0000
@@ -885,6 +885,9 @@
font-weight: bold;
}
+.disable-clicks {
+ pointer-events: none;
+}
@media print {
#header, #leftBar, .not-printable {