跳至內容
選單
此問題已被標幟
1 回覆
10082 瀏覽次數

I need the table with  Fixed Columns so am including script files from below link

\https://datatables.net/extensions/fixedcolumns/examples/initialisation/left_right_columns.html

<template id="fc_assets_backend" name="account assets" inherit_id="web.assets_backend">

<xpath expr="." position="inside">

<script type="text/javascript" src="/purchase_requisition/static/src/js/dataTables.fixedColumns.js"></script>

<script type="text/javascript" src="/purchase_requisition/static/src/js/jquery.dataTables.js"></script>

<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.css" />

<link rel="stylesheet" href="https://cdn.datatables.net/fixedcolumns/3.2.4/css/fixedColumns.dataTables.css" />

</xpath>

</template>

Getting below error:

web.assets_backend.js:2824 Could not get content for jquery-1.12.4.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2824

web.assets_backend.js:2827 Could not get content for /js/jquery.dataTables.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2827

web.assets_backend.js:2830 Could not get content for /fixedcolumns/3.2.4/js/dataTables.fixedColumns.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2830

web.assets_backend.js:2795 Uncaught TypeError: $(...).DataTable is not a function

Please help me to resolve this error

頭像
捨棄
最佳答案

you dont need to include the jquery lib, and also cdn will not accepted I think.

So download the lib and include it under your custom addon and give the path within the script tag.

頭像
捨棄
作者

<script type="text/javascript" src="/purchase_requisition/static/src/js/dataTables.fixedColumns.js"></script>

<script type="text/javascript" src="/purchase_requisition/static/src/js/jquery.dataTables.js"></script> Cant get function from this file

相關帖文 回覆 瀏覽次數 活動
2
5月 24
2248
0
12月 23
1758
1
8月 23
3494
0
3月 21
2209
2
12月 19
7424