From e3c58f83cfdd160f27e83192795e90096aeb07df Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 12 Feb 2017 18:48:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BE=D0=BA=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/my.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/static/js/my.js b/static/js/my.js index cfb606b..65870df 100644 --- a/static/js/my.js +++ b/static/js/my.js @@ -1,18 +1,24 @@ -function show_Modal(title, content, type_class){ - $('#modContent').html(''+content); +function show_ModalMyContent(content){ + $('#modContent').html(content); $('#modFrm').modal(); } - -function errShow(errContent) { - show_Modal('Ошибка', '', 'warning'); +function show_Modal(title, content, type_class){ +var cnt='' + + '' + + ''; + 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); });