Api explorer - add loading icon to api.action
authorColeman Watts <coleman@civicrm.org>
Fri, 19 Sep 2014 18:41:36 +0000 (14:41 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 19 Sep 2014 18:41:36 +0000 (14:41 -0400)
templates/CRM/Admin/Page/APIExplorer.js

index 51709f3b729869b91c4563178539bf14548d4b4c..2063c2a62f9ec655090d8d87ffc2ebd4feb1d220 100644 (file)
    */
   function getActions() {
     if (entity) {
+      $('#api-action').addClass('loading');
       CRM.api3(entity, 'getactions').done(function(data) {
         actions = data.values || ['get'];
         populateActions();
    */
   function populateActions(el) {
     var val = $('#api-action').val();
-    $('#api-action').select2({
+    $('#api-action').removeClass('loading').select2({
       data: _.transform(actions, function(ret, item) {ret.push({text: item, id: item})})
     });
     // If previously selected action is not available, set it to 'get' if possible