MT#6299 Introduce confirmation dialog

this is basically backported from the newer ngcp-panel
but using the existing jquery-ui
mr3.5.1
Gerhard Jungwirth 11 years ago
parent 9115f749de
commit 3e2f21fd6c

@ -48,6 +48,10 @@
margin-top: 30px;
}
#dataConfirmModal {
display: none;
}
a, a:visited, a:link,
.content .ui-state-default a, .content .ui-state-default a:visited,
.content .ui-state-default a:link {

@ -63,6 +63,17 @@
dateFormat: 'dd.mm.yy',
});
$( "#dataConfirmModal" ).dialog({ autoOpen: false, modal: true });
$( "#dataConfirmCancel" ).button({ });
$( "#dataConfirmOK" ).button({ });
$( "#dataConfirmCancel").click(function(){ $( "#dataConfirmModal" ).dialog( "close" ); return false; });
$(".button-delete , .button-terminate").parents("a").click(function(){
//show dialog here
var href = $(this).attr('href');
$('#dataConfirmOK').attr('href', href);
$( "#dataConfirmModal" ).dialog("open");
return false;
});
[%
buttons = [
@ -109,6 +120,12 @@
<body>
[% content %]
<div id="dataConfirmModal" class="modal" title="Are you sure?">
<a id="dataConfirmCancel">Cancel</a>
<a id="dataConfirmOK">OK</a>
</div>
</body>
</html>

Loading…
Cancel
Save