From 5e291fc48fb98b114dd05e211cee5406a555225f Mon Sep 17 00:00:00 2001
From: Dany De Bontridder
Date: Tue, 27 Aug 2019 19:28:38 +0200
Subject: [PATCH] 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 485e4802f..cc24a325a 100644
--- a/include/lib/icon_action.class.php
+++ b/include/lib/icon_action.class.php
@@ -96,13 +96,31 @@ class Icon_Action
*/
static function tips($p_comment)
{
- $p_comment=htmlentities($p_comment);
+ $p_comment=str_replace("'",' ',$p_comment);
$r='';
$r.="";
$r.='';
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('',
+ $js,$js);
+ $r.="";
+ $r.='';
+
+ return $r;
+ }
/**
* Display a icon ON
* @param string $p_div id of element
@@ -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( '%s',
+ $p_id,
+ $p_javascript,
+ $lock_cur);
+ return $r;
+ }
}
diff --git a/scenario/icon_actionTest.php b/scenario/icon_actionTest.php
index 4682d7e69..35c33a98c 100644
--- a/scenario/icon_actionTest.php
+++ b/scenario/icon_actionTest.php
@@ -77,4 +77,10 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";
Tips
+
+
+ Slider
+
+
+ Comment
\ No newline at end of file