[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/14: Select has a new attribute : size
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/14: Select has a new attribute : size |
Date: |
Wed, 28 Oct 2015 09:56:56 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9184a5564b6a99a499face6e561421faf3e33f0f
Author: Dany De Bontridder <address@hidden>
Date: Sun Oct 25 19:17:27 2015 +0100
Select has a new attribute : size
---
include/ajax/ajax_add_menu.php | 1 +
include/lib/class_iselect.php | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/ajax/ajax_add_menu.php b/include/ajax/ajax_add_menu.php
index e6ff190..b8ad21c 100644
--- a/include/ajax/ajax_add_menu.php
+++ b/include/ajax/ajax_add_menu.php
@@ -127,6 +127,7 @@ select me_code,me_code||' '||coalesce(me_menu,'')||'
'||coalesce(me_description,
$p_order=new INum("p_order", "10");
$me_code=new ISelect('me_code');
+ $me_code->size=15;
$me_code->value=$ame_code;
diff --git a/include/lib/class_iselect.php b/include/lib/class_iselect.php
index 60d781c..2f8b64e 100644
--- a/include/lib/class_iselect.php
+++ b/include/lib/class_iselect.php
@@ -20,7 +20,10 @@
// Copyright Author Dany De Bontridder address@hidden
/*!\file
- * \brief Html Input
+ * \brief Html Input , create a tag <SELECT> ... </SELECT>
+ * if readonly == true then display the label corresponding to the selected
value
+ * You can use also $this->size to specify the number of lines to display
+ *
* @see Database::make_array
*/
require_once NOALYSS_INCLUDE.'/lib/class_html_input.php';
@@ -37,10 +40,11 @@ class ISelect extends HtmlInput
$disabled=($this->disabled==true)?"disabled":"";
$rowsize = (isset ($this->rowsize)) ? ' size =
"'.$this->rowsize.'"':"";
+ $size=(isset($this->size))?'size="'.$this->size.'"':"";
+
$r="";
- $a="<SELECT id=\"$this->id\" NAME=\"$this->name\" $style
$this->javascript $disabled $rowsize>";
-
+ $a="<SELECT {$size} id=\"$this->id\" NAME=\"$this->name\" $style
$this->javascript $disabled $rowsize>";
if (empty($this->value)) return '';
for ( $i=0;$i<sizeof($this->value);$i++)
{
- [Noalyss-commit] [noalyss] branch master updated (08827e1 -> a3fd1a9), Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 01/14: Protect $_POST variable, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 03/14: Fix issue when delete a menu with submenu , remove properly all direct and indirect children, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 07/14: Sort of the ledger in search, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 08/14: Bug : in follow-up , error in security can_add_action, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 02/14: Reinforce and Protect ajax, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 05/14: Select has a new attribute : size,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 10/14: Bug : in follow-up , error in security can_add_action, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 11/14: Bug : in export card, the textarea was not exported in CSV properly, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 12/14: Bug : in export card, the textarea was not exported in CSV properly, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 06/14: Select has already undocumented rowsize attribute , changes reversed, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 09/14: Bug : in follow-up , error in security can_add_action, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 14/14: indent, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 13/14: #1188 : display side for detail operation, Dany De Bontridder, 2015/10/28
- [Noalyss-commit] [noalyss] 04/14: Translation and update comments, Dany De Bontridder, 2015/10/28