r73588 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73587‎ | r73588 | r73589 >
Date:05:26, 23 September 2010
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: Fix editing LiquidThreads posts when the UsabilityInitiative iframe is being used.
Modified paths:
  • /trunk/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/lqt.js
@@ -847,8 +847,16 @@
848848 'handleAJAXSave' : function( e ) {
849849 var editform = $j(this).closest('.lqt-edit-form');
850850 var type = editform.find('input[name=lqt_method]').val();
851 -
852 - var text = editform.find('#wpTextbox1').val();
 851+ var wikiEditorContext = editform.find('#wpTextbox1').data( 'wikiEditor-context' );
 852+ var text;
 853+
 854+ if ( !wikiEditorContext || typeof(wikiEditorContext) == 'undefined' ||
 855+ ! wikiEditorContext.$iframe) {
 856+ text = editform.find('#wpTextbox1').val();
 857+ } else {
 858+ text = wikiEditorContext.$textarea.textSelection( 'getContents' );
 859+ }
 860+
853861 var summary = editform.find('#wpSummary').val();
854862
855863 var signature;

Status & tagging log