From db80856a3286385271f9b54b5fff323750a563ae Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 15 Oct 2012 14:10:40 +0000 Subject: [PATCH] use loading button feature while saving remote repository git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1398298 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/repositories.js | 6 ++++++ .../src/main/webapp/js/templates/archiva/repositories.html | 2 +- .../archiva/webdav/ArchivaDavResourceFactoryTest.java | 2 +- 3 files changed, 8 insertions(+), 2 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 5e44b6e1c..2b9db5b44 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 @@ -785,6 +785,8 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery return; } clearUserMessages(); + $("#user-messages").html(mediumSpinnerImg()); + $("#remote-repository-save-button" ).button('loading'); if (update){ $.ajax("restServices/archivaServices/remoteRepositoriesService/updateRemoteRepository", { @@ -800,6 +802,10 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery error: function(data) { var res = $.parseJSON(data.responseText); displayRestError(res); + }, + complete: function(){ + $("#remote-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 c6a7f0604..8fe94fc79 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 @@ -627,7 +627,7 @@ - + diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java index 049bfab47..c7e3eea3a 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java @@ -38,6 +38,7 @@ import org.apache.archiva.repository.RepositoryContentFactory; import org.apache.archiva.repository.content.LegacyPathParser; import org.apache.archiva.repository.content.ManagedDefaultRepositoryContent; import org.apache.archiva.repository.content.RepositoryRequest; +import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavResourceLocator; @@ -57,7 +58,6 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; /** * ArchivaDavResourceFactoryTest