From 3e2f21fd6cde7d4d01dd6015c48225020999c4c5 Mon Sep 17 00:00:00 2001 From: Gerhard Jungwirth Date: Mon, 25 Aug 2014 17:08:13 +0300 Subject: [PATCH] MT#6299 Introduce confirmation dialog this is basically backported from the newer ngcp-panel but using the existing jquery-ui --- root/css/admin.css | 4 ++++ root/layout/html | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/root/css/admin.css b/root/css/admin.css index 3e4b670..efe1c67 100644 --- a/root/css/admin.css +++ b/root/css/admin.css @@ -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 { diff --git a/root/layout/html b/root/layout/html index 5484b4c..6f9b9bf 100644 --- a/root/layout/html +++ b/root/layout/html @@ -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 @@ [% content %] + + +