From 3a818a9aeb82c60d9d14ed134ca9792c7246ba6a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 20:24:17 +0100 Subject: [PATCH] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20apparenc?= =?UTF-8?q?e=20=20:=20Gestion=20Cache=20les=20check=20quand=20on=20ferme?= =?UTF-8?q?=20la=20fen=C3=AAtre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 7 +++++++ include/class_html_input.php | 12 ++++++++++-- include/template/action_other_action.php | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 4cc5cc3cf..be2112148 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2451,6 +2451,13 @@ function action_show_checkbox() a[i].style.display = 'block'; } } +function action_hide_checkbox() +{ + var a = document.getElementsByName('ag_id_td'); + for (var i = 0; i < a.length; i++) { + a[i].style.display = 'none'; + } +} /** * * @param {type} obj diff --git a/include/class_html_input.php b/include/class_html_input.php index d883fea27..aa473b34a 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -700,10 +700,18 @@ class HtmlInput } return $_REQUEST[$ind]; } - static function title_box($name,$div,$mod="close") + /** + * Title for boxes + * @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 + * @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(_('Fermer'),"$('$div').hide()"); + if ($mod=='hide') $r=HtmlInput::anchor_hide(_('Fermer'),"$('$div').hide();$p_js"); if ( $mod == 'none') $r=""; $r.=h2($name,' class="title" '); return $r; diff --git a/include/template/action_other_action.php b/include/template/action_other_action.php index 8f6d855cf..bb51613a1 100644 --- a/include/template/action_other_action.php +++ b/include/template/action_other_action.php @@ -14,7 +14,7 @@ echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remin "tdoc", "action_query","date_start","date_end","hsstate","searchtag")); ?>