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

KendoCultureHeaderItem / please extend from OnDomReadyHeaderItem #246

Open
Patrick1701 opened this issue Oct 20, 2016 · 2 comments
Open

Comments

@Patrick1701
Copy link
Contributor

Hi Sebastien,
I found a minor bug in KendoCultureHeaderItem.

Currently, developer must pay attention for order, in which HeaderItems be added to pages (when adding manually, not via KendoCultureHeaderContributor).

(My case is, I splitted KendoUI Framework Components in seperate JS files for file size delivery reasons and I'm adding e.g. Scheduler JS files on my own)

The culture setting script must be executed later to work correct in conjunction with other kendo component scripts on page.
I think OnDomReady is the prefered way.
(have a copied working class on our project until this issue is solved)

This change could also change the KendoCultureHeaderContributor. I used PrioritiyHeaderItem for some reason. I dont really remember... I believe it was just convenience-copy-paste, because I found some some parts in your JQueryBehaviors, where you wrap scripts on page using a PriorityHeaderItem.

But I'm not able to reappraise side-effects, when just removing PrioritiyHeaderItem in KendoCultureHeaderContributor, because you had reasons wrapping them in your JQueryBehaviors.
Could you please have a look on this?

kind regards
Patrick

@sebfz1
Copy link
Owner

sebfz1 commented Oct 25, 2016 via email

@sebfz1
Copy link
Owner

sebfz1 commented Nov 3, 2016

Hi Patrick,

The culture setting script must be executed later to work correct in conjunction with other kendo component scripts on page.

Hummm, I do not really agree. At least that's not what I remember. Moreover, it seems to late (to me) to execute the culture statement (kendo.culture('de_DE')) in the dom ready script. I need to investigate much more...

where you wrap scripts on page using a PriorityHeaderItem.

PriorityHeaderItem is highly recommended if the underlying HeaderItem directly relies on a script file. If not, there is a chance that the script is attached after a statement that would use it (in a renderHead, from a page, component or a behavior, the order of attachments to the DOM may differs...).

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