Sun Java System Communications Express 6 2005Q4 Customization Guide

Customizing the Order of Calendar Toolbar Icons

To change the order of the calendar toolbar icons, you need to modify the <calclient-dir>/CalToolBarNormal.jsp file.

Figure 3–1 shows the default order of the Calendar Toolbar Icons.

Figure 3–1 Order of Calendar Toolbar Icons

Figure showing the default order of Calendar toolbar icons: New
Event, New Task, Check Availability, Search for Calendar, Printable, and Import/Export

Example 3–1 shows the default code used to display the Calendar Toolbar Icons in the order, New Event, New Task, Check Availability, Search for Calendar, Printable and Import/Export.


Example 3–1 Default code that displays the default Calendar Toolbar Icons


<div class="Toolbar">

<a name="toolbar"></a>
<script language="JavaScript" src="../uwc/js/define_images_cal.js"></script>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
	New Event
   <td nowrap><a href="javascript:void(0)" accesskey="e"
		onMouseOver="over('newEvent')" onMouseOut="out('newEvent')"
		onClick="openWinAutoHeight('<jato:text name="NewEventUrl"
escape="false"/>','eventWin','scrollbars=yes,resizable=yes,width=700');
return false;"><img name="newEvent"
src="<%= getLocalizedLabel(session,"skinModel", 
"uwc-calclient-NewEventImage", 
"../uwc/images/LrlNewEvent_1_wo.gif") %>"width="24" 
height="24" align="absmiddle" border="0" 
title="<%= getLocalizedLabel(session,
 "uwc-calclient-toolbar-tooltip-NewEvent",
"New Event") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewEvent", 
"New Event") %>"></a> <a href="javascript:void(0)"
title="<%= getLocalizedLabel(session,
"uwc-calclient-toolbar-tooltip-NewEvent", "New Event") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text name="NewEventUrl"
escape="false"/>',
'eventWin','scrollbars=yes,resizable=yes,width=700'); return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-NewEvent", 
	"New Event") %>
</a></td>
New Task <td class="ToolbarItem" nowrap><a href="javascript:void(0)"
 accesskey="t" 
onMouseOver="over('newTask')" onMouseOut="out('newTask')" 
onClick="openWinAutoHeight('<jato:text name="NewTaskUrl" 
escape="false"/>',
'task','scrollbars=yes,resizable=yes,width=700'); return false;">
<img name="newTask" src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-calclient-NewTaskImage", "../uwc/images/LrlNewTask_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0"
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewTask", "New Task") %>" 
alt="<%= getLocalizedLabel(session, "uwc-calclient-toolbar-tooltip-NewTask",
"New Task") %>"></a> <a href="javascript:void(0)" 
title="<%= getLocalizedLabel(session, 
	"uwc-calclient-toolbar-tooltip-NewTask",
"New Task") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text name="NewTaskUrl" 
escape="false"/>',
'task','scrollbars=yes,resizable=yes,width=700'); return false;"><%= 
getLocalizedLabel(session, "uwc-calclient-toolbar-NewTask", "New Task") %>
</a></td>
Check Availability
<td class="ToolbarItem" nowrap><a href="javascript: void(0)" 
accesskey="a" onMouseOver="over('checkAvail')" 
onMouseOut="out('checkAvail')" 
onClick="openWinAutoHeight('<jato:text name="AvailabilityUrl" 
escape="false"/>',
'availability','scrollbars=yes,resizable=yes,width=800'); 
return false;">
<img name="checkAvail" src="<%= getLocalizedLabel(session, "skinModel",
"uwc-calclient-CheckAvailabilityImage", 
"../uwc/images/LrlCheckAvail_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-CheckAvailability", 
"Check Availability") %>" 
alt="<%= getLocalizedLabel(session,
"uwc-calclient-toolbar-tooltip-CheckAvailability", 
"Check Availability") %>"></a> <a href="javascript: void(0)" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-CheckAvailability", 
"Check Availability") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text 
name="AvailabilityUrl" escape="false"/>','availability','scrollbars=yes,
resizable=yes,width=800'); return false;">
<%= getLocalizedLabel(session,
"uwc-calclient-toolbar-CheckAvailability", "Check Availability") %></a></td>
Search for Calendar
<!-- Show SearchCalendar if and only if 
the parent view is not manage calendars -->
<jato:content name="ShowSearchCalendars">
<td class="ToolbarItem" nowrap><a href="javascript: void(0)" accesskey="s" 
onMouseOver="over('search')" onMouseOut="out('search')" 
onClick="openSearchForCalendarsPopup(); return false;"><img name="search" 
src="<%= getLocalizedLabel(session, "skinModel", "uwc-common-SearchImage", 
"../uwc/images/LrlSearch_1_wo.gif") %>" width="24" height="24" 
align="absmiddle" border="0" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-SearchCalendar", "Search for Calendar") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-SearchCalendar", 
"Search for Calendar") %>"></a>
 <a href="javascript: void(0)" title="
<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-SearchCalendar", 
"Search for Calendar") %>" class="ToolLbl" 
onClick="openSearchForCalendarsPopup(); 
return false;"><%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-SearchCalendar", 
"Search for Calendar") %></a></td>

</jato:content>
Printable
<!-- Show Printable f and only if the parent view is not invitations -->
<jato:content name="ShowPrintable">

    <td class="ToolbarItem" nowrap><a href="javascript: void(0)" 
onClick="openWinAutoHeight('<jato:text name="PrintUrl" 
escape="false"/>','print',
'menubar=yes,scrollbars=yes,resizable=yes,width=700,height=650'); 
return false;" 
accesskey="p" class="ToolLbl" onMouseOver="over('printable')" 
onMouseOut="out('printable')"><img name="printable" src="<%= 
getLocalizedLabel(session, 
"skinModel", "uwc-common-PrintableImage", 
"../uwc/images/LrlPrintable_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", "Display a Printable Page") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", 
"Display a Printable Page") %>"></a>
 <a href="javascript:void(0)" onClick="openWinAutoHeight('<jato:text 
name="PrintUrl" 
escape="false"/>','print','menubar=yes,scrollbars=yes,resizable=yes,
width=700,height=650'); return false;" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", "Display a Printable Page") %>" 
class="ToolLbl"><%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-Printable", 
"Printable") %></a></td>

</jato:content>
Import/Export
    <td class="ToolbarItem" nowrap><a href="javascript: void(0)" 
accesskey="i" onMouseOver="over('importExport')" 
onMouseOut="out('importExport')" 
onClick="openWinAutoHeight('<jato:text name="ImportExportUrl" 
escape="false"/>',
'importexport','scrollbars=yes,resizable=yes,width=700'); 
return false;">
<img name="importExport" src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-common-ImportExportImage", "../uwc/images/LrlImpExp_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>" alt="<%= 
getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>"></a>
      <a href="javascript: void(0)" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>"
class="ToolLbl" onClick="openWinAutoHeight('<jato:text 
name="ImportExportUrl" 
escape="false"/>','importexport','scrollbars=yes,resizable=yes,
width=700'); 
return false;"><%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-ImportExport", "Import/Export") %></a>
    </td>
  </tr>
</table>
</div>

            

Figure 3–2 Changed order of the Toolbar Icons

Figure showing the changed order of the toolbar icons.

Example 3–2 shows the edited code that changes the order of icons in calendar tool bar to - New Task, New Event, Printable, Check Availability, Import/Export, Search for Calendar


Example 3–2 Customizing the toolbar icon order


<div class="Toolbar">

<a name="toolbar"></a>

<script language="JavaScript" 
src="../uwc/js/define_images_cal.js"> </script>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
New Task
<td class="ToolbarItem" nowrap><a href="javascript:void(0)"
 accesskey="t" 
onMouseOver="over('newTask')" onMouseOut="out('newTask')" 
onClick="openWinAutoHeight('<jato:text 
name="NewTaskUrl" escape="false"/>',
'task','scrollbars=yes,resizable=yes,width=700'); return false;">
<img name="newTask" 
src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-calclient-NewTaskImage", 
"../uwc/images/LrlNewTask_1_wo.gif") %>" width="24" height="24"
 align="absmiddle" 
border="0" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewTask", 
"New Task") %>" alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewTask", "New Task") %>"></a>
      <a href="javascript:void(0)" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewTask", "New Task") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text name="NewTaskUrl" 
escape="false"/>','task',
'scrollbars=yes,resizable=yes,width=700'); return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-NewTask", 
"New Task") %></a></td>
New Event
    <td nowrap><a href="javascript:void(0)" accesskey="e" 
onMouseOver="over('newEvent')" 
onMouseOut="out('newEvent')" 
onClick="openWinAutoHeight('<jato:text name="NewEventUrl" 
escape="false"/>','eventWin','scrollbars=yes,
resizable=yes,width=700'); return false;">
<img name="newEvent" src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-calclient-NewEventImage", "../uwc/images/LrlNewEvent_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0" title="<%= 
getLocalizedLabel(session, "uwc-calclient-toolbar-tooltip-NewEvent", 
"New Event") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewEvent", 
"New Event") %>"></a>
      <a href="javascript:void(0)" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-NewEvent", "New Event") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text name="NewEventUrl" escape="false"/>',
'eventWin','scrollbars=yes,resizable=yes,width=700'); return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-NewEvent", 
"New Event") %></a></td>
Printable
<!-- Show Printable f and only if the parent view is not invitations -->
<jato:content name="ShowPrintable">
<td class="ToolbarItem" nowrap><a href="javascript: void(0)" 
onClick="openWinAutoHeight('<jato:text name="PrintUrl" 
escape="false"/>',
'print','menubar=yes,scrollbars=yes,resizable=yes,width=700,
height=650'); 
return false;" accesskey="p" class="ToolLbl" 
onMouseOver="over('printable')" 
onMouseOut="out('printable')">
<img name="printable"
src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-common-PrintableImage", 
"../uwc/images/LrlPrintable_1_wo.gif") %>" width="24" height="24" 
align="absmiddle" 
border="0" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", 
"Display a Printable Page") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", 
"Display a Printable Page") %>"></a>
      <a href="javascript:void(0)" onClick="openWinAutoHeight('<jato:text 
name="PrintUrl" escape="false"/>','print','menubar=yes,
scrollbars=yes,resizable=yes,
width=700,height=650'); return false;" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Printable", "Display a Printable Page") %>" 
class="ToolLbl"><%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-Printable", 
"Printable") %></a></td>

</jato:content>
Check Availability
<td class="ToolbarItem" nowrap><a href="javascript: void(0)" accesskey="a" 
onMouseOver="over('checkAvail')" onMouseOut="out('checkAvail')" 
onClick="openWinAutoHeight('<jato:text name="AvailabilityUrl" 
escape="false"/>',
'availability','scrollbars=yes,resizable=yes,width=800'); 
return false;">
<img name="checkAvail" src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-calclient-CheckAvailabilityImage", 
"../uwc/images/LrlCheckAvail_1_wo.gif") %>" 
width="24" height="24" align="absmiddle" border="0" title="<%= 
getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-CheckAvailability",
"Check Availability") %>" alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-CheckAvailability", 
"Check Availability") %>">
</a>
      <a href="javascript: void(0)" title="<%= getLocalizedLabel(session,
 "uwc-calclient-toolbar-tooltip-CheckAvailability", 
"Check Availability") %>" 
class="ToolLbl" onClick="openWinAutoHeight
('<jato:text name="AvailabilityUrl" 
escape="false"/>','availability','scrollbars=yes,resizable=yes,
width=800'); 
return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-CheckAvailability", 
"Check Availability") %></a></td>
Import/Export
<td class="ToolbarItem" nowrap><a href="javascript: void(0)" accesskey="i" 
onMouseOver="over('importExport')" onMouseOut="out('importExport')" 
onClick="openWinAutoHeight('<jato:text name="ImportExportUrl" 
escape="false"/>',
'importexport','scrollbars=yes,resizable=yes,width=700'); 
return false;"><img name="importExport" 
src="<%= getLocalizedLabel(session, "skinModel", 
"uwc-common-ImportExportImage", 
"../uwc/images/LrlImpExp_1_wo.gif") %>" width="24" 
height="24" align="absmiddle" border="0" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>" 
alt="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>"></a>
      <a href="javascript: void(0)" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-ImportExport", 
"Import and Export Calendar") %>" class="ToolLbl" 
onClick="openWinAutoHeight('<jato:text 
name="ImportExportUrl" escape="false"/>',
'importexport','scrollbars=yes,resizable=yes,width=700'); 
return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-ImportExport", 
	"Import/Export") %></a>
 </td>
Search for Calendar
<!-- Show SearchCalendar if and only if the parent 
view is not manage calendars -->
<jato:content name="ShowSearchCalendars">

    <td class="ToolbarItem" nowrap><a href="javascript: void(0)" 
accesskey="s" 
onMouseOver="over('search')" onMouseOut="out('search')" 
onClick="openSearchForCalendarsPopup(); return false;"><img name="search" 
src="<%= getLocalizedLabel(session, "skinModel", "uwc-common-SearchImage", 
"../uwc/images/LrlSearch_1_wo.gif") %>" width="24" height="24"
 align="absmiddle" 
border="0" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-SearchCalendar",
"Search for Calendar") %>" alt="<%= getLocalizedLabel(session,
"uwc-calclient-toolbar-tooltip-SearchCalendar", 
"Search for Calendar") %>"></a>
<a href="javascript: void(0)" title="<%= 
getLocalizedLabel(session,
"uwc-calclient-toolbar-tooltip-SearchCalendar", "Search for Calendar") %>" 
class="ToolLbl" onClick="openSearchForCalendarsPopup(); return false;">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-SearchCalendar", 
"Search for Calendar") %></a></td>
</jato:content>
/tr>
</table>
</div>