From 34727286f1c6e154681acc9ca90dec8113b2882a Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Sun, 25 Jun 2017 22:03:06 +0200 Subject: [PATCH 1/2] Let's time to refactoring the tpl folder Propose to refactoring all the file present in /tpl folder for hamonisation with the rest of dolibarr file. Good resolution for this summer --- htdocs/core/tpl/bloc_showhide.tpl.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/core/tpl/bloc_showhide.tpl.php b/htdocs/core/tpl/bloc_showhide.tpl.php index 2c5d71c79d5..60ea83043a8 100644 --- a/htdocs/core/tpl/bloc_showhide.tpl.php +++ b/htdocs/core/tpl/bloc_showhide.tpl.php @@ -49,15 +49,15 @@ $(document).ready(function() { }); -
-
-
+'.img_picto('', '1uparrow.png').''."\n"; +print '
'.img_picto('', '1downarrow.png').'
'."\n"; +print '
'.$title.'
'."\n"; +print '
'."\n"; -
- - - -
-
- - \ No newline at end of file +include DOL_DOCUMENT_ROOT.'/core/tpl/'.$blocname.'.tpl.php'; +print '

'; +?> + From fe749cbd95cdc155ee87e35928fc77b054be9497 Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Sun, 25 Jun 2017 22:27:38 +0200 Subject: [PATCH 2/2] Update bloc_showhide.tpl.php --- htdocs/core/tpl/bloc_showhide.tpl.php | 52 ++++++++++++++------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/htdocs/core/tpl/bloc_showhide.tpl.php b/htdocs/core/tpl/bloc_showhide.tpl.php index 60ea83043a8..a98e8314097 100644 --- a/htdocs/core/tpl/bloc_showhide.tpl.php +++ b/htdocs/core/tpl/bloc_showhide.tpl.php @@ -21,35 +21,37 @@ if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocb if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false); ?> - - +print '$("#show-'.$blocname.'").click(function(){'."\n"; +print ' setShowHide(1);'."\n"; +print ' $("#'.$blocname.'").show("blind", {direction: "vertical"}, 300).addClass("nohideobject");'."\n"; +print ' $(this).hide();'."\n"; +print ' $("#hide-'.$blocname.'").show();'."\n"; +print '});'."\n"; + +print 'function setShowHide(status) {'."\n"; +print ' var id = '.$object->id."\n"; +print ' var element = '.$object->element."\n"; +print ' var htmlelement = '.$blocname."\n"; +print ' var type = "showhide";'."\n"; +print ' $.get("'.dol_buildpath('/core/ajax/extraparams.php', 1); +print '?id="+id+"&element="+element+"&htmlelement="+htmlelement+"&type="+type+"&value="+status);'."\n"; +print '}'."\n"; + +print '});'."\n"; +print ''."\n"; -'.img_picto('', '1uparrow.png').''."\n"; print '