From 5eb7e7af77ca65d9d3b82ec23c0f0a7fd0e26591 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 12 Oct 2012 22:16:41 +0000 Subject: switch button to toggle state while deleting git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397732 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp-js/src/main/webapp/js/archiva/search.js | 6 ++++++ .../src/main/webapp/js/templates/archiva/modal.html | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'archiva-modules/archiva-web/archiva-webapp-js') diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index 24a0d152e..b1ac8efea 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -107,6 +107,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno var previousHash=getUrlHash(); $.log("previousHash:"+previousHash); openDialogConfirm(function(){ + $("#dialog-confirm-modal-ok").button('loading'); $.ajax({ url:"restServices/archivaServices/repositoriesService/deleteGroupId?groupId="+groupId+"&repositoryId="+repoId, type:"GET", @@ -119,6 +120,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno displayRestError(data,"user-messages"); }, complete:function(){ + $("#dialog-confirm-modal-ok").button('reset'); closeDialogConfirm(); } }); @@ -222,6 +224,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno clearUserMessages(); var artifact = new Artifact(repoId,null,self.groupId,self.artifactId,repoId,version); openDialogConfirm(function(){ + $("#dialog-confirm-modal-ok").button('loading'); $.ajax({ url:"restServices/archivaServices/repositoriesService/deleteArtifact", type:"POST", @@ -236,6 +239,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno displayRestError( data,"user-messages"); }, complete:function(){ + $("#dialog-confirm-modal-ok").button('reset'); closeDialogConfirm(); } }); @@ -603,6 +607,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno clearUserMessages(); openDialogConfirm(function(){ + $("#dialog-confirm-modal-ok").button('loading'); $.ajax({ url:"restServices/archivaServices/repositoriesService/deleteArtifact", type:"POST", @@ -627,6 +632,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno displayRestError(data,"user-messages"); }, complete:function(){ + $("#dialog-confirm-modal-ok").button('reset'); closeDialogConfirm(); } }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/modal.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/modal.html index 811ab31c3..aebb5c88e 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/modal.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/modal.html @@ -25,7 +25,7 @@

@@ -37,5 +37,4 @@ - -- cgit v1.2.3