mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-12-13 10:06 am

[dw-free] Selecting a username before pressing the user-tag button in the RTE causes a JS error

[commit: http://hg.dwscoalition.org/dw-free/rev/32c4e549d7a2]

http://bugs.dwscoalition.org/show_bug.cgi?id=2225

Fix broken 'select username and turn into link' behavior in RTE.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
--------------------------------------------------------------------------------
diff -r 07180fbb157d -r 32c4e549d7a2 htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
--- a/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	Sun Dec 13 10:04:06 2009 +0000
+++ b/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	Sun Dec 13 10:06:54 2009 +0000
@@ -11,6 +11,7 @@ LJUserCommand.Execute=function() {
 LJUserCommand.Execute=function() {
     var username;
     var selection = '';
+    var UserTagCache = window.parent.UserTagCache;
 
     if (FCK.EditorWindow.getSelection) {
         selection = FCK.EditorWindow.getSelection();
@@ -91,7 +92,6 @@ LJUserCommand.Execute=function() {
         do_insert( username );
     } else {
         var DOM = window.parent.DOM;
-        var UserTagCache = window.parent.UserTagCache;
         var _textDiv = window.parent._textDiv;
         var userPopup = new window.parent.LJ_IPPU( window.parent.FCKLang.UserPrompt );
         userPopup.hide =   function() {
--------------------------------------------------------------------------------