|
|
|
@ -1,18 +1,24 @@ |
|
|
|
function show_Modal(title, content, type_class){ |
|
|
|
$('#modContent').html('<div class="modal-header '+type_class+'">\ |
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>\ |
|
|
|
<h4 class="modal-title"><span class="glyphicon glyphicon-warning-sign"></span>'+title+'</h4>\ |
|
|
|
</div>'+content); |
|
|
|
function show_ModalMyContent(content){ |
|
|
|
$('#modContent').html(content); |
|
|
|
$('#modFrm').modal(); |
|
|
|
} |
|
|
|
|
|
|
|
function errShow(errContent) { |
|
|
|
show_Modal('Ошибка', '<div class="modal-body">'+errContent+'</div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button></div>', 'warning'); |
|
|
|
function show_Modal(title, content, type_class){ |
|
|
|
var cnt='<div class="modal-header '+type_class+'">' + |
|
|
|
'<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>' + |
|
|
|
'<h4 class="modal-title"><span class="glyphicon glyphicon-warning-sign"></span>'+title+'</h4>' + |
|
|
|
'</div>' + |
|
|
|
'<div class="modal-body">'+content+'</div>' + |
|
|
|
'<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button></div>'; |
|
|
|
show_ModalMyContent(cnt); |
|
|
|
} |
|
|
|
|
|
|
|
function showErr(errContent) {show_Modal('Ошибка', errContent, 'warning');} |
|
|
|
function showSuccess(errContent) {show_Modal('Успешно', errContent, 'success');} |
|
|
|
function showPrimary(errContent) {show_Modal('Внимание!', errContent, 'primary');} |
|
|
|
|
|
|
|
$(document).ajaxError(function (ev, jqXHR, ajaxSettings, thrownError) { |
|
|
|
//loaderShow(false);
|
|
|
|
errShow(jqXHR.status + ': ' + jqXHR.statusText); |
|
|
|
showErr(jqXHR.status + ': ' + jqXHR.statusText); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|