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){
|
this.deleteProxyConnectorRule=function(proxyConnectorRule){
|
||||||
|
|
||||||
//FIXME modal dialog to confirm
|
|
||||||
//$("#proxy-connector-rule-delete-btn" ).button("loading");
|
//$("#proxy-connector-rule-delete-btn" ).button("loading");
|
||||||
$("#user-messages" ).html(mediumSpinnerImg());
|
$("#user-messages" ).html(mediumSpinnerImg());
|
||||||
$.ajax("restServices/archivaServices/proxyConnectorRuleService/deleteProxyConnectorRule",
|
$.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){
|
editProxyConnectorRule=function(proxyConnectorRule){
|
||||||
var proxyConnectorRuleViewModel=new ProxyConnectorRuleViewModel(proxyConnectorRule,self,true);
|
var proxyConnectorRuleViewModel=new ProxyConnectorRuleViewModel(proxyConnectorRule,self,true);
|
||||||
ko.applyBindings(proxyConnectorRuleViewModel,$("#main-content").find("#proxy-connector-rules-edit" ).get(0));
|
ko.applyBindings(proxyConnectorRuleViewModel,$("#main-content").find("#proxy-connector-rules-edit" ).get(0));
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
<p id="dialog-confirm-modal-body-text"></p>
|
<p id="dialog-confirm-modal-body-text"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-secondary" id="dialog-confirm-modal-cancel" href="#">${$.i18n.prop('cancel')}</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" href="#">${$.i18n.prop('ok')}</a>
|
<a class="btn btn-primary" id="dialog-confirm-modal-ok">${$.i18n.prop('ok')}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1303,7 +1303,7 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<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">
|
<span class="btn btn-danger">
|
||||||
<i class="icon-trash icon-white"/>
|
<i class="icon-trash icon-white"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue