uPortal IRC Logs-2009-07-22
[09:16:23 EDT(-0400)] * fj4000 (n=Jacob@142.150.154.106) has joined ##uportal
[09:43:39 EDT(-0400)] * athena (n=athena@adsl-75-58-122-144.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[10:37:48 EDT(-0400)] * michelled (n=team@142.150.154.193) has joined ##uportal
[11:03:17 EDT(-0400)] * holdorph (n=holdorph@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[11:50:18 EDT(-0400)] * bszabo (n=bszabo@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[11:59:38 EDT(-0400)] * bszabo (n=bszabo@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[12:20:57 EDT(-0400)] * EricDalquist (n=EricDalq@76.210.62.51) has joined ##uportal
[12:25:59 EDT(-0400)] * EricDalquist (n=EricDalq@76.210.62.51) has joined ##uportal
[12:26:31 EDT(-0400)] <EricDalquist> JavaScript loading in portals is the bane of my existence right now
[12:30:54 EDT(-0400)] <athena> uhoh!
[12:31:13 EDT(-0400)] <EricDalquist> so we have a group that is writing a set of portlets in a single app
[12:31:22 EDT(-0400)] <EricDalquist> each portlet has JavaScript needs
[12:31:41 EDT(-0400)] <EricDalquist> and we don't know which modules the user will have on their page
[12:32:01 EDT(-0400)] <EricDalquist> so does each portlet get its own global namespace
[12:32:33 EDT(-0400)] <EricDalquist> if not how do we avoid loading jQuery several times into the same namespace
[12:32:42 EDT(-0400)] <EricDalquist> uhg
[12:32:58 EDT(-0400)] <EricDalquist> I found this project: http://code.google.com/p/jingo/wiki/GettingStarted
[12:33:01 EDT(-0400)] <EricDalquist> which looks neat
[12:33:12 EDT(-0400)] <EricDalquist> but only designed to handle the more sane case
[12:33:19 EDT(-0400)] <EricDalquist> of one dynamic app on a page
[12:33:22 EDT(-0400)] <EricDalquist> not the portal case
[13:07:00 EDT(-0400)] <EricDalquist> so when I do something like the following in a JS file:
[13:07:02 EDT(-0400)] <EricDalquist> (function($){
[13:07:02 EDT(-0400)] <EricDalquist> $.courseBrowse = function(callerSettings) {
[13:07:02 EDT(-0400)] <EricDalquist> };
[13:07:03 EDT(-0400)] <EricDalquist> })(jQuery);
[13:07:33 EDT(-0400)] <EricDalquist> that is actually declaring my courseBrowse function as a field in the jQuery object?
[13:41:45 EDT(-0400)] <athena> oops, sorry, i'd wondered off to a meting
[13:41:47 EDT(-0400)] <athena> er, meeting
[13:41:50 EDT(-0400)] * athena can't spell today
[13:43:01 EDT(-0400)] <athena> EricDalquist: it seems like you might need to use a namespace for each portlet, i guess
[13:43:30 EDT(-0400)] <athena> but it's worth considering that to avoid loading jquery multiple times it would need to be based on the <portlet:namespace/>
[13:43:36 EDT(-0400)] <athena> in case it was included twice in the same page . . .
[13:50:21 EDT(-0400)] <EricDalquist> yeah ...
[13:50:32 EDT(-0400)] <EricDalquist> so if I call jQuery.noConflict(true)
[13:50:39 EDT(-0400)] <EricDalquist> and don't assign the return value to anything
[13:50:51 EDT(-0400)] <EricDalquist> it pretty much removes any accessible reference to the library right?
[13:53:18 EDT(-0400)] <EricDalquist> what I have working for me now is this: http://uportal.pastebin.com/m6671cc56
[13:53:45 EDT(-0400)] <EricDalquist> so on the page you would load jQuery then any other things you need (like jQueryUI, plugins) then this js file
[13:54:02 EDT(-0400)] <EricDalquist> and it would be careful not to clobber anything namespace for the portlet app
[13:57:26 EDT(-0400)] <athena> yeah, i think that's true
[13:57:51 EDT(-0400)] <athena> fluid leaves a visible variable, i think - which you might want to explicitly clear
[13:58:16 EDT(-0400)] <EricDalquist> ah, well not using any fluid components here (yet)
[13:58:20 EDT(-0400)] <athena> yeah
[14:25:39 EDT(-0400)] <athena> i think some people around here are starting to use the pager in particular
[17:01:50 EDT(-0400)] * lennard1 (n=sparhk@ip68-98-56-21.ph.ph.cox.net) has joined ##uportal