Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[livejournal] r16272: LJSV-818: Canceling lj-cut prompt in RTE...

Committer: pkornilov
LJSV-818: Canceling lj-cut prompt in RTE still generates lj-cut in entry.
U   trunk/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
Modified: trunk/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
===================================================================
--- trunk/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	2010-02-24 10:53:50 UTC (rev 16271)
+++ trunk/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	2010-02-24 10:59:50 UTC (rev 16272)
@@ -175,13 +175,17 @@
 			cut_node.setAttribute('text', text) :
 			cut_node.removeAttribute('text');
 	} else {
-		var text = prompt(top.FCKLang.CutPrompt, top.FCKLang.ReadMore),
+		var text = prompt(top.FCKLang.CutPrompt, top.FCKLang.ReadMore);
+		
+		if (text == null) {
+			return;
+		}
+		
+		var cut_node = FCK.EditorDocument.createElement('lj-cut'),
 			range = new FCKDomRange(FCK.EditorWindow);
 		
 		range.MoveToSelection();
 		
-		var cut_node = FCK.EditorDocument.createElement('lj-cut');
-		
 		if (text && text != top.FCKLang.ReadMore) {
 			cut_node.setAttribute('text', text);
 		}

Tags: js, livejournal, lusever
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments