Search and Top Navigation
#8149 closed bug (wontfix)
Opened February 29, 2012 09:17PM UTC
Closed October 05, 2012 12:22PM UTC
Last modified October 05, 2012 02:23PM UTC
correction to ThemeRoller - does not work on pages other than the demo page
Reported by: | mdeweerd | Owned by: | mdeweerd |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | [meta] ui.themeroller | Version: | 1.8.18 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi
I can't get the themeroller to work on any page different from the demo page.
I started debugging and discovered that in 'developertool.js.php' the following line :
if( $("link[href*=parseTheme.css.php], link[href=ui.theme.css]").size() > 0){
should be written as:
if( $("link[href*='parseTheme.css.php'], link[href='ui.theme.css']").size() > 0){
There are several other lines requiring a similar change.
Without these extra single quotes, the interactive console in firefox says:
Error: Syntax error, unrecognized expression: [href*=parseTheme.css.php] (from jQuery.js).
Concretely, doing:
jquitr.reloadCSS = function(){
var currSrc = jquitr.getHash(), cssLink;
if(jquitr.trString !== currSrc && currSrc !== ''){
jquitr.trString = currSrc;
cssLink = '<link href="http://jqueryui.com/themeroller/css/parseTheme.css.php?'+ currSrc +'" type="text/css" rel="Stylesheet" />';
//works for both 1.6 final and early rc's
if( $("link[href*='parseTheme.css.php'], link[href='ui.theme.css']").size() > 0){
$("link[href*='parseTheme.css.php']:last, link[href='ui.theme.css']:last").eq(0).after(cssLink);
} else {
$("head").append(cssLink);
}
if( $("link[href*='parseTheme.css.php']").size() > 3){
$("link[href*='parseTheme.css.php']:first").remove();
}
}
window.setTimeout(jquitr.reloadCSS, 1000);
};
and then running
jquitr.reloadCSS();
works for me.
Attachments (0)
Change History (6)
Changed February 29, 2012 09:21PM UTC by comment:1
Changed February 29, 2012 10:10PM UTC by comment:2
I've also modified my Themeroller shortcut to be:
javascript:(function(){if(!/Firefox[\\/\\s](\\d+\\.\\d+)/.test(navigator.userAgent)){alert("Sorry,%20due%20to%20security%20restrictions,%20this%20tool%20only%20works%20in%20Firefox");return%20false}else{if(window.jquitr){jquitr.addThemeRoller()}else{jquitr={};jquitr.s=document.createElement("script");jquitr.s.src="http://jqueryui.com/themeroller/developertool/developertool.js.php";document.getElementsByTagName("head")[0].appendChild(jquitr.s);var%20a=function(){jquitr.reloadCSS=function(){var%20c=jquitr.getHash(),b;if(jquitr.trString!==c&&c!==""){jquitr.trString=c;b='<link%20href="http://jqueryui.com/themeroller/css/parseTheme.css.php?'+c+'"%20type="text/css"%20rel="Stylesheet"%20/>';if($("link[href*='parseTheme.css.php'],%20link[href='ui.theme.css']").size()>0){$("link[href*='parseTheme.css.php']:last,%20link[href='ui.theme.css']:last").eq(0).after(b)}else{$("head").append(b)}if($("link[href*='parseTheme.css.php']").size()>3){$("link[href*='parseTheme.css.php']:first").remove()}}window.setTimeout(jquitr.reloadCSS,1000)};jquitr.reloadCSS()};window.setTimeout(a,1100)}}})();
which works ;-) (and proves that this solves the issue).
Changed October 05, 2012 12:09AM UTC by comment:3
owner: | jquery-infrastructure → mdeweerd |
---|---|
status: | new → pending |
Can you clarify what you're referring to? ThemeRoller, ThemeRoller bookmarklet, or ThemeSwitcher? ThemeRoller proper only exists on jqueryui.com/themeroller.
Changed October 05, 2012 12:22PM UTC by comment:4
resolution: | → wontfix |
---|---|
status: | pending → closed |
Noticing that you're using a javascript: URL, this must be the bookmarklet.
We're no longer supporting the ThemeRoller bookmarklet. Please either use Dave Hoff's Super Theme Switcher or go to the ThemeRoller page directly.
Changed October 05, 2012 01:54PM UTC by comment:5
Hi
I understand that you no longer support the bookmarklet. I kindly propose that you consider the following:
- As the themeroller bookmarklet does not work 'as is', remove it from the page where it is proposed.
- Other people have the same issue, and even propose solutions to get it work with the latest firefox version (http://forum.jquery.com/topic/the-firefox-themeroller-bookmarklet-does-not-update-the-html-page-when-changing-theme-colors );
- Suggest 'Super Theme Switcher' in the above forum entry;
- As there are proposed fixes, integrate these proposed fixes as the bookmarklet link in the existing page;
- That any of these solutions will avoid many users and developers trying the bookmarklet followed by some effort to understand why it does not work and find (or not find) the workaround(s) for it.
I appreciate that jQuery is public and for free, and I understand that you try to limit your effort. When I opened this ticket I tried to share my solution and reduce the effort for others on this planet.
I'ld appreciate that you show somehow that this message is acknowledged as I can not reopen the ticket.
Kind regards
Mario
Changed October 05, 2012 02:23PM UTC by comment:6
The link is removed from the new site which will go live with the 1.9.0 release. I replied to the linked forum thread. We're obviously not going to incorporate any fixes for something that we're no longer supporting. That's the definition of not supporting.
I uploaded the modified code to http://jsfiddle.net/GRTwy/2/