projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring. Moved a member out of base class.
[timetracker.git]
/
WEB-INF
/
lib
/
form
/
TextArea.class.php
diff --git
a/WEB-INF/lib/form/TextArea.class.php
b/WEB-INF/lib/form/TextArea.class.php
index
887f8ad
..
8a4e20a
100644
(file)
--- a/
WEB-INF/lib/form/TextArea.class.php
+++ b/
WEB-INF/lib/form/TextArea.class.php
@@
-29,16
+29,16
@@
import('form.FormElement');
class TextArea extends FormElement {
import('form.FormElement');
class TextArea extends FormElement {
- var $mValue;
var $mPassword = false;
var $mColumns = "";
var $mRows = "";
var $mPassword = false;
var $mColumns = "";
var $mRows = "";
- var $cClassName = "TextArea";
+ var $cClassName = "TextArea";
+ var $mOnKeyPress = "";
- function
TextArea
($name,$value="")
+ function
__construct
($name,$value="")
{
{
- $this->
mName
= $name;
- $this->
mValue
= $value;
+ $this->
name
= $name;
+ $this->
value
= $value;
}
function setColumns($value) { $this->mColumns = $value; }
}
function setColumns($value) { $this->mColumns = $value; }
@@
-50,12
+50,12
@@
class TextArea extends FormElement {
function toStringControl() {
if (!$this->isRenderable()) return "";
function toStringControl() {
if (!$this->isRenderable()) return "";
- if ($this->
mId=="") $this->mI
d = $this->mName;
+ if ($this->
id=="") $this->i
d = $this->mName;
$js_maxlen = "";
$html = "\n\t<textarea";
$js_maxlen = "";
$html = "\n\t<textarea";
- $html .= " name=\"$this->
mName\" id=\"$this->mI
d\"";
+ $html .= " name=\"$this->
name\" id=\"$this->i
d\"";
if ($this->mColumns!="")
$html .= " cols=\"$this->mColumns\"";
if ($this->mColumns!="")
$html .= " cols=\"$this->mColumns\"";
@@
-63,11
+63,11
@@
class TextArea extends FormElement {
if ($this->mRows!="")
$html .= " rows=\"$this->mRows\"";
if ($this->mRows!="")
$html .= " rows=\"$this->mRows\"";
- if ($this->m
MaxL
ength!="") {
+ if ($this->m
ax_l
ength!="") {
if ($this->mOnKeyPress) $this->mOnKeyPress .= ";";
if ($this->mOnKeyPress) $this->mOnKeyPress .= ";";
- $this->mOnKeyPress .= "return validateMaxLenght_".$this->
mN
ame."(this, event);";
+ $this->mOnKeyPress .= "return validateMaxLenght_".$this->
n
ame."(this, event);";
$js_maxlen = $this->getExtraScript();
$js_maxlen = $this->getExtraScript();
- $html .= " maxlength=\"$this->m
MaxL
ength\"";
+ $html .= " maxlength=\"$this->m
ax_l
ength\"";
}
if ($this->mStyle!="")
}
if ($this->mStyle!="")
@@
-86,8
+86,8
@@
class TextArea extends FormElement {
function getExtraScript() {
$s = "<script>\n";
$s .= "var isNS4 = (navigator.appName==\"Netscape\")?1:0;\n";
function getExtraScript() {
$s = "<script>\n";
$s .= "var isNS4 = (navigator.appName==\"Netscape\")?1:0;\n";
- $s .= "function validateMaxLenght_".$this->
mN
ame."(element, event) {\n";
- $s .= "\tmaxlength=".$this->m
MaxL
ength.";\n";
+ $s .= "function validateMaxLenght_".$this->
n
ame."(element, event) {\n";
+ $s .= "\tmaxlength=".$this->m
ax_l
ength.";\n";
$s .= "\tvar iKey = (!isNS4?event.keyCode:event.which);\n";
//$s .= "alert(iKey);";
$s .= "\tvar re = new RegExp(\"".'\r\n'."\",\"g\");\n";
$s .= "\tvar iKey = (!isNS4?event.keyCode:event.which);\n";
//$s .= "alert(iKey);";
$s .= "\tvar re = new RegExp(\"".'\r\n'."\",\"g\");\n";