mirror of https://github.com/apache/archiva.git
open a confirm modial dialog to ask confirmation for deletion
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1393183 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f94548ed6
commit
abfde6364a
|
@ -104,9 +104,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
);
|
||||
}
|
||||
|
||||
removeProxyConnectorRule=function(proxyConnectorRule){
|
||||
|
||||
//FIXME modal dialog to confirm
|
||||
this.deleteProxyConnectorRule=function(proxyConnectorRule){
|
||||
//$("#proxy-connector-rule-delete-btn" ).button("loading");
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
$.ajax("restServices/archivaServices/proxyConnectorRuleService/deleteProxyConnectorRule",
|
||||
|
@ -132,6 +130,15 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
);
|
||||
}
|
||||
|
||||
removeProxyConnectorRule=function(proxyConnectorRule){
|
||||
|
||||
openDialogConfirm(
|
||||
function(){self.deleteProxyConnectorRule(proxyConnectorRule);window.modalConfirmDialog.modal('hide')},
|
||||
$.i18n.prop('ok'), $.i18n.prop('cancel'),
|
||||
$.i18n.prop('proxy-connector-rule.delete.confirm',proxyConnectorRule.pattern()),"");
|
||||
|
||||
}
|
||||
|
||||
editProxyConnectorRule=function(proxyConnectorRule){
|
||||
var proxyConnectorRuleViewModel=new ProxyConnectorRuleViewModel(proxyConnectorRule,self,true);
|
||||
ko.applyBindings(proxyConnectorRuleViewModel,$("#main-content").find("#proxy-connector-rules-edit" ).get(0));
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
<p id="dialog-confirm-modal-body-text"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-secondary" id="dialog-confirm-modal-cancel" href="#">${$.i18n.prop('cancel')}</a>
|
||||
<a class="btn btn-primary" id="dialog-confirm-modal-ok" href="#">${$.i18n.prop('ok')}</a>
|
||||
<a class="btn btn-secondary" id="dialog-confirm-modal-cancel">${$.i18n.prop('cancel')}</a>
|
||||
<a class="btn btn-primary" id="dialog-confirm-modal-ok">${$.i18n.prop('ok')}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1303,7 +1303,7 @@
|
|||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" data-bind="click: function(){ removeProxyConnectorRule(row) }" data-loading-text="${$.i18n.prop('common.loading')}">
|
||||
<a data-bind="click: function(){ removeProxyConnectorRule(row) }" data-loading-text="${$.i18n.prop('common.loading')}">
|
||||
<span class="btn btn-danger">
|
||||
<i class="icon-trash icon-white"/>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue