Refactoring - removedunused stuff and some renaming.
authoranuko <support@anuko.com>
Mon, 20 Feb 2017 00:33:01 +0000 (00:33 +0000)
committeranuko <support@anuko.com>
Mon, 20 Feb 2017 00:33:01 +0000 (00:33 +0000)
WEB-INF/lib/form/Checkbox.class.php
WEB-INF/lib/form/Combobox.class.php
WEB-INF/lib/form/DateField.class.php
WEB-INF/lib/form/FormElement.class.php
WEB-INF/lib/form/TextField.class.php
WEB-INF/templates/footer.tpl

index 428d428..d79e5fe 100644 (file)
@@ -53,8 +53,8 @@ class Checkbox extends FormElement {
                $html = "\n\t<input type=\"checkbox\"";
                $html .= " name=\"$this->name\" id=\"$this->id\"";
 
-               if ($this->mOnChange!="")
-                  $html .= " onchange=\"$this->mOnChange\"";
+               if ($this->on_change!="")
+                  $html .= " onchange=\"$this->on_change\"";
                   
                if ($this->mStyle!="")
                   $html .= " style=\"$this->mStyle\"";
index a421b66..78bd996 100644 (file)
@@ -79,8 +79,8 @@ class Combobox extends FormElement {
                if ($this->mMultiple)
                  $html .= " multiple";
 
-               if ($this->mOnChange!="")
-                  $html .= " onchange=\"$this->mOnChange\"";
+               if ($this->on_change!="")
+                  $html .= " onchange=\"$this->on_change\"";
                   
                if ($this->mStyle!="")
                   $html .= " style=\"$this->mStyle\"";
index cf1bb08..0ed220d 100644 (file)
@@ -403,8 +403,8 @@ class DateField extends TextField {
 
         $html .= " maxlength=\"50\"";
 
-      if ($this->mOnChange!="")
-         $html .= " onchange=\"$this->mOnChange\"";
+      if ($this->on_change!="")
+         $html .= " onchange=\"$this->on_change\"";
 
       if ($this->mOnClick!="")
          $html .= " onclick=\"$this->mOnClick\"";
index 6bdca86..7bd28ab 100644 (file)
 
 // FromElement is the base class for controls on forms.
 class FormElement {
-  var $id = '';
-  var $name;
-  var $form_name = '';
-  var $value = '';
-  var $size = '';
-  var $max_length = '';
+  var $id = '';         // Control id.
+  var $name;            // Control name.
+  var $form_name = '';  // Form name the control is in.
+  var $value = '';      // Value of the control.
+  var $size = '';       // Control size.
+  var $max_length = ''; // Max lenght of text in control.
+  var $on_change = '';  // What happens when value of control changes.
   // TODO: refactoring ongoing down from here.
-       var $mOnSelect          = "";
-       var $mOnChange          = "";
        var $mOnClick           = "";
        var $mOnKeyPress        = "";
        var $mOnFocus           = "";
@@ -85,9 +84,8 @@ class FormElement {
        function setEnable($flag)       { $this->mEnabled = $flag;      }
        function isEnable()     { return $this->mEnabled; }
        
-       function setOnChange($str)      { $this->mOnChange = $str; }
+       function setOnChange($str) { $this->on_change = $str; }
        function setOnClick($str)       { $this->mOnClick = $str; }
-       function setOnSelect($str)      { $this->mOnSelect = $str; }
 
        function setLocalization($i18n) {
                $this->mI18n = $i18n;
index 88fb434..82d6af2 100644 (file)
@@ -63,8 +63,8 @@ class TextField extends FormElement {
                        if ($this->max_length!="")
                           $html .= " maxlength=\"$this->max_length\"";
                           
-                       if ($this->mOnChange!="")
-                          $html .= " onchange=\"$this->mOnChange\"";
+                       if ($this->on_change!="")
+                          $html .= " onchange=\"$this->on_change\"";
 
                        $html .= " value=\"".htmlspecialchars($this->getValue())."\"";
                        $html .= ">";
index dbfde95..1499b22 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3598 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3599 | Copyright &copy; <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>