http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90878
Revision: 90878
Author: janpaul123
Date: 2011-06-27 14:54:04 +0000 (Mon, 27 Jun 2011)
Log Message:
-----------
Fixed performance issue by commenting out a line for now. This line doesn't
make sense as it is only necessary to check for resizing when the *width* of
the textarea changed, and in this function we only change the height. This line
caused infinite recursion in Firefox. Will report this problem and proposed
solution upstream.
Modified Paths:
--------------
trunk/extensions/WikiLove/WikiLove.php
trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
trunk/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
Modified: trunk/extensions/WikiLove/WikiLove.php
===================================================================
--- trunk/extensions/WikiLove/WikiLove.php 2011-06-27 14:05:23 UTC (rev
90877)
+++ trunk/extensions/WikiLove/WikiLove.php 2011-06-27 14:54:04 UTC (rev
90878)
@@ -126,6 +126,7 @@
'jquery.ui.dialog',
'jquery.ui.button',
'jquery.localize',
+ 'jquery.elastic',
),
),
'ext.wikiLove.local' => array(
@@ -142,4 +143,9 @@
'messages' => $wgWikiLoveOptionMessages,
'dependencies' => 'ext.wikiLove.startup'
),
+ 'jquery.elastic' => array(
+ 'localBasePath' => dirname( __FILE__ ) .
'/modules/jquery.elastic',
+ 'remoteExtPath' => 'WikiLove/modules/jquery.elastic',
+ 'scripts' => 'jquery.elastic.js',
+ ),
);
Modified: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
===================================================================
--- trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
2011-06-27 14:05:23 UTC (rev 90877)
+++ trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
2011-06-27 14:54:04 UTC (rev 90878)
@@ -125,7 +125,7 @@
$( '#mw-wikilove-subtype' ).change(
$.wikiLove.changeSubtype );
$( '#mw-wikilove-preview-form' ).submit(
$.wikiLove.submitPreview );
$( '#mw-wikilove-send-form' ).click(
$.wikiLove.submitSend );
- $( '#mw-wikilove-message' ); // have the message
textarea grow automatically
+ $( '#mw-wikilove-message' ).elastic(); // have the
message textarea grow automatically
}
$dialog.dialog( 'open' );
Modified: trunk/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
===================================================================
--- trunk/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
2011-06-27 14:05:23 UTC (rev 90877)
+++ trunk/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
2011-06-27 14:54:04 UTC (rev 90878)
@@ -90,7 +90,7 @@
$textarea.css({'height':
curratedHeight + 'px','overflow':overflow});
// Fire the custom event resize
- $textarea.trigger('resize');
+ //$textarea.trigger('resize');
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs