Sun Java System Messenger Express 6 2005Q4 Customization Guide
  Sök endast i den här boken
Ladda ner denna bok i PDF (1087 KB)

Chapter 3 Customizing User Interface Features in Messenger Express

This chapter describes how to customize user interface features of Sun Java System Messenger Express.

This chapter contains the following sections:

Modifying the Main Function Tabs

This section describes how to modify the Sun Java System Messenger Express main function tabs shown in Modifying the Main Function Tabs.

Figure 3–1 Sun Java System Messenger Express Main Function Tabs, With Default Labels

Messenger Express Main Function tabs, with default labels

You can modify the following on the Sun Java System Messenger Express main function tabs:

  • Interchange the location of tabs

  • Change the text of the tab labels

To Modify the Main Function Tabs

To modify the main function tabs, edit the appropriate files as follows:

  • For tab layout, edit the toolFrame() function in the main.js file.

  • For text used in the default tab labels, in the lang/i18n.js file, edit the i18n[] values for folders, message, and options in the // Tabs section, and help and logout in the // Tool Bars section.

  • For text of the default folder name labels (including the initially displayed Inbox tab label), edit the fldr[] values in the // Localized folder names section in the lang/i18n.js file.

Functionally, the tabs are constructed by the toolFrame() function. The toolFrame() function calls the tab()function in the main.js file and specifies the text of the tab label to be displayed.

The following functions, located in main.js, handle the default tabs:

  • Folders: displayFolders()

  • Inbox: displayMbox() or refreshMbox() (depending on the state selected)

  • Message: selectMsg()

  • Options: selectOptions()

  • Help: help()

  • Logout: logout()

Example—Main Function Tabs Modifications

The example shown in Example—Main Function Tabs Modifications moves the Options tab to the right, and changes the text of its tab label to “Preferences.”

Figure 3–2 Example Main Function Tabs Modifications

In this figure the Options tab has been  moved to the right end
of the toolbar, and the text of the tab "Label" has been  changed to "Preferences."

Example—Main Function Tabs Modifications shows the necessary changes to be made in file main.js (layout).


Example 3–1 Altering Function Tabs Layout ( main.js)


function toolFrame() {
.....
’
               <td width=30%\>’ + nbsp + ’</td\>\\n+
tab(i18n[’options’], state == ’Options’, ’selectOptions()’) +
....
}


            

Example—Main Function Tabs Modifications shows the necessary changes to be made in file en/i18n.js (tab labels).


Example 3–2 Altering Function Tabs Labels (en/i18n.js)


// Tabs
i18n[’folders’] = ’Folders’
i18n[’message’] = ’Message’
i18n[’pab’] = ’Addresses’
i18n[’options’] = ’
               Preferences

Modifying the Mailbox Tool Bar

This section describes how to modify the Sun Java System Messenger Express mailbox tool bar shown in Modifying the Mailbox Tool Bar.

Figure 3–3 Sun Java System Messenger Express Mailbox Tool Bar

Mail tools bar

You can modify the following on the Sun Java System Messenger Express mailbox tool bar:

  • Change the layout of the mailbox tool bar relative to the rest of the page

  • Rearrange the order of tools

  • Change the tools text

To Modify the Mailbox Tool Bar

To modify the mailbox tool bar, edit the appropriate files as follows:

  • To customize the layout relative to the rest of the page, edit the toolFrame() function in the main.js file.

  • To customize the layout within the tool bar and the associated graphics, edit the getToolbar() function in the mbox_fs.html file.

  • To customize the text associated with the graphics in the Tool Bar, edit the i18n[] values get mail, compose, search, new search, file selected message, delete, undelete, and expunge in the lang/i18n.js file.

Functionally, toolFrame() in main.js calls getToolbar()in mbox_fs.html to get the HTML code to write out to the page.

The getToolbar() function in mbox_fs.html assembles the code and assigns the functions to the graphics by calling toolbar() in main.js, which takes care of items such as colors and text-only versions.

The getToolbar() function in mbox_fs.html also calls folderSelection() in main.js to generate the drop-down folder list.

