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

archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
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 0ea324242420695726d2225e0dacc42c35f1ff23..fd2c9b35fe5a4454fdb26df16089d977a52fe8ad 100644 (file)
@@ -36,6 +36,7 @@ identifier=Id
 url=Url
 directory=Directory
 save.all=Save all
+common.loading=Loading...
 
 authz.karma.needed=You need to be authenticated for this action or have more privileges.
 error.500=An error has happened you must contact the administrator to check the logs.
index c3eb1fc925ac7f49b8f37bb3b1ef2c51b3221b58..4fcb252021a543a03022805a3d198fc826be5082 100644 (file)
@@ -599,6 +599,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
     var self=this;
     save=function(){
       $("#user-messages").html( mediumSpinnerImg());
+      $("#main-content" ).find("#ui-configuration-btn-save" ).button('loading');
       $.ajax("restServices/archivaServices/archivaAdministrationService/setUiConfiguration", {
         type: "POST",
         contentType: 'application/json',
@@ -609,6 +610,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
         },
         complete: function(){
           removeMediumSpinnerImg("#user-messages");
+          $("#main-content" ).find("#ui-configuration-btn-save" ).button('reset');
         }
       });
     }
index 22a0f8ddcfc6a5f99e05ad01699511a39940234d..c6dff4fe44898791aff3e2a677547eb75f2c8d5e 100644 (file)
         </div>
 
       </fieldset>
-      <button id="ui-configuration-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+      <button id="ui-configuration-btn-save" data-bind="click: save" class="btn" data-loading-text="${$.i18n.prop('common.loading')}">${$.i18n.prop('save')}</button>
     </form>
 </script>