jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

jQM and theme inheritance #443

Closed jtsage closed 5 years ago

jtsage commented 5 years ago

Basically, this is hard. I'm open to ideas of what should inherit and where. I know I can search up the tree for the nearest set theme. But what to do with it is the problem.

I'm just not sure what should inherit, and what should be an option setting. A lot can, but it get's odd on things like highlighted buttons. Do I hard code a theme assuming that 'b' is a highlight to 'a'? Or assume the default theme, and if "b" is inherited, use "a", otherwise the reverse?

Thoughts would be appreciated. Part of me is leaning towards how all the other frameworks work, and hardcode all of it as options.

jtsage commented 5 years ago

@slavap I'm hoping you have time to chime in here. Thanks!

slavap commented 5 years ago

@jtsage All of it as options - sounds perfectly fine to me. It’s right to have explicit option for each particular aspect of calendar coloring. What I see in commit db81819 looks right. By the way in my project based on jqm designers created 15+ color swatches and at least 5 are used for coloring calendars.

jtsage commented 5 years ago

Excellent. That's what I will work towards. Putting this framework back in has actually proved to be pretty simple.

The one important change is I am actually generating fully marked up content, rather than the short markup in the demo, to avoid having to run "enahnceWithin" all over the place. All it really means, if if you use something like calBeforeAppendFunc or calFormatter, you'll need to either provide the full CSS markup, or call enhanceWithin yourself.

Good to hear on the designers, the default theme on 1.4.5 is very limiting, and the old default theme was not terribly pleasant to look at (but it did do a nice job of showing possibilities).

Thanks for your help on this.