projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6e59f47
)
Ongoing refactoring - renamed a variable.
author
anuko
<support@anuko.com>
Sun, 19 Feb 2017 22:14:28 +0000
(22:14 +0000)
committer
anuko
<support@anuko.com>
Sun, 19 Feb 2017 22:14:28 +0000
(22:14 +0000)
14 files changed:
WEB-INF/lib/form/Calendar.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Checkbox.class.php
patch
|
blob
|
history
WEB-INF/lib/form/CheckboxGroup.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Combobox.class.php
patch
|
blob
|
history
WEB-INF/lib/form/DateField.class.php
patch
|
blob
|
history
WEB-INF/lib/form/FloatField.class.php
patch
|
blob
|
history
WEB-INF/lib/form/FormElement.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Hidden.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Submit.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Table.class.php
patch
|
blob
|
history
WEB-INF/lib/form/TextArea.class.php
patch
|
blob
|
history
WEB-INF/lib/form/TextField.class.php
patch
|
blob
|
history
WEB-INF/lib/form/UploadFile.class.php
patch
|
blob
|
history
WEB-INF/templates/footer.tpl
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/form/Calendar.class.php
b/WEB-INF/lib/form/Calendar.class.php
index
46fcd6e
..
a64a035
100644
(file)
--- a/
WEB-INF/lib/form/Calendar.class.php
+++ b/
WEB-INF/lib/form/Calendar.class.php
@@
-90,7
+90,7
@@
class Calendar extends FormElement {
function toString($date="") {
global $i18n;
function toString($date="") {
global $i18n;
- $indate = $this->
mV
alue;
+ $indate = $this->
v
alue;
if (!$indate) $indate = strftime(DB_DATEFORMAT);
if (!$this->isRenderable()) return "";
if (!$indate) $indate = strftime(DB_DATEFORMAT);
if (!$this->isRenderable()) return "";
diff --git
a/WEB-INF/lib/form/Checkbox.class.php
b/WEB-INF/lib/form/Checkbox.class.php
index
8ee4fea
..
6822adf
100644
(file)
--- a/
WEB-INF/lib/form/Checkbox.class.php
+++ b/
WEB-INF/lib/form/Checkbox.class.php
@@
-35,8
+35,8
@@
class Checkbox extends FormElement {
function __construct($name,$value="")
{
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setChecked($value) { $this->mChecked = $value; }
}
function setChecked($value) { $this->mChecked = $value; }
@@
-62,7
+62,7
@@
class Checkbox extends FormElement {
if ($this->mStyle!="")
$html .= " style=\"$this->mStyle\"";
if ($this->mStyle!="")
$html .= " style=\"$this->mStyle\"";
- if ($this->mChecked || (($this->
mValue == $this->mOptions) && ($this->mV
alue != null)))
+ if ($this->mChecked || (($this->
value == $this->mOptions) && ($this->v
alue != null)))
$html .= " checked=\"true\"";
if (!$this->isEnable())
$html .= " checked=\"true\"";
if (!$this->isEnable())
diff --git
a/WEB-INF/lib/form/CheckboxGroup.class.php
b/WEB-INF/lib/form/CheckboxGroup.class.php
index
759a076
..
13f207d
100644
(file)
--- a/
WEB-INF/lib/form/CheckboxGroup.class.php
+++ b/
WEB-INF/lib/form/CheckboxGroup.class.php
@@
-41,8
+41,8
@@
class CheckboxGroup extends FormElement {
function __construct($name,$value="")
{
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setChecked($value) { $this->mChecked = $value; }
}
function setChecked($value) { $this->mChecked = $value; }
@@
-87,9
+87,9
@@
class CheckboxGroup extends FormElement {
$optval = $optval[$this->mDataKeys[1]];
}
$html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
$optval = $optval[$this->mDataKeys[1]];
}
$html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
- if (is_array($this->
mV
alue)) {
- foreach ($this->
mValue as $value
) {
- if (($
value == $optkey) && ($value
!= null))
+ if (is_array($this->
v
alue)) {
+ foreach ($this->
value as $element
) {
+ if (($
element == $optkey) && ($element
!= null))
$html .= " checked=\"true\"";
}
}
$html .= " checked=\"true\"";
}
}
@@
-115,9
+115,9
@@
class CheckboxGroup extends FormElement {
$optval = $optval[$this->mDataKeys[1]];
}
$html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
$optval = $optval[$this->mDataKeys[1]];
}
$html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
- if (is_array($this->
mV
alue)) {
- foreach ($this->
mValue as $value
) {
- if (($
value == $optkey) && ($value
!= null))
+ if (is_array($this->
v
alue)) {
+ foreach ($this->
value as $element
) {
+ if (($
element == $optkey) && ($element
!= null))
$html .= " checked=\"true\"";
}
}
$html .= " checked=\"true\"";
}
}
diff --git
a/WEB-INF/lib/form/Combobox.class.php
b/WEB-INF/lib/form/Combobox.class.php
index
0e8ec06
..
082765e
100644
(file)
--- a/
WEB-INF/lib/form/Combobox.class.php
+++ b/
WEB-INF/lib/form/Combobox.class.php
@@
-48,8
+48,8
@@
class Combobox extends FormElement {
function __construct($name,$value="")
{
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setMultiple($value) { $this->mMultiple = $value; }
}
function setMultiple($value) { $this->mMultiple = $value; }
@@
-95,7
+95,7
@@
class Combobox extends FormElement {
if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))
foreach ($this->mOptionsEmpty as $key=>$value) {
$html .= "<option value=\"".$key."\"";
if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))
foreach ($this->mOptionsEmpty as $key=>$value) {
$html .= "<option value=\"".$key."\"";
- if (($this->
mValue == $value) && ($this->mV
alue != '')) $html .= " selected";
+ if (($this->
value == $value) && ($this->v
alue != '')) $html .= " selected";
$html .= ">".$value."</option>\n";
}
if (is_array($this->mOptions) && (count($this->mOptions) > 0))
$html .= ">".$value."</option>\n";
}
if (is_array($this->mOptions) && (count($this->mOptions) > 0))
@@
-106,7
+106,7
@@
class Combobox extends FormElement {
$value = $value[$this->mDataKeys[1]];
}
$html .= "<option value=\"".$key."\"";
$value = $value[$this->mDataKeys[1]];
}
$html .= "<option value=\"".$key."\"";
- if (($this->
mValue == $key) && ($this->mV
alue != '')) $html .= " selected";
+ if (($this->
value == $key) && ($this->v
alue != '')) $html .= " selected";
$html .= ">".htmlspecialchars($value)."</option>\n";
}
$html .= ">".htmlspecialchars($value)."</option>\n";
}
diff --git
a/WEB-INF/lib/form/DateField.class.php
b/WEB-INF/lib/form/DateField.class.php
index
24266a3
..
7075c42
100644
(file)
--- a/
WEB-INF/lib/form/DateField.class.php
+++ b/
WEB-INF/lib/form/DateField.class.php
@@
-68,13
+68,13
@@
class DateField extends TextField {
function setValueSafe($value) {
if (isset($value) && (strlen($value) > 0)) {
$this->mDateObj->parseVal($value, DB_DATEFORMAT);
function setValueSafe($value) {
if (isset($value) && (strlen($value) > 0)) {
$this->mDateObj->parseVal($value, DB_DATEFORMAT);
- $this->
mV
alue = $this->mDateObj->toString($this->mDateFormat); //?
+ $this->
v
alue = $this->mDateObj->toString($this->mDateFormat); //?
}
}
// get value for storing in session or database
function getValueSafe() {
}
}
// get value for storing in session or database
function getValueSafe() {
- if (strlen($this->
mV
alue)>0) {
- $this->mDateObj->parseVal($this->
mV
alue, $this->mDateFormat); //?
+ if (strlen($this->
v
alue)>0) {
+ $this->mDateObj->parseVal($this->
v
alue, $this->mDateFormat); //?
return $this->mDateObj->toString(DB_DATEFORMAT);
} else {
return null;
return $this->mDateObj->toString(DB_DATEFORMAT);
} else {
return null;
diff --git
a/WEB-INF/lib/form/FloatField.class.php
b/WEB-INF/lib/form/FloatField.class.php
index
298e09b
..
b5f8d0d
100644
(file)
--- a/
WEB-INF/lib/form/FloatField.class.php
+++ b/
WEB-INF/lib/form/FloatField.class.php
@@
-54,19
+54,19
@@
class FloatField extends TextField {
$value = sprintf('%'.$this->mFFormat.'f', $value);
$value = str_replace('.', $this->mDelimiter, $value);
}
$value = sprintf('%'.$this->mFFormat.'f', $value);
$value = str_replace('.', $this->mDelimiter, $value);
}
- $this->
mV
alue = $value;
+ $this->
v
alue = $value;
}
function setValueSafe($value) {
// '.' to ',' , apply delimiter
if (strlen($value) > 0)
}
function setValueSafe($value) {
// '.' to ',' , apply delimiter
if (strlen($value) > 0)
- $this->
mV
alue = str_replace('.', $this->mDelimiter, $value);
+ $this->
v
alue = str_replace('.', $this->mDelimiter, $value);
}
function getValueSafe() {
// ',' to '.'
}
function getValueSafe() {
// ',' to '.'
- if (strlen($this->
mV
alue) > 0)
- return str_replace($this->mDelimiter, '.', $this->
mV
alue);
+ if (strlen($this->
v
alue) > 0)
+ return str_replace($this->mDelimiter, '.', $this->
v
alue);
return null;
}
}
return null;
}
}
diff --git
a/WEB-INF/lib/form/FormElement.class.php
b/WEB-INF/lib/form/FormElement.class.php
index
f46e3bf
..
209578d
100644
(file)
--- a/
WEB-INF/lib/form/FormElement.class.php
+++ b/
WEB-INF/lib/form/FormElement.class.php
@@
-28,10
+28,11
@@
// FromElement is the base class for controls on forms.
class FormElement {
// FromElement is the base class for controls on forms.
class FormElement {
- var $id =
""
;
+ var $id =
''
;
var $name;
var $name;
- var $form_name = "";
- var $mValue = "";
+ var $form_name = '';
+ var $value = '';
+ // TODO: refactoring ongoing down from here.
var $mSize = "";
var $mMaxLength = "";
var $mTabindex = "";
var $mSize = "";
var $mMaxLength = "";
var $mTabindex = "";
@@
-53,17
+54,17
@@
class FormElement {
function getClass() { return $this->cClassName; }
function getClass() { return $this->cClassName; }
- function setName($name) { $this->name = $name;
}
+ function setName($name) { $this->name = $name; }
function getName() { return $this->name; }
function setFormName($name) { $this->form_name = $name; }
function getFormName() { return $this->form_name; }
function getName() { return $this->name; }
function setFormName($name) { $this->form_name = $name; }
function getFormName() { return $this->form_name; }
- function setValue($value)
{ $this->mV
alue = $value;}
- function getValue() { return $this->
mV
alue; }
+ function setValue($value)
{ $this->v
alue = $value;}
+ function getValue() { return $this->
v
alue; }
- function setValueSafe($value)
{ $this->mV
alue = $value;}
- function getValueSafe() { return $this->
mV
alue; }
+ function setValueSafe($value)
{ $this->v
alue = $value;}
+ function getValueSafe() { return $this->
v
alue; }
function setId($id) { $this->id = $id; }
function getId() { return $this->id; }
function setId($id) { $this->id = $id; }
function getId() { return $this->id; }
diff --git
a/WEB-INF/lib/form/Hidden.class.php
b/WEB-INF/lib/form/Hidden.class.php
index
0105de1
..
cddb223
100644
(file)
--- a/
WEB-INF/lib/form/Hidden.class.php
+++ b/
WEB-INF/lib/form/Hidden.class.php
@@
-29,13
+29,12
@@
import('form.FormElement');
class Hidden extends FormElement {
import('form.FormElement');
class Hidden extends FormElement {
- var $mValue;
var $cClassName = "Hidden";
function __construct($name,$value="")
{
var $cClassName = "Hidden";
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function toStringControl() {
}
function toStringControl() {
diff --git
a/WEB-INF/lib/form/Submit.class.php
b/WEB-INF/lib/form/Submit.class.php
index
bcfe3be
..
c4a2c0d
100644
(file)
--- a/
WEB-INF/lib/form/Submit.class.php
+++ b/
WEB-INF/lib/form/Submit.class.php
@@
-33,8
+33,8
@@
class Submit extends FormElement {
function __construct($name,$value="")
{
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function toStringControl() {
}
function toStringControl() {
@@
-49,7
+49,7
@@
class Submit extends FormElement {
$html .= " disabled=\"true\"";
}
$html .= " disabled=\"true\"";
}
- $html .= " value=\"$this->
mV
alue\"";
+ $html .= " value=\"$this->
v
alue\"";
if ($this->mOnClick) {
$html .= " onclick=\"".$this->mOnClick."\"";
if ($this->mOnClick) {
$html .= " onclick=\"".$this->mOnClick."\"";
diff --git
a/WEB-INF/lib/form/Table.class.php
b/WEB-INF/lib/form/Table.class.php
index
833bffa
..
44685d4
100644
(file)
--- a/
WEB-INF/lib/form/Table.class.php
+++ b/
WEB-INF/lib/form/Table.class.php
@@
-49,7
+49,7
@@
class Table extends FormElement {
function __construct($name, $value='') {
$this->name = $name;
function __construct($name, $value='') {
$this->name = $name;
- $this->
mV
alue = $value;
+ $this->
v
alue = $value;
}
function setKeyField($value) {
}
function setKeyField($value) {
@@
-160,8
+160,8
@@
class Table extends FormElement {
if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
// Checkbox for the row. Determine if selected.
$selected = false;
if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
// Checkbox for the row. Determine if selected.
$selected = false;
- if (is_array($this->
mV
alue)) {
- foreach ($this->
mV
alue as $p) {
+ if (is_array($this->
v
alue)) {
+ foreach ($this->
v
alue as $p) {
if ($p == $this->mData[$row][$this->mKeyField]) {
$selected = true;
break;
if ($p == $this->mData[$row][$this->mKeyField]) {
$selected = true;
break;
diff --git
a/WEB-INF/lib/form/TextArea.class.php
b/WEB-INF/lib/form/TextArea.class.php
index
ecc2010
..
6b3b5ee
100644
(file)
--- a/
WEB-INF/lib/form/TextArea.class.php
+++ b/
WEB-INF/lib/form/TextArea.class.php
@@
-29,7
+29,6
@@
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 = "";
@@
-37,8
+36,8
@@
class TextArea extends FormElement {
function __construct($name,$value="")
{
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setColumns($value) { $this->mColumns = $value; }
}
function setColumns($value) { $this->mColumns = $value; }
diff --git
a/WEB-INF/lib/form/TextField.class.php
b/WEB-INF/lib/form/TextField.class.php
index
e1259d6
..
4766d91
100644
(file)
--- a/
WEB-INF/lib/form/TextField.class.php
+++ b/
WEB-INF/lib/form/TextField.class.php
@@
-29,14
+29,13
@@
import('form.FormElement');
class TextField extends FormElement {
import('form.FormElement');
class TextField extends FormElement {
- var $mValue;
var $mPassword = false;
var $cClassName = "TextField";
function __construct($name,$value="")
{
var $mPassword = false;
var $cClassName = "TextField";
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setAsPassword($name) { $this->mPassword = $name; }
}
function setAsPassword($name) { $this->mPassword = $name; }
diff --git
a/WEB-INF/lib/form/UploadFile.class.php
b/WEB-INF/lib/form/UploadFile.class.php
index
98fbe0a
..
97a2a8c
100644
(file)
--- a/
WEB-INF/lib/form/UploadFile.class.php
+++ b/
WEB-INF/lib/form/UploadFile.class.php
@@
-29,14
+29,13
@@
import('form.FormElement');
class UploadFile extends FormElement {
import('form.FormElement');
class UploadFile extends FormElement {
- var $mValue;
var $cClassName = "UploadFile";
var $mMaxSize = 100000; // 100kb
function __construct($name,$value="")
{
var $cClassName = "UploadFile";
var $mMaxSize = 100000; // 100kb
function __construct($name,$value="")
{
- $this->name
= $name;
- $this->
mValue
= $value;
+ $this->name = $name;
+ $this->
value
= $value;
}
function setMaxSize($value) { $this->mMaxSize = $value; }
}
function setMaxSize($value) { $this->mMaxSize = $value; }
diff --git
a/WEB-INF/templates/footer.tpl
b/WEB-INF/templates/footer.tpl
index
20116c5
..
fc9eb2b
100644
(file)
--- a/
WEB-INF/templates/footer.tpl
+++ b/
WEB-INF/templates/footer.tpl
@@
-12,7
+12,7
@@
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.10.38.359
4
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.10.38.359
5
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>