[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/27: New : icon_action:slider icon_action:c
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/27: New : icon_action:slider icon_action:comment and fix single quote issue in icon_action:tips |
Date: |
Wed, 4 Sep 2019 15:24:53 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 5e291fc48fb98b114dd05e211cee5406a555225f
Author: Dany De Bontridder <address@hidden>
Date: Tue Aug 27 19:28:38 2019 +0200
New : icon_action:slider icon_action:comment
and fix single quote issue in icon_action:tips
---
include/lib/icon_action.class.php | 37 ++++++++++++++++++++++++++++++++++++-
scenario/icon_actionTest.php | 6 ++++++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/include/lib/icon_action.class.php
b/include/lib/icon_action.class.php
index 485e480..cc24a32 100644
--- a/include/lib/icon_action.class.php
+++ b/include/lib/icon_action.class.php
@@ -96,7 +96,7 @@ class Icon_Action
*/
static function tips($p_comment)
{
- $p_comment=htmlentities($p_comment);
+ $p_comment=str_replace("'",' ',$p_comment);
$r='<span tabindex="-1" class="icon"
style="cursor:pointer;display:inline;text-decoration:none;"
onmouseover="displayBulle(\''.$p_comment.'\')"
onclick="displayBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">';
$r.="";
$r.='</span>';
@@ -104,6 +104,24 @@ class Icon_Action
return $r;
}
/**
+ * Display a info in a bubble, text is given as parameter
+ * @param string $p_comment
+ *
+ * @return html string
+ */
+ static function comment($p_comment)
+ {
+ $p_comment=str_replace("'",' ',$p_comment);
+ $js=sprintf("displayBulle('%s')",$p_comment);
+
+ $r=sprintf('<span tabindex="-1" class="icon"
style="cursor:pointer;display:inline;text-decoration:none;" onmouseover="%s"
onclick="%s" onmouseout="hideBulle(0)">',
+ $js,$js);
+ $r.="";
+ $r.='</span>';
+
+ return $r;
+ }
+ /**
* Display a icon ON
* @param string $p_div id of element
* @param string $p_javascript
@@ -307,4 +325,21 @@ class Icon_Action
$lock_cur);
return $r;
}
+ /**
+ * Display the icon of a slider
+ * @param string $p_id DOMid
+ * @param string $p_javascript
+ * @return htmlString
+ */
+ static function slider($p_id,$p_javascript)
+ {
+
+ $lock_cur="";
+
+ $r=sprintf( '<span id="%s" onclick="%s" class="icon
smallicon">%s</span>',
+ $p_id,
+ $p_javascript,
+ $lock_cur);
+ return $r;
+ }
}
diff --git a/scenario/icon_actionTest.php b/scenario/icon_actionTest.php
index 4682d7e..35c33a9 100644
--- a/scenario/icon_actionTest.php
+++ b/scenario/icon_actionTest.php
@@ -77,4 +77,10 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";
</p>
<p>
Tips <?php echo Icon_Action::tips("Allo ?")?>
+</p>
+<p>
+ Slider <?php echo Icon_Action::slider(uniqid(), "alert('test')")?>
+</p>
+<p>
+ Comment<?php echo Icon_Action::comment("Allo ? l'heure d'été ?")?>
</p>
\ No newline at end of file
- [Noalyss-commit] [noalyss] branch master updated (aabcd83 -> c249f39), Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 03/27: changement de texte, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 04/27: Translation & text, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 06/27: Security : avoid direct call to Http Variable, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 08/27: New : icon_action:slider icon_action:comment and fix single quote issue in icon_action:tips,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/27: fixup! fixup! New Task 1728: Aide à l'encodage - Journaux négatifs (note de crédit), Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 18/27: #0001735: icone add catégorie de fiche, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 12/27: #1369: Étendre la comptabilité analytique à tous les postes? #1716: GROS SOUCI CA - ventilation 4 et 5. 5 phantôme! #1479: PROPOSITION CA - paramétrage comptes actifs, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 20/27: Task #0001731: Moyen de paiement , bug in ajax , if ledger==ODS a category of card is mandatory, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 21/27: Data_SQL Add database indication, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 02/27: Task #0001736: PHP7 comptability : count() works only with array, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 26/27: Database_Core add function with the number of cols, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 07/27: #0001584: En mode «optionnelle», afficher si CA ventilée ou non. Ajout symbole "contient", Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 11/27: layout, Dany De Bontridder, 2019/09/04
- [Noalyss-commit] [noalyss] 27/27: Merge branch 'dev7109', Dany De Bontridder, 2019/09/04