[opencms-dev] direct edit icons not showing up when using jQuery
Michael Moossen
m.moossen at alkacon.com
Mon May 17 17:11:15 CEST 2010
Dear Pujan!
The problem is that the direct edit provider loads jQuery and your
template also loads jQuery. And this twice loading is not good, in
special for IE. there are several solutions for this problem:
- use the old direct edit provider that does not use jQuery, see
opencms-workplace.xml, i think the right class is
CmsDefaultDIrectEditProvider in the same package...
- change your template to load jQuery only when online, ie
using something like:
cms.getRequestContext().currentProject().isOnlineProject()
then your jQuery file will be used when online and the direct edit
provider's when offline...
HTH
-------------------
Michael Moossen
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
On 17.05.2010 16:53, Pujan Kafle wrote:
> Hello all,
>
> I have used jQuery in some of my webpages in OpenCms. My page works
> fine, however, the direct edit icons were not showing up when I was
> trying to access those pages from the workplace when I was in "Offline"
> project.
>
> If I disable jQuery include in my code, direct edit icons do show up and
> my page works fine only when I am in "Offline" project. If I enable
> jQuery include, direct edit icons do not show up anymore.
>
> Has anyone encountered similar problem?
>
> I also noticed, OpenCms loads jQuery from
> /system/workplace/resources/jquery/ for showing direct edit icons.
>
> Does this mean, for using jQuery, we must always include jQuery from
> this location?
>
> Are there any guidelines how to use jQuery within OpenCms?
>
> Your suggestions would be highly appreciated.
>
> Thanks,
> Pujan
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list