[Vtigercrm-developers] jQuery Class files: delay loading?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Vtigercrm-developers] jQuery Class files: delay loading?

Alan Lord (News)
I have a custom Javascript file which I want to load _after_
Vtiger_Detail_Js (because I need to re-use some of the exiting
functions) but my class should be available in several vtiger modules so
I have used the vtiger_link HEADERSCRIPT method of loading my file.
Otherwise I must modify core vtiger files like the View classes to
include my javascript library.

> Vtiger_Detail_Js('LSCustom_ServiceHelper_Js', {}, {
>  ...
> }

Using the HEADERSCRIPT method unfortunately my file is being loaded
before Vtiger_Detail_Js and so is not working as I wish due to an error:

> "ReferenceError: Vtiger_Detail_Js is not defined".

How can I delay the loading of my file?

It would be really useful if we could use something like the sequence
value in the vtiger_link table for this kind of thing but it doesn't
seem to do anything in this use-case.

TIA


Al


_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: jQuery Class files: delay loading?

Alan Lord (News)
On 08/03/17 10:18, Alan Lord wrote:
> I have a custom Javascript file which I want to load _after_
> Vtiger_Detail_Js (because I need to re-use some of the exiting

> How can I delay the loading of my file?
>
> It would be really useful if we could use something like the sequence
> value in the vtiger_link table for this kind of thing but it doesn't
> seem to do anything in this use-case.


Or, of course, you (vtiger) could change the Vtiger_Loader class so we
can override vtiger classes ;-)


Al


_______________________________________________
http://www.vtiger.com/