1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-22 03:16:34 +00:00

fixed bug in addConfirmTo function

This commit is contained in:
llj
2013-03-02 21:01:11 +08:00
parent 14f1dad39f
commit 7a384cd486

View File

@@ -51,10 +51,13 @@ $(document).click(function(e) {
*/
function addConfirmTo(op_ele, popup) {
op_ele.click(function() {
var con = '';
if ($(this).data('target') && popup['con'].indexOf('%s') != -1) {
popup['con'] = popup['con'].replace('%s', '<span class="op-target">' + $(this).data('target') + '</span>');
con = popup['con'].replace('%s', '<span class="op-target">' + $(this).data('target') + '</span>');
} else {
con = popup['con'];
}
$('#confirm-con').html('<h3>' + popup['title'] + '</h3><p>' + popup['con'] + '</p>');
$('#confirm-con').html('<h3>' + popup['title'] + '</h3><p>' + con + '</p>');
$('#confirm-popup').modal({appendTo:'#main'});
$('#simplemodal-container').css({'height':'auto'});
$('#confirm-yes').data('url', $(this).data('url')).click(function() {