← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13120: ie8 fixes for storage engine

 

------------------------------------------------------------
revno: 13120
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-03 10:49:28 +0100
message:
  ie8 fixes for storage engine
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ls.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.memory.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ss.js
  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-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-11-25 07:31:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-12-03 09:49:28 +0000
@@ -208,7 +208,7 @@
         cache: false
     } ).done( function ( json ) {
         if ( json.response === 'success' ) {
-            DAO.store.delete( 'dataValues', event.id ).done( function () {
+            DAO.store.remove( 'dataValues', event.id ).done( function () {
                 updateOfflineEvents();
                 searchEvents( eval( getFieldValue( 'listAll' ) ) );
             } );
@@ -846,7 +846,7 @@
     DAO.store.get('dataValues', programStageId).done(function(obj) {
         if(obj) {
             if( confirm(i18n_comfirm_delete_event) ) {
-                DAO.store.delete('dataValues', programStageId).always(function() {
+                DAO.store.remove('dataValues', programStageId).always(function() {
                     updateOfflineEvents();
                     // needed, seemed that from time-to-time the events are updated too early, could be idb related
                     setTimeout(updateOfflineEvents, 100);
@@ -945,7 +945,7 @@
     DAO.store.get('dataValues', programStageInstanceId).done(function(obj) {
         if(obj) {
             if( confirm(i18n_comfirm_delete_event) ) {
-                DAO.store.delete('dataValues', programStageInstanceId).always(function() {
+                DAO.store.remove('dataValues', programStageInstanceId).always(function() {
                     setTimeout(backEventList, 200);
                 });
             }

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2013-12-03 09:00:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2013-12-03 09:49:28 +0000
@@ -86,10 +86,7 @@
   });
 
   $list.on('click.context', 'td', function( e ) {
-    $list.find('td').removeClass(config.menuItemActiveClass);
-
-    if( $menu.is(":visible") ) {
-      $menu.hide();
+    if(dhis2.contextmenu.disable()) {
       return false;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js	2013-08-20 07:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js	2013-12-03 09:49:28 +0000
@@ -150,31 +150,6 @@
             },
             enumerable: true
         },
-        /*
-         'setAll': {
-         value: function( store, arr ) {
-         var self = this;
-         var deferred1 = $.Deferred();
-         var deferred2 = $.Deferred();
-         var chained = deferred2.promise();
-
-         $.each( arr, function( idx, item ) {
-         chained = chained.then( function() {
-         return self.set( store, item );
-         } );
-         } );
-
-         chained = chained.then( function() {
-         deferred1.resolveWith( this );
-         } );
-
-         deferred2.resolve();
-
-         return deferred1.promise();
-         },
-         enumerable: true
-         },
-         */
         'setAll': {
             value: function( store, arr ) {
                 var self = this;
@@ -338,7 +313,7 @@
             },
             enumerable: true
         },
-        'delete': {
+        'remove': {
             value: function( store, key ) {
                 var self = this;
 
@@ -374,7 +349,7 @@
             },
             enumerable: true
         },
-        'clear': {
+        'removeAll': {
             value: function( store ) {
                 var self = this;
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.js	2013-08-20 07:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.js	2013-12-03 09:49:28 +0000
@@ -115,7 +115,7 @@
         enumerable: true
     } );
 
-    var adapterMethods = "open set setAll get getAll getKeys count contains clear close delete destroy".split( ' ' );
+    var adapterMethods = "open set setAll get getAll getKeys count contains remove removeAll close destroy".split( ' ' );
 
     $.each( adapterMethods, function( idx, item ) {
         Object.defineProperty( self, item, {
@@ -153,7 +153,7 @@
     } );
 };
 
-dhis2.storage.Store.adapterMethods = "open set setAll get getAll getKeys count contains clear close delete destroy".split( ' ' );
+dhis2.storage.Store.adapterMethods = "open set setAll get getAll getKeys count contains remove removeAll close destroy".split( ' ' );
 
 dhis2.storage.Store.verifyAdapter = function( Adapter ) {
     var failed = [];

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ls.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ls.js	2013-08-20 07:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ls.js	2013-12-03 09:49:28 +0000
@@ -235,7 +235,7 @@
             },
             enumerable: true
         },
-        'delete': {
+        'remove': {
             value: function ( store, key ) {
                 var self = this;
 
@@ -254,14 +254,14 @@
             },
             enumerable: true
         },
-        'clear': {
+        'removeAll': {
             value: function ( store ) {
                 var self = this;
                 var deferred = $.Deferred();
 
                 this.getKeys( store ).done( function ( keys ) {
                     $.each( keys, function ( idx, item ) {
-                        self.delete( store, item );
+                        self.remove( store, item );
                     } );
 
                     deferred.resolveWith( self );
@@ -315,7 +315,7 @@
                 var deferred = $.Deferred();
 
                 $.each( self.objectStoreNames, function ( idx, item ) {
-                    self.clear( item );
+                    self.removeAll( item );
                     self.indexer[item].destroy();
                 } );
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.memory.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.memory.js	2013-08-20 07:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.memory.js	2013-12-03 09:49:28 +0000
@@ -235,7 +235,7 @@
             },
             enumerable: true
         },
-        'delete': {
+        'remove': {
             value: function ( store, key ) {
                 var self = this;
 
@@ -254,14 +254,14 @@
             },
             enumerable: true
         },
-        'clear': {
+        'removeAll': {
             value: function ( store ) {
                 var self = this;
                 var deferred = $.Deferred();
 
                 this.getKeys( store ).done( function ( keys ) {
                     $.each( keys, function ( idx, item ) {
-                        self.delete( store, item );
+                        self.remove( store, item );
                     } );
 
                     deferred.resolveWith( self );
@@ -315,7 +315,7 @@
                 var deferred = $.Deferred();
 
                 $.each( self.objectStoreNames, function ( idx, item ) {
-                    self.clear( item );
+                    self.removeAll( item );
                     self.indexer[item].destroy();
                 } );
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ss.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ss.js	2013-08-20 07:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.storage.ss.js	2013-12-03 09:49:28 +0000
@@ -237,7 +237,7 @@
             },
             enumerable: true
         },
-        'delete': {
+        'remove': {
             value: function ( store, key ) {
                 var self = this;
 
@@ -256,14 +256,14 @@
             },
             enumerable: true
         },
-        'clear': {
+        'removeAll': {
             value: function ( store ) {
                 var self = this;
                 var deferred = $.Deferred();
 
                 this.getKeys( store ).done( function ( keys ) {
                     $.each( keys, function ( idx, item ) {
-                        self.delete( store, item );
+                        self.remove( store, item );
                     } );
 
                     deferred.resolveWith( self );
@@ -317,7 +317,7 @@
                 var deferred = $.Deferred();
 
                 $.each( self.objectStoreNames, function ( idx, item ) {
-                    self.clear( item );
+                    self.removeAll( item );
                     self.indexer[item].destroy();
                 } );
 

=== 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	2013-11-26 13:01:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2013-12-03 09:49:28 +0000
@@ -166,7 +166,7 @@
         var def = $.Deferred();
 
         // clear out old tree
-        dhis2.ou.store.clear(OU_KEY).always(function() {
+        dhis2.ou.store.removeAll(OU_KEY).always(function() {
           // set new tree
           dhis2.ou.store.setAll(OU_KEY, ous).always(function() { 
             def.resolve();