[Vtigercrm-developers] Poss. to have HEADERSCRIPT dependent on vtiger version?

Sutharsan Jeganathan ajstharsan at gmail.com
Sat Oct 7 15:35:27 GMT 2017


Hope this will work.

It is bit slower,  but possible to send an Ajax to vtigerversion.php then
load relevant script


On 6 Oct 2017 19:23, "Alan Lord" <alanslists at gmail.com> wrote:

> I have a small extension on the marketplace that I would like to make
> compatible with vtiger 7, but I want to keep it compatible with vtiger 6
> too.
> As the module was released it has a single Javascript file which is loaded
> via a HEADERSCRIPT link.
> In v7 some libraries are not immediately available (hoverIntent in my
> example) so I have re-written part of the code to use the available qTip2
> library instead.
> So my question is how can I either:
> 1. Load a different javascript file via the HEADERSCRIPT depending on
> vtiger version
> or
> 2. Determine during my javascript initialisation the version of vtiger and
> register an appropriate function/handler
> For #2 I couldn't find anything that looked remotely helpful in app.js or
> helper.js or several other library files and there doesn't appear to be a
> value anywhere in the dom either (apart from the "Powered By vtiger .." bit
> but that is unreliable to say the least).
> I can't use the layout/{vlayout,v7}/ route as this is an extension module
> and doesn't have any real "views".
> Al
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20171007/2bbd8911/attachment.html>

More information about the vtigercrm-developers mailing list