mirror of https://github.com/apache/archiva.git
switch button to toggle state while deleting
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99e5b54918
commit
5eb7e7af77
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue