aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-10-15 14:10:55 +0000
committerOlivier Lamy <olamy@apache.org>2012-10-15 14:10:55 +0000
commit56450cc053965d2842fa207b1f8873c1d6b2f54e (patch)
tree160a64c368201eb39aa434c80710774ee546ee43
parentdb80856a3286385271f9b54b5fff323750a563ae (diff)
downloadarchiva-56450cc053965d2842fa207b1f8873c1d6b2f54e.tar.gz
archiva-56450cc053965d2842fa207b1f8873c1d6b2f54e.zip
use loading button feature while saving managed repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1398299 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js10
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html4
2 files changed, 11 insertions, 3 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
index 2b9db5b44..0de22a82c 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
@@ -201,6 +201,8 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
}
$.log("save:"+this.managedRepository.name());
clearUserMessages();
+ $("#user-messages").html(mediumSpinnerImg());
+ $("#managed-repository-save-button" ).button('loading');
if (this.update){
$.ajax("restServices/archivaServices/managedRepositoriesService/updateManagedRepository",
{
@@ -212,6 +214,10 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
displaySuccessMessage($.i18n.prop('managedrepository.updated',self.managedRepository.id()));
activateManagedRepositoriesGridTab();
self.managedRepository.modified(false);
+ },
+ complete: function(){
+ $("#managed-repository-save-button" ).button('reset');
+ removeMediumSpinnerImg("#user-messages");
}
}
);
@@ -233,6 +239,10 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
}else{
addManagedRepository(self.managedRepository);
}
+ },
+ complete: function(){
+ $("#managed-repository-save-button" ).button('reset');
+ removeMediumSpinnerImg("#user-messages");
}
});
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
index 8fe94fc79..09bf8e5f2 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
@@ -391,10 +391,8 @@
</div>
</div>
-
-
</fieldset>
- <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+ <button data-bind="click: save" class="btn" id="managed-repository-save-button">${$.i18n.prop('save')}</button>
<button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
</form>
</script>