← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16042: dhis2.selected: disable search button while doing loads from server

 

------------------------------------------------------------
revno: 16042
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-09 14:04:35 +0700
message:
  dhis2.selected: disable search button while doing loads from server
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.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/javascripts/dhis2/dhis2.selected.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.js	2014-07-09 07:02:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.selected.js	2014-07-09 07:04:35 +0000
@@ -164,6 +164,7 @@
 
       context.searchButton.find('i').removeClass('fa-search');
       context.searchButton.find('i').addClass('fa-spinner fa-spin');
+      context.searchButton.attr('disabled', true);
 
       return $.ajax(request).done(function( data ) {
         if( data.pager ) {
@@ -196,6 +197,7 @@
       }).always(function() {
          context.searchButton.find('i').removeClass('fa-spinner fa-spin');
          context.searchButton.find('i').addClass('fa-search');
+         context.searchButton.removeAttr('disabled');
       });
     }
   };