diff --git a/media/js/base.js b/media/js/base.js index c752fd871c..142e0cb4e2 100644 --- a/media/js/base.js +++ b/media/js/base.js @@ -249,6 +249,29 @@ function addConfirmTo(op_ele, popup) { }); } +// Similar to ``addConfirmto``, instead using form post when user confirms. +function addConfirmTo_POST(op_ele, popup) { + op_ele.click(function() { + var con = ''; + if ($(this).data('target') && popup['con'].indexOf('%s') != -1) { + con = popup['con'].replace('%s', '' + HTMLescape($(this).data('target')) + ''); + } else { + con = popup['con']; + } + $('#confirm-con').html('
' + con + '
'); + $('#confirm-popup').modal({appendTo:'#main'}); + $('#simplemodal-container').css({'height':'auto'}); + $('#confirm-yes').data('url', $(this).data('url')).click(function() { + $('