From 3cb410fcbfa52e182ddaf1dcea4a4818495bb484 Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Fri, 1 Jul 2005 23:47:29 +0000 Subject: [PATCH] - seperate textmenu from sidebox menu - build default textmenu and toolbar with default options - add first concept for the new sidebox menu (still a lot to do) - new page refresh button and menu item - better way of popping up the manual page and the about egw page - remove underlines from taskbar nodes --- phpgwapi/templates/idots2/css/idots2_page.css | 488 ++++---- phpgwapi/templates/idots2/css/idots2_skin.css | 1 + phpgwapi/templates/idots2/images/refresh.png | Bin 0 -> 910 bytes phpgwapi/templates/idots2/navbar.inc.php | 1113 +++++++++-------- phpgwapi/templates/idots2/navbar.tpl | 63 +- 5 files changed, 935 insertions(+), 730 deletions(-) create mode 100644 phpgwapi/templates/idots2/images/refresh.png diff --git a/phpgwapi/templates/idots2/css/idots2_page.css b/phpgwapi/templates/idots2/css/idots2_page.css index d093193148..3c633012c1 100755 --- a/phpgwapi/templates/idots2/css/idots2_page.css +++ b/phpgwapi/templates/idots2/css/idots2_page.css @@ -1,87 +1,87 @@ body, html { - scrollbar-3dlight-color : #000000; - scrollbar-arrow-color : #000000; - scrollbar-base-color : #000000; - scrollbar-darkshadow-color : #000000; - scrollbar-face-color : #C6C6C6; - scrollbar-highlight-color : #C6C6C6; - scrollbar-shadow-color : #000000; - scrollbar-track-color : #e0e0e0; - top: 0; - left: 0; - margin: 0px 5px 5px 5px; - padding: 0; - padding-top: 0px; - background-color: #ffffff; - font-family: Verdana, Arial, sans-serif, Helvetica; - font-style: normal; - text-decoration: none; - color: #000000; - font-size: 11px; + scrollbar-3dlight-color : #000000; + scrollbar-arrow-color : #000000; + scrollbar-base-color : #000000; + scrollbar-darkshadow-color : #000000; + scrollbar-face-color : #C6C6C6; + scrollbar-highlight-color : #C6C6C6; + scrollbar-shadow-color : #000000; + scrollbar-track-color : #e0e0e0; + top: 0; + left: 0; + margin: 0px 5px 5px 5px; + padding: 0; + padding-top: 0px; + background-color: #ffffff; + font-family: Verdana, Arial, sans-serif, Helvetica; + font-style: normal; + text-decoration: none; + color: #000000; + font-size: 11px; } form { - margin:0px; - padding:0px; + margin:0px; + padding:0px; } img { - border-width:0px; - border-style:none; + border-width:0px; + border-style:none; } a:link,a:visited { - cursor:pointer; - color: #006699; - text-decoration: none; + cursor:pointer; + color: #006699; + text-decoration: none; } a:hover,a:active { - cursor:pointer; - color: #ff9933; - text-decoration: underline; + cursor:pointer; + color: #ff9933; + text-decoration: underline; } input,button { - font-size: 12px; - color: #006699; - font-family: Arial, Helvetica, sans-serif; - border: 1px #bbbbbb solid; + font-size: 12px; + color: #006699; + font-family: Arial, Helvetica, sans-serif; + border: 1px #bbbbbb solid; } input[type=submit],input[type=button],input[type=reset],button { - margin:1px; - padding:1px; - cursor: pointer; - cursor: hand; + margin:1px; + padding:1px; + cursor: pointer; + cursor: hand; } input[type=image] { - cursor: pointer; - cursor: hand; - border: 0px #bbbbbb none; + cursor: pointer; + cursor: hand; + border: 0px #bbbbbb none; } select { - font-size: 11px; - color: #006699; - font-family: Arial, Helvetica, sans-serif; - border: 1px #bbbbbb solid; + font-size: 11px; + color: #006699; + font-family: Arial, Helvetica, sans-serif; + border: 1px #bbbbbb solid; } td { - color: #000000; - font-size: 11px; - font-family: Verdana, Arial, sans-serif, Helvetica; - font-style: normal; - text-decoration: none; + color: #000000; + font-size: 11px; + font-family: Verdana, Arial, sans-serif, Helvetica; + font-style: normal; + text-decoration: none; } .xF_button { background-color: #638494; border: 1px solid #000000; font-family: Verdana, Arial, sans-serif, Helvetica; font-style: normal; text-decoration: none; color: #ffffff; font-size: 11px;} @@ -95,342 +95,362 @@ td #nav { - padding: 0; - list-style: none; - height: 20px; - width:100%; - background-color:#eeeeee; - position: fixed; - margin:0; - top:0; - left:0; - z-index: 900; - border-bottom: 1px solid #9c9c9c; + padding: 0; + list-style: none; + height: 20px; + width:100%; + background-color:#eeeeee; + position: fixed; + margin:0; + top:0; + left:0; + z-index: 900; + border-bottom: 1px solid #9c9c9c; } - + #nav a,#nav a:visited { - display:block; - text-decoration:none; - margin: 0px; + display:block; + text-decoration:none; + margin: 0px; } #nav>li a { - padding-left: 5px; - padding-right: 5px; + padding-left: 5px; + padding-right: 5px; } #nav>ul { - height: 20px; + height: 20px; } #nav a:hover, #nav a:active { - display:block; - background-color:#2773fe; - border: 0px solid #000; - color:#ffffff; + display:block; + background-color:#2773fe; + border: 0px solid #000; + color:#ffffff; } #nav ul { - padding-top: 0px; - margin-top:3px; - border: 1px solid #9c9c9c; - display:none; - border-style: outset; - min-width:100px; - margin-left: 0px; - padding-left: 0px; - z-index: 900; + padding-top: 0px; + margin-top:3px; + border: 1px solid #9c9c9c; + display:none; + border-style: outset; + min-width:100px; + margin-left: 0px; + padding-left: 0px; + z-index: 900; } #nav ul ul,#nav ul { - background-color:#eeeeee; - position: absolute; + background-color:#eeeeee; + position: absolute; } #nav li:hover, #nav li li:hover { -display:block; -background-color:#2773fe; -color:white; + display:block; + background-color:#2773fe; + color:white; } #nav>li, #nav>li:hover { - padding: 0; - padding-top: 2px; - padding-bottom: 0px; - margin: 0; - list-style: none; - float:left; - height: 18px; + padding: 0; + padding-top: 2px; + padding-bottom: 0px; + margin: 0; + list-style: none; + float:left; + height: 18px; } #nav>li:hover ul { - display:block; + display:block; } #nav li li,#nav li li:hover { - display:block; - color:white; - list-style: none; - position: relative; - clear:both; - margin:0px; - height:18px; - padding:0px; - padding-top: 2px; + display:block; + color:white; + list-style: none; + position: relative; + clear:both; + margin:0px; + height:18px; + padding:0px; + padding-top: 2px; } #nav li li:hover a, #nav li:hover>a { - color:white; + color:white; +} + + + +#sidebox_container +{ + border-top:outset 1px #9c9c9c; + border-bottom:outset 1px #9c9c9c; + border-right:outset 1px #9c9c9c; +/* padding-top:50px; + padding-bottom:60px; + */ + left:0px; + width:170px; +/** height:100%;*/ + background-color:#cccccc; + display:none; + overflow:visible; + position:fixed; + z-index:899; } .divLoginbox { - position:relative; - width: 300px; - border-right: #9c9c9c 1px solid; - border-top: #9c9c9c 1px solid; - border-left: #9c9c9c 1px solid; - border-bottom: #9c9c9c 1px solid + position:relative; + width: 300px; + border-right: #9c9c9c 1px solid; + border-top: #9c9c9c 1px solid; + border-left: #9c9c9c 1px solid; + border-bottom: #9c9c9c 1px solid } .divLoginboxHeader { - text-align:center; - background-color:#dddddd; - padding-top:2px; - font-size:11px; - font-weight:bold; - color:#FFFFFF; + text-align:center; + background-color:#dddddd; + padding-top:2px; + font-size:11px; + font-weight:bold; + color:#FFFFFF; } .divSidebox { - position:relative; - width: 147px; - border-right: #9c9c9c 1px solid; - border-top: #9c9c9c 1px solid; - border-left: #9c9c9c 1px solid; - border-bottom: #9c9c9c 1px solid + position:relative; + width: 147px; + border-right: #9c9c9c 1px solid; + border-top: #9c9c9c 1px solid; + border-left: #9c9c9c 1px solid; + border-bottom: #9c9c9c 1px solid } .divSideboxHeader { - text-align:center; - padding-top:2px; - font-size:10px; - color:#666666; + text-align:center; + padding-top:2px; + font-size:10px; + color:#666666; } a.divSideboxEntry, .divSideboxEntry { - text-align:left; - height:16px; - background-color:#eeeeee; + text-align:left; + height:16px; + background-color:#eeeeee; } a.appTitles,.appTitles { - font-size: 10px; - height:18px; - padding-top:2px; - padding-bottom:2px; + font-size: 10px; + height:18px; + padding-top:2px; + padding-bottom:2px; } .sideboxSpace { - height:9px; + height:9px; } .greyLine { - margin:1px; - border-top-color:#7e7e7e; - border-top-width:1px; - border-top-style:solid; - height:1px; + margin:1px; + border-top-color:#7e7e7e; + border-top-width:1px; + border-top-style:solid; + height:1px; } .prefSection { - font-weight:bold; - font-size:16px; - line-height:40px; + font-weight:bold; + font-size:16px; + line-height:40px; } .extraIconsRow { - border-top-color:#dddddd; - border-top-width:1px; - border-top-style:solid; - padding:2px; + border-top-color:#dddddd; + border-top-width:1px; + border-top-style:solid; + padding:2px; } #extraIcons { - background-color:#eeeeee; - border-width:1px; - border-color:#7e7e7e; - border-style:solid; + background-color:#eeeeee; + border-width:1px; + border-color:#7e7e7e; + border-style:solid; } #divLogo { - position:absolute; - left:20px; - top:5px; - z-index:51; + position:absolute; + left:20px; + top:5px; + z-index:51; } #divAppTextBar { - background-color:white; + background-color:white; } #divStatusBar { - background-color:white; - height:15px; - padding-left:10px; - margin-top: 13px; + background-color:white; + height:15px; + padding-left:10px; + margin-top: 13px; } #tdSidebox { - width:170px; - background-color:white; - overflow:visible; + width:170px; + background-color:white; + overflow:visible; } #tdAppbox { - background-color:white; - padding-left:5px; - width: 100%; + background-color:white; + padding-left:5px; + width: 100%; } #divSideboxContainer { - position:relative; - width:150px; - top:0px; - left:0px; - background-color:white; - border-width:1px; - border-style:solid; - z-index:40; + position:relative; + width:150px; + top:0px; + left:0px; + background-color:white; + border-width:1px; + border-style:solid; + z-index:40; } #divAppboxHeader { - padding-bottom:0px; - font-size:14px; - font-weight:bold; - color:#666666; + padding-bottom:0px; + font-size:14px; + font-weight:bold; + color:#666666; } #divAppbox { - background-color:#ffffff; - margin-top:50px; - padding:0; + background-color:#ffffff; + margin-top:50px; + padding:0; } fmStatusBar { - margin-left:4px; - margin-bottom:3px; - font-size: 10px; + margin-left:4px; + margin-bottom:3px; + font-size: 10px; } .fmButton { - background-image:url(../images/buttonbackground.png); - width:28px; - height:28px; - background-repeat: no-repeat; + background-image:url(../images/buttonbackground.png); + width:28px; + height:28px; + background-repeat: no-repeat; } #fmLocation { - position:relative; - margin-bottom:3px; - height:27px; + position:relative; + margin-bottom:3px; + height:27px; } #fmMenu { - position:relative; + position:relative; } #fmFileWindow { - background-color:#ffffff; - margin-left:4px; - padding:5px; - position:relative; - border-right: #cccccc 1px solid; - border-top: #9c9c9c 2px solid; - border-left: #9c9c9c 2px solid; - border-bottom: #cccccc 1px solid + background-color:#ffffff; + margin-left:4px; + padding:5px; + position:relative; + border-right: #cccccc 1px solid; + border-top: #9c9c9c 2px solid; + border-left: #9c9c9c 2px solid; + border-bottom: #cccccc 1px solid } #admin_info { - position:relative; - text-align:right; + position:relative; + text-align:right; } #divGenTime { - bottom:14px; - font-size: 9px; - color: #ff0000; - text-align:center; - width:99%; + bottom:14px; + font-size: 9px; + color: #ff0000; + text-align:center; + width:99%; } #divPoweredBy { - bottom:14px; - font-size: 9px; - color: #000; - text-align:center; - width:99%; + bottom:14px; + font-size: 9px; + color: #000; + text-align:center; + width:99%; } .idots2toolbar { - background-color: #e5e5e5; - display: block; - position: fixed; - top: 20px; - left: 0; - padding: 0; - width: 100%; - height: 26px; - z-index: 49; - border-bottom: 1px solid #9c9c9c; + background-color: #e5e5e5; + display: block; + position: fixed; + top: 20px; + left: 0; + padding: 0; + width: 100%; + height: 26px; + z-index: 49; + border-bottom: 1px solid #9c9c9c; } .idots2toolbar a { - background-color: #e5e5e5; - display: block; - float: left; - width: 30px; - height: 20px; - padding: 0; - margin-top: 2px; - margin-bottom: 1px; - margin-left: 2px; - margin-right: 2px; - text-align: center; - background-position: center center; - background-repeat: no-repeat; - border: 1px solid #e5e5e5; + background-color: #e5e5e5; + display: block; + float: left; + width: 30px; + height: 20px; + padding: 0; + margin-top: 2px; + margin-bottom: 1px; + margin-left: 2px; + margin-right: 2px; + text-align: center; + background-position: center center; + background-repeat: no-repeat; + border: 1px solid #e5e5e5; } diff --git a/phpgwapi/templates/idots2/css/idots2_skin.css b/phpgwapi/templates/idots2/css/idots2_skin.css index 6c5327a00a..40ab353645 100755 --- a/phpgwapi/templates/idots2/css/idots2_skin.css +++ b/phpgwapi/templates/idots2/css/idots2_skin.css @@ -188,6 +188,7 @@ a.taskNode { text-align: center; color: #000; font-weight: 900; + text-decoration:none; } a.taskNode span { diff --git a/phpgwapi/templates/idots2/images/refresh.png b/phpgwapi/templates/idots2/images/refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..5c6a26dd396fdab3c0b0f5b41a70b0ee34b5fcef GIT binary patch literal 910 zcmV;919AL`P)f8Te$nK?6^OJ*kIrinHQMng4_5U*WGp<0UFM3gQHE=1aHT)Gl> z`X{&IRMKz{0-QyES^qmfQ%061RA%7(?2n{CSX4j;z- z{kH}mezsIB7DMd_{w;}+w`QkDrapT67!yMZ%XZm2G_gGhLcu^^gjb){Y1vw0ZC{-0 zs{GZtabaoz!}AwE85|rq_x@QOfy6W$^rtkYj^|OLOU?8#AB8w>$kU@SHV(8zr6p41 z@%8K4?4^>97W?AOlNmjofEaC_KQTfosRIz#qcp65UBkh0d@MU46Yp|+Go13>_EiPU zNA+YT8~3Ri9bSKJj35lTUTUyibx6b{wi^hjcZ41m=wi}J30v)sok z<83aS8Sly64?=_x2tW`@3BhL53RyGy`FZmww$slkMskXk-9BnfyGP)l=AtC{T?Y|Z zJ4$&*sp}+~QVeA_j3hT!9Zt{0`1D)Fhzuc|vj5s&W4{CodYXE2G;&wfF?An8x_C`{d*~j~1 z#G{gk66leCduy-5?KNX(*!%I~kSvz~O9NP0S>eoFvflJkUv1Y_YOCT-*^V2vy?{pB z<=(!@ufI1td;15)A@BPS{)StHLZSB?7Zw)CX0y?4cVet9pExB{;z^;!ToG71Ie+a= kUr?@^rfC43VzCIoUl;;lJtwtVUjP6A07*qoM6N<$g5ejSXaE2J literal 0 HcmV?d00001 diff --git a/phpgwapi/templates/idots2/navbar.inc.php b/phpgwapi/templates/idots2/navbar.inc.php index 7fcaab6516..f69ecba106 100755 --- a/phpgwapi/templates/idots2/navbar.inc.php +++ b/phpgwapi/templates/idots2/navbar.inc.php @@ -1,504 +1,633 @@ set_file( + /**************************************************************************\ + * eGroupWare * + * http://www.egroupware.org * + * -------------------------------------------- * + * 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. * + \**************************************************************************/ + + + /* + * parse_navbar + * + * Make the navbar or make the launchmenu when x-desktop is not yet loaded + * + * @param force default false + */ + function parse_navbar($force = False) + { + + $GLOBALS['idots2_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); + $GLOBALS['idots2_tpl']->set_file( + array( + 'navbar' => 'navbar.tpl' + ) + ); + + $GLOBALS['idots2_tpl']->set_block('navbar','xdesktop_header','xdesktop_header'); + $GLOBALS['idots2_tpl']->set_block('navbar','background','background'); + $GLOBALS['idots2_tpl']->set_block('navbar','background_stretched','background_stretched'); + $GLOBALS['idots2_tpl']->set_block('navbar','background_none','background_none'); + $GLOBALS['idots2_tpl']->set_block('navbar','logo','logo'); + + $GLOBALS['idots2_tpl']->set_block('navbar','navbar_header_begin','navbar_header_begin'); + $GLOBALS['idots2_tpl']->set_block('navbar','launch_app','launch_app'); + $GLOBALS['idots2_tpl']->set_block('navbar','logout','logout'); + $GLOBALS['idots2_tpl']->set_block('navbar','navbar_header_end','navbar_header_end'); + + $GLOBALS['idots2_tpl']->set_block('navbar','show_clock','show_clock'); + $GLOBALS['idots2_tpl']->set_block('navbar','no_clock','no_clock'); + + $GLOBALS['idots2_tpl']->set_block('navbar','sidebox_container','sidebox_container'); + $GLOBALS['idots2_tpl']->set_block('navbar','sidebox_container_footer','sidebox_container_footer'); + + $GLOBALS['idots2_tpl']->set_block('navbar','sidebox','sidebox'); + $GLOBALS['idots2_tpl']->set_block('navbar','sidebox_footer','sidebox_footer'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_sidebox_block_row','extra_sidebox_block_row'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_sidebox_block_row_raw','extra_sidebox_block_row_raw'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_sidebox_block_row_no_link','extra_sidebox_block_row_no_link'); + + $GLOBALS['idots2_tpl']->set_block('navbar','extra_blocks_header','extra_block_header'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row','extra_block_row'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row_raw','extra_block_row_raw'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer'); + $GLOBALS['idots2_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer'); + + $GLOBALS['idots2_tpl']->set_block('navbar','begin_toolbar','begin_toolbar'); + $GLOBALS['idots2_tpl']->set_block('navbar','end_toolbar','end_toolbar'); + $GLOBALS['idots2_tpl']->set_block('navbar','toolbar_item','toolbar_item'); + $GLOBALS['idots2_tpl']->set_block('navbar','toolbar_seperator','toolbar_seperator'); + + $GLOBALS['idots2_tpl']->set_block('navbar','appbox','appbox'); + $GLOBALS['idots2_tpl']->set_block('navbar','end_appbox','end_appbox'); + $GLOBALS['idots2_tpl']->set_block('navbar','navbar_footer','navbar_footer'); + + $template_dir = $GLOBALS['phpgw_info']['server']['webserver_url'] . "/phpgwapi/templates/" . $GLOBALS['phpgw_info']['server']['template_set']; + + $var['template_dir'] = $template_dir; + + if($GLOBALS['phpgw_info']['flags']['currentapp']=='eGroupWare') { + // If this is the initial page load x-desktop + + // Should we display a clock or not + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show'] == 'yes') + { + $var['clock_show'] = "yes"; + + // How should the clock be displayed + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_min'])) + { + $var['clock']='second'; + } + else + { + $var['clock']=$GLOBALS['phpgw_info']['user']['preferences']['common']['clock_min']; + } + } + else + { + $var['clock_show'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']; + } + + + // Location of the x-desktop skin + $iconpath = $template_dir."/js/x-desktop/xDT/skins/IDOTS2"; + $var['iconpath'] = $iconpath; + + + $var['serverpath'] = $GLOBALS['phpgw_info']['server']['webserver_url']; + + + // If there is an update display it + if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == "yes") { + $var['default_app'] = 'home'; + $var['default_title'] = addslashes(lang('Home')); + } + else + { + + if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])) + { + // Display the default application + $var['default_app'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']; + $var['default_title'] = addslashes($GLOBALS['phpgw_info']['user']['apps'][$var['default_app']]['title']); + } + } + + $var["dIcons"] = ""; + $var["urlpref"] = $GLOBALS['phpgw_info']['navbar']['preferences']['url']; + $first = true; + $first2 = true; + if($GLOBALS['phpgw_info']['user']['preferences']['phpgwapi']) + { + foreach($GLOBALS['phpgw_info']['user']['preferences']['phpgwapi'] as $shortcut => $shortcut_data) + { + if(strpos($shortcut, "size_") === false) { + if($first) + { + $var["appTitles"] = $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['title']]['title']; + + $var["appImgs"] = $shortcut_data['icon']; + $var["appUrls"] = $shortcut_data['link']; + $var["appTop"] = $shortcut_data['top']; + $var["appLeft"] = $shortcut_data['left']; + $var["appType"] = $shortcut_data['type']; + $var["appName"] = $shortcut_data['title']; + $first= false; + } + else + { + + $var["appTitles"] .=','. $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['title']]['title']; + $var["appImgs"] .=','. $shortcut_data['icon']; + $var["appUrls"] .=','. $shortcut_data['link']; + $var["appTop"] .=','. $shortcut_data['top']; + $var["appLeft"] .=','. $shortcut_data['left']; + $var["appType"] .=','. $shortcut_data['type']; + $var["appName"] .=','. $shortcut_data['title']; + + } + } + else { + if($first2) + { + $var["sizeTitles"] = $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['name']]['title']; + $var["sizeWidth"] = $shortcut_data['width']; + $var["sizeHeight"] = $shortcut_data['height']; + $first2= false; + } + else + { + $var["sizeTitles"] .=','. $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['name']]['title']; + $var["sizeWidth"] .=','. $shortcut_data['width']; + $var["sizeHeight"] .=','. $shortcut_data['height']; + + } + + } + } + } + + $var["back_shortcut"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['back_icons']; + + if(!empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor_icons'])) + { + $var["color_shortcut"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor_icons']; + } + else + { + $var["color_shortcut"] = '#FFF'; + } + + if(!empty($GLOBALS['phpgw_info']['user']['preferences']['common']['textcolor_icons'])) + { + $var["color_text_sc"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['textcolor_icons']; + } + else + { + $var["color_text_sc"] = '#000'; + } + + + $var["appTitles"] = addslashes($var["appTitles"]); + $var["strXmlUrl"] = "phpgwapi/templates/" . $GLOBALS['phpgw_info']['server']['template_set']; + + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['scrWidth'])) + { + $var["scrWidth"] = "600"; + } + else + { + $var["scrWidth"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['scrWidth']; + } + + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['scrHeight'])) + { + $var["scrHeight"] = "400"; + } + else + { + $var["scrHeight"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['scrHeight']; + } + $var['titleAdd'] = lang('Add Shortcut'); + $var['titleRem'] = lang('Remove Shortcut'); + $var['titlePref'] = $GLOBALS['phpgw_info']['navbar']['preferences']['title']; + $var['titleAbout'] = lang('About'); + $var['programs'] = lang('Programs'); + $var['calendarTitle'] = $GLOBALS['phpgw_info']['navbar']['calendar']['title']; + // print_r($GLOBALS['phpgw_info']['navbar']); + $GLOBALS['idots2_tpl']->set_var($var); + $GLOBALS['idots2_tpl']->pfp('out','xdesktop_header'); + + + if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['files'])) + { + $var["backgroundimage"] = $template_dir.'/images/backgrounds/achtergrond.png'; + } + else + { + $var["backgroundimage"] = $template_dir.'/images/backgrounds/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['files']; + } + + if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bckStyle'])) + { + $var["backgroundstyle"] = "stretched"; + } + else + { + $var["backgroundstyle"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bckStyle']; + } + + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor'])) + { + $var["backgroundcolor"] = '#FFFFFF'; + } + else + { + $var["backgroundcolor"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor']; + } + + $GLOBALS['idots2_tpl']->set_var($var); + + if( $GLOBALS['phpgw_info']['user']['preferences']['common']['files'] == 'none') + { + $GLOBALS['idots2_tpl']->pfp('out','background_none'); + } + else + { + if($var["backgroundstyle"] == "stretched") + { + $GLOBALS['idots2_tpl']->pfp('out','background_stretched'); + } + else + { + $GLOBALS['idots2_tpl']->pfp('out','background'); + } + } + if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['showLogo']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['showLogo'] == 'yes') + { + $GLOBALS['idots2_tpl']->pfp('out','logo'); + } + + if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show'] == 'yes') + { + $GLOBALS['idots2_tpl']->pfp('out','show_clock'); + } + else + { + $GLOBALS['idots2_tpl']->pfp('out','no_clock'); + } + + + $var['img_root'] = $$template_dir.'/images'; + $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; + + + + $GLOBALS['idots2_tpl']->pfp('out','navbar_header_begin'); + + //print_r($GLOBALS['phpgw_info']['navbar']); + foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) + { + if($app != 'about') + { + $var['title'] = $app_data['title']; + $var['icon'] = $app_data['icon']; + $var['url'] = $app_data['url']; + $GLOBALS['idots2_tpl']->set_var($var); + if($app != 'logout') + { + $GLOBALS['idots2_tpl']->pfp('out','launch_app'); + } + else + { + $GLOBALS['idots2_tpl']->pfp('out','logout'); + } + } + } + + + $GLOBALS['idots2_tpl']->pfp('out','navbar_header_end'); + + /******************************************************\ + * The menu's * + \******************************************************/ + } + else + { + // build the menu + $menu=array(); + $menu['Window'] = array( array( - 'navbar' => 'navbar.tpl' - ) - ); - - $GLOBALS['idots2_tpl']->set_block('navbar','xdesktop_header','xdesktop_header'); - $GLOBALS['idots2_tpl']->set_block('navbar','background','background'); - $GLOBALS['idots2_tpl']->set_block('navbar','background_stretched','background_stretched'); - $GLOBALS['idots2_tpl']->set_block('navbar','background_none','background_none'); - $GLOBALS['idots2_tpl']->set_block('navbar','logo','logo'); - - $GLOBALS['idots2_tpl']->set_block('navbar','navbar_header_begin','navbar_header_begin'); - $GLOBALS['idots2_tpl']->set_block('navbar','launch_app','launch_app'); - $GLOBALS['idots2_tpl']->set_block('navbar','logout','logout'); - $GLOBALS['idots2_tpl']->set_block('navbar','navbar_header_end','navbar_header_end'); - - $GLOBALS['idots2_tpl']->set_block('navbar','show_clock','show_clock'); - $GLOBALS['idots2_tpl']->set_block('navbar','no_clock','no_clock'); - - $GLOBALS['idots2_tpl']->set_block('navbar','navbar_header','navbar_header'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_blocks_header','extra_block_header'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row','extra_block_row'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row_raw','extra_block_row_raw'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer'); - $GLOBALS['idots2_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer'); - - $GLOBALS['idots2_tpl']->set_block('navbar','begin_toolbar','begin_toolbar'); - $GLOBALS['idots2_tpl']->set_block('navbar','end_toolbar','end_toolbar'); - $GLOBALS['idots2_tpl']->set_block('navbar','toolbar_item','toolbar_item'); - $GLOBALS['idots2_tpl']->set_block('navbar','toolbar_seperator','toolbar_seperator'); - - - $GLOBALS['idots2_tpl']->set_block('navbar','appbox','appbox'); - $GLOBALS['idots2_tpl']->set_block('navbar','end_appbox','end_appbox'); - $GLOBALS['idots2_tpl']->set_block('navbar','navbar_footer','navbar_footer'); - - - $template_dir = $GLOBALS['phpgw_info']['server']['webserver_url'] . "/phpgwapi/templates/" . $GLOBALS['phpgw_info']['server']['template_set']; - - $var['template_dir'] = $template_dir; - - if($GLOBALS['phpgw_info']['flags']['currentapp']=='eGroupWare') { - // If this is the initial page load x-desktop - - // Should we display a clock or not - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show'] == 'yes') - { - $var['clock_show'] = "yes"; - - // How should the clock be displayed - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_min'])) - { - $var['clock']='second'; - } - else - { - $var['clock']=$GLOBALS['phpgw_info']['user']['preferences']['common']['clock_min']; - } - - - } - else - { - $var['clock_show'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']; - } - - - // Location of the x-desktop skin - $iconpath = $template_dir."/js/x-desktop/xDT/skins/IDOTS2"; - $var['iconpath'] = $iconpath; - - - $var['serverpath'] = $GLOBALS['phpgw_info']['server']['webserver_url']; - - - // If there is an update display it - if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == "yes") { - $var['default_app'] = 'home'; - $var['default_title'] = addslashes(lang('Home')); - } - else { - - if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])) - { - // Display the default application - $var['default_app'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']; - $var['default_title'] = addslashes($GLOBALS['phpgw_info']['user']['apps'][$var['default_app']]['title']); - } - } - - $var["dIcons"] = ""; - $var["urlpref"] = $GLOBALS['phpgw_info']['navbar']['preferences']['url']; - $first = true; - $first2 = true; - if($GLOBALS['phpgw_info']['user']['preferences']['phpgwapi']) - { - foreach($GLOBALS['phpgw_info']['user']['preferences']['phpgwapi'] as $shortcut => $shortcut_data) - { - if(strpos($shortcut, "size_") === false) { - if($first) - { - $var["appTitles"] = $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['title']]['title']; - - $var["appImgs"] = $shortcut_data['icon']; - $var["appUrls"] = $shortcut_data['link']; - $var["appTop"] = $shortcut_data['top']; - $var["appLeft"] = $shortcut_data['left']; - $var["appType"] = $shortcut_data['type']; - $var["appName"] = $shortcut_data['title']; - $first= false; - } - else - { - - $var["appTitles"] .=','. $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['title']]['title']; - $var["appImgs"] .=','. $shortcut_data['icon']; - $var["appUrls"] .=','. $shortcut_data['link']; - $var["appTop"] .=','. $shortcut_data['top']; - $var["appLeft"] .=','. $shortcut_data['left']; - $var["appType"] .=','. $shortcut_data['type']; - $var["appName"] .=','. $shortcut_data['title']; - - } - } - else { - if($first2) - { - $var["sizeTitles"] = $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['name']]['title']; - $var["sizeWidth"] = $shortcut_data['width']; - $var["sizeHeight"] = $shortcut_data['height']; - $first2= false; - } - else - { - $var["sizeTitles"] .=','. $GLOBALS['phpgw_info']['user']['apps'][$shortcut_data['name']]['title']; - $var["sizeWidth"] .=','. $shortcut_data['width']; - $var["sizeHeight"] .=','. $shortcut_data['height']; - - } - - } - } - } - - $var["back_shortcut"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['back_icons']; - - if(!empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor_icons'])) - { - $var["color_shortcut"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor_icons']; - } - else - { - $var["color_shortcut"] = '#FFF'; - } - - if(!empty($GLOBALS['phpgw_info']['user']['preferences']['common']['textcolor_icons'])) - { - $var["color_text_sc"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['textcolor_icons']; - } - else - { - $var["color_text_sc"] = '#000'; - } - - - $var["appTitles"] = addslashes($var["appTitles"]); - $var["strXmlUrl"] = "phpgwapi/templates/" . $GLOBALS['phpgw_info']['server']['template_set']; - - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['scrWidth'])) - { - $var["scrWidth"] = "600"; - } - else - { - $var["scrWidth"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['scrWidth']; - } - - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['scrHeight'])) - { - $var["scrHeight"] = "400"; - } - else - { - $var["scrHeight"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['scrHeight']; - } - $var['titleAdd'] = lang('Add Shortcut'); - $var['titleRem'] = lang('Remove Shortcut'); - $var['titlePref'] = $GLOBALS['phpgw_info']['navbar']['preferences']['title']; - $var['titleAbout'] = lang('About'); - $var['programs'] = lang('Programs'); - $var['calendarTitle'] = $GLOBALS['phpgw_info']['navbar']['calendar']['title']; -// print_r($GLOBALS['phpgw_info']['navbar']); - $GLOBALS['idots2_tpl']->set_var($var); - $GLOBALS['idots2_tpl']->pfp('out','xdesktop_header'); - - - if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['files'])) - { - $var["backgroundimage"] = $template_dir.'/images/backgrounds/achtergrond.png'; - } - else - { - $var["backgroundimage"] = $template_dir.'/images/backgrounds/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['files']; - } - - if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bckStyle'])) - { - $var["backgroundstyle"] = "stretched"; - } - else - { - $var["backgroundstyle"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bckStyle']; - } - - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor'])) - { - $var["backgroundcolor"] = '#FFFFFF'; - } - else - { - $var["backgroundcolor"] = $GLOBALS['phpgw_info']['user']['preferences']['common']['bgcolor']; - } - - $GLOBALS['idots2_tpl']->set_var($var); - - if( $GLOBALS['phpgw_info']['user']['preferences']['common']['files'] == 'none') - { - $GLOBALS['idots2_tpl']->pfp('out','background_none'); - } - else - { - if($var["backgroundstyle"] == "stretched") - { - $GLOBALS['idots2_tpl']->pfp('out','background_stretched'); - } - else - { - $GLOBALS['idots2_tpl']->pfp('out','background'); - } - } - if (empty($GLOBALS['phpgw_info']['user']['preferences']['common']['showLogo']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['showLogo'] == 'yes') - { - $GLOBALS['idots2_tpl']->pfp('out','logo'); - } - - if(empty($GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show']) || $GLOBALS['phpgw_info']['user']['preferences']['common']['clock_show'] == 'yes') - { - $GLOBALS['idots2_tpl']->pfp('out','show_clock'); - } - else - { - $GLOBALS['idots2_tpl']->pfp('out','no_clock'); - } - - - $var['img_root'] = $$template_dir.'/images'; - $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; - - - - $GLOBALS['idots2_tpl']->pfp('out','navbar_header_begin'); - - //print_r($GLOBALS['phpgw_info']['navbar']); - foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) - { - if($app != 'about') - { - $var['title'] = $app_data['title']; - $var['icon'] = $app_data['icon']; - $var['url'] = $app_data['url']; - $GLOBALS['idots2_tpl']->set_var($var); - if($app != 'logout') - { - $GLOBALS['idots2_tpl']->pfp('out','launch_app'); - } - else - { - $GLOBALS['idots2_tpl']->pfp('out','logout'); - } - } - } - - - $GLOBALS['idots2_tpl']->pfp('out','navbar_header_end'); - - /******************************************************\ - * The menu's * - \******************************************************/ - } - else { - // Show the menu - $menu_title = lang('Help'); - $file = array( - array( - 'text' => lang('%1 Manual',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']), + 'text' => lang('%1 start',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']), 'no_lang' => True, - 'link' => $GLOBALS['phpgw_info']['navbar']['manual']['url'] + 'link' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/index.php' + ), + array( + 'text' => lang('Refresh'), + 'no_lang' => True, + 'link' => 'javascript:document.location=document.location' ), - array( - 'text' => '
', + array( + 'text' => lang('Open sidebox'), + 'no_lang' => True, + 'link' => 'javascript:sidebox_open()' + ), + array( + 'text' => lang('Close sidebox'), + 'no_lang' => True, + 'link' => 'javascript:sidebox_close()' + ), + ); + + $menu['Help'] = array( + array( + 'text' => lang('%1 manual',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']), + 'no_lang' => True, + 'link' => 'javascript:parent.openX(\''.lang('%1 manual',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']).'\',\''.$GLOBALS['phpgw_info']['navbar']['manual']['url'].'\')' + ), + array( + 'text' => '
', 'no_lang' => True ), - array( + array( 'text' => lang('About %1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']), 'no_lang' => True, + //'link' => 'javascript:parent.openX(\'about\',\''.$GLOBALS['phpgw_info']['navbar']['about']['url'].'\')' 'link' => $GLOBALS['phpgw_info']['navbar']['about']['url'] ), array( - 'text' => lang('About eGroupware'), - 'no_lang' => True, - 'link' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/about.php', - //below is how it aught to be - // 'link' => 'javascript:openX(\'about\',\''.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/about.php'.'\')' - ), - ); - - $var['menu_link'] = ''; - $var['sideboxcolstart'] = ''; - $var['remove_padding'] = ''; - - $GLOBALS['idots2_tpl']->set_var($var); - $GLOBALS['idots2_tpl']->pparse('out','appbox'); - - $var['sideboxcolend'] = ''; - - $GLOBALS['idots2_tpl']->set_var($var); - $menu_new = $GLOBALS['phpgw']->hooks->single('menu',$GLOBALS['phpgw_info']['flags']['currentapp']); - if(is_array($menu_new)) - { - foreach($menu_new as $menu_title =>$menu) - { - display_sidebox('',$menu_title,$menu); - } - } - else - { - $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); - display_sidebox('',$menu_title,$file); - } - - $GLOBALS['idots2_tpl']->pparse('out','end_appbox'); - - //Is there a toolbar hooked in this application - $toolbar = $GLOBALS['phpgw']->hooks->single('toolbar',$GLOBALS['phpgw_info']['flags']['currentapp']); - if(is_array($toolbar) && count($toolbar) > 0) { - display_toolbar($toolbar); - } - - $GLOBALS['idots2_tpl']->pparse('out','navbar_footer'); - - - - // If the application has a header include, we now include it - if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) - { - list($app,$class,$method) = explode('.',$_GET['menuaction']); - if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - - - } - return; - } - - - /* - * display_toolbar - * - * The toolbar - * - */ - function display_toolbar($toolbar) { - $GLOBALS['idots2_tpl']->pparse('out','begin_toolbar'); - $app = $GLOBALS['phpgw_info']['flags']['currentapp']; - foreach($toolbar as $item) { - if(is_array($item)) { - $item['image'] = $GLOBALS['phpgw']->common->image($app,$item['image']); - $GLOBALS['idots2_tpl']->set_var($item); - $GLOBALS['idots2_tpl']->pfp('out','toolbar_item'); - } - else { - $GLOBALS['idots2_tpl']->pparse('out','toolbar_seperator'); - } - } - $GLOBALS['idots2_tpl']->pparse('out','end_toolbar'); - } - - function display_sidebox($appname,$menu_title,$file) - { - if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) - { - $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); - $GLOBALS['idots2_tpl']->set_var($var); - $GLOBALS['idots2_tpl']->pfp('out','extra_blocks_header'); - - foreach($file as $text => $url) - { - sidebox_menu_item($url,$text); - } - - $GLOBALS['idots2_tpl']->pparse('out','extra_blocks_footer'); - } - } - function sidebox_menu_item($item_link='',$item_text='') - { - if($item_text === '_NewLine_' || $item_link === '_NewLine_') - { - $GLOBALS['idots2_tpl']->pparse('out','extra_block_spacer'); - } - else - { - $var['icon_or_star']='ball'; - $var['target'] = ''; - if(is_array($item_link)) - { - if(isset($item_link['icon'])) - { - $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; - $var['icon_or_star'] = $item_link['icon'] ? '' : False; - } - $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); - $var['item_link'] = $item_link['link']; - if ($item_link['target']) - { - $var['target'] = ' target="' . $item_link['target'] . '"'; - } - } - else - { - $var['lang_item'] = lang($item_text); - $var['item_link'] = $item_link; - } - $GLOBALS['idots2_tpl']->set_var($var); - - $block = 'extra_block_row'; - if ($var['item_link'] === False) - { - $block .= $var['icon_or_star'] === False ? '_raw' : '_no_link'; - } - $GLOBALS['idots2_tpl']->pparse('out',$block); - } - } - - function parse_navbar_end() - { - $GLOBALS['idots2_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); - - $GLOBALS['idots2_tpl']->set_file( + 'text' => lang('About eGroupware'), + 'no_lang' => True, + 'link' => 'javascript:parent.openX(\'about\',\''.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/about.php'.'\')' + ), + ); + + $var['menu_link'] = ''; + $var['sideboxcolstart'] = ''; + $var['remove_padding'] = ''; + + $GLOBALS['idots2_tpl']->set_var($var); + $GLOBALS['idots2_tpl']->pparse('out','appbox'); + + $var['sideboxcolend'] = ''; + + $GLOBALS['idots2_tpl']->set_var($var); + $menu_from_app = $GLOBALS['phpgw']->hooks->single('menu',$GLOBALS['phpgw_info']['flags']['currentapp']); + //_debug_array($menu_new); + //die(); + if(is_array($menu_from_app)) + { + $menu = array_merge($menu_from_app,$menu); + } + /* else + { + $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); + display_sidebox('',$menu_title,$menu_help); + } + */ + + foreach($menu as $menu_title =>$menu) + { + display_textmenu('',$menu_title,$menu); + } + + $GLOBALS['idots2_tpl']->pparse('out','end_appbox'); + + //build the toolbar + + $toolbar = Array(); + $toolbar['refresh'] = Array( + 'title' => "Refresh", + 'image' => 'refresh.png', + 'url'=>'javascript:document.location=document.location' + ); + + //Is there a toolbar hooked in this application + $toolbar_from_app = $GLOBALS['phpgw']->hooks->single('toolbar',$GLOBALS['phpgw_info']['flags']['currentapp']); + if(is_array($toolbar_from_app) && count($toolbar_from_app) > 0) + { + $toolbar = array_merge($toolbar_from_app,$toolbar); + } + + display_toolbar($toolbar); + + + //build the sidebox + $menu_title = lang('General Menu'); + + $file['Home'] = $GLOBALS['egw_info']['navbar']['home']['url']; + if($GLOBALS['egw_info']['user']['apps']['preferences']) + { + $file['Preferences'] = $GLOBALS['egw_info']['navbar']['preferences']['url']; + } + $file += array( array( - 'footer' => 'footer.tpl' - ) - ); - $var = Array( - 'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images', - 'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], - 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] - ); - $GLOBALS['phpgw']->hooks->process('navbar_end'); - - if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) - { - $mtime = microtime(); - $mtime = explode(' ',$mtime); - $mtime = $mtime[1] + $mtime[0]; - $tend = $mtime; - $totaltime = ($tend - $GLOBALS['page_start_time']); - - $var['page_generation_time'] = '

