]> source.dussan.org Git - archiva.git/commitdiff
use bootstrap toggle button feature
authorOlivier Lamy <olamy@apache.org>
Fri, 28 Sep 2012 13:45:46 +0000 (13:45 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 28 Sep 2012 13:45:46 +0000 (13:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1391462 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/general-admin.html

index 4fcb252021a543a03022805a3d198fc826be5082..4dcbf80a0046c17829f05e676c9808b15d8c547f 100644 (file)
@@ -848,6 +848,8 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
           return;
       }
       clearUserMessages();
+      $("#user-messages" ).html(mediumSpinnerImg());
+      $("#main-content" ).find("#appearance-configuration-btn-save" ).button('loading');
       $.ajax("restServices/archivaServices/archivaAdministrationService/setOrganisationInformation", {
         type: "POST",
         contentType: "application/json",
@@ -859,6 +861,10 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
         },
         error: function(data){
           displayErrorMessage($.i18n.prop('appearance-configuration.updating-error'));
+        },
+        complete: function(){
+          removeMediumSpinnerImg("#user-messages");
+          $("#main-content" ).find("#appearance-configuration-btn-save" ).button('reset');
         }
       });
     }
index c6dff4fe44898791aff3e2a677547eb75f2c8d5e..9b165d9936238cb1219c563f3476007e1f820ea6 100644 (file)
                 </div>
             </div>
         </fieldset>
-        <button id="appearance-configuration-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+        <button id="appearance-configuration-btn-save" data-loading-text="${$.i18n.prop('common.loading')}" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
     </form>
 </script>