[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 56/73: Output_HTML adapt to bootstrap navbar
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 56/73: Output_HTML adapt to bootstrap navbar |
Date: |
Fri, 28 May 2021 05:26:44 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 581940306eefe397872371cdd4b11023b0169081
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri May 7 17:44:09 2021 +0200
Output_HTML adapt to bootstrap navbar
---
include/lib/output_html_tab.class.php | 128 +++++++++++++++++++++++++++++++---
1 file changed, 118 insertions(+), 10 deletions(-)
diff --git a/include/lib/output_html_tab.class.php
b/include/lib/output_html_tab.class.php
index 56544f2..d7ed0e5 100644
--- a/include/lib/output_html_tab.class.php
+++ b/include/lib/output_html_tab.class.php
@@ -40,6 +40,12 @@ class Output_Html_Tab
private $class_tab; //!< for normal tab
private $class_tab_selected; //!< for class_tab_selected
private $mode; //!< mode default tabs
+ private $class_tab_main; //! CSS class for the UL tag
+ private $class_anchor; //! CSS class for the A tag (anchor) default empty
+ private $class_div; //! CSS class for the DIV containing the UL default
empty
+ private $class_content_div; //! CSS class for the DIV with content,
default empty
+ private $class_comment ; //! CSS class for the comment default "tabs"
+
/**
*@example html_tab.test.php
*/
@@ -47,18 +53,117 @@ class Output_Html_Tab
{
$this->a_tabs=[];
$this->class_tab="tabs";
+ $this->class_tab_main="tabs";
$this->class_tab_selected="tabs_selected";
$this->set_mode("tab");
+ $this->class_anchor="";
+ $this->class_div="";
+ $this->class_content_div="";
+ $this->class_comment="tabs";
+ }
+ /**
+ * @brief CSS class for the comment default "tabs"
+ * @return type
+ */
+ public function get_class_comment()
+ {
+ return $this->class_comment;
+ }
+ /**
+ * @brief CSS class for the comment default "tabs"
+ * @return type
+ */
+
+ public function set_class_comment($class_comment)
+ {
+ $this->class_comment=$class_comment;
+ return $this;
+ }
+
+ /**
+ * @brief CSS class for the DIV with content (default empty)
+ */
+ public function get_class_content_div()
+ {
+ return $this->class_content_div;
+ }
+ /**
+ *@brief CSS class for the DIV with content (default empty)
+ *
+ * @param string $class_content_div
+ */
+ public function set_class_content_div($class_content_div)
+ {
+ $this->class_content_div=$class_content_div;
+ return $this;
}
+ /**
+ * @brief CSS class for the DIV containing the UL
+ * @return string
+ */
+ public function get_class_div()
+ {
+ return $this->class_div;
+ }
+
/**
- * get the mode , possible value are row or tabs
+ * @brief CSS class for the DIV containing the UL
+ * @return string
+ */
+
+ public function set_class_div($class_div)
+ {
+ $this->class_div=$class_div;
+ return $this;
+ }
+
+ /**
+ * @brief CSS class for the A tag (anchor)
+ * @return type
+ */
+ public function get_class_anchor()
+ {
+ return $this->class_anchor;
+ }
+ /**
+ * @brief CSS class for the A tag (anchor)
+ * @param type $anchor_class
+ */
+ public function set_class_anchor($anchor_class)
+ {
+ $this->class_anchor=$anchor_class;
+ $this;
+ }
+
+ /**
+ * @brief get the CSS class for the UL element
+ * @return type
+ */
+ public function get_class_tab_main()
+ {
+ return $this->class_tab_main;
+ }
+
+ /**
+ * @brief set the CSS class for the UL element
+ * @return this
+ */
+
+ public function set_class_tab_main($class_tab_main)
+ {
+ $this->class_tab_main=$class_tab_main;
+ return $this;
+ }
+
+ /**
+ * @brief get the mode , possible value are row or tabs , with mode = row
, the
+ * class_content_div is set to row
* @return mixed
*/
public function get_mode()
{
return $this->mode;
- return $this;
}
/**
@@ -100,7 +205,6 @@ class Output_Html_Tab
public function get_class_tab()
{
return $this->class_tab;
- return $this;
}
/**
@@ -120,7 +224,6 @@ class Output_Html_Tab
public function get_class_tab_selected()
{
return $this->class_tab_selected;
- return $this;
}
/**
@@ -169,12 +272,12 @@ class Output_Html_Tab
}
/**
- * When printing row , a comment is written if not empty
+ * When printing row , a comment is written if not empty,
* @param $p_index
*/
protected function print_comment($p_index) {
printf ('<span class="%s"> %s </span>',
- $this->get_class_tab(),
+ $this->get_class_comment(),
$this->a_tabs[$p_index]->get_comment()
);
@@ -190,7 +293,8 @@ class Output_Html_Tab
{
return;
}
- printf ( '<ul class="%s">',$this->class_tab);
+ printf('<div class="%s">',$this->class_div);
+ printf ( '<ul class="%s">',$this->class_tab_main);
for ($i=0; $i<$nb; $i++)
{
printf ('<li id="tab%s" class="%s">',
@@ -198,7 +302,8 @@ class Output_Html_Tab
switch ($this->a_tabs[$i]->get_mode())
{
case 'link':
- printf ('<a id="%s" href="%s">',
+ printf ('<a class="%s" id="%s" href="%s">',
+ $this->class_anchor,
$this->a_tabs[$i]->get_id(),
$this->a_tabs[$i]->get_link());
printf ('<span class="title_%s"> %s </span>',
@@ -209,7 +314,8 @@ class Output_Html_Tab
break;
case 'ajax':
- printf('<a id="%s" onclick="%s">',
+ printf('<a class="%s" id="%s" onclick="%s">',
+ $this->class_anchor,
$this->a_tabs[$i]->get_id(),
$this->a_tabs[$i]->get_link());
printf ('<span class="title_%s"> %s </span>',
@@ -223,7 +329,7 @@ class Output_Html_Tab
case 'static':
// show one , hide other
$script=$this->build_js($this->a_tabs[$i]->get_id());
- printf('<a onclick="%s">', $script);
+ printf('<a class="%s" onclick="%s">',
$this->class_anchor,$script);
printf ('<span class="title_%s"> %s </span>',
$this->get_class_tab(),
$this->a_tabs[$i]->get_title()
@@ -245,6 +351,8 @@ class Output_Html_Tab
}
}
echo '</ul>';
+ echo '</div>';
+
if ( $this->get_mode()=="tab" ) {
for ($i=0;$i<$nb;$i++)
{
- [Noalyss-commit] [noalyss] 16/73: Currency : add a check , upgrade version of DB, (continued)
- [Noalyss-commit] [noalyss] 16/73: Currency : add a check , upgrade version of DB, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 24/73: Bug Select_Box = problem with DIV id, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 29/73: Cosmetic : display properly currency in detail operation, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 34/73: javascript : test and improve cosmetic, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 36/73: improve captcha, replace the global variable by a "DEFINE" constant, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 41/73: Cosmetic : Card History, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 47/73: Fix block problem with font, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 49/73: Improve function display_row_custom for the custom sort key see Sorttable.js, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 50/73: Improve Manage_Table_SQL, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 55/73: Manage_Table_SQL : typo, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 56/73: Output_HTML adapt to bootstrap navbar,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 57/73: Task #1807: Boutons indistincts – thème 7 classic, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 44/73: Cosmetic : width to large if recover passwd enable and icon trash not available for document (in operation detail), Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 28/73: Task #0001961: Devise : faciliter les calculs d'écarts de conversion, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 38/73: Task #1961 : Currency remove default currency, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 40/73: Cosmetic : add button_magnifier for searching, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 52/73: Code Rewriting : rename Noalyss_SQL class by Table_Data_SQL, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 53/73: Code Rewriting : rename Noalyss_SQL class by Table_Data_SQL, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 45/73: Cosmetic : button with HREF, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 60/73: Cosmetic : navigator on small device, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 62/73: Remove dead code, Dany De Bontridder, 2021/05/28