From fab0db92d276989bd8daacd9b7c59b4fd6ebf464 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Aug 2011 23:29:44 +0000 Subject: [PATCH] Experiment flip-flap left menu with theme eldy when using smartphone. Need to setup MAIN_SMARTPHONE_OPTIM --- htdocs/main.inc.php | 6 ++++-- htdocs/theme/eldy/style.css.php | 26 +++++++++++++++++--------- htdocs/user/fiche.php | 7 ++++--- htdocs/user/param_ihm.php | 3 +-- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b2897fc840d..3df25cf7117 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -640,8 +640,10 @@ if (! defined('NOLOGIN')) $conf->theme=$user->conf->MAIN_THEME; $conf->css = "/theme/".$conf->theme."/style.css.php"; } - // If theme support flip-hide left menu and we use a smartphone, we force it - if ($conf->browser->phone && $conf->theme == 'eldy') $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced'; + + // If theme support optim like flip-hide left menu and we use a smartphone, we force it + if (! empty($conf->global->MAIN_SMARTPHONE_OPTIM) && $conf->browser->phone && $conf->theme == 'eldy') $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced'; + // Set javascript option if (! GETPOST('nojs')) // If javascript was not disabled on URL { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 848a86e427d..39bb6bdb374 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -54,7 +54,7 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on $langs->load("main",0,1); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); -$fontsize=empty($conf->browser->phone)?'12':'14'; +$fontsize=empty($conf->browser->phone)?'12':'15'; $fontsizesmaller=empty($conf->browser->phone)?'11':'14'; $path=''; // This value may be used in future for external module to overwrite theme @@ -217,8 +217,8 @@ td.showDragHandle { /* ============================================================================== */ div.fiche { - margin-: browser->phone)?'10':'24'; ?>px; - margin-: browser->phone)?'8':''; ?>px; + margin-: browser->phone) || empty($conf->global->MAIN_SMARTPHONE_OPTIM))?'10':'24'; ?>px; + margin-: browser->phone)?'8':'6'; ?>px; } div.fichecenter { @@ -228,12 +228,12 @@ div.fichecenter { div.fichethirdleft { browser->phone)) { print "float: ".$left.";\n"; } ?> browser->phone)) { print "width: 35%;\n"; } ?> - browser->phone)) { print "padding-bottom: 4px;\n"; } ?> + browser->phone)) { print "padding-bottom: 6px;\n"; } ?> } div.fichetwothirdright { browser->phone)) { print "float: ".$left.";\n"; } ?> browser->phone)) { print "width: 65%;\n"; } ?> - browser->phone)) { print "padding-bottom: 4px\n"; } ?> + browser->phone)) { print "padding-bottom: 6px\n"; } ?> } div.fichehalfleft { browser->phone)) { print "float: ".$left.";\n"; } ?> @@ -778,6 +778,9 @@ td.photo { .ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */ background: #E1A4A4; /* red */ } +.ui-layout-resizer-closed { + background-color: #DDDDDD; +} .ui-layout-resizer-closed:hover { background-color: #EEDDDD; } @@ -791,30 +794,35 @@ td.photo { } /* sliding resizer - add 'outside-border' to resizer on-hover */ /* this sample illustrates how to target specific panes and states */ -.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; } +/*.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; } .ui-layout-resizer-south-sliding-hover { border-top-width: 1px; } .ui-layout-resizer-west-sliding-hover { border-right-width: 1px; } .ui-layout-resizer-east-sliding-hover { border-left-width: 1px; } +*/ /* * TOGGLER-BUTTONS */ .ui-layout-toggler { + browser->phone)) { ?> border-top: 1px solid #AAA; /* match pane-border */ border-right: 1px solid #AAA; /* match pane-border */ border-bottom: 1px solid #AAA; /* match pane-border */ background-color: #DDD; top: 5px !important; - } + + diplay: none; + +} .ui-layout-toggler-open { - height: 48px !important; + height: 54px !important; width: browser->phone)?'7':'22'); ?>px !important; -moz-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px; border-radius:0px 10px 10px 0px; } .ui-layout-toggler-closed { - height: 48px !important; + height: browser->phone)?'54':'2'); ?>px !important; width: browser->phone)?'7':'22'); ?>px !important; -moz-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index c3347cce4e8..ca6dba6d87d 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -821,9 +821,10 @@ if (($action == 'create') || ($action == 'adduserldap')) print "".''.$langs->trans("PassPenix").''; print ''; } - - print "".''; - print "\n"; + print "\n"; + + print '

'; + print ""; } else diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index b510800f754..395224478e8 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -185,9 +185,8 @@ if ($_GET["action"] == 'edit') print '
'; - // Theme - show_theme($fuser,empty($dolibarr_main_demo)?1:0,true); + show_theme($fuser,(($user->admin || empty($dolibarr_main_demo))?1:0),true); print '';