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

Revision: 100093
Author:   yaron
Date:     2011-10-17 22:45:22 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
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: 
trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php
===================================================================
--- trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php     
2011-10-17 22:35:10 UTC (rev 100092)
+++ trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php     
2011-10-17 22:45:22 UTC (rev 100093)
@@ -58,6 +58,12 @@
 
                if ( array_key_exists( 'cols', $other_args ) ) {
                        $textarea_attrs['cols'] = $other_args['cols'];
+               } elseif ( array_key_exists( 'autogrow', $other_args ) ) {
+                       // If 'autogrow' has been set, automatically set
+                       // the number of columns - otherwise, the Javascript
+                       // won't be able to know how many characters there
+                       // are per line, and thus won't work.
+                       $textarea_attrs['cols'] = 90;
                } else {
                        $textarea_attrs['style'] = 'width: 100%';
                }


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

Reply via email to