i really dont get why the people packaging these libs together dont
provide a simple load_once check...
can you not modify the version of jquery.js your designer is including
to do such a check?
-igor
On Feb 1, 2008 2:41 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> > That would still require me to do some code in every page they want to
> > use jquery stuff in. But what do you think of the possibility of the
> > JQuery headercontributor to "scan" the <wicket:head> section using a
> > regexp or something, and not add jquery if the regexp matches? Can I get
> > to the <wicket:head> stuff from a header-contributor?
>
> Somewhere along the lines of this, in JQueryBehaviour:
>
> public static final Pattern JQUERY_REGEXP =
> Pattern.compile("<script.*?src=\".*jquery.*\\.js>");
>
>
> public void renderHead(IHeaderResponse response) {
> super.renderHead(response);
>
> if(!JQUERY_REGEXP.matcher(response.getResponse().toString()).matches()) {
> response.renderJavascriptReference(JQUERY_JS);
> if
> (Application.DEVELOPMENT.equals(Application.get().getConfigurationType())) {
> response.renderJavascriptReference(JQUERY_DEBUG_JS);
> }
> }
> }
>
> .. or am I on the wrong track? :)
>
>
> -- Edvin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]