InomHitta mer dokumentationSupportresurser som ingår | Ladda ner denna bok i PDF (1087 KB)
Chapter 3 Customizing User Interface Features in Messenger ExpressThis chapter describes how to customize user interface features of Sun Java System Messenger Express. This chapter contains the following sections: Modifying the Main Function TabsThis 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
You can modify the following on the Sun Java System Messenger Express main function tabs:
To Modify the Main Function TabsTo modify the main function tabs, edit the appropriate files as follows:
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: Example—Main Function Tabs ModificationsThe 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
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)
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)
Modifying the Mailbox Tool BarThis 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
You can modify the following on the Sun Java System Messenger Express mailbox tool bar:
To Modify the Mailbox Tool BarTo modify the mailbox tool bar, edit the appropriate files as follows:
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:
Example—Mailbox Tool Bar ModificationsThe 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
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)
Example—Mailbox Tool Bar Modifications
Example 3–4 Altering Tool Bar Text (en/i18n.js)
Modifying the Message List WindowThis 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
You can modify the following in the Sun Java System Messenger Express Message List window:
To Modify the Message List WindowTo modify the Message List window, edit the appropriate files as follows:
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 ModificationsThe 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
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)
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)
Modifying the Message Display WindowThis 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
You can modify the following in the Sun Java System Messenger Express Message Display window:
To Modify the Message Display WindowTo modify the Message Display window, edit the appropriate files as follows:
Example—Message Display Window ModificationsThe example shown in Example—Message Display Window Modifications moves “Subject” before “To.” Figure 3–8 Example Message Display Window Modifications
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
Modify the Message Display Window to Display User Defined Header FieldsThis section describes how to add and display user defined header fields in the Message Display window. To Display User Defined Header FieldsEdit the listFrameHTML(doc) function in the msg_fs.html file. Example—Modifying the Message Display Window to Display User Defined Header FieldsThe 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.
Modifying the Message Tool BarThis 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
You can modify the following in the Sun Java System Messenger Express message tool bar:
To Modify the Message Tool BarTo modify the message tool bar, edit the appropriate files as follows:
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:
Example—Message Tool Bar ModificationsThe 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
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)
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)
Modifying the Message Composition WindowThis 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
You can modify the following in the Sun Java System Messenger Express Message Composition window:
To Modify the Message Composition WindowTo modify the Message Composition window, edit the appropriate files as follows:
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:
Example—Message Composition Window ModificationsThe 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
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)
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)
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
Example—Message Composition Window Modifications shows how to edit main.js file to disable emoticons. Example 3–14 Altering Composition Window to Disable Emoticons
Modifying Message Search WindowThis 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
You can modify the following on the Sun Java System Messenger Express Message Search window:
To Modify the Message Search WindowTo modify the Message Search window, edit the appropriate files as follows:
Example—Message Search Window ModificationsThe 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
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
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
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
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
Modifying the Address (Directory Lookup) WindowThis 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
You can modify the following in the Address (directory lookup) window:
To Modify the Address (Directory Lookup) WindowTo modify the Address window, edit the appropriate files as follows:
Functionally, searchFrameHTML() and addFrameHTML() assign the following functions to the buttons:
Example—Address (Directory Lookup) Window ModificationsThe 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
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
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
Adding a User Defined Directory to SearchYou 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) WindowAdd 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) WindowThe 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.
Modifying the Options WindowNote – 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
You can modify the following on the Sun Java System Messenger Express Options window:
To Modify the Options WindowTo modify the Options window, edit the appropriate files as follows:
Example—Options Window ModificationsThe 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
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)
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)
Modifying the Folders WindowThis 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
You can modify the following in the Sun Java System Messenger Express Folders window:
To Modify the Folders WindowTo modify the Folders window, edit the appropriate files as follows:
The functions assigned to the tools and links by getToolbar() and listFrameHTML() in fldr_fs.html are:
Example—Folders Window ModificationsThe 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
Example—Folders Window Modifications shows the changes to be made in the file fldr_fs.html. Example 3–23 Altering Folders Window Layout
Aligning the User Interface from Right to LeftBy 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.
|
.... i18n['dir'] = 'ltr' .... |
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.
Change the /html/main.js file to disable filtering the HTML tags in the mails.
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.
....
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
.... load(msgFrame, msgHREF + 'msg.msc?sid=' + sid + '&security=' + security + '&mbox=' + encode(selectmbox) + '&uid=' + num + '&process=link,target,html' + binhex + maxtext + .... |
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
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.
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.
// 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'] = ' '
|