'.lang('Page was generated in %1 seconds',$totaltime).'
'; - } - - $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); - $var['activate_tooltips'] = ''; - $GLOBALS['idots2_tpl']->set_var($var); - $GLOBALS['idots2_tpl']->pfp('out','footer'); - } + 'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']), + 'no_lang' => True, + 'link' => $GLOBALS['egw_info']['navbar']['about']['url'] + ), + 'Logout'=>$GLOBALS['egw_info']['navbar']['logout']['url'] + ); + $var['menu_link'] = ''; + //$var['sideboxcolstart'] = ''; + $var['remove_padding'] = ''; + $GLOBALS['idots2_tpl']->set_var($var); + + $GLOBALS['idots2_tpl']->pparse('out','sidebox_container'); + + //display_sidebox('',$menu_title,$file); + $GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']); + + //$var['sideboxcolend'] = ''; + $GLOBALS['idots2_tpl']->pparse('out','sidebox_container_footer'); + + + $GLOBALS['idots2_tpl']->pparse('out','navbar_footer'); + + // If the application has a header include, we now include it + if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) + { + list($app,$class,$method) = explode('.',$_GET['menuaction']); + if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) + { + $GLOBALS[$class]->header(); + } + } + } + return; + } + + + /* + * display_toolbar + * + * The toolbar + * + */ + function display_toolbar($toolbar) { + $GLOBALS['idots2_tpl']->pparse('out','begin_toolbar'); + $app = $GLOBALS['phpgw_info']['flags']['currentapp']; + foreach($toolbar as $item) { + if(is_array($item)) { + $item['image'] = $GLOBALS['phpgw']->common->image($app,$item['image']); + $GLOBALS['idots2_tpl']->set_var($item); + $GLOBALS['idots2_tpl']->pfp('out','toolbar_item'); + } + else { + $GLOBALS['idots2_tpl']->pparse('out','toolbar_seperator'); + } + } + $GLOBALS['idots2_tpl']->pparse('out','end_toolbar'); + } + + function display_textmenu($appname,$menu_title,$file) + { + if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) + { + $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); + $GLOBALS['idots2_tpl']->set_var($var); + $GLOBALS['idots2_tpl']->pfp('out','extra_blocks_header'); + + foreach($file as $text => $url) + { + sidebox_menu_item($url,$text); + } + + $GLOBALS['idots2_tpl']->pparse('out','extra_blocks_footer'); + } + } + + function textmenu_item($item_link='',$item_text='') + { + if($item_text === '_NewLine_' || $item_link === '_NewLine_') + { + $GLOBALS['idots2_tpl']->pparse('out','extra_block_spacer'); + } + else + { + $var['icon_or_star']='ball'; + $var['target'] = ''; + if(is_array($item_link)) + { + if(isset($item_link['icon'])) + { + $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; + $var['icon_or_star'] = $item_link['icon'] ? '' : False; + } + $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); + $var['item_link'] = $item_link['link']; + if ($item_link['target']) + { + $var['target'] = ' target="' . $item_link['target'] . '"'; + } + } + else + { + $var['lang_item'] = lang($item_text); + $var['item_link'] = $item_link; + } + $GLOBALS['idots2_tpl']->set_var($var); + + $block = 'extra_block_row'; + if ($var['item_link'] === False) + { + $block .= $var['icon_or_star'] === False ? '_raw' : '_no_link'; + } + $GLOBALS['idots2_tpl']->pparse('out',$block); + } + } + + function display_sidebox($appname,$menu_title,$file) + { + if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) + { + $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); + $GLOBALS['idots2_tpl']->set_var($var); + $GLOBALS['idots2_tpl']->pfp('out','sidebox'); + + foreach($file as $text => $url) + { + sidebox_menu_item($url,$text); + } + + $GLOBALS['idots2_tpl']->pparse('out','sidebox_footer'); + } + } + + function sidebox_menu_item($item_link='',$item_text='') + { + if($item_text === '_NewLine_' || $item_link === '_NewLine_') + { + $GLOBALS['idots2_tpl']->pparse('out','extra_block_spacer'); + } + else + { + $var['icon_or_star']='ball'; + $var['target'] = ''; + if(is_array($item_link)) + { + if(isset($item_link['icon'])) + { + $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; + $var['icon_or_star'] = $item_link['icon'] ? '' : False; + } + $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); + $var['item_link'] = $item_link['link']; + if ($item_link['target']) + { + $var['target'] = ' target="' . $item_link['target'] . '"'; + } + } + else + { + $var['lang_item'] = lang($item_text); + $var['item_link'] = $item_link; + } + $GLOBALS['idots2_tpl']->set_var($var); + + $block = 'extra_sidebox_block_row'; + if ($var['item_link'] === False) + { + $block .= $var['icon_or_star'] === False ? '_raw' : '_no_link'; + } + $GLOBALS['idots2_tpl']->pparse('out',$block); + } + } + + function parse_navbar_end() + { + $GLOBALS['idots2_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); + + $GLOBALS['idots2_tpl']->set_file( + array( + 'footer' => 'footer.tpl' + ) + ); + $var = Array( + 'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images', + 'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], + 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] + ); + $GLOBALS['phpgw']->hooks->process('navbar_end'); + + if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) + { + $mtime = microtime(); + $mtime = explode(' ',$mtime); + $mtime = $mtime[1] + $mtime[0]; + $tend = $mtime; + $totaltime = ($tend - $GLOBALS['page_start_time']); + + $var['page_generation_time'] = '

'.lang('Page was generated in %1 seconds',$totaltime).'
'; + } + + $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); + $var['activate_tooltips'] = ''; + $GLOBALS['idots2_tpl']->set_var($var); + $GLOBALS['idots2_tpl']->pfp('out','footer'); + } diff --git a/phpgwapi/templates/idots2/navbar.tpl b/phpgwapi/templates/idots2/navbar.tpl index f05c2840e9..2cf278f526 100755 --- a/phpgwapi/templates/idots2/navbar.tpl +++ b/phpgwapi/templates/idots2/navbar.tpl @@ -149,11 +149,66 @@ function start() { - + + + + + + + + + + + + + + + + + + + +
  • {lang_item}
  • + + + + + + +
  • + + + + + + +
  • {lang_item}
  • + + - @@ -189,7 +244,7 @@ function start() { -
  • +