Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JQM datebox does not respect theming #110

Closed
Zeddy- opened this issue Nov 10, 2011 · 4 comments
Closed

JQM datebox does not respect theming #110

Zeddy- opened this issue Nov 10, 2011 · 4 comments

Comments

@Zeddy-
Copy link

Zeddy- commented Nov 10, 2011

Hi, from the documentation you get the understanding that the JQM datebox should be automatically styled using the selected JQM data-theme, this is however not the case and i cannot get it to change:

http://www.smartload.se/?resort=666&lang=se

What am i missing here?

@jtsage
Copy link
Owner

jtsage commented Nov 10, 2011

The problem is, datebox has many, many internal elements to theme. (many). It is explained in depth here:

http://dev.jtsage.com/jQM-DateBox/demos/api/themes.html

I choose not to do simple inheritance, because which elements should inherit? (as it is, the original input actually does inherit correctly - which is of course hidden in your example)

@jtsage
Copy link
Owner

jtsage commented Nov 18, 2011

Also, you were sort of right. data-theme did not properly inherit to the input element. It does now.

Again though, all internal controls are configured via options - if anyone has a better idea on this, I am open to suggestions.

@jtsage jtsage closed this as completed Nov 18, 2011
@Zeddy-
Copy link
Author

Zeddy- commented Nov 18, 2011

Okay, nice to hear.. Im using datebox on this site:
http://smartload.se/

after choosing skiskunne from the list the datebox is displayed.. smartload is being built as a service where i let the users style their page, so it would be great to get the datebox themed according to the page, why not programtically take the parent data-theme and apply it to all elements in the datebox?

I noticed that when switching to the latest version of jqm datebox i get the following error (u can test this in the page above):
Uncaught TypeError: Object false has no method 'find'

// FIX THE SET BUTTON
switch (o.mode) {
case "timebox":
case "timeflipbox":
self.setButton.find('.ui-btn-text').html(o.lang[o.useLang].setTimeButtonLabel);
break;
case "durationbox":
self.setButton.find('.ui-btn-text').html(o.lang[o.useLang].setDurationButtonLabel);
break;
case "calbox":
if ( self.setButton !== false ) {
self.setButton.find('.ui-btn-text').html(o.lang[o.useLang].calTodayButtonLabel);
}
break;
default:
self.setButton.find('.ui-btn-text').html(o.lang[o.useLang].setDateButtonLabel);
jquery.mobile.datebox.js:1757 Uncaught TypeError: Object false has no method 'find'
break;
}

When using the old version it worked.. I also tried using the latest version of jQueryMobile and jQuery but that didn't help

@jtsage
Copy link
Owner

jtsage commented Nov 18, 2011

Fixed that but, gave you the option to "forceInheritTheme" - it will pull the internal control themes from the first parent with a theme when set to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants