[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: smdoc/lib/input input.textarea.php,1.3,1.4
From:       Erin Schnabel <ebullient () users ! sourceforge ! net>
Date:       2003-12-31 5:24:41
Message-ID: E1AbYqX-0003K0-00 () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/smdoc/lib/input
In directory sc8-pr-cvs1:/tmp/cvs-serv12643/input

Modified Files:
	input.textarea.php 
Log Message:
doc cleanup (minor), tweaks for object creation


Index: input.textarea.php
===================================================================
RCS file: /cvsroot/squirrelmail/smdoc/lib/input/input.textarea.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- input.textarea.php	6 Dec 2003 20:09:10 -0000	1.3
+++ input.textarea.php	31 Dec 2003 05:24:38 -0000	1.4
@@ -66,13 +66,24 @@
   {
     $maxlength = getRegexLength($this->regex, INPUT_TEXTAREA_WIDTH_MAX);
 
+    $name  = 'name="'.$this->name.'" ';
+    $value = 'value="'.htmlentities($this->value).'" ';
+    $class  = ( $class == NULL ) ? ''  : 'class="'.$class.'" ';
+    $maxlength = ( $maxlength == 0 )  ? ''   : 'maxlength="'.$maxlength.'" ';
+ 
     if ( $width == NULL )
+    {
+      if ( $class == '')
       $width = ($maxlength == 0) ? INPUT_TEXTAREA_WIDTH_MAX : (int) ($maxlength / 2);
-
+    }
+    else
+    {
     if ( $width > INPUT_TEXTAREA_WIDTH_MAX ) 
       $width = INPUT_TEXTAREA_WIDTH_MAX;
     elseif ( $width < INPUT_TEXTAREA_WIDTH_MIN )
       $width = INPUT_TEXTAREA_WIDTH_MIN;
+    }
+    $width = ( $width == NULL ) ? '' : 'cols="'.$width.'" ';
 
     if ( $height == NULL )
       $height = ($maxlength == 0) ? INPUT_TEXTAREA_HEIGHT_MAX : (int) ($maxlength / 10);
@@ -82,12 +93,7 @@
     elseif ( $height < INPUT_TEXTAREA_HEIGHT_MIN )
       $height = INPUT_TEXTAREA_HEIGHT_MIN;
 
-    $name  = 'name="'.$this->name.'" ';
-    $value = 'value="'.htmlentities($this->value).'" ';
-    $width = 'cols="'.$width.'" ';
     $height = 'rows="'.$height.'" ';
-    $class  = ( $class == NULL ) ? ''  : 'class="'.$class.'" ';
-    $maxlength = ( $maxlength == 0 )  ? ''   : 'maxlength="'.$maxlength.'" ';
 
     echo '<textarea '.$name.$width.$height.$class.'wrap="virtual" >'."\n"
          .htmlentities($this->value)."\n"



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic