noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 170/323: indent


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 170/323: indent
Date: Wed, 14 Mar 2018 17:38:44 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit f6e7f56d59fc31752f61553775b8b6e0874ac662
Author: Dany De Bontridder <address@hidden>
Date:   Sat Feb 10 01:15:44 2018 +0100

    indent
---
 include/lib/inum.class.php | 87 +++++++++++++++++++++++++---------------------
 1 file changed, 47 insertions(+), 40 deletions(-)

diff --git a/include/lib/inum.class.php b/include/lib/inum.class.php
index 59e01d0..4bd6fa8 100644
--- a/include/lib/inum.class.php
+++ b/include/lib/inum.class.php
@@ -1,4 +1,5 @@
 <?php
+
 /*
  *   This file is part of NOALYSS.
  *
@@ -15,15 +16,15 @@
  *   You should have received a copy of the GNU General Public License
  *   along with NOALYSS; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 
 // Copyright Author Dany De Bontridder address@hidden
 
-/*!\file
+/* !\file
  * \brief for the numeric input text field
  */
 require_once NOALYSS_INCLUDE.'/lib/itext.class.php';
-/*!\brief
+/* !\brief
  * This class handles only the numeric input, the input will
  * call a javascript
  * to change comma to period  and will round it (2 decimal), the precision is 
given by
@@ -37,75 +38,81 @@ require_once NOALYSS_INCLUDE.'/lib/itext.class.php';
  *  value = value of the widget
  *
  */
+
 class INum extends IText
 {
-    function __construct($name='',$value='',$id="")
+
+    function __construct($name='', $value='', $id="")
     {
-        parent::__construct($name,$value,$id);
+        parent::__construct($name, $value, $id);
 
         $this->size=9;
         $this->style='class="inum"';
-       $this->javascript= 'onchange="format_number(this,2);"';
+        $this->javascript='onchange="format_number(this,2);"';
     }
-    /*!\brief print in html the readonly value of the widget*/
+
+    /* !\brief print in html the readonly value of the widget */
+
     public function display()
     {
 
         $readonly=" readonly ";
-               $this->id=($this->id=="")?$this->name:$this->id;
+        $this->id=($this->id=="")?$this->name:$this->id;
 
-        //$style='style="border:solid 1px 
blue;color:black;background:#EDEDED;text-align:right"';
         $style=' class="inum input_text_ro"';
-        $this->value=str_replace('"','',$this->value);
+        $this->value=str_replace('"', '', $this->value);
         $r='<INPUT '.$style.' TYPE="TEXT" id="'.
-           $this->id.'"'.
-           'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
-           'SIZE="'.$this->size.'" '.$this->javascript." $readonly 
$this->extra >";
+                $this->id.'"'.
+                'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
+                'SIZE="'.$this->size.'" '.$this->javascript." $readonly 
$this->extra >";
 
         /* add tag for column if inside a table */
-        if ( $this->table == 1 )                 $r='<td>'.$r.'</td>';
+        if ($this->table==1)
+            $r='<td>'.$r.'</td>';
 
         return $r;
-
     }
-        /*!\brief show the html  input of the widget*/
-    public function input($p_name=null,$p_value=null)
+
+    /* !\brief show the html  input of the widget */
+
+    public function input($p_name=null, $p_value=null)
     {
-               if ( isset ($this->prec)) {
-                       $this->javascript= 
'onchange="format_number(this,'.$this->prec.');"';
-               }
+        if (isset($this->prec))
+        {
+            
$this->javascript='onchange="format_number(this,'.$this->prec.');"';
+        }
         $this->name=($p_name==null)?$this->name:$p_name;
         $this->value=($p_value==null)?$this->value:$p_value;
-               $this->id=($this->id=="")?$this->name:$this->id;
+        $this->id=($this->id=="")?$this->name:$this->id;
 
-        if ( $this->readOnly==true) return $this->display();
+        if ($this->readOnly==true)
+            return $this->display();
 
-        $t= ((isset($this->title)))?'title="'.$this->title.'"   ':' ';
+        $t=((isset($this->title)))?'title="'.$this->title.'"   ':' ';
 
         $extra=(isset($this->extra))?$this->extra:"";
 
-        $this->value=str_replace('"','',$this->value);
-        if ( ! isset ($this->css_size))
+        $this->value=str_replace('"', '', $this->value);
+        if (!isset($this->css_size))
         {
-        $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
-           $this->id.'"'.$t.
-           'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
-           'SIZE="'.$this->size.'" '.$this->javascript."  $this->extra >";
-        /* add tag for column if inside a table */
-        } else {
-           $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
-           $this->id.'"'.$t.
-           'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
-           ' style="width:'.$this->css_size.';" '.$this->javascript."  
$this->extra >";
-
+            $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
+                    $this->id.'"'.$t.
+                    'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
+                    'SIZE="'.$this->size.'" '.$this->javascript."  
$this->extra >";
+            /* add tag for column if inside a table */
+        }
+        else
+        {
+            $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
+                    $this->id.'"'.$t.
+                    'NAME="'.$this->name.'" VALUE="'.$this->value.'"  '.
+                    ' style="width:'.$this->css_size.';" '.$this->javascript." 
 $this->extra >";
         }
 
-        if ( $this->table == 1 )                 $r='<td>'.$r.'</td>';
+        if ($this->table==1)
+            $r='<td>'.$r.'</td>';
 
         return $r;
-
     }
 
 }
-
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]