http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73588

Revision: 73588
Author:   werdna
Date:     2010-09-23 05:26:53 +0000 (Thu, 23 Sep 2010)

Log Message:
-----------
LiquidThreads: Fix editing LiquidThreads posts when the UsabilityInitiative 
iframe is being used.

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/lqt.js

Modified: trunk/extensions/LiquidThreads/lqt.js
===================================================================
--- trunk/extensions/LiquidThreads/lqt.js       2010-09-23 02:59:07 UTC (rev 
73587)
+++ trunk/extensions/LiquidThreads/lqt.js       2010-09-23 05:26:53 UTC (rev 
73588)
@@ -847,8 +847,16 @@
        'handleAJAXSave' : function( e ) {
                var editform = $j(this).closest('.lqt-edit-form');
                var type = editform.find('input[name=lqt_method]').val();
-
-               var text = editform.find('#wpTextbox1').val();
+               var wikiEditorContext = editform.find('#wpTextbox1').data( 
'wikiEditor-context' );
+               var text;
+               
+               if ( !wikiEditorContext || typeof(wikiEditorContext) == 
'undefined' ||
+                               ! wikiEditorContext.$iframe) {
+                       text = editform.find('#wpTextbox1').val();
+               } else {
+                       text = wikiEditorContext.$textarea.textSelection( 
'getContents' );
+               }
+               
                var summary = editform.find('#wpSummary').val();
 
                var signature;



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to