Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 97634 invoked from network); 1 Nov 2005 14:16:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Nov 2005 14:16:41 -0000 Received: (qmail 71337 invoked by uid 500); 1 Nov 2005 14:16:41 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 71264 invoked by uid 500); 1 Nov 2005 14:16:40 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 71253 invoked by uid 99); 1 Nov 2005 14:16:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 06:16:40 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 01 Nov 2005 06:16:35 -0800 Received: (qmail 97442 invoked by uid 65534); 1 Nov 2005 14:16:18 -0000 Message-ID: <20051101141618.97440.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r330061 - in /forrest/trunk/main/template-sites/v2/src/documentation: content/xdocs/samples/index.fv resources/themes/default/html/branding-theme-switcher.ft resources/themes/default/js/cssStyleSwitcher.js Date: Tue, 01 Nov 2005 14:16:17 -0000 To: svn@forrest.apache.org From: thorsten@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: thorsten Date: Tue Nov 1 06:16:08 2005 New Revision: 330061 URL: http://svn.apache.org/viewcvs?rev=330061&view=rev Log: - Enabled theme-profiling in the theme switcher. In combination with the branding-theme-profiler this contract provides a quick way to create new themes and switch them. The default theme can have unlimited color derivatives. If you turn on the color profiling this contract will activate the default theme in combination with the profiling styles. - Updated the example fv to enable the full power of the contract. - removed static stuff in contract and made all possible values configurable via the fv. - you can choose between an "a-link" switcher, that will output the possible themes in theme$seperator... gramatic, or as select box. Modified: forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/samples/index.fv forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/html/branding-theme-switcher.ft forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/js/cssStyleSwitcher.js Modified: forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/samples/index.fv URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/samples/index.fv?rev=330061&r1=330060&r2=330061&view=diff ============================================================================== --- forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/samples/index.fv (original) +++ forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/samples/index.fv Tue Nov 1 06:16:08 2005 @@ -47,7 +47,115 @@ --> - + + + Pelt-Forrest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pelt-Krysalis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pelt-Collabnet + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -251,7 +359,18 @@ - + + + + + + + + + + + Modified: forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/html/branding-theme-switcher.ft URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/html/branding-theme-switcher.ft?rev=330061&r1=330060&r2=330061&view=diff ============================================================================== --- forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/html/branding-theme-switcher.ft (original) +++ forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/html/branding-theme-switcher.ft Tue Nov 1 06:16:08 2005 @@ -22,7 +22,7 @@

branding-theme-switcher provides a way to switch the - underlying stylesheets (it not a "real" theme switcher).

+ underlying stylesheets (b).

 A "real" theme switcher would change a/b/c. 

A "real" color-theme switcher should also provide a possibility to change each color with a WEB-GUI.

+
+
Note
+
+ branding-theme-switcher-profiler and branding-theme-switcher-defaultTheme are required!
+ branding-theme-switcher-profiler {true|false} only works on the defaultTheme.
+ normally you are not using an "a link" (branding-theme-switcher-a) and a "selectbox" + (branding-theme-switcher-select) switcher at the same time in the same position, so uncomment the one you want. +
+
+

+ In combination with the branding-theme-profiler this contract provides a quick way to create new themes. The default theme + can have unlimited color derivatives. If you turn on the color profiling this contract will activate the default theme in combination + with the profiling styles. +

- ]]> + + + + + + + + + + +]]> - + + + + + - - Theme-switcher:
-
static:
- as links: default|pelt -
- -
-
-
Dynamic: -
- -
- -
+ + + + + + + + dynamic theme switcher links + + + +
+
+ + + + +
+
Modified: forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/js/cssStyleSwitcher.js URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/js/cssStyleSwitcher.js?rev=330061&r1=330060&r2=330061&view=diff ============================================================================== --- forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/js/cssStyleSwitcher.js (original) +++ forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/default/js/cssStyleSwitcher.js Tue Nov 1 06:16:08 2005 @@ -20,10 +20,12 @@ * * cssStyleSwitcher.js */ +var THEME_SWITCHER_PROFILING=false; +var THEME_SWITCHER_DEFAULT_THEME=""; function switchTheme(title){ - var linkElements= document.getElementsByTagName("link"); + var linkElements= document.getElementsByTagName("link"); // get all linked objects for(var i = 0; i -1){ + var profiled = (a.getAttribute("title") == THEME_SWITCHER_DEFAULT_THEME || a.getAttribute("title") == title)?true:false; + a.disabled = (profiled)?false:true; + }else{ + a.disabled = (a.getAttribute("title") == title)?false:true; + } + }else{ + a.disabled = (a.getAttribute("title") == title)?false:true; + } + } + } + var styleElements= document.getElementsByTagName("style");// get all inline style objects + for(var i = 0; i -1){ + var profiled = (a.getAttribute("title") == THEME_SWITCHER_DEFAULT_THEME || a.getAttribute("title") == title)?true:false; + a.disabled = (profiled)?false:true; + }else{ + a.disabled = (a.getAttribute("title") == title)?false:true; + } + }else{ + a.disabled = (a.getAttribute("title") == title)?false:true; + } } } createCookie("style", title, 365); -} +} // end method switchTheme(title) /* change the active (preferred) stylesheet to the selected one and save it */ function switchThemeSelect(selBox){ var selIndex= selBox.selectedIndex; // get the selected index @@ -55,6 +94,19 @@ } } } +function initASwitcher(themeSwitcherA,seperator){ + var select = $(themeSwitcherA); // get the object where we want to insert the response + var output = "";// initialize output object + var themes = aviableThemes(); // get all aviable themes + var tempTheme = themes.split(';'); // get an array out of the themes + for(var xi=0;xi < tempTheme.length;xi++) { + if (tempTheme[xi].length>1){ + output=output+""+tempTheme[xi]+""+seperator; // add the theme to an a object + } + } + var response = output.substring(0, output.lastIndexOf(seperator)); // clean the output trailing seperator + $(select).innerHTML=response; // set the response +} function aviableThemes(){ var currentTheme; var themes=""; @@ -76,6 +128,24 @@ } } } + var styleElements= document.getElementsByTagName("style"); + for(var i = 0; i 0) && (st.substring(0, pref.length) == pref) ); } -initBrandingThemeSwitcher();