so how to avoid this conflicts with other libraries, maybe using RequireJS ?
inside hooks.py i do
app_include_css = [“/assets/addons/css/elevateZoom.js”]
for example this js library it work fine in a doctype with HTML docfield with image element like this:
but sometimes when i open other doctypes in different module i can see the zoom dialog bugged
is there anyway to include js files inside the targeted doctype only ?
try include into doctype.js file if it is a external app doctype …or add a custom script for the desired doctype.
JoEz, is this mean that i have to edit the core doctype.js or create on inside my custom app and if so in which folder should be placed in?
Sagar_Vore, sorry its js really but i wrote it wrong in this topic
Since it’s core, I recommend to copy all content of script and paste it into “Custom Script” and select relevant doctype.
i think this can be solution How Can i add app_include_js for Single DocType?
but unlike rmehta posted, this method require second argument ‘callback’. im not sure how to impalement but i will check it.
thanks @Sagar_Vora just like what i want, including scripts in single doctype
I’m not getting urtis point …i’m not saying to hack core code (doctype.js)…but to add you code to yourdoctype.js …or put it in custom scripts …