From 780ab9457100da7f96656a9bf97cb512b5c69a6e Mon Sep 17 00:00:00 2001 From: Lukasz Anwajler Date: Mon, 23 Aug 2010 17:14:34 -0500 Subject: [PATCH] Shorter XML error message in WYSIWYG editor. --- redakcja/static/js/wiki/view_editor_wysiwyg.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 5f450622..5fcca87e 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -91,7 +91,6 @@ // BUG #273 - selected text can contain themes, which should be omitted from // defining term var text = html2plainText(range.cloneContents()); - var tag = $(''); range.collapse(false); range.insertNode(tag[0]); @@ -486,11 +485,11 @@ _finalize(success); }, error: function(text){ - var message = $('
');
-                message.text(text);
-                $('#html-view').html('

Wystąpił błąd:

' +
-                message.html() +
-                '
'); + /* only basic error message */ + var errorArray = text.split("\n"); + var errorLocation = errorArray[2].split(":")[0]; + text = errorLocation; + $('#html-view').html('

Wystąpił błąd: '+ text + '

'); _finalize(failure); } }); -- 2.20.1