[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 53/107: Select_Box new Object
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 53/107: Select_Box new Object |
Date: |
Mon, 26 Aug 2019 10:31:57 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3b22021fd649ce7d6690d2438ce64d03be3064e3
Author: Dany De Bontridder <address@hidden>
Date: Mon Jul 29 10:56:45 2019 +0200
Select_Box new Object
---
html/do.php | 2 +-
include/lib/icon_action.class.php | 12 +++++++++---
include/lib/select_box.class.php | 2 +-
include/template/result_cat_card_summary.php | 9 +++++----
scenario/select-box-test.php | 14 +++++++-------
5 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/html/do.php b/html/do.php
index c8ea494..715dcf8 100644
--- a/html/do.php
+++ b/html/do.php
@@ -356,7 +356,7 @@ else
record_log($exc->getTraceAsString());
throw $exc;
}
-
+
}
diff --git a/include/lib/icon_action.class.php
b/include/lib/icon_action.class.php
index a23ba44..070a201 100644
--- a/include/lib/icon_action.class.php
+++ b/include/lib/icon_action.class.php
@@ -243,10 +243,16 @@ class Icon_Action
$p_javascript);
return $r;
}
-
- static function menu($p_id,$p_javascript)
+ /**
+ * When a mouse is over this or if you click on it , it will trigger the
javascript
+ * @param domid $p_id
+ * @param string $p_javascript
+ * @return html string
+ */
+ static function menu_click($p_id,$p_javascript)
{
- $r=sprintf('<span id="%s" onclick="%s" class="smallicon icon"
style="font-size:150%%;margin-left:5px">☰</span>',
+
+ $r=sprintf('<input type="button" id="%s" onclick="%s"
class="smallbutton icon" value="" style="font-weigth:bolder">',
$p_id,
$p_javascript);
return $r;
diff --git a/include/lib/select_box.class.php b/include/lib/select_box.class.php
index 4ce7e28..9e07d6e 100644
--- a/include/lib/select_box.class.php
+++ b/include/lib/select_box.class.php
@@ -78,7 +78,7 @@ class Select_Box
}',$this->id,$this->id);
// display the button
- printf('<input type="button" id="%s_bt" value="%s ▾">',
+ printf('<input type="button" class="smallbutton icon" id="%s_bt"
value="%s ▾">',
$this->id, $this->value);
printf('<input type="hidden" id="%s" name="%s" value="%s">', $this->id,
$this->id, $this->default_value);
diff --git a/include/template/result_cat_card_summary.php
b/include/template/result_cat_card_summary.php
index 6fc97b4..3b1c406 100644
--- a/include/template/result_cat_card_summary.php
+++ b/include/template/result_cat_card_summary.php
@@ -27,9 +27,10 @@ $e=0;
foreach ($array as $row ) :
$e++;
if ($e%2==0)
- echo '<tr class="odd">';
- else
- echo '<tr class="even">';
+ printf('<tr id="card%s" class="odd">',$row['f_id']);
+ else
+ printf('<tr id="card%s" class="even">',$row['f_id']);
+
$fiche=new Fiche($cn);
$fiche->id=$row['f_id'];
$fiche->getAttribut();
@@ -37,7 +38,7 @@
$detail=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE));
echo td($detail);
foreach($fiche->attribut as $attr) :
$sort="";
-
+
if ( $attr->ad_type != 'select'):
if ($attr->ad_type=="date") :
// format YYYYMMDD
diff --git a/scenario/select-box-test.php b/scenario/select-box-test.php
index 991c6fc..3c23ff6 100644
--- a/scenario/select-box-test.php
+++ b/scenario/select-box-test.php
@@ -44,19 +44,19 @@ div.select_box a:hover,div.select_box ul li:hover {
Le CSS est important , surtout la position, il faut qu'il soit
dans
un élément positionné en absolu.
</p>
- <p style="position: absolute">
+ <p style="float : static">
<?php
require NOALYSS_INCLUDE.'/lib/select_box.class.php';
$a=new Select_Box("test","click me !");
- $a->add_url("List","?id=5");
- $a->add_javascript("Hello","alert('hello')");
- $a->add_value("Value = 10",10);
- $a->add_value("Value = 1",1);
- $a->add_value("Value = 15",15);
+ $a->add_url("List (link)","?id=5&".Dossier::get());
+ $a->add_javascript("Hello (Javascript)","alert('hello')");
+ $a->add_value("Value = 10 (set value)",10);
+ $a->add_value("Value = 1 (set value)",1);
+ $a->add_value("Value = 15 (set value)",15);
echo $a->input();
- ?>
+ ?>
</p>
</div>
</body>
- [Noalyss-commit] [noalyss] 51/107: Code Cleaning split sendmail between sendmail_core (not related to noalyss) and sendmail which is used by noalyss, (continued)
- [Noalyss-commit] [noalyss] 51/107: Code Cleaning split sendmail between sendmail_core (not related to noalyss) and sendmail which is used by noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 54/107: Merge branch 'dev7109', Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 59/107: #0001729: Preference : ne plus recharger la page, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 85/107: Cosmetic : Icon_Trash in Todo_List, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 80/107: translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 82/107: DatabaseCore fix silent when not debug, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 72/107: Improve message progress bar + translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 94/107: Bug : Database::fetch_all returns an array or FALSE, because of pg_fetch_all, the version PHP7 cannot use anymore a boolean with count()., Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 63/107: remove background color, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 66/107: Code cleaning : rename table mod_payment to payment_method, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 53/107: Select_Box new Object,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 55/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 57/107: PDF_Core : code cleaning, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 71/107: Select_Box add a search, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 77/107: Security : replace direct use of $_GET, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 45/107: Replace PHPCOMPTA by NOALYSS, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 90/107: Cosmetic : add button close in history card & accounting, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 88/107: SQL : correct SQL script to take care of users who delete the profile no 2, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 104/107: 0001728: Aide à l'encodage - Journaux négatifs (note de crédit) Unit test, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 48/107: Doxygen does not allow to document javascript Remove tag for using with jsdoc, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 89/107: Task #1735: Détail opération utilisation icone poubelle, Dany De Bontridder, 2019/08/26