more usage of toggle button: yup users something happend archiva do not hang :-)

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-10-13 14:08:53 +00:00
parent 091be091a5
commit 75575d6d38
2 changed files with 7 additions and 1 deletions

View File

@ -129,6 +129,8 @@ function() {
this.saveRepositoryGroup=function(repositoryGroup){
clearUserMessages();
$("#user-messages").html(mediumSpinnerImg());
$("#repository-group-save" ).button('loading');
$.ajax("restServices/archivaServices/repositoryGroupService/updateRepositoryGroup",
{
type: "POST",
@ -144,6 +146,10 @@ function() {
error: function(data) {
var res = $.parseJSON(data.responseText);
displayRestError(res);
},
complete:function(data){
$("#repository-group-save" ).button('reset');
removeMediumSpinnerImg("#user-messages");
}
}
);

View File

@ -1232,7 +1232,7 @@
{{/if}}
{{if repositoryGroup.modified()}}
<div class="span3">
<a href="#" class="btn btn-warning" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">${$.i18n.prop('save')}</a>
<a href="#" class="btn btn-warning" data-loading-text="${$.i18n.prop('common.loading')}" id="repository-group-save" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">${$.i18n.prop('save')}</a>
</div>
<br/>
{{/if}}