The functions assigned by getToolbar() in mbox_fs.html that handle the tool clicks are:

  • Get Mail: main.refreshMbox()

  • Compose: main.compose(”new”)

  • Search: parent.srch()

  • Move Messages to Folder: parent.move()

  • Delete: parent.delmsg(), parent.undelmsg(), parent.exmsg() (depending on whether the message is in the trash folder or not)

Example—Mailbox Tool Bar Modifications

The example shown in Example—Mailbox Tool Bar Modifications makes “Search” as the first tool and changes the text of the “Get Mail” tool to “Get Messages.”

Figure 3–4 Example Mailbox Tool Bar Modifications

In this figure the "Search" tool  is displayed as the first tool
and  the  "Get Mail" tool       has been  renamed to "Get Messages."

Example—Mailbox Tool Bar Modifications shows the necessary changes to be made in files mbox_fs.html (layout).


Example 3–3 Altering Tool Bar Layout (mbox_fs.html)


function getToolbar() {
....
main.WMtoolbar(
....
(main.srch != ’’ ? i18n[’new search’] : i18n[’search’]),
’parent.srch()’, ’imx/search.gif’, 27, 25, true,
               
i18n[’get mail’], ’main.refreshMbox()’, ’imx/pull.gif’, 27, 25,
true, i18n[’compose’], ’main.compose(”new”)’, ’imx/compose.gif’,
27, 25, true)
....
}


            

Example—Mailbox Tool Bar Modifications


 shows the necessary changes to be made in file en/i18n.js (text)
            


Example 3–4 Altering Tool Bar Text (en/i18n.js)


// Tool Bars
....
i18n[’get mail’] = ’
               Get Messages

Modifying the Message List Window

This section describes how to modify the Sun Java System Messenger Express Message List window shown in Modifying the Message List Window.

Figure 3–5 Sun Java System Messenger Express Message List Window

Messenger Express Message List Window.

You can modify the following in the Sun Java System Messenger Express Message List window:

  • By default change the sorting order

  • Change the text of the default column heading

  • Change the text on “Collect External Mail” button

To Modify the Message List Window

To modify the Message List window, edit the appropriate files as follows:

  • To customize how the message list appears, edit the listFrameHTML() function in the mbox_fs.html file.

  • To customize the order in which messages are listed, edit the defaults[] values near the top of the main.js file.

  • To change the text of default column heading, edit the i18n[] values for search results, date, from, to, size, and subject in the lang/i18n.js file.

  • To change the text on the “Collect External Mail” button, edit i18n[’collect long] in the lang/i18n.js file.

Functionally, listFrameHTML() calls getSortHeader() in mbox_fs.html and assigns column headings with appropriate call to the sorting function sortMsgs() in main.js. The listFrameHTML() function also links the “Collect External Mail” hyperlink to collect() in main.js.

Example—Message List Window Modifications

The example shown in Example—Message List Window Modifications displays the most recently received mails first, and changes the text on “Collect External Mail” button to “Get Messages From Another Server”.

Figure 3–6 Example Message List Window Modifications

Customized Message List Window.

Example—Message List Window Modifications shows the necessary changes to be made in files main.js.


Example 3–5 Altering Message List Window Layout ( main.js)


var defaults = new Array(
.....
’meSortOrder’, ’
               L
               ’,
.....
)


            

Example—Message List Window Modifications shows the necessary changes to be made in file en/i18n.js.


Example 3–6 Altering List Window Text (en/i18n.js)


// POP3 Collection
....
i18n[’collect long’] = ’
               Get Messages From Another Server

Modifying the Message Display Window

This section describes how to modify the Sun Java System Messenger Express Message Display window shown in Modifying the Message Display Window.

Figure 3–7 Sun Java System Messenger Express Message Display Window

Message Display window

You can modify the following in the Sun Java System Messenger Express Message Display window:

  • Change the message display

  • Alter the layout of, window

  • Change the text of the fields

  • Display User Defined Header Fields

To Modify the Message Display Window

To modify the Message Display window, edit the appropriate files as follows:

  • To customize how the message appears, edit the listFrameHTML(doc) function in the msg_fs.html file.

  • To customize the default text, edit the i18n[] values under// Message Headers and // Message in the lang/i18n.js file.

  • To customize the display defaults (word wrap), edit the defaults[] values main.js file.

Example—Message Display Window Modifications

The example shown in Example—Message Display Window Modifications moves “Subject” before “To.”

Figure 3–8 Example Message Display Window Modifications

Customized Message Display Window

Example—Message Display Window Modifications shows the necessary changes to be made in file msg_fs.html.


Example 3–7 Altering Message Display Window Layout


function listFrameHTML(doc) {
....
s += header(’from’) + header(’date’) + 
header(’subject’)+ header(’to’) + header(’cc’)
               
....
}


            

Modify the Message Display Window to Display User Defined Header Fields

This section describes how to add and display user defined header fields in the Message Display window.

To Display User Defined Header Fields

Edit the listFrameHTML(doc) function in the msg_fs.html file.

Example—Modifying the Message Display Window to Display User Defined Header Fields

The example shows how to display the user defined field X-document-id in the Message Display Window.

Example—Modifying the Message Display Window to Display User Defined Header Fields shows the changes made to the function listFrameHTML() in the msg_fs.html file.


Example 3–8 Changes made to the msg_fs.html file.


function listFrameHTML(doc) {
....
s += header('from') + header('sentdate')
 + header('to') + header('cc') + header('bcc') 
+ header('subject')

var hdrstr =  getHeaderStr(main.msgFrame.hdr[0], 'X-
document-id
')
if(hdrstr != '') {
s += <tr\><td nowrap align=right valign=top width=5%' 
+ main.base_line 
+ ' bgcolor=' + main.chrome2 
+ '\>' + main.font() + html('X-
document-id
') + nbsp + '</td\>\\n<td ' + main.cellBgString + '\>' 
+ extra + main.font() + hdrstr + '</td\></tr\>\\n'
}
....
}

Modifying the Message Tool Bar

This section describes how to modify the Sun Java System Messenger Express message tool bar shown in Modifying the Message Tool Bar.

Figure 3–9 Sun Java System Messenger Express Message Tool Bar

Message Tool bar

You can modify the following in the Sun Java System Messenger Express message tool bar:

  • Change the layout of the tool bar relative to the rest of the page

  • Alter the layout within the tool bar

  • Change the text associated with the graphics

To Modify the Message Tool Bar

To modify the message tool bar, edit the appropriate files as follows:

  • To customize the layout relative to the rest of the page, edit the toolFrame() function in the main.js file.

  • To customize the layout within the tool bar and the associated graphics, edit the getToolbar() function in the msg_fs.html file.

  • To customize the texts associated with the graphics in the Tool Bar, edit the i18n[] values compose, reply, reply all, forward, delete, undelete, previous, and next in the lang/i18n.js file.

Functionally, getToolbar() in msg_fs.html assembles the code and assigns the functions to the graphics by calling toolbar() in main.js, which takes care of items such as colors and text-only versions.

The getToolbar() function in msg_fs.html also calls folderSelection() in main.js to generate the drop-down folder list.

The functions assigned by getToolbar() in msg_fs.html to handle the tools are:

  • Compose: main.compose(’new’)

  • Reply: main.compose(’reply’)

  • Reply All: main.compose(’replyall’)

  • Forward: main.compose(’forward’)

  • Move Messages to Folder: parent.move()

  • Delete and Undelete: parent.delmsg()

  • Add all Addresses: parent.addAllAddresses()

  • Previous: parent.prev()

  • Next: parent.next()

  • Close: parent.gotofolder()

Example—Message Tool Bar Modifications

The example shown in Example—Message Tool Bar Modifications moves “New Message” to the right and abbreviates the text from “Previous” to “Prev.”

Figure 3–10 Example Message Tool Bar Modifications

In this figure the "Compose" tool is moved to the right and "Previous"
 is  abbreviated to "Prev."

Example—Message Tool Bar Modifications shows the necessary changes to be made in file msg_fs.html.


Example 3–9 Altering Message Tool Bar Layout (msg_fs.html)


function getToolbar() {
var s
...
main.WMtoolbar(
 null,null,’imx/spacer.gif’,5,1,false,
 i18n[’close’], ’parent.gotofolder()’, 
’imx/cancel.gif" alt="’ 
+i18n[’msg close’], 24, 24, true,
null,null,’imx/spacer.gif’,5,1,false,

i18n[’compose’], ’main.compose(”new”)’, 
’imx/compose.gif" alt="’ + i18n[’msg compose’], 24, 24, true) +
               
 <td\><img src="imx/spacer.gif" width="1" height="1"\></td\>\\n’ +
....


            

Example—Message Tool Bar Modifications shows the necessary changes to be made in file en/i18n.js.


Example 3–10 Altering Message Tool Bar Text ( en/i18n.js)


// Tool Bars
....
i18n[’previous’] = ’
               Prev

Modifying the Message Composition Window

This section describes how to modify the Sun Java System Messenger Express Message Composition window shown in Modifying the Message Composition Window.

Figure 3–11 Sun Java System Messenger Express Message Composition Window

Message Composition window

You can modify the following in the Sun Java System Messenger Express Message Composition window:

  • Change the location of the tools in the window

  • Alter text associated with the tools

  • Enable and disable emoticons

  • Create your own dictionary

To Modify the Message Composition Window

To modify the Message Composition window, edit the appropriate files as follows:

  • To customize the window, edit the compFrameHTML() function in the comp_fs.html file.

  • To customize the text, edit the values under // Message Composition and // Tool Bars in the lang/i18n.js file.

  • To enable and disable the emoticons, edit the variable iconHREF in the main.js file. By default, the emoticon files are located in msg_svr_base/html/imx directory.

Functionally, compFrameHTML() in comp_fs.html assembles the code and assigns the functions to the graphics by calling WMtoolbar() in main.js which also handles colors and text-only versions. The compFrameHTML() function in comp_fs.html generates the “To”, “Cc”, and “Bcc” control area by calling i18n_compose_controls() in lang/i18n.js.

The functions assigned by compFrameHTML() in comp_fs.html are:

  • Send: parent.send(’smtp’)

  • Address: parent.lookup()

  • Attach: parent.attach()

  • Save Draft: parent.send(’draft’)

  • Spell Check: parent.spellchk()

  • Text/HTML: parent.switchEditor()

  • Help: main.help(1007399)

  • Cancel: parent.cancel()

Example—Message Composition Window Modifications

The example shown in Example—Message Composition Window Modifications moves the Address tool to the left so that it appears first on the tool bar, and changes the text “Recipients” to “Send to.”

Figure 3–12 Example Message Composition Window Modifications

Screen showing address tool bar moved to the left so that it
appears first on the tool bar, and the field  "Recipients" is renamed as "Send to."

Example—Message Composition Window Modifications shows the necessary changes to be made in file comp_fs.html for swapping Address tool and Send tool.


Example 3–11 Altering Composition Window Layout (comp_fs.html)


function compFrameHTML() {
main.WMtoolbar(i18n[’lookup’], ’parent.lookup()’,
’imx/address.gif"
alt="’ + i18n[’lookup’], 27, 25, true, i18n[’send’],
’parent.send(”smtp’)’, ’imx/send.gif " alt="’
+ i18n[’compose_send’],27, 25, true)
               }
            

Example—Message Composition Window Modifications shows the necessary changes to be made in file en/i18n.js for changing the text “Recipients” to “Send to”.


Example 3–12 Altering Composition Window Text (en/i18n.js)


// Message Composition
....
i18n[’recipient’] = ’
               Send To

The emoticons appear on the screen if the Text/HTML option is set to HTML. By default the Text/HTML option is set to Text format.

Example—Message Composition Window Modifications shows how to edit the main.js file to enable emoticons.


Example 3–13 Altering Composition Window to Enable Emoticons


var iconHREF = ’
               msg_svr_base
               
               /imx/

Example—Message Composition Window Modifications shows how to edit main.js file to disable emoticons.


Example 3–14 Altering Composition Window to Disable Emoticons


var iconHREF =
                ’’
       

Modifying Message Search Window

This section describes how to modify the Sun Java System Messenger Express Message Search window shown in Modifying Message Search Window.

Figure 3–13 Message Search Window

Message Search window

You can modify the following on the Sun Java System Messenger Express Message Search window:

  • Change the layout of the window

  • Change the text associated with the tool

  • Change the tool bar layout in the Message View window

To Modify the Message Search Window

To modify the Message Search window, edit the appropriate files as follows:

  • To alter the layout of the window, edit the listFrameHTML() function in the file /en/searchMessage.html.

  • To change the text associated with the tool, edit the file en/i18n.js.

  • To alter the tool bar in the Message View window, edit the getToolbar() function in the seachmsg_fs.html file.

Example—Message Search Window Modifications

The example shown in Example—Message Search Window Modifications changes the text associated with the tool “Delete” to “Remove”. It also shows how to interchange the appearance of the default column headings.

Figure 3–14 Message Search Window With Changes

In this figure the  column  name "Delete"  has been changed 
to "Remove."

Example—Message Search Window Modifications shows the changes to be made in file en/i18n.js, to change the text associated with the tool.


Example 3–15 Altering the Tool Text


// Tool Bars
i18n[’delete’] = ’
               Remove

Example—Message Search Window Modifications shows the necessary changes to be made in the searchMessage.html file.


Example 3–16 Interchanging the Order of Appearance of the Default Column Headings


function listFrameHTML() {
  var i, msg
....
s += main.tableStart + ’<form name="form1"\><tr bgcolor=’ +
main.chrome2 + ’\>\\n’
s += ’<td align="center" width=1% nowrap\>’ + main.font() +
    i18n[’selectLabel’] + ’</td\>\\n’
s += ’<td align="center" width=5% 
nowrap\><img src="../imx/attach.gif"
               
alt="’ + i18n[’msg Attachment’] + ’" width=16 height=16’ +
 (IE \>= 4 || NN \> 0 ? ’ hspace=2\>’ : ’\>’) + getSortHeader(’’) +
’</td\>\\n’
s += ’<td align="center" width=1% nowrap\><img src="../imx/high-0.gif"
alt="’ + i18n[’msg priority’] + ’" width=16 height=16’ +
 (IE \>= 4 || NN \> 0 ? ’ hspace=2\>’ : ’\>’) + getSortHeader(’’) +
’</td\>\\n’
  s += ’<td align="left" width=1% nowrap\>’ + getSortHeader(’’) +
’</td\>\\n’
...


            

The example shown in Example—Message Search Window Modifications alters the tool bar layout in the Message View window.

Figure 3–15 Message View Window with the Tool bar Modifications

Message View window with the tool bar modifications

Example—Message Search Window Modifications shows the necessary changes to be made in the file seachmsg_fs.html to alter the tool bar layout.


Example 3–17 Message View Window Tool Bar Modifications


function getToolbar() {
  var s
....
main.WMtoolbar(
....
i18n[’close’], ’parent.closeMe()’, ’imx/cancel.gif" alt="’ +
i18n[’msg close’], 27, 25, true,
null, null, ’imx/divider.gif’, 2, 24, false,

i18n[’compose’], ’main.compose(”new”)’, 
’imx/compose.gif" alt="’
+ i18n[’msg compose’], 27, 25, true,
i18n[’reply’], ’main.compose(”reply”)’, 
’imx/reply.gif" alt="’
i18n[’msg reply’], 27, 25, enable) +
’<td nowrap\>’ + main.font(1) + main.nbsp +
 main.folderSelection(’folderList’,
’parent.move(options[selectedIndex].value);selectedIndex=0’,
i18n[’file msg’], false,
main.mboxFrame.mbox,’’,getsharedfolders())+ ’</td\>’ +
....


            

Modifying the Address (Directory Lookup) Window

This section describes how to modify the Sun Java System Messenger Express Address (directory lookup) window shown in Modifying the Address (Directory Lookup) Window.

Figure 3–16 Messenger Express Address Window

Messenger Express Address Window

You can modify the following in the Address (directory lookup) window:

  • Change overall window appearance

  • Alter search controls and their text

  • Add additonal LDAP server search

  • Alter all other texts

  • Add User Defined Directory to Search

To Modify the Address (Directory Lookup) Window

To modify the Address window, edit the appropriate files as follows:

  • To customize the overall window appearance, edit the getSearchResult() and idxHTML() functions in the lookup.js file.

  • To customize other text, edit the // LDAP Lookup values in the lang/lookup_fs.html file.

  • To add additional LDAP server search, add new entries specifying the LDAP host followed by the DN as the third parameter, edit the lang/lookup_fs.html file.

Functionally, searchFrameHTML() and addFrameHTML() assign the following functions to the buttons:

  • Search: parent.doSearch()

  • Cancel: parent.cancel()

Example—Address (Directory Lookup) Window Modifications

The example shown in Example—Address (Directory Lookup) Window Modifications changes “Search Corporate directory” to “Search the Sun Directory” and adds the LDAP server search “Search Yahoo!” to the search list.

Figure 3–17 Example Address (Directory Lookup) Window Modifications

Altering Address (Directory Lookup) window text

Example—Address (Directory Lookup) Window Modifications shows the necessary changes to be made in en/lookup_fs.html.


Example 3–18 Altering Address Window Text


//Search Control
function s_SearchCtrl() {
....
’<option value="3 200"\>
Search the Sun Java System Directory
</option\>\\n’ +
....

Example—Address (Directory Lookup) Window Modifications shows how to add LDAP server search to the list. The file to edit is en/lookup_fs.html.


Example 3–19 Adding LDAP Server Search


//Search Control
function s_SearchCtrl() {
...
’<option value="2 25 ldap://ldap.yahoo.com/"\>’ +
’Search Yahoo!</option\>\\n’ +
’</select\>\\n’ +
...


            

Adding a User Defined Directory to Search

You can add an additional user defined directory to the LDAP server search in the Address (Directory Lookup) Window. This can be accomplished by adding new entry for the LDAP host followed by the DN in the lang/lookup_fs.html.

To a Add User Defined Directory to Search to the Address (Directory Lookup) Window

Add a new entry specifying the LDAP host followed by the DN as the third parameter in the lang/lookup_fs.html file.

Example—Adding a User Defined Directory to Search to the Address (Directory Lookup) Window

The example shows the changes made to Address (Directory Lookup) Window to search for the user defined directory in the host florizel.com with the DN ou=People, o=florizel.com.

Example—Adding a User Defined Directory to Search to the Address (Directory Lookup) Window shows how to add the user defined directory to the search list in the Address (Directory Lookup) Window. The file to edit is lang/lookup_fs.html.


Example 3–20 Adding user defined directory to search.


//Search Control
function s_SearchCtrl() {
...
’<option value="2 25 
ldap://ldap.florizel.com/ou=People,o=florizel.com"\>’ +
’Search Florizel!</option\>\\n’ +
...

Modifying the Options Window


Note –

Example—Adding a User Defined Directory to Search to the Address (Directory Lookup) Window will work only if anonymous reads are allowed on the DN ou=People,o=florizel.com. Otherwise to bind to the host florizel.com, you need to provide the values for binddn and bindpwd in the ldap.msc file.


This section describes how to modify the Sun Java System Messenger Express Options window shown in Modifying the Options Window.

Figure 3–18 Sun Java System Messenger Express Options Window

Messenger Express Options window

You can modify the following on the Sun Java System Messenger Express Options window:

  • Change the layout of the window

  • Change the default text

To Modify the Options Window

To modify the Options window, edit the appropriate files as follows:

  • To customize the options and the layout of the options, edit the toggleFrameHTML() function in the opts_fs.html file.

  • To customize default text, edit the i18n[] values under// Options in the lang/i18n.js file.

Example—Options Window Modifications

The example shown in Example—Options Window Modifications moves “Vacation Message” between “Personal Information” and “Password,” and changes the text “Sun Java System Messenger Express” to “Mozilla Super Speedy Web Mail.”

Figure 3–19 Example Options Window Modifications

In this figure the 'Vacation Message' field is moved between
'Personal Information' and 'Password.'

Example—Options Window Modifications shows the necessary changes to be made in the file opts_fs.html to move “Vacation Message” between “Personal Information” and “Password.”


Example 3–21 Altering Options Window Layout ( opts_fs.html)


function toggleFrameHTML()  {
....
 getToggle(main.i18n[’personal’], ’personal’,
 ’javascript:parent.toggle(”personal”)’) +
getToggle(main.i18n[’vacation’], ’vacation’,
’javascript:parent.toggle(”vacation”)’) +
n.i18n[’password’], ’password’,
’javascript:parent.toggle(”password”)’) +
....
}


            

Example—Options Window Modifications shows the necessary changes to be made in the file en/i18n.js to change the text “Sun Java System Messenger Express” to “Mozilla Super Speedy Web Mail.


Example 3–22 Altering Options Window Text ( en/i18n.js)


// Options
....
i18n[’passwd exp’] = ’
Use this form to change the password 
you use to access Mozilla Super Speedy Web Mail.

Modifying the Folders Window

This section describes how to modify the Sun Java System Messenger Express Folders window shown in Modifying the Folders Window.

Figure 3–20 Sun Java System Messenger Express Folders Window

Messenger Express Folders window

You can modify the following in the Sun Java System Messenger Express Folders window:

  • Change the location of the tools

  • Change the text associated with the tools or folders

To Modify the Folders Window

To modify the Folders window, edit the appropriate files as follows:

  • To rearrange the tools on the folders toolbar, edit the getToolbar() function in the fldr_fs.html file.

  • To customize the column headings, appearance of the buttons, and color of the window, edit the listFrameHTML() function in the fldr_fs.html file.

  • To customize the text of the “Collect External Mail” button, edit i18n[’collect long] in the lang/i18n.js file.

  • To customize any other text, edit the // Folders section in lang/i18n.js.

The functions assigned to the tools and links by getToolbar() and listFrameHTML() in fldr_fs.html are:

  • Refresh: main.refreshFolders()

  • New Message: main.compose(’new’)

  • New: parent.addFolder()

  • Rename: parent.renFolder()

  • Share: parent.setfolder()

  • Move Folder: parent.moveFolder(options[selectedIndex].value)

  • Delete: parent.delFolder()

  • Subscribe: main.subscribeFolder()

  • Unsubscribe: parent.unsubscribeFolder()

Example—Folders Window Modifications

The example shown in Example—Folders Window Modifications moves “Refresh” and “New Message” tools to the end of the toolbar.

Figure 3–21 Example Folders Window Modifications

The Update and Compose tools appear at right the end of the toolbar

Example—Folders Window Modifications shows the changes to be made in the file fldr_fs.html.


Example 3–23 Altering Folders Window Layout


function getToolbar() {
....
main.WMtoolbar(
i18n["new folder"], ’parent.addFolder()’, ’imx/fldr_new.gif"
alt="’ + i18n[’folder new’], 24, 24, true,
i18n[’rename’], ’parent.renFolder()’, ’imx/fldr_edit.gif" alt="’ +
i18n[’folder rename’], 24, 24, true,
....
main.WMtoolbar(
null, null, ’imx/spacer.gif’, 2, 24, false,
i18n[’update’] ? i18n[’update’] : i18n[’get mail’],
’main.refreshFolders()’, ’imx/Update_Folder.gif" alt="’ +
i18n[’folder update’], 24, 24, true,
i18n[’compose’], ’main.compose(”new”)’, ’imx/compose.gif’,
alt="’+ i18n[’msg compose’], 24, 24, true
....
}


            

Aligning the User Interface from Right to Left

By default the Menu tabs are aligned from left to right. When you have selected Arabic as the preferred language, then you need to customize Sun Java System Messenger Express to align the Menu tabs from right to left.

ProcedurTo align the User Interface from right to left

Step

    To align the User Interface from right to left you need to remove a line from the ar/i18n.js file.

    Aligning the User Interface from Right to Left shows the line that needs to be removed from the ar/i18n.js file.


    ....
    i18n['dir'] = 'ltr'
    ....

Disabling Filtering of the HTML Tags

For security reasons the Sun Java System Messenger Express server filters the HTML tags that are used to encode multimedia in mails which are in HTML format. The user can disable the filtering of these HTML tags in the mails.



ProcedurTo disable the filtering of the HTML tags:

Step

    Change the /html/main.js file to disable filtering the HTML tags in the mails.

Example— Disable the filtering of the HTML tags

The example shows how to disable filtering of JavaScript tags in the mails.

Example— Disable the filtering of the HTML tags shows the /html/main.js file before changing the file for disabling the filtering of Javascript tags in the mails.


Example 3–24 Before editing the main.js file.


....
load(msgFrame, msgHREF + 'msg.msc?sid=' + sid + '&security=' +
security + '&mbox=' + encode(selectmbox) + '&uid=' + num +
'&process=js,link,target,html' + 
binhex + maxtext +
get_charset())
....


            

Example— Disable the filtering of the HTML tags shows the changes to be made in the /html/main.js file for disabling the filtering of Javascript tags in the mails


Example 3–25 After altering themain.js file.


....
load(msgFrame, msgHREF + 'msg.msc?sid=' + sid + '&security=' +
security + '&mbox=' + encode(selectmbox) + '&uid=' + num +

'&process=link,target,html' + 
binhex + maxtext +
....

Supporting a New Locale

If the language is supported by the Messaging Server, you can add the language to the preferred language list and create the language-specific static webmail pages. These language-specific pages should be grouped in a subdirectory under the main document directory. The webmail code automatically detects the client’s language preference and fetches the webmail pages from the appropriate subdirectory.

To support a new language in Sun Java System Messenger Express:

  • Add the new language to the preferred language list. The new language can be added by editing the i18n_preferredlanguagelist() funtion in the i18n.js file.

  • Copy the files from the directory html/en to this language directory html/lang.

  • Change the charset to iso-8859-5 in the lang/i18n.js



Example—Supporting a New Locale

The example shows how to support Russian language in Sun Java System Messenger Express.

Example—Supporting a New Locale shows the changes to be made to the i18n_preferredlanguagelist() funtion in the i18n.js file for supporting Russian language.


Example 3–26 Adding a language to the 18n_preferredlanguagelist() function in the i18n.js file


function i18n_preferredlanguagelist()
{
var s = '<select name="preferredLanguage"\>' +
'<option value="ar"\>Arabic</option\>' +
'<option value="zh-CN"\>Chinese/Simplified</option\>' +
'<option value="zh-TW"\>Chinese/Traditional</option\>' +
'<option value="en"\>English</option\>' +
'<option value="fr"\>French</option\>' +
'<option value="de"\>German</option\>' +
'<option value="it"\>Italian</option\>' +
'<option value="ja"\>Japanese</option\>' +
'<option value="ko"\>Korean</option\>' +
'<option value="ru"\>Russian</option\>' +
....
'</select\>'
return s
} 

Example—Supporting a New Locale shows the changes to be made to the ru/i18n.js file for changing the charset in the i18N resource file.


Example 3–27 Changing the charset in the I18N Resource File.


// I18N Resource file
var i18n = new Array()
var fldr = new Array()
// DO NOT TRANSLATE AS STRINGS-JUST VALUES
i18n['client charset'] = 'iso-8859-5'
i18n['http charset'] = 'iso-8859-5'
i18n['fontface'] = 'PrimaSans BT,Verdana,sans-serif
i18n['fontface1'] = i18n['fontface']
i18n['fontface2'] = 'Times New Roman,Times,serif'
i18n['fontface3'] = 'Courier New,Courier,mono'
i18n['nbsp'] = '&nbsp;'