Opened 10 years ago

Closed 7 years ago

#4714 closed feature (wontfix)

Themeswitcher: onSelect behavior

Reported by: pwnedd Owned by:
Priority: minor Milestone: 1.10.0
Component: [meta] ui.themeroller Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

Would it be possible to:

  1. Have onSelect provide the name of the theme that was selected? It is not hard to find (e.g. $(".jquery-ui-themeswitcher-trigger > .jquery-ui-themeswitcher-title").text()), but it would be useful to simply pass to the event-handler.
  1. Prevent onSelect from firing during initialization?

Thanks, Keith

Change History (5)

comment:1 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.next

comment:2 Changed 8 years ago by Lwangaman

Not sure about point 1, but if I understand correctly point 2 it's an issue I've been thinking about lately. When setting the "onSelect" callback in the widget options, I noticed that it was getting triggered on every page load after having selected a theme. I believe that the expected behaviour is to trigger only after the actual select from the widget, and not on every successive theme load (such as on page load).

I found the cause, it was because when the theme is loaded either from the cookie or from the "loadTheme" option, a click is triggered on the widget, causing the onselect event to trigger also. So I deleted the click trigger and modified it so as not to trigger the onselect event. Here is my test case on jsbin:

http://jsbin.com/ehoja3/9 ( = original themeswitcher widget code)

versus

http://jsbin.com/ehoja3/8 (my code)

Is the themeswitcher widget to be found on the repository on GitHub? If so I can push a fix, but after looking over the repository I could not find the themeswitcher widget code.

comment:3 Changed 7 years ago by Scott González

Type: enhancementfeature

comment:4 Changed 7 years ago by Scott González

Milestone: 1.next1.10.0

comment:5 Changed 7 years ago by Scott González

Resolution: wontfix
Status: newclosed

We're no longer supporting ThemeSwitcher. Please use Dave Hoff's Super Theme Switcher.

Note: See TracTickets for help on using tickets.