Index: lams_central/src/java/org/lamsfoundation/lams/web/tag/CssTag.java =================================================================== diff -u -re347450b1cb3a6d44b33482c4a70c42d3e9976d2 -r65b2816b6b46b51ef66de7ed0df1969fc9b80b88 --- lams_central/src/java/org/lamsfoundation/lams/web/tag/CssTag.java (.../CssTag.java) (revision e347450b1cb3a6d44b33482c4a70c42d3e9976d2) +++ lams_central/src/java/org/lamsfoundation/lams/web/tag/CssTag.java (.../CssTag.java) (revision 65b2816b6b46b51ef66de7ed0df1969fc9b80b88) @@ -41,184 +41,194 @@ /** * Output the required css based in the user's details. Will output one or more * lines. If the user has a theme then exports the default and then the user's - * style sheet. If the user doesn't have a theme then it just exports - * the default. This way, if the user's entry points to a stylesheet that - * doesn't exist, the default one is always available. + * style sheet. If the user doesn't have a theme then it just exports the + * default. This way, if the user's entry points to a stylesheet that doesn't + * exist, the default one is always available. * - * @jsp.tag name="css" - * body-content="empty" - * display-name="User's chosen stylesheet" - * description="Output stylesheet based on the user preferences." - * + * @jsp.tag name="css" body-content="empty" display-name="User's chosen + * stylesheet" description="Output stylesheet based on the user + * preferences." + * * @author Fiona Malikoff */ public class CssTag extends TagSupport { - private static final Logger log = Logger.getLogger(CssTag.class); - private static final String IE_STYLESHEET_NAME = "ie-styles"; - private static final String IE_STYLESHEET_NAME_RTL = "ie-styles_rtl"; - private static final String IE7_STYLESHEET_NAME = "ie7-styles"; - private static final String IE7_STYLESHEET_NAME_RTL = "ie7-styles_rtl"; - private String localLinkPath = null; - private String style = null; - - private static final String LEARNER_STYLE = "learner"; // expandable - private static final String TABBED_STYLE = "tabbed"; // fixed width - private static final String RTL_DIR = "rtl"; // right-to-left direction - /** - * - */ - public CssTag() { - super(); - } - - public int doStartTag() throws JspException { - HttpSession session = ((HttpServletRequest) this.pageContext.getRequest()).getSession(); - - String customStylesheetLink = null; - - boolean rtl = false; - String pageDirection = (String) session.getAttribute(LocaleFilter.DIRECTION); // RTL or LTR (default) - - String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL); - serverURL = ( serverURL != null ? serverURL.trim() : null); + private static final Logger log = Logger.getLogger(CssTag.class); + private static final String IE_STYLESHEET_NAME = "ie-styles"; + private static final String IE_STYLESHEET_NAME_RTL = "ie-styles_rtl"; + private static final String IE7_STYLESHEET_NAME = "ie7-styles"; + private static final String IE7_STYLESHEET_NAME_RTL = "ie7-styles_rtl"; + private String localLinkPath = null; + private String style = null; - - try { + private static final String LEARNER_STYLE = "learner"; // expandable + private static final String TABBED_STYLE = "tabbed"; // fixed width + private static final String RTL_DIR = "rtl"; // right-to-left direction + private static final String MAIN_STYLE = "main"; // expandable - JspWriter writer = pageContext.getOut(); - if ( serverURL != null ) { - if(pageDirection != null) - if(pageDirection.toLowerCase().equals(RTL_DIR)) - rtl = true; - - List themeList = CSSThemeUtil.getAllUserThemes(); - - for ( String theme: themeList) { - if ( theme != null) { - theme = appendStyle(theme, rtl); - if (localLinkPath != null) - customStylesheetLink = generateLocalLink(theme); - else - customStylesheetLink = generateLink(theme, serverURL); - } - - if ( customStylesheetLink != null ) { - writer.println(customStylesheetLink); - } - } - - } else { - log.warn("CSSTag unable to write out CSS entries as the server url is missing from the configuration file."); - } - - // Special IE stylesheet for all those IE related formatting issues - String ieStylesheetName = (!rtl)?IE_STYLESHEET_NAME:IE_STYLESHEET_NAME_RTL; - String ie7StylesheetName = (!rtl)?IE7_STYLESHEET_NAME:IE7_STYLESHEET_NAME_RTL; - String ieLink = localLinkPath != null ? generateLocalURL(ieStylesheetName) : generateURL(ieStylesheetName,serverURL); - - writer.println(""); - - String ie7Link = localLinkPath != null ? generateLocalURL(ie7StylesheetName) : generateURL(ie7StylesheetName,serverURL); - writer.println(""); + /** + * + */ + public CssTag() { + super(); + } - } catch ( IOException e ) { - log.error("CssTag unable to write out CSS details due to IOException.", e); - // don't throw a JSPException as we want the system to still function. - } - return SKIP_BODY; - } + public int doStartTag() throws JspException { + HttpSession session = ((HttpServletRequest) this.pageContext.getRequest()).getSession(); - private String generateLocalLink(String stylesheetName) { - if ( localLinkPath.endsWith("/") ) { - return ""; - } else { - return ""; - } - } + String customStylesheetLink = null; - private String appendStyle(String stylesheetName, boolean rtl) { - String ssName = stylesheetName; - if ( ssName != null && ( getStyle() == null || getStyle().equals(LEARNER_STYLE)) ) { - ssName = (!rtl)?ssName + "_" + "learner":ssName + "_" + RTL_DIR +"_"+ "learner"; - } else { - ssName = (!rtl)?ssName:ssName + "_" + RTL_DIR; + boolean rtl = false; + String pageDirection = (String) session.getAttribute(LocaleFilter.DIRECTION); // RTL or LTR (default) + + String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL); + serverURL = (serverURL != null ? serverURL.trim() : null); + + try { + + JspWriter writer = pageContext.getOut(); + if (serverURL != null) { + if (pageDirection != null) + if (pageDirection.toLowerCase().equals(RTL_DIR)) + rtl = true; + + String style = getStyle(); + List themeList; + if(style != null && style.equals(MAIN_STYLE)){ + themeList = CSSThemeUtil.getAllUserThemes(CSSThemeUtil.DEFAULT_MAIN_HTML_THEME); } - return ssName; - } - - private String generateLocalURL(String stylesheetName) { - if ( localLinkPath.endsWith("/") ) { - return "\""+localLinkPath+"css/"+stylesheetName + ".css\""; - } else { - return "\""+localLinkPath+"/css/"+stylesheetName + ".css\""; + else{ + themeList = CSSThemeUtil.getAllUserThemes(CSSThemeUtil.DEFAULT_HTML_THEME); } - } - private String generateLink(String stylesheetName, String serverURL) - { - if ( serverURL.endsWith("/") ) { - return ""; - } else { - return ""; + for (String theme : themeList) { + if (theme != null) { + theme = appendStyle(theme, rtl); + if (localLinkPath != null) + customStylesheetLink = generateLocalLink(theme); + else + customStylesheetLink = generateLink(theme, serverURL); + } + + if (customStylesheetLink != null) { + writer.println(customStylesheetLink); + } } + + } else { + log + .warn("CSSTag unable to write out CSS entries as the server url is missing from the configuration file."); + } + + // Special IE stylesheet for all those IE related formatting issues + String ieStylesheetName = (!rtl) ? IE_STYLESHEET_NAME : IE_STYLESHEET_NAME_RTL; + String ie7StylesheetName = (!rtl) ? IE7_STYLESHEET_NAME : IE7_STYLESHEET_NAME_RTL; + String ieLink = localLinkPath != null ? generateLocalURL(ieStylesheetName) : generateURL(ieStylesheetName, + serverURL); + + writer.println(""); + + String ie7Link = localLinkPath != null ? generateLocalURL(ie7StylesheetName) : generateURL( + ie7StylesheetName, serverURL); + writer.println(""); + + } catch (IOException e) { + log.error("CssTag unable to write out CSS details due to IOException.", e); + // don't throw a JSPException as we want the system to still function. } + return SKIP_BODY; + } - private String generateURL(String stylesheetName, String serverURL) - { - if ( serverURL.endsWith("/") ) { - return "\""+serverURL+"css/"+stylesheetName+".css\""; - } else { - return "\""+serverURL+"/css/"+stylesheetName+".css\""; - } + private String generateLocalLink(String stylesheetName) { + if (localLinkPath.endsWith("/")) { + return ""; + } else { + return ""; } + } - public int doEndTag() { - return EVAL_PAGE; + private String appendStyle(String stylesheetName, boolean rtl) { + String ssName = stylesheetName; + if (ssName != null && (getStyle() == null || getStyle().equals(LEARNER_STYLE))) { + ssName = (!rtl) ? ssName + "_" + "learner" : ssName + "_" + RTL_DIR + "_" + "learner"; + } else { + ssName = (!rtl) ? ssName : ssName + "_" + RTL_DIR; } - - /** - * @jsp.attribute required="false" rtexprvalue="true" - * description="Should the css link be a local file link? If so, what is the path back to the 'root'. For tools' export portfolio pages, this should be set to \"../\"" - * - * @return Returns the property. - */ - public String getLocalLinkPath() - { - return localLinkPath; - } + return ssName; + } - public void setLocalLinkPath(String localLinkPath) - { - this.localLinkPath = localLinkPath; + private String generateLocalURL(String stylesheetName) { + if (localLinkPath.endsWith("/")) { + return "\"" + localLinkPath + "css/" + stylesheetName + ".css\""; + } else { + return "\"" + localLinkPath + "/css/" + stylesheetName + ".css\""; } + } - /** - * @jsp.attribute required="false" rtexprvalue="true" - * description="Learner pages use learner, fancy pages such as index page use core" - * - * Sets whether to use blah.css (style="core") or blah_learner.css (style=learner). - * If this parameter is left blank, you get blah_learner.css e.g. default_learner.css - * @return Returns style. - */ - public String getStyle() - { - return style; + private String generateLink(String stylesheetName, String serverURL) { + if (serverURL.endsWith("/")) { + return ""; + } else { + return ""; } + } - public void setStyle(String style) - { - this.style = style; + private String generateURL(String stylesheetName, String serverURL) { + if (serverURL.endsWith("/")) { + return "\"" + serverURL + "css/" + stylesheetName + ".css\""; + } else { + return "\"" + serverURL + "/css/" + stylesheetName + ".css\""; } + } + public int doEndTag() { + return EVAL_PAGE; + } + /** + * @jsp.attribute required="false" rtexprvalue="true" description="Should + * the css link be a local file link? If so, what is the path + * back to the 'root'. For tools' export portfolio pages, + * this should be set to \"../\"" + * + * @return Returns the property. + */ + public String getLocalLinkPath() { + return localLinkPath; + } + public void setLocalLinkPath(String localLinkPath) { + this.localLinkPath = localLinkPath; + } + + /** + * @jsp.attribute required="false" rtexprvalue="true" description="Learner + * pages use learner, fancy pages such as index page use + * core" + * + * Sets whether to use blah.css (style="core") or blah_learner.css + * (style=learner). If this parameter is left blank, you get + * blah_learner.css e.g. default_learner.css + * @return Returns style. + */ + public String getStyle() { + return style; + } + + public void setStyle(String style) { + this.style = style; + } + } Index: lams_central/web/css/defaultMainHTML.css =================================================================== diff -u --- lams_central/web/css/defaultMainHTML.css (revision 0) +++ lams_central/web/css/defaultMainHTML.css (revision 65b2816b6b46b51ef66de7ed0df1969fc9b80b88) @@ -0,0 +1,1100 @@ +/* +************************************************* +LAMS 2.0 +CVS ID $id$ + +************************************************* +General page styles +********************************************** */ + +* { + margin: 0px; + padding: 0px; +} + +body { + background-color:#fff; + line-height:16px; + font-size: 11px; + font-family: verdana, arial, helvetica, sans-serif; +} + +a { + color: #47bc23; + text-decoration: none; + border-bottom: 1px dotted #47bc23; + text-decoration: none; +} + +a:hover { + color: #47bc23; + text-decoration: none; + border-bottom: 1px solid #47bc23; + text-decoration: none; +} + +body.stripes { + background: url('../images/css/diagonal_bg.gif'); +} + +.row { + voice-family: "\"}\""; /* hide the following rules from IE5 */ + voice-family: inherit; + overflow: hidden; /* CSS 'clearing hack' - works on all except for IE5, that's why the IE5 box model hack above */ +} + +* html .row { + height: 1%; +} /* part of the CSS 'clearing hack' */ + + +h1 { + color:#0087e5; + font-size:15px; + margin-bottom:0px; + margin-left:10px; + padding-top:5px; } + + +/*when there are no tabs at the top of the page */ +h1.no-tabs-below { + color:#0087e5; + font-size:16px; + margin-bottom:0px; + margin-left:10px; + padding-top:25px; } + +h2 {color:#47bc23; + font-size:12px; + margin-left:10px; + margin-bottom:10px; + margin-top:10px; } + +h2.no-space-left { + margin-left:0px; +} + +h2.spacer-left{ + margin-left:25px; +} + +span.h2font {color:#47bc23; + font-size:12px; } + +h3 {color:#47bc23; + font-size:12px; + margin-left:10px; + margin-bottom:10px; + margin-top:10px; } + + + +h4 {color:#47bc23; font-size:11px;} + +/*defines when instructions are given and places a blue arrow before the text */ +p.instructions { + color: #0087e5; + margin-bottom: 0px; + margin-top: 0px;; + margin-left: 30px; + font-weight: bold; + background: url('../images/css/blue_arrow_right.gif') no-repeat 0 0px; + padding-left: 30px; + padding-bottom: 10px; + font-size: 12px +} + +p { + margin-left: 25px; + margin-right: 30px; + margin-bottom: 18px; +} + +ul { + margin-left: 25px; + margin-right: 30px; +} + +ul li { + list-style-type: circle; + padding-bottom: 5px; +} + +ol { + margin-left: 25px; + margin-right: 30px; +} + +li.no-list-type { + list-style-type: none; +} + +#page { /*whole layout of page*/ + margin: 25px auto; + width: 100%; + background: url('../images/css/lams_logo.gif') no-repeat 585px 10px; +} + +#header { /*layout of the header */ + width: 90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:5px; + +} + +#header-no-tabs { /*layout of the header when no-tabs are required. Big enough to line up with LAMS icon - don't use for learner (see header-no-tabs-learner) */ +width:100%; height:40px; background:url('../images/css/top_bg.jpg') no-repeat bottom; } + + + + + +/* +************************************************* + +Layout of tab navigation section + +********************************************** */ +#nav { /* layout of box that contains the main navigation */ + margin-top: 15px; + width: auto; + height: 24px; + margin-left: -1px; +} + +#nav a { + color: #0087e5; + text-decoration: none; + font-size: 12px; + font-weight: bold; + border:0; +} + +#nav a:hover { + color: #006bb6; + text-decoration: none; + border:0; +} + +#nav a.selected { + color: #333; + border:0; +} + + + + +/* +************************************************* + +Tab navigation styles + +********************************************** */ +.nav-box { /* layout of containers that surround the tab navigation */ + height: 31px; + width: auto; + margin-right: 2px; + float: left; + text-align: center; +} + +.tab-left-selected { /* defines left side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/selected_left.jpg') no-repeat top left; + float: left +} + +.tab-middle-selected { /* defines middle of selected tab */ + height: 31px; + width: 90px; + background: url('../images/css/selected_bg.jpg') repeat-x; + float: left; + padding:8px 5px 0px 5px; +} + +#nav .tab-middle-link-selected { + color: #333333 +} + +.tab-right-selected { /* defines right side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/selected_right.jpg') no-repeat top right; + float: left +} + +.tab-left { /* defines left side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/button_left.jpg') no-repeat top left; + float: left +} + +.tab-middle { /* defines middle of selected tab */ + height: 31px; + width: 90px; + background: url('../images/css/button_bg.jpg') repeat-x; + float: left; + padding:8px 5px 0px 5px; +} + +#nav .tab-middle-link { + color: #0087e5 +} + +.tab-right { /* defines right side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/button_right.jpg') no-repeat top right; + float: left +} + + .tab-left-highlight { /* defines left side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/button_highlight_left.jpg') no-repeat top left; + float: left + } + + .tab-middle-highlight { /* defines middle of selected tab */ + height: 31px; + width: 90px; + background: url('../images/css/button_highlight_bg.jpg') repeat-x; + float: left; + + padding:8px 5px 0px 5px; + } + + #nav .tab-middle-highlight-link { + color: #FFFFFF + } + + .tab-right-highlight { /* defines right side of selected tab */ + height: 31px; + width: 8px; + background: url('../images/css/button_highlight_right.jpg') no-repeat top right; + float: left + } + +/* +************************************************* + +Layout of main content section + +********************************************** */ +#content { /*box around the main content area */ + background-color:#fff; + font-size: 11px; + border:1px solid #d4d8da; + margin-top: 0px; + margin-left:auto; + margin-right:auto; + margin-bottom:-5px; + width:90%; + height:100%; + padding-bottom:-5px; + min-width:707px; +} + +/*layout of Links within the content area */ +#content a { + color: #47bc23; + text-decoration: none; + border-bottom: 1px dotted #47bc23; +} + +#content a:hover { + color: #47bc23; + text-decoration: none; + border-bottom: 1px solid #47bc23; +} + +/*layout of a general button*/ +#content a.button { + background: url('../images/css/btn_off.gif') repeat-x 0px 0px; + color: #333; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; + font-size:11px; +} + +/* style to disbable input buttons */ +#content a.button .disabled { + color: #999; + background: url('../images/css/btn_off.gif') repeat-x 0px 0px; + border: 0px none; + padding:5px 20px 6px 20px; + } + +#content a:hover.button { + background: url('../images/css/btn_over.gif') repeat-x 0px 0px; + color: #349018; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; +} + +/*layout of a general button*/ +a.button { + background: url('../images/css/btn_off.gif') repeat-x 0px 0px; + color: #333; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; + font-size:11px; + +} + +a:hover.button { + background: url('../images/css/btn_over.gif') repeat-x 0px 0px; + color: #349018; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; + font-size:11px; +} + + +/* Hovering submit button */ +input.button { + background: url('../images/css/btn_off.gif') repeat-x 0px 0px; + color: #333; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; + font-size: 11px; + font-family: verdana, arial, helvetica, sans-serif; +} + +input:hover.button { + background: url('../images/css/btn_over.gif') repeat-x 0px 0px; + color: #349018; + border: 0px none; + padding:5px 20px 6px 20px; + text-decoration: none; + font-size: 11px; + font-family: verdana, arial, helvetica, sans-serif; +} + +input.disabled { + color: #999; + background: url('../images/css/btn_off.gif') repeat-x 0px 0px; + border: 0px none; + padding:5px 20px 6px 20px; + font-size:11px; + } + +.box { + display: none; + min-height: 100px; + margin-right:5%; + margin-left:5%; +} + +#footer { /*layout of the footer - the bottom of the box */ + width: 100%; + height: 14px; +} + +#footer a{ /*layout of the footer - the bottom of the box */ + color:#85aacd; + border-bottom:1px solid #85aacd; + } + +/*layout of the table with the alternate color for the table heading cell */ +table.alternative-color { + width:91%; + margin-left:17px; + padding-top:0px; + margin-bottom:15px; + text-align:left; +} + +table.alternative-color th { + background: url('../images/css/green_bg.jpg') repeat-x; + height: 30px; + color: #47bc23; + padding-left: 15px; + border-left: 1px solid #cacdd1; + border-right: 1px solid #fff; + font-size: 12px; +} + +table.alternative-color td { + padding-left: 20px; + font-size: 11px; + border-bottom: 1px solid #efefef; + vertical-align: top; + background:url('../images/css/greyfade_bg.jpg') repeat-x 3px 0px +} + +table.alternative-color td.first, table.alternative-color th.first { + border-left: none; + padding-left: 20px; +} + + +/* Used for chosen grouping */ +table.chosengrouping { + width:98%; + margin-left:0px; + text-align:center; + } + +table.chosengrouping tr { + vertical-align:top +} + +table.chosengrouping th { + padding:0px; + font-size:11px; + text-align:center; +} + +table.chosengrouping td { + padding:0px; + font-size:11px; + text-align:center; +} + +table.chosengrouping td p{ + padding:0px; + font-size:11px; + line-height:11px; +} + +table.chosengrouping td select { + font-size:11px; +} +/*layout of the table with form elements */ + +table { + width:100%; + margin-left:auto; + margin-right:auto; + text-align:left; + table-layout: #; +} + +td { + padding:10px; + font-size:12px; + margin-right:auto; + margin-left:auto; + align:center; +} + +td p{ + padding:10px; + font-size:12px; + line-height:18px; +} + +/* */ /*layout of form styles */ +.field-name{ + color: #0087e5; + font-weight: bold; + text-align: left; + padding-bottom:10px; +} + +.field-name-alternative-color { + color: #47bc23; + font-weight: bold; + padding-bottom:10px; + text-align: left; +} + +input { + border: 1px solid #c1c1c1; + padding: 2px; +} + +textarea { + border: 1px solid #c1c1c1; + padding: 2px; +} + +.noBorder { + border: none; +} + +/*misc styles*/ +.space-right { + margin-right: 10px; +} + +.space-left { + margin-left: 10px; +} + +.space-bottom { + margin-bottom: 40px; +} + +.space-bottom-top { + padding-bottom: 20px; + padding-top: 20px; + padding-right:20px; /* Testing spacing IE */ +} + +.small-space-bottom { + margin-bottom: 20px; +} + +.small-space-top {padding-top:6px;} + +.space-top {padding-top:20px;} + +.title-space-top {margin-top:12px;} + +hr {border:0px; + border-top:1px solid #ccc; + width: 630px; + height: 1px; + + } + +/* Warning message style */ +.warning { + color: #cc0000; + padding:8px 10px 10px 40px; + margin-top: 25px; + margin-left: auto; + margin-right: auto; + text-align: left; + font-weight: normal; + background: url('../images/css/warning.gif') no-repeat #ffeae0 10px 8px; + width: 70%; + border: 1px solid #E82A28; +} + +.warning-login { + color: #cc0000; + padding:5px 5px; + padding-left: 35px; + padding-bottom: -10px; + margin-top: -5px; + margin-bottom: -10px; + margin-left: 15px; + text-align: left; + font-weight: normal; + background: url('../images/css/warning.gif') no-repeat #ffeae0 10px 8px; + width: 70%; + border: 1px solid #E82A28; +} + +b.error {color:#cc0000;} + + +/* +************************************************* + +Floating button containers + +********************************************** */ + +.left-buttons {float:left; padding-left:20px;} + +.right-buttons {float:right; padding-right:20px; padding-top:5px;} + + + +/* +************************************************* + +My Courses Pages +********************************************** */ + +/* welcome user box */ + + +.welcome {margin-bottom:35px; margin-top:0px; background-color:#33FFFF; margin-left:20px;margin-right:20px;} + +.float-left {float:left;} + +.float-right {float:right;} + + + +/* layout for my-courses pages */ + +.my-courses { + background: url('../images/css/diagonal_bg.gif') repeat; +} + + +#page-mycourses { /*whole layout of page*/ + margin: 25px auto; + width: 100%; + background: url('../images/css/lams_logo.gif') no-repeat 5% -7px; + +} + +#page-mycourses #footer { /*layout of the footer - the bottom of the box */ + width: 90%; + min-width:707px; + margin-left:auto; + margin-right:auto; +} + +#page-mycourses #footer p{ + padding:20px 0px 0px 10px; + text-align:center; + font-family: verdana, arial, helvetica, sans-serif; + font-size:.9em; + color:#999; +} + + +#header-my-courses { /*layout of the header */ + width:90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:5px; +} + +/* my courses nav */ + +.nav-box-right { + height: 31px; + width: auto; + margin-right: -1px; + margin-top: 16px; + float: right; + text-align: center; + margin-left: 3px; +} + +#nav-right { /* layout of box that contains the main navigation */ + margin-top:30px; + width: 100%; + height: 40px; +} + +#nav-right a { + color: #0087e5; + text-decoration: none; + font-size: 12px; + font-weight: bold; +} + +#nav-right a:hover { + color: #006bb6; + text-decoration: none; +} + +#nav-right a.selected { + color: #333; +} + + +/* my courses grey buttons in the green bar */ + +.mycourses-left-buttons {float:left; padding-left:10px;} + +.mycourses-right-buttons {float:right; padding-right:20px; margin-top:11px; height:24px; font-size:11px} + +#content a.sorting { border-bottom: none; cursor: pointer; } + +#content a.add-lesson-button { + background: url('../images/css/add_lesson.jpg') no-repeat 0px 0px; + color: #666; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; + + margin-left:5px; +} + +#content a:hover.add-lesson-button { + background: url('../images/css/add_lesson.jpg') no-repeat 0px 0px; + color: #47bc23; + padding: 5px 12px 6px 30px; + text-decoration: none; + + margin-left:5px; + border-right:1px solid #d2d2d2; + border-bottom: 0px; +} + +#content a.manage-group-button { + background: url('../images/css/manage_groups.jpg') no-repeat 0px 0px; + color: #666; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; +} + +#content a:hover.manage-group-button { + background: url('../images/css/manage_groups.jpg') no-repeat 0px 0px; + color: #47bc23; + padding: 5px 12px 6px 30px; + text-decoration: none; + + border-right:1px solid #d2d2d2; + border-bottom: 0px; +} + +#content a.show-all-groups-button { + background: url('../images/css/show_all_groups.jpg') no-repeat 0px 0px; + color: #666; + padding: 5px 12px 6px 16px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; +} + +#content a:hover.show-all-groups-button { + background: url('../images/css/show_all_groups.jpg') no-repeat 0px 0px; + color: #47bc23; + padding: 5px 12px 6px 16px; + text-decoration: none; + text-align:left; + border-right:1px solid #d2d2d2; + border-bottom: 0px; +} + +/* my courses individual course boxes */ + + + + +.course-bg { /*---- box around the green tabbed items -- */ + margin-top:15px; + margin-bottom:20px; + width:100%; + background:#fff url('../images/css/mycourses_greentab-minimal.jpg') repeat-x top; + margin-left:0px; +} + +.course-bg h2 { + font-size:13px; + color:#47bc23; + padding-left:0px; + margin-top:12px; + margin-left:0px; +} + +.course-bg h4 { + font-size:12px; + color:#47bc23; + padding-left:0px +} + +.course-buttons { + margin-right:0px; +} + + + + + + + +/************ The sequence name box **********/ +.sequence-name { + margin-top:5px; + margin-left:30px; + +} + +.sequence-name p{ + margin:0px; + +} + + +#content a.sequence-name-link { + color:#0087E5; + text-decoration: none; + border-bottom: 1px dotted #0087E5; + } + + +#content a:hover.sequence-name-link { + color:#0087E5; + text-decoration: none; + border-bottom: 1px solid #0087E5; + +} + +#content a.sequence-action-link { + color:#47bc23; + text-decoration: none; + border:0px; + font-variant:small-caps; + margin-left:20px; +} + +#content a:hover.sequence-action-link { + color:#47bc23; + text-decoration: none; + border-bottom:0px; + font-variant:small-caps; + margin-left:20px; + } + +.sequence-description-tooltip { + border: 1px solid #d2d2d2; + background-color: #ffffff; + padding: 4px; + color: #000000; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + width: 250px; +} +.sequence-description-tooltip #tooltipURL { + display: none; +} + +/************ The group name box **********/ + +.group-name { +margin-top:5px; +margin-left:80px; +} + +.group-name p { +padding-top:0px; +margin-bottom:0px; +padding-left:0px; +margin-left:0px; +} + +.group-name strong { +color: #666; +} + +/*aligns the image in the middle of the line - gives padding */ +.align-middle { +vertical-align:middle; +padding-right:0px; +border:0px; +} + +.help {text-align:right; margin-right:35px; cursor: pointer;} + +.help-no-tabs {float:right; cursor:pointer;} + +/************ My Profile custom **********/ +.align-right { + text-align: right; +} + +.align-left { + text-align: left; +} + +.shading-bg { + padding: 5px; + padding-left: 10px; + padding-top: 10px; + margin-top: 10px; + margin-bottom: 10px; + width: 98%; + border-top: 1px solid #ccc; + background: url('../images/css/greyfade_bg.jpg') repeat-x 3px 1px +} + +.img-border { + padding: 2px; + border: 1px solid #dcdcdc; +} + +.userpage-td {border-left:1px solid #ccc;} + + +.user-img {background: url('../images/css/user.jpg') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; +} + +.mycourses-monitor-img {background: url('../images/css/mycourses_monitor.jpg') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; +} + +.mycourses-addlesson-img {background: url('../images/css/mycourses_addlesson.jpg') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; +} + +.mycourses-stop-img {background: url('../images/css/lesson_disabled.gif') no-repeat 0 3px; margin-left:20px; margin-right:5px; padding:5px 0px 5px 25px; +} + +.mycourses-completed-img {background: url('../images/css/lesson_completed.gif') no-repeat 0 3px; margin-left:20px; margin-right:5px; padding:5px 0px 5px 25px; +} + + + + +/*IE style workarounds */ + +* html #header { /*layout of the header */ + width:90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:5px; +} + +* html #header-my-courses { /*layout of the header */ + width:90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:5px; +} + +* html .nav-box-right { + height: 31px; + width: auto; + margin-right: -1px; + margin-top: 16px; + float: right; + text-align: center; + margin-left: 3px; +} + +* html #nav-right { /* layout of box that contains the main navigation */ + margin-top:15px; + width: auto; + height: 40px; + margin-right: 1px; +} + +* html .mycourses-right-buttons {float:right; height:24px; padding-top:5px; padding-bottom:5px; margin-top:4px;} + +* html #content a.add-lesson-button { + background: url ('../images/css/add_lesson.jpg') no-repeat 0px 0px; + color: #666; + border: 0px none; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + margin-left:5px; +} + +* html #content a:hover.add-lesson-button { + background: url ('../images/css/add_lesson.jpg') no-repeat 0px 0px; + color: #47bc23; + border: 0px none; + padding: 5px 12px 6px 30px; + text-decoration: none; + margin-top:0px; + margin-left:5px; + border-right:1px solid #d2d2d2; +} + +* html #content a.manage-group-button { + background: url ('../images/css/manage_groups.jpg') no-repeat 0px 0px; + color: #666; + border: 0px none; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + margin-top:6px; + margin-left:10px; +} + +* html #content a:hover.manage-group-button { + background: url ('../images/css/manage_groups.jpg') no-repeat 0px 0px; + color: #47bc23; + border: 0px none; + padding: 5px 12px 6px 30px; + text-decoration: none; + margin-top:0px; + margin-left:10px; + border-right:1px solid #d2d2d2; + } + +* html #content { + background-color:#fff; + font-size: 11px; + border:1px solid #d4d8da; + margin-top: -15px; + margin-left:auto; + margin-right:auto; + margin-bottom:-5px; + width:90%; + height:100%; + padding-bottom:-5px; + min-width:707px; + position:relative; + z-index:1; + } + + +* html .right-buttons {float:right; padding-top:5px; padding-bottom:5px; margin-bottom:20px;} + +* html .space-bottom { + margin-bottom: 40px; + +} + +* html #nav-right { /* layout of box that contains the main navigation */ + margin-top:30px; + width: 100%; + height: 40px; + position:relative; + z-index:2; + margin-right:-1px; +} + +* html #page-mycourses { /*whole layout of page*/ + margin: 0px auto; + width: 100%; + background: url('../images/css/lams_logo.gif') no-repeat 5% 25px; + +} + +/*IE 7 workarounds */ + +*:first-child+html .nav-box-right { + height: 0px; + width: auto; + margin-right: 2px; + margin-top: -14px; + float: right; + text-align: center; +} + +*:first-child+html .mycourses-right-buttons {float:right; padding-right:20px; margin-top:0px; height:24px; font-size:11px; padding-top:10px; padding-bottom:10px;} + +*:first-child+html #header { /*layout of the header */ + width:90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:-25px; +} + +*:first-child+html #header-my-courses { /*layout of the header */ + width:90%; + min-width:707px; + margin-left:auto; + margin-right:auto; + margin-bottom:-25px; +} + +*:first-child+html #nav-right { /* layout of box that contains the main navigation */ + margin-top:30px; + width: 100%; + height: 40px; + position:relative; + z-index:2; +} + +*:first-child+html .nav-box-right { + height: 0px; + width: auto; + margin-right: -1px; + margin-top: -14px; + float: right; + text-align: center; +} + + + Index: lams_central/web/main.jsp =================================================================== diff -u -r05db875c7974d705f89231416ff6dfe91a5e70f1 -r65b2816b6b46b51ef66de7ed0df1969fc9b80b88 --- lams_central/web/main.jsp (.../main.jsp) (revision 05db875c7974d705f89231416ff6dfe91a5e70f1) +++ lams_central/web/main.jsp (.../main.jsp) (revision 65b2816b6b46b51ef66de7ed0df1969fc9b80b88) @@ -23,7 +23,7 @@ - + Index: lams_common/src/java/org/lamsfoundation/lams/util/CSSThemeUtil.java =================================================================== diff -u -r8bd9b88a431c50cf5b0f64a8e48a9d2ccc748fda -r65b2816b6b46b51ef66de7ed0df1969fc9b80b88 --- lams_common/src/java/org/lamsfoundation/lams/util/CSSThemeUtil.java (.../CSSThemeUtil.java) (revision 8bd9b88a431c50cf5b0f64a8e48a9d2ccc748fda) +++ lams_common/src/java/org/lamsfoundation/lams/util/CSSThemeUtil.java (.../CSSThemeUtil.java) (revision 65b2816b6b46b51ef66de7ed0df1969fc9b80b88) @@ -36,23 +36,28 @@ public class CSSThemeUtil { // private static Logger log = Logger.getLogger(CSSThemeUtil.class); - private static String DEFAULT_HTML_THEME = "defaultHTML"; + public static String DEFAULT_HTML_THEME = "defaultHTML"; + public static String DEFAULT_MAIN_HTML_THEME = "defaultMainHTML"; + /** * Will return a list of stylesheets for the current user. * If the user does not have a specific stylesheet, then * the default stylesheet will be included in this list. * The default stylesheet will always be included in this list. * @return */ - public static List getAllUserThemes() + public static List getAllUserThemes(String defaultTheme) { List themeList = new ArrayList(); // Always have default as that defines everything. Other themes // define changes. - themeList.add(DEFAULT_HTML_THEME); + + themeList.add(defaultTheme); + + boolean userThemeFound = false; HttpSession ss = SessionManager.getSession(); if ( ss != null ) {