[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;
-
}
}
-
-
- [Noalyss-commit] [noalyss] 230/323: index.css : CSS responsive, (continued)
- [Noalyss-commit] [noalyss] 230/323: index.css : CSS responsive, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 249/323: SQL Patch : correct syntax for new version, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 252/323: PLANANC : fix bug when creating first plan, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 226/323: Dashboard : remove dead code, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 217/323: Periode : fix bug, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 208/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 233/323: Backward comptability for SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 264/323: Category Aged Balance add a start date, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 269/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 270/323: check if open_basedir is empty, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 170/323: indent,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 207/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 236/323: Merge tag 'rel6920', Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 175/323: Manage_Table_SQL : Improve Documentation + add function count_error, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 214/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 184/323: missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 260/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 311/323: Follow-up fix small bug with ag_ref, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN & ACH, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if there is no template, Dany De Bontridder, 2018/03/14