diff --git a/htdocs/includes/menus/standard/bureau2crea.lib.php b/htdocs/includes/menus/standard/bureau2crea.lib.php new file mode 100644 index 00000000000..840827f793a --- /dev/null +++ b/htdocs/includes/menus/standard/bureau2crea.lib.php @@ -0,0 +1,332 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/includes/menus/standard/bureau2crea.lib.php + * \brief Library for file bureau2crea menus + * \version $Id$ + */ + + + +/** + * Core function to output top menu bureau2crea + * + * @param $db + * @param $atarget + * @param $type_user 0=Internal,1=External,2=All + */ +function print_bureau2crea_menu($db,$atarget,$type_user) +{ + require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php"); + + global $user,$conf,$langs,$dolibarr_main_db_name; + + // On sauve en session le menu principal choisi + if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; + if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; + $_SESSION["leftmenuopened"]=""; + + $menuArbo = new Menubase($db,'bureau2crea','top'); + $tabMenu = $menuArbo->menuTopCharger($type_user,$_SESSION['mainmenu'], 'bureau2crea'); + + print_start_menu_array_bureau2crea(); + + for($i=0; $i'; + print ''; + print_text_menu_entry_bureau2crea($tabMenu[$i]['titre']); + print ''; + print_end_menu_entry_bureau2crea(); + } + else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) + { + if (! $type_user) + { + print_start_menu_entry_bureau2crea($idsel); + print ''; + print ''; + print_text_menu_entry_bureau2crea($tabMenu[$i]['titre']); + print ''; + print_end_menu_entry_bureau2crea(); + } + } + } + } + + print_end_menu_array_bureau2crea(); + + print "\n"; +} + + + +function print_start_menu_array_bureau2crea() +{ + global $conf; + if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print ''; + else print ''; + else print ''; + print "\n"; +} + +function print_end_menu_array_bureau2crea() +{ + global $conf; + if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '
'; + else print ''; + print "\n"; +} + + + +/** + * Core function to output left menu bureau2crea + * + * @param db Database handler + * @param menu_array_before Table of menu entries to show before entries of menu handler + * @param menu_array_after Table of menu entries to show after entries of menu handler + */ +function print_left_bureau2crea_menu($db,$menu_array_before,$menu_array_after) +{ + global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; + + $overwritemenufor = array(); + $newmenu = new Menu(); + + // Read mainmenu and leftmenu that define which menu to show + if (isset($_GET["mainmenu"])) { + // On sauve en session le menu principal choisi + $mainmenu=$_GET["mainmenu"]; + $_SESSION["mainmenu"]=$mainmenu; + $_SESSION["leftmenuopened"]=""; + } else { + // On va le chercher en session si non defini par le lien + $mainmenu=$_SESSION["mainmenu"]; + } + + if (isset($_GET["leftmenu"])) { + // On sauve en session le menu principal choisi + $leftmenu=$_GET["leftmenu"]; + $_SESSION["leftmenu"]=$leftmenu; + if ($_SESSION["leftmenuopened"]==$leftmenu) { + //$leftmenu=""; + $_SESSION["leftmenuopened"]=""; + } + else { + $_SESSION["leftmenuopened"]=$leftmenu; + } + } else { + // On va le chercher en session si non defini par le lien + $leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:''; + } + + //this->menu_array contains menu in pre.inc.php + + + // Show logo company + if (! empty($conf->global->MAIN_SHOW_LOGO)) + { + $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; + if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini); + print "\n".''."\n"; + print '
'."\n"; + print '
'."\n"; + print '
'."\n"; + } + } + + /** + * On definit newmenu en fonction de mainmenu et leftmenu + * ------------------------------------------------------ + */ + if ($mainmenu) + { + require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php"); + + $menuArbo = new Menubase($db,'bureau2crea','left'); + $overwritemenufor = $menuArbo->listeMainmenu(); + $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'bureau2crea'); + //var_dump($newmenu); + + /* + * Menu AUTRES (Pour les menus du haut qui ne serait pas geres) + */ + if ($mainmenu && ! in_array($mainmenu,$overwritemenufor)) { $mainmenu=""; } + } + + + /** + * Si on est sur un cas gere de surcharge du menu, on ecrase celui par defaut + */ + //var_dump($menu_array_before);exit; + //var_dump($menu_array_after);exit; + $menu_array=$newmenu->liste; + //if ($mainmenu) { + if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array); + if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after); + //} + //var_dump($menu_array);exit; + + // Affichage du menu + $alt=0; + if (is_array($menu_array)) + { + for ($i = 0 ; $i < sizeof($menu_array) ; $i++) + { + $alt++; + if (empty($menu_array[$i]['level'])) + { + if (($alt%2==0)) + { + if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) + { + print '
'."\n"; + } + else + { + print '
'."\n"; + } + } + else + { + print '
'."\n"; + } + } + + // Place tabulation + $tabstring=''; + $tabul=($menu_array[$i]['level'] - 1); + if ($tabul > 0) + { + for ($j=0; $j < $tabul; $j++) + { + $tabstring.='   '; + } + } + + // Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser. + $url=$menu_array[$i]['url']; + if (! preg_match('/mainmenu=/i',$menu_array[$i]['url'])) + { + if (! preg_match('/\?/',$url)) $url.='?'; + else $url.='&'; + $url.='mainmenu='.$mainmenu; + } + + // Menu niveau 0 + if ($menu_array[$i]['level'] == 0) + { + if ($menu_array[$i]['enabled']) + { + print ''; + } + else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) + { + print ''; + } + print "\n".'
'."\n"; + print ''."\n"; + } + // Menu niveau > 0 + if ($menu_array[$i]['level'] > 0) + { + if ($menu_array[$i]['enabled']) + { + print ''; + } + else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) + { + print ''; + } + } + + // If next is a new block or end + if (empty($menu_array[$i+1]['level'])) + { + print ''."\n"; + print "
\n"; + print "
\n"; + } + } + } + + return sizeof($menu_array); +} + +?> diff --git a/htdocs/theme/bureau2crea/.cvsignore b/htdocs/theme/bureau2crea/.cvsignore index 98e6ef67fad..77883ba2a3e 100644 --- a/htdocs/theme/bureau2crea/.cvsignore +++ b/htdocs/theme/bureau2crea/.cvsignore @@ -1 +1,2 @@ *.db +style.css?-?Copie.php diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 62e02cea6ca..0105bef3732 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -35,7 +35,6 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter( FALSE ); require_once("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php"); @@ -84,7 +83,7 @@ body { width: 100%; margin: 0px; } - + #mainbody .connexion_box { position: absolute; top: 2px; @@ -92,7 +91,7 @@ body { height: 12px; text-align: left; } - + #mainbody .connexion_box .login, #mainbody .connexion_box .printer { margin-left: 10px; font-size: 10px; @@ -100,7 +99,7 @@ body { padding: 0px !important; padding-right: 10px !important; } - + #mainbody .connexion_box .login a { color: #333; text-decoration: none; @@ -133,9 +132,6 @@ input.flat { padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; } -input:disabled { -background:#ddd; -} textarea { font-size: px; font-family: ; @@ -152,9 +148,6 @@ textarea.flat { padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; } -textarea:disabled { -background:#ddd; -} select.flat { background: #FDFDFD; font-size: px; @@ -174,7 +167,7 @@ input.button[type=submit] { margin: 0px; background-repeat: repeat-x; border: 2px solid #336600; - color: #336600; + color: #FFFFFF; cursor: pointer; font-size: 10px; } @@ -208,11 +201,6 @@ form { padding: 0em 0em 0em 0em; margin: 0em 0em 0em 0em; } -div.float -{ - float:; -} - /* For dragging lines */ @@ -231,10 +219,9 @@ td.showDragHandle { /* Styles de positionnement des zones */ /* ============================================================================== */ - - -td.vmenu { - width: 220px; +div.leftContent { + margin-left: 20px !important; + width: 220px !important; } div.vmenu { @@ -245,14 +232,21 @@ div.vmenu { } div.fiche { - margin-: 12px; - margin-: 10px; - margin-bottom: 10px; - padding: 0px;² + margin: 0px 20px 20px 40px; + padding: 0px; position: relative; height: auto; } + +/* ============================================================================== */ +/* Barre de redmiensionnement menu */ +/* ============================================================================== */ + +.ui-layout-resizer-west-open { + left: 240px !important; +} + /* ============================================================================== */ /* Menu top et 1ere ligne tableau */ /* ============================================================================== */ @@ -279,7 +273,7 @@ div.tmenu { white-space: nowrap; border-left: 0px; padding: 0px; - margin: 10px 0px 10px 0px; + margin: 10px 20px 10px 20px; font-size: 13px; background-image : url() ; height: 22px; @@ -433,36 +427,37 @@ li.tmenu, li.tmenusel { li.tmenu span, li.tmenusel span { margin: 0px 10px 0px 10px; } - + li.tmenu { background-image : url(); background-position: right; } - + li.tmenu a { position: relative; display: block; width: 100%; + height: 22px; background-image : url(); background-position: left; background-repeat: no-repeat; font-size: 12px; font-family: Geneva, Verdana, sans-serif; - line-height: 22px; + line-height: 25px; color: #FFF; font-weight: normal; } - + li.tmenu a:hover { color: #842F00; } - + li.tmenusel { background-image : url(); background-position: right; } - -li.tmenusel a { + +li.tmenusel a.tmenusel { position: relative; display: block; width: 100%; @@ -472,15 +467,15 @@ li.tmenusel a { background-repeat: no-repeat; font-size: 12px; font-family: Geneva, Verdana, sans-serif; - line-height: 22px; - color: #474747; + line-height: 25px; + color: #303030; font-weight: normal; } - + li.tmenusel a:hover { color: #474747; } - + li.tmenu a.tmenudisabled { color: #CCC; } @@ -491,17 +486,10 @@ li.tmenu a.tmenudisabled { /* Login */ -div.login_block { - - display: none; - -} - div.login { position: absolute; - : 60px; - top: 5px; - padding: 0px 8px; + : 30px; + padding: 12px 8px; margin: 0px 0px 1px 0px; font-weight: bold; } @@ -513,10 +501,9 @@ div.login a:hover { text-decoration:underline; } -img.login, img.printer, img.entity { +img.login, img.printer { position: absolute; - : 25px; - top: -3px; + : 20px; padding: 10px 0px 0px 0px; text-decoration: none; color: white; @@ -525,17 +512,14 @@ img.login, img.printer, img.entity { img.printer { : 4px; } -img.entity { - : 45px; -} - /* ============================================================================== */ /* Menu gauche */ /* ============================================================================== */ - +browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> .vmenu { display: none; } @@ -896,7 +880,7 @@ td.photo { div.tabs { top: 20px; - margin: 20px 0px 0px 0px; + margin: 10px 0px 0px 0px; text-align: left; width: 100%; background-image: url(); @@ -906,6 +890,12 @@ div.tabs { background-position: bottom; } +div.tabs a.tabTitle { + margin-right: 5px; + position: relative; + float: left; +} + div.tabs a.tab { display: block; width: auto; @@ -950,41 +940,26 @@ div.tabs a.tab:hover { color: #333333; } -a.tabTitle { - background: #D8610F; - color: white; - font-family: ; - font-weight: normal; - padding: 0px 6px 0px 2px; - margin: 0px 0px 0px 6px; - float: left; - text-decoration: none; - white-space: nowrap; - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; -} - /*div.tabs { top: 20px; margin: 1px 0px 0px 0px; padding: 0px 6px 0px 0px; text-align: ; -}*/ +} div.tabBar { -/* color: #234046;*/ + color: #234046; margin: 0px 0px 10px 0px; -/* background: #dee7ec url() repeat-x; */ + background: #dee7ec url() repeat-x; } div.tabsAction { - margin: 12px 0em 1px 0em; + margin: 20px 0em 1px 0em; padding: 0em 0em; text-align: right; } -/* + a.tabTitle { background: #5088A9; color: white; @@ -1244,30 +1219,50 @@ table.liste td { padding-right: 2px; } -tr.liste_titre { - height: 20px; +table.noborder { background-image: url(); background-repeat: no-repeat; - bakground-position: top right; - color: #FFFFFF; + background-position: top right; + vertical-align: text-top; +} + +tr.liste_titre { + height: 20px; +/* background-image: url(); + background-repeat: no-repeat; + background-position: top right; +*/ color: #FFFFFF; font-family: ; - line-height: 8px; + line-height: 18px; padding-left: 10px; white-space: nowrap; } tr.liste_titre td { padding-left: 3px; + vertical-align: text-top; } td.liste_titre { - background: #7699A9; - background-image: url(); background-repeat: repeat-x; color: #FFFFFF; font-family: ; font-weight: normal; white-space: nowrap; + background-image: none; +} + +tr.liste_titre select.flat { + float: left; + width: 200px; + position: relative; + margin: 30px 10px 10px 0px; +} + +tr.liste_titre input.button { + float: left; + position: relative; + margin: 30px 10px 10px 0px; } td.liste_titre_sel { @@ -1419,18 +1414,16 @@ div.error { background-color: #AD1800; height: 20px; line-height: 20px; - margin-top: 10px; - margin-bottom: 10px; + margin-bottom: 20px; } /* Info admin */ div.info { - color: #707070; + color: #505050; padding: 0.2em 0.2em 0.2em 0.2em; margin: 0.5em 0em 0.5em 0em; - border: 1px solid #c0c0d0; - -moz-border-radius:6px; - background: #efefd4; + border: 1px solid #878003; + background: #F4EAA2; } @@ -1969,19 +1962,20 @@ A.none, A.none:active, A.none:visited, A.none:hover { line-height:1.5; zoom:1; font-weight: normal; - font-family:; + font-family:Verdana,Arial,sans-serif; font-size:1em; } -.ui-widget { - font-family:; - font-size:px; -} -.ui-button { margin-left: -1px; } -.ui-button-icon-only .ui-button-text { height: 8px; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: 2px 0px 6px 0px; } -.ui-button-text -{ - line-height: 1em !important; -} -.ui-autocomplete-input { margin: 0; padding: 1px; } +div.tabsAction { + margin-top: 10px; +} + +table.noborder { + margin-bottom: 10px; + position: relative; + float: left; +} + +div.leftContent { + background-color: #FFF; +}