Dynamic sorting of Javascript dependencies

23 views
Skip to first unread message

Mads Hartmann

unread,
Jan 12, 2010, 2:52:29 PM1/12/10
to Lift
Hello everyone

Is there any way to tell Lift if a javascript file (or just <script>
tag) is dependent of another one? - this would allow lift to order the
<script> tags correctly

Example:
The AutcoComplete widget adds the '/classpath/autocomplete/
jquery.autocomplete.js' javascript file to the header - If I want to
include a static JS file where I bind some JS functions to the
autocomplete text-field I can't select it using it's class as the css
selector unless my static file is loaded after the <script> tag - This
is because the class is added dynamically when the <script> tag that
calls the autocomplete method executes

N.B: This is not really a big problem in my case because i can just
select the text-field using another css selector, but i could imagine
that in larger projects this would be a handy thing to have :)

Cheers,
Mads Hartmann Jensen

Marius

unread,
Jan 12, 2010, 3:07:30 PM1/12/10
to Lift
No we don't have that but I find it quite interesting and useful in
practice. I think it worth opening a ticket (http://github.com/dpp/
liftweb/issues) as a feature request.

Br's,
Marius

Mads Hartmann

unread,
Jan 12, 2010, 3:36:33 PM1/12/10
to Lift
Glad you like it Marius :) I think I saw this feature in wordpress,
but I'm not sure :)

Mads Hartmann

unread,
Jan 12, 2010, 3:37:03 PM1/12/10
to Lift
Ups forgot - I created an issue on github here:
http://github.com/dpp/liftweb/issues/#issue/281

On Jan 12, 9:07 pm, Marius <marius.dan...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages