New feature to not show all icons in iconbar bacause it are to many, Ralf is implementing template-prefs right for setting the max. number of icons in toolbar

This commit is contained in:
Pim Snel 2003-11-04 14:07:52 +00:00
parent f3de62e3da
commit 58df15c97f
7 changed files with 189 additions and 23 deletions

View File

@ -62,6 +62,12 @@ input[type=submit],input[type=button],button
cursor: hand; cursor: hand;
} }
input[type=image]
{
cursor: pointer;
cursor: hand;
border: 0px #bbbbbb none;
}
select select
{ {
font-size: 11px; font-size: 11px;
@ -142,6 +148,19 @@ a.textSidebox
height:1px; height:1px;
} }
#extraIcons
{
position:absolute;
z-index:13;
right:10px;
top:113px;
visibility:hidden;
background-image:url(../images/alpha-white.png);
border-width:1px;
border-color:#7e7e7e;
border-style:solid;
}
#divMain #divMain
{ {
background-color:white; background-color:white;

View File

@ -177,6 +177,19 @@ a.textSidebox
z-index:51; z-index:51;
} }
#extraIcons
{
position:absolute;
z-index:13;
right:10px;
top:113px;
visibility:hidden;
background-image:url(../images/alpha-white.png);
border-width:1px;
border-color:#7e7e7e;
border-style:solid;
}
#divAppIconBar #divAppIconBar
{ {
background-color:white; background-color:white;

View File

@ -3,22 +3,18 @@
<html xml:lang="nl" xmlns="http://www.w3.org/1999/xhtml"> <html xml:lang="nl" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<!-- <!--
HTML Coding Standards; HTML Coding Standards:
1. use lowercase is possible, because of xhtml validation 1. use lowercase is possible, because of xhtml validation
2. make your template validate either html 4.01 or xhtml 1 2. make your template validate either html 4.01 or xhtml 1
3. make your application validat both if possible 3. make your application validat both if possible
4. always use "" when possible (please help me I don't know the English word) 4. always use "" when possible (please help me I don't know the English word)
5. use png-graphics if possible, but keep in ming IE has a transparency bug when it renders png's 5. use png-graphics if possible, but keep in ming IE has a transparency bug when it renders png's
--> -->
<!-- LAY-OUT BUGS <!-- LAY-OUT BUGS
1. in IE no link cursor is displayd when for png's that link 1. in IE no link cursor is displayd when for png's that link
2. tabs are ugly in preferences 2. tabs are ugly in preferences
3. spacers inside sidebox 3. spacers inside sidebox
--> -->
<title>{website_title}</title> <title>{website_title}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" /> <meta http-equiv="content-type" content="text/html; charset={charset}" />
@ -34,12 +30,99 @@
<link href="{theme_css}" type="text/css" rel="StyleSheet" /> <link href="{theme_css}" type="text/css" rel="StyleSheet" />
{css} {css}
{java_script} {java_script}
<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> <!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher -->
<!--[if gte IE 5.5000]> <!--[if gte IE 5.5000]>
<SCRIPT src="{pngfix}" type=text/javascript> <script src="{pngfix}" type=text/javascript>
</SCRIPT> </script>
<![endif]--> <![endif]-->
<script language="Javascript" type="text/javascript">
/*
javascript for showing and hiding layers starting with the one in the iconbar
*/
// Javascript Browser Sniff 1.0 Jim Cummins - http://www.conxiondesigns.com
var isIE = false;
var isOther = false;
var isNS4 = false;
var isNS6 = false;
if(document.getElementById)
{
if(!document.all)
{
isNS6=true;
}
if(document.all)
{
isIE=true;
}
}
else
{
if(document.layers)
{
isNS4=true;
}
else
{
isOther=true;
}
}
// End of Browser Sniff 1.0
// Access Layer Style Properties Jim Cummins - http://www.conxiondesigns.com
function aLs(layerID)
{
var returnLayer;
if(isIE)
{
returnLayer = eval("document.all." + layerID + ".style");
}
if(isNS6)
{
returnLayer = eval("document.getElementById('" + layerID + "').style");
}
if(isNS4)
{
returnLayer = eval("document." + layerID);
}
if(isOther)
{
returnLayer = "null";
alert("Error:\nDue to your browser you will probably not\nbe able to view all of the following page\nas it was designed to be viewed. We regret\nthis error sincerely.");
}
return returnLayer;
}
// HideShow 1.0 Jim Cummins - http://www.conxiondesigns.com
function ShowL(ID)
{
aLs(ID).visibility = "visible";
}
function HideL(ID)
{
aLs(ID).visibility = "hidden";
}
function HideShow(ID)
{
if((aLs(ID).visibility == "visible") || (aLs(ID).visibility == ""))
{
aLs(ID).visibility = "hidden";
}
else if(aLs(ID).visibility == "hidden")
{
aLs(ID).visibility = "visible";
}
}
</script>
</head> </head>
<!-- we don't need body tags anymore, do we?) we do!!! onload!! LK --> <!-- we don't need body tags anymore, do we?) we do!!! onload!! LK -->
<body {body_tags}> <body {body_tags}>

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

View File

@ -32,38 +32,84 @@
$var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg'];
$applications = ''; $applications = '';
// == 'icons_and_text')
// == 'icons_and_text')
$max_icons=7; // must be detected with javascript or must be a preference
foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data)
{ {
if($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout') if($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout')
{ {
$title = $GLOBALS['phpgw_info']['apps'][$app]['title']; $title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title if($i<=$max_icons)
. '" title="'. $title . '" border="0" />';
$app_icons .= '<td height="66" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
$GLOBALS['phpgw_info']['flags']['navbar_target'])
{ {
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; $app_icons .= '<td height="66" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
}
$app_icons .= '>' . $icon . '</a></td>'; if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
{
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_icons .= '>' . $icon . '</a></td>';
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
{
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_titles .= '>' . $title . '</a></td>';
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
$GLOBALS['phpgw_info']['flags']['navbar_target'])
{
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
} }
$app_titles .= '>' . $title . '</a></td>'; else // generate extra icon layer | always shows icons and text
{
$app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= '>' . $icon . '</a></td>';
$app_extra_icons .= '<td align=left class="extraIconsRow"><a href="'.$app_data['url'] . '"';
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= '>' . $title . '</a></td></tr>';
}
unset($icon); unset($icon);
unset($title); unset($title);
$i++;
} }
} }
$var['app_icons'] = $app_icons; $var['app_icons'] = $app_icons;
if($i>$max_icons)
{
$app_extra_icons_div='
<div id="extraIcons">
<table>'.$app_extra_icons.'
<tr><td>&nbsp;</td><td nowrap=nowrap align="right"><a href="javascript:void(0);" onClick="HideL(\'extraIcons\');" title="'.lang('close').'"><img border="0" src="'.$var['img_root'].'/close.png"/></a></td></tr>
</table>
</div>';
$var['app_extra_icons_div']= $app_extra_icons_div;
$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="padding-right:3px;padding-top:50px;"><a title="'.lang('show_more_apps').'" href="javascript:void(0);" onClick="HideShow(\'extraIcons\');"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
}
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='icons') if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='icons')
{ {
$var['app_titles'] = $app_titles; $var['app_titles'] = $app_titles;

View File

@ -1,6 +1,8 @@
<!-- BEGIN navbar_header --> <!-- BEGIN navbar_header -->
<div id="divLogo"><a href="http://{logo_url}" target="_blank"><img src="{logo_file}" border="0" alt="eGroupWare"/></a></div> <div id="divLogo"><a href="http://{logo_url}" target="_blank"><img src="{logo_file}" border="0" alt="eGroupWare"/></a></div>
{app_extra_icons_div}
<div id="divMain"> <div id="divMain">
<div id="divAppIconBar"> <div id="divAppIconBar">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
@ -17,6 +19,9 @@
</table> </table>
</td> </td>
{app_extra_icons_icon}
<td width="1" valign="top" align="right"><img src="{img_root}/grey-pixel.png" width="1" height="68" alt="spacer" /></td> <td width="1" valign="top" align="right"><img src="{img_root}/grey-pixel.png" width="1" height="68" alt="spacer" /></td>
</tr> </tr>
</table> </table>