[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 07/30: Improve method HtmlInput::title_box
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 07/30: Improve method HtmlInput::title_box |
Date: |
Tue, 02 Jun 2015 22:29:05 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 26e46a4aaec7ad72e72230bb7086bfd12915e3d9
Author: Dany De Bontridder <address@hidden>
Date: Sat May 30 12:29:15 2015 +0200
Improve method HtmlInput::title_box
---
include/class_html_input.php | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/include/class_html_input.php b/include/class_html_input.php
index 28639c3..dae4029 100755
--- a/include/class_html_input.php
+++ b/include/class_html_input.php
@@ -424,11 +424,11 @@ class HtmlInput
* Return a html string with an anchor which close the inside popup.
(top-right corner)
address@hidden name of the DIV to close
*/
- static function anchor_close($div)
+ static function anchor_close($div,$p_js="")
{
$r='';
$r.='<div style="position:absolute;right:2px;margin:2px;padding:0px;">';
- $r.= '<A id="close_div" class="input_text"
onclick="removeDiv(\''.$div.'\');">⨉</A>';
+ $r.= '<A id="close_div" class="input_text"
onclick="removeDiv(\''.$div.'\');'.$p_js.'">⨉</A>';
$r.='</div>';
return $r;
}
@@ -702,19 +702,24 @@ class HtmlInput
return $_REQUEST[$ind];
}
/**
- * Title for boxes
+ * Title for boxes, you can customize the symbol thanks symbol with
+ * the mode "custom"
* @param type $name Title
- * @param type $div element id
- * @param type $mod hide or close
- * @param type $p_js if $mod is hide then you can add a javascript
+ * @param type $div element id, except for mode none or custom
+ * @param type $mod hide , close , zoom , custom or none, with
+ * custom , the $name contains all the code
+ * @param type $p_js contains the javascript with "custom" contains
button + code
* @return type
*/
static function title_box($name,$div,$mod="close",$p_js="")
{
- if ($mod=='close')
$r=HtmlInput::anchor_close($div);
- if ($mod=='hide')
$r=HtmlInput::anchor_hide("⨉","$('$div').hide();$p_js");
- if ($mod=='zoom') $r='<span
style="float:right;margin-right:5px">'.HtmlInput::anchor("⬜","",$p_js,'
id="close_div" class="input_text" ').'</span>';
- if ( $mod == 'none') $r="";
+ if ($mod=='close')
{$r=HtmlInput::anchor_close($div,$p_js); }else
+ if ($mod=='hide')
{$r=HtmlInput::anchor_hide("⨉","$('$div').hide();$p_js");} else
+ if ($mod=='zoom') {$r='<span id="span_'.$div.'"
style="float:right;margin-right:5px">'.HtmlInput::anchor("⬜","",$p_js,'
name="small'.$div.'" id="close_div" class="input_text" ').'</span>'; } else
+ if ( $mod == 'custom') {$r='<span id="span_'.$div.'"
style="float:right;margin-right:5px">'.$p_js."</span>";} else
+ if ( $mod == 'none') {$r="" ; }
+ else
+ die (__FILE__.":".__LINE__._('Paramètre invaide'));
$r.=h2($name,' class="title" ');
return $r;
}
- [Noalyss-commit] [noalyss] branch master updated (38c52bf -> 255124b), Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 01/30: Task #1118 - Partage de notes via le Pense-bête #1118 : partage de note Correction bug, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 03/30: Merge tag 'rel6803', Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 02/30: Task #1123 - Visualisation/présentation de la balance: SOLDE #1123 : PRINTBAL ajout du solde quand on utilise les sous-niveaux, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 05/30: Icon in the menu, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 06/30: #1118 : partage de note Esthétique Zoom des notes partagées, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 04/30: Icon in the menu, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 07/30: Improve method HtmlInput::title_box,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 08/30: #1118 : partage de note Ne peut partager note non sauvée, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 09/30: #1118 : partage de note Esthétique zoom, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 10/30: Database improve : new function get_affected returns the number of rows affected by the last query, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 13/30: Administration user : add condition if no folder exists + esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 11/30: Remove table priv_user, the local admin and plugin user are obsolete, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 16/30: Administration user : esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 14/30: Administration user : add condition if no folder exists + esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 15/30: Administration user : esthetic + rewrite add user Correct bug : ajax_admin.js, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 17/30: Administration user : esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 18/30: HtmlInput : add a new function to create an empty anchor, Dany De Bontridder, 2015/06/02