IBM R1 manual Applying customization sets, Changing the application style

Page 37

Images

Applying customization sets

When you create a customization set, you create a new branch in the application directory to house the files that contain alternative resources for the application, including graphics, style sheets, and .properties files. For details, see “Creating customization sets.”

This chapter, which describes customizing JSPs, defines how to add and edit graphics,

.properties, and CSS files. In the procedures that follow, steps are provided for adding and editing files in the standard directory. If you are adding or editing files in a customization set, complete the following steps in addition to those defined in the subsequent topics:

1.From the Settings module of the Administrator interface, click Manage Customization Sets.

2.From the list of customization sets, select the set you are editing and click the Edit button.

The Edit Customization Set window displays.

3.Select one of the following checkboxes:

Use CSS: Overrides the default CSS files with the CSS files in the customization set subdirectory.

Use text: Overrides the default .properties files with the .properties files in the customization set subdirectory.

Use custom images: Overrides the default image files with the image files in the customization set subdirectory.

4.Click the Save button at the bottom of the dialog box.

Changing the application style

The default global styles of the JSPs that make up the LMS application, their background colors and font styles, for example, are defined by a set of cascading style sheets (CSS files). To change the global style of the application, you can edit the existing CSS files or add your own to the application. To change the style of a single JSP, see “Changing the style of an individual JSP.”

Note: Most of the existing pages in the LMS application contain HTML and custom JSP tags with class or id attributes that correspond to styles in existing CSS files. If you delete a class or id from an existing CSS file, you must remove the references to it from each JavaServer Page that uses it. For example, the table cell element tag, <td class="formBoxBg" width="15">, which displays in the adminTemplate.jsp, is an HTML tag that calls the formBoxBg class defined in the general.css file to set the table cell background color. If you delete the formBoxBg class from the general.css file or delete the general.css file and do not provide a replacement definition or file, this will result in unpredictable formatting for any elements referencing that class on the page.

Each server has a separate set of CSS files for the application it hosts. The Learning Management System server, Delivery server, and Offline Learning Client server each have their own set of CSS files. These are broken down into:

Language-version: Based on the locale code specified in the browser request

Browser-type: Based on the browser with which the user accesses the application

The BrowserSniffer Bean, which determines what type of browser the current request is coming from, is called from the initial pages in the application. This Bean also reads the locale attribute of the browser request. Based on this information, it applies the appropriate version of the CSS files to the current and subsequent pages. For example, the BrowserSniffer Bean is called from the

32 IBM Lotus Learning Management System Release 1 Customization Guide

Image 37
Contents Customization Guide Licensed Materials Property of IBM DisclaimerList of Trademarks Page Table of Contents Creating a tab Customization setsIndex Customizing the user interface Acronyms and abbreviations Disclaimer and a word about conventionsAcronym or What it stands for Abbreviation Page Changing settings Chapter Changing settings through the user interface or XMLPage To add a role to the system Chapter Controlling access to features through permissionsTo assign a role to a user To modify permissions settings for an existing roleTo automatically assign a role to a user To explicitly assign a role to a userControlling access to features Page Anatomy of a Help topic Chapter Customizing HelpScript Background-repeat repeat-x Mosaic-bgScript Head Replacing a context-sensitive Help topic Editing an existing Help topicLmsform action=/prefSubmit.do % Adding your own Help topic HREF=shenrolled.html target=topEnrolled courses/Abr HREF=shnotifications.html target=topNotifications/AbrOverview Chapter Customizing JavaServer PagesLMS JSP tag libraries Anatomy of a TLD fileServerNameWEB-INFtld String formName = request.getParameterformName Referencing the url tag in a JSPDefining the url tag in the TLD file ServerNameWEB-INFclassescomlotuselearntaglib Rtexprvaluetrue/rtexprvalue Attribute TagAnatomy of a JSP Learning Management System serverDefining a page as a JSP Including tag library descriptor files Localizing page contentReferencing Struts tags Including the JSPs that comprise the main template Including JavaScript source codeLogicnotPresent LogicnotMatch Td class=formBoxTitleBg colspan=3 valign=middle nowrapDiv class=formBoxPositionInner DivLogicpresent LogicnotPresent logicpresent name=invalidFormLocalizing page text Delivery serverScript language=JavaScript src=js/delivery.js/script Displaying errors to the userPopulating a frameset in a JSP Defining resizable frames Frameset Html Making global changesChanging the application style Applying customization setsServerNamecsslanguageCodebrowserType Editing existing CSS filesLanguage-version Browser-versionReplacing CSS files Adding your own CSS filesChanging the font size or font style of the application @import urlmyStyles.cssServerNameWEB-INFclassesresourcesserverNameproperties Updating page textApplication.title = IBM Lotus Learning Management System Titlelmsmessage key=application.title //titleAdding and replacing graphics Lmslinklmsimg src=images/name.gif… //lmslinkLearning Management System server Replacing the application logoImage.alt.logo = IBM Lotus Learning Management System Delivery serverReplacing a reference to a CSS style Changing individual JSPsDeliverylogoURL resource=images/myCompanyLogo.gif Changing the style of an individual JSPChanging the functionality of an individual JSP Editing existing JSP tagsSpecifying the next page to display Submitting a form Canceling the submission of a formEditing form Bean values with the lmshidden tag Lmshidden name=%=formName% property=unmodifiedKeywords Removing JSP tagsLmshidden property=userEvent Custom fieldsIt then checks to see if its a text box type field LogicnotPresent Logicequal Page Customizing user searches Chapter Customizing SearchAdding Ldap attributes to User Search pages Attribute name=HealthPlanChoice type=java.lang.StringRemoving fields from User Search pages HealthPlanChoice = Employees Health PlanCustomizing course management and resource searches Customizing Offerings Catalog searchesAdding custom fields to the Offerings Catalog Removing fields from Offerings Search pagesRemoving fields from the Search pages Creating a customization set Chapter Customization setsLMM De en Etc De en etc. SalesCSPage Attribute Name Type Modified Size Path Customization sets Page Users Chapter Creating a tab@ taglib uri=/WEB-INF/tld/lms.tld prefix=lms % Users.jspTd width=1 valign=top Page Users.rosterUsers.subtitle = Roster Users Navigation.xml Users.rosterUsers.search.confirm Users.rosterUsers.searchTrail TrailManageRoles TrailTrail TrailManageProfiles Trail TrailManageUsersName tag page names and resourced text Content tag JSP file namesTarget tag struts action-mapping Label tag breadcrumbsUsers.rosterUsers.search.confirm Title tag title bar text Adding custom permissionsPermissions tag permission to display HelpPage tag context-sensitive HelpOid UpdatetimeName Permid0000000000000000PERM 0000000000003000PERM 0000000000009300PERM Copy the JSPs ExamplePage Creating a tab END Index Content Area Creating a tab Div Second linked page customGoodbye.jsp looks like this Page Create Help files Customtab.htmlCustomtabb.html Select Maxpermid from Permission Add permissions to the LMS databaseEdit ApplicationResources.properties Navigation Edit navigation.xmlAssign permissions Namestudenthome/nameCreating a tab Page Index