вопрос
Как вот в это:
Воткнуть вот это(mfp)?:
function AddComplaint( id, action ){
var b = {};
var mailpromt = '';
b[dle_act_lang[3]] = function() {
$(this).dialog('close');
};
b[dle_p_send] = function() {
if ( $('#dle-promt-text').val().length < 1) {
$('#dle-promt-text').addClass('ui-state-error');
} else {
var response = $('#dle-promt-text').val();
var entermail = '';
if ( $('#dle-promt-mail').val() ) {
entermail = $('#dle-promt-mail').val();
}
$(this).dialog('close');
$('#dlepopup').remove();
$.post(dle_root + 'engine/ajax/controller.php?mod=complaint', { id: id, text: response, action: action, mail: entermail, user_hash: dle_login_hash },
function(data){
if (data == 'ok') { DLEalert(dle_p_send_ok, dle_info); } else { DLEalert(data, dle_info); }
});
}
};
$('#dlepopup').remove();
if(dle_group == 5) {
mailpromt = dle_mail+"<br><input type=\"text\" name=\"dle-promt-mail\" id=\"dle-promt-mail\" class=\"ui-widget-content ui-corner-all\" style=\"width:100%;\" value=\"\">";
}
$('body').append("<div id='dlepopup' title='"+dle_c_title+"' style='display:none'>"+dle_complaint+"<br><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:100%;height:100px;'></textarea>"+mailpromt+"</div>");
$('#dlepopup').dialog({
autoOpen: true,
width: 600,
resizable: false,
dialogClass: "modalfixed dle-popup-complaint",
buttons: b
});
$('.modalfixed.ui-dialog').css({position:"fixed"});
$('#dlepopup').dialog( "option", "position", { my: "center", at: "center", of: window } );
};
Воткнуть вот это(mfp)?:
$.magnificPopup.open({
items: {
src: '<div style="width:400px;background:#FFF;position:relative;margin:0 auto;"> <div class="p-3"><b>'+ title +'</b> <hr> <center>'+ message +'</center></div> </div>'
},
type: 'inline',
mainClass: 'mfp-fade',
removalDelay: 170,
overflowY: 'hide',
closeOnBgClick: true,
showCloseBtn: true
});