diff options
author | Olivier Lamy <olamy@apache.org> | 2012-10-12 22:16:41 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-10-12 22:16:41 +0000 |
commit | 5eb7e7af77ca65d9d3b82ec23c0f0a7fd0e26591 (patch) | |
tree | 65b567c9f96acff72af100931aa29716be2fd22d /archiva-modules/archiva-web/archiva-webapp-js | |
parent | 99e5b549189d7465ee1d3262aef807de67f5da20 (diff) | |
download | archiva-5eb7e7af77ca65d9d3b82ec23c0f0a7fd0e26591.tar.gz archiva-5eb7e7af77ca65d9d3b82ec23c0f0a7fd0e26591.zip |
switch button to toggle state while deleting
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397732 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-js')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js | 6 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/modal.html | 3 |
2 files changed, 7 insertions, 2 deletions
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 @@ <p id="dialog-confirm-modal-body-text"></p> </div> <div class="modal-footer"> - <a class="btn btn-secondary" id="dialog-confirm-modal-cancel">${$.i18n.prop('cancel')}</a> + <a class="btn btn-secondary" id="dialog-confirm-modal-cancel" data-loading-text="${$.i18n.prop('common.loading')}">${$.i18n.prop('cancel')}</a> <a class="btn btn-primary" id="dialog-confirm-modal-ok">${$.i18n.prop('ok')}</a> </div> </div> @@ -37,5 +37,4 @@ </div> <div class="modal-body" id="dialog-modal-merge-repo-body-text">> </div> - </div> |