[Vtigercrm-developers] How to add javascript file to header

Stencel, Maciej m.stencel at opensaas.pl
Tue Oct 22 12:17:40 GMT 2013


When the script is loaded using getHeaderScripts() or vtlib LinkType
zeroclipboard is loaded between other scripts...

It is loaded by JSResources.tp.

The code
<script type="text/javascript" src="libraries/html5shim/html5.js"></script>
<script type="text/javascript"
src="libraries/jquery/jquery.blockUI.js"></script>
...
...
...
<script type="text/javascript"
src="libraries/jquery/datepicker/js/datepicker.js"></script>
<script type="text/javascript"
src="libraries/jquery/dangrossman-bootstrap-daterangepicker/date.js"></script>
<script type="text/javascript"
src="libraries/jquery/jquery.ba-outside-events.min.js"></script>

*<script type="text/javascript"
src="layouts/vlayout/modules/MYMODULE/resources/ZeroClipboard.js?&v=6.0.0Beta"></script>
*
<script type="text/javascript"
src="libraries/bootstrap/js/eternicode-bootstrap-datepicker/js/bootstrap-datepicker.js?&v=6.0.0Beta"></script>
...
...
...
<script type="text/javascript"
src="layouts/vlayout/modules/Vtiger/resources/CkEditor.js?&v=6.0.0Beta"></script>

<!-- Added in the end since it should be after less file loaded -->
<script type="text/javascript"
src="libraries/bootstrap/js/less.min.js"></script></div></body></html>


The only time for me for this to work is move the js file to top before
</head> tag, or modyfying the whole zeroclipboard library...

Ok thank You for your time.


2013/10/22 Alan Lord <alanslists at gmail.com>

> On 22/10/13 12:43, Stencel, Maciej wrote:
>
>> Please download ZeroClipboard.js, add it to your module and tell me if
>> it's working for You...
>>
>
> 1. You have not supplied any links or packages to the file and it is not
> something I have ever heard of before.
> 2. If you mean this: https://github.com/**zeroclipboard/zeroclipboard<https://github.com/zeroclipboard/zeroclipboard>it doesn't look like one simple javascript file and I do not have time to
> investigate this for free.
> 3. If you havent already, try using Firebug in Firefox or the Chrome
> developer tools to identify the problem.
>
> Cheers
>
> Al
>
>
> ______________________________**_________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20131022/4a8d9e32/attachment.html>


More information about the vtigercrm-developers mailing list