Lazy load URL using Namespaces!

13 views
Skip to first unread message

Jrad

unread,
May 2, 2011, 8:28:36 AM5/2/11
to jquery-claypool
Dear Chris,
Consider we have 2 seperate claypool application structures named app1
and app2:

+app1
++ views
++ models

+app2
++ views
++ models

I used $.scan to define both namespaces, and then set appbase as
below:
appbase: {
'': 'app/',
app1: 'app1/app/',
app2: 'app2/app/'
},

When i try $.$( "app1#MyView" ) this is mapped to "/app1/app/app1views/
my.js"!!!
but I expect the resolved path to be "/app1/app/views/my.js" not
"app1views"!
Can this be somehow configured within claypool?

chris thatcher

unread,
May 2, 2011, 12:37:32 PM5/2/11
to jquery-...@googlegroups.com
This looks like a bug to me.  I'll try to get it fixed today or tomorrow.  I understand what your expectation is and I I would have expected the same.  The Library is planning to use a similar approach since they will soon be releasing several new claypool apps which all run potentially on the same page.  I'll ping you when it's pushed out (will be 1.2.8) which includes several patches related to console.log in ie8 and better stack traces in most broswers too.

Thatcher


--
You received this message because you are subscribed to the Google Groups "jquery-claypool" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to jquery-claypo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-claypool?hl=en.




--
Christopher Thatcher

chris thatcher

unread,
May 2, 2011, 12:39:16 PM5/2/11
to jquery-...@googlegroups.com
oh and jquery 1.5 compatibility patch will be included too
--
Christopher Thatcher

Jrad

unread,
May 2, 2011, 2:04:14 PM5/2/11
to jquery-claypool
We are also trying to load multiple claypool apps in a single page
portal! One of my interests there was a
feature letting me to merge environments and configs of claypool apps!

I have done this for 2 environments.js files in some way which I'll
show you if you're interested.


Nice to hear from you again Chris.Thank you.


On May 2, 8:39 pm, chris thatcher <thatcher.christop...@gmail.com>
wrote:
> oh and jquery 1.5 compatibility patch will be included too
>
> On Mon, May 2, 2011 at 12:37 PM, chris thatcher <
>
>
>
>
>
>
>
>
>
> thatcher.christop...@gmail.com> wrote:
> > This looks like a bug to me.  I'll try to get it fixed today or tomorrow.
> > I understand what your expectation is and I I would have expected the same.
> > The Library is planning to use a similar approach since they will soon be
> > releasing several new claypool apps which all run potentially on the same
> > page.  I'll ping you when it's pushed out (will be 1.2.8) which includes
> > several patches related to console.log in ie8 and better stack traces in
> > most broswers too.
>
> > Thatcher
>

chris thatcher

unread,
May 7, 2011, 9:27:44 PM5/7/11
to jquery-...@googlegroups.com
I am interested in what appraoches you've taken because we are still working at it finding the best solution.  Sorry I didnt post the patches yet, I've got two new web site projects I work on being released by the Library this month and my schedule has been crazy.  I have some mothers day events tomorrow but I will absolutely get these patches out.

Thatcher

chris thatcher

unread,
May 9, 2011, 11:42:24 AM5/9/11
to jquery-...@googlegroups.com
Ok, got this patch pushed out to trunk and tagged as 1.2.8.  Thanks for the feedback!!

Thatcher
--
Christopher Thatcher

Jrad

unread,
May 10, 2011, 3:54:54 AM5/10/11
to jquery-claypool
Dear Chris,
I got and tested your patch. Expected path is now resolved. but I
think there's a typo in your code at end of the line 3611 of
jquery.claypool.1.2.8.js ( 'x' character). Claypool first throw an
undefined variable error at the specified line, but worked after
removing that character.

And about merging claypool environment files: I've a core
environments.js, and app1 environments.js which are both attached to
the index.html. To have both environments merged into the final
portal, my files are as below:

core/app/configs/environments.js:
(function($){
$.env({

automap: {
"": "defaults"
},

defaults:{
version:'0.1',
debug: true,
}
});

})(jQuery);


app1/app/configs/environments.js:
(function($){

$.env({
prod: {
client: {
debug: false,
pageLimit:10,
validatorSuffix:"Validator",
treeTheme:"apple"
}
}
});

$.env( "defaults", "prod.client" );

})(jQuery);




On May 9, 7:42 pm, chris thatcher <thatcher.christop...@gmail.com>
wrote:
> Ok, got this patch pushed out to trunk and tagged as 1.2.8.  Thanks for the
> feedback!!
>
> Thatcher
>
> On Sat, May 7, 2011 at 9:27 PM, chris thatcher <
>
>
>
>
>
>
>
>
>
> thatcher.christop...@gmail.com> wrote:
> > I am interested in what appraoches you've taken because we are still
> > working at it finding the best solution.  Sorry I didnt post the patches
> > yet, I've got two new web site projects I work on being released by the
> > Library this month and my schedule has been crazy.  I have some mothers day
> > events tomorrow but I will absolutely get these patches out.
>
> > Thatcher
>
Reply all
Reply to author
Forward
0 new messages