r100093 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100092‎ | r100093 | r100094 >
Date:22:45, 17 October 2011
Author:yaron
Status:deferred
Tags:
Comment:
Changed default with to be 90 columns, instead of 100%, if 'autogrow' is set, so that the Javascript will work
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php
@@ -58,6 +58,12 @@
5959
6060 if ( array_key_exists( 'cols', $other_args ) ) {
6161 $textarea_attrs['cols'] = $other_args['cols'];
 62+ } elseif ( array_key_exists( 'autogrow', $other_args ) ) {
 63+ // If 'autogrow' has been set, automatically set
 64+ // the number of columns - otherwise, the Javascript
 65+ // won't be able to know how many characters there
 66+ // are per line, and thus won't work.
 67+ $textarea_attrs['cols'] = 90;
6268 } else {
6369 $textarea_attrs['style'] = 'width: 100%';
6470 }