makeEditable不是使用jquery-datatables-editable的函数

时间:2014-12-03 13:44:10

标签: javascript jquery datatable jeditable

我有一个HTML表,我用它来管理数据表。现在我尝试添加一些功能,如添加行,删除行和修改单元格。 要做到这一点,我试图使用" jquery-datatables-editable"插入。 我按照说明操作,它给了我以下错误:

  

TypeError:$(...)。DataTable(...)。makeEditable不是函数

我已经看过关于这个问题的其他问题,但那些实际上并没有解决我的错误。 导入顺序没问题: jQuery dataTables makeEditable() is not a function 似乎我没有以下问题: Jquery Datatable : makeEditable not a function error

这是我的代码:

processManager = $('#processManager').DataTable( {
        "ajax": {
            url: "getMultiTables.php",
            type: "POST"
        },
        "rowCallback": function( row, data ) {
            if ( $.inArray(data.DT_RowId, selected) !== -1 ) {
                $(row).addClass('selected');
            }
        },
        "columns": [
                    {
                        "orderable": false,
                // Create an HTML select with all the versions of the data
                //TODO Correggi +01
                "render": function (row, type, val, meta) {
                    //scheduledButtons(val, process);
                    return returnButtons(val)
                    // return  '<button type="button" name="button A" class="btn btn-primary btn-xs" onclick="launchProcess(this)">A</button><button type="button" name="button B" class="btn btn-primary btn-xs" onclick="launchProcess(this)">B</button><button type="button" name="button C" class="btn btn-primary btn-xs" onclick="launchProcess(this)">C</button>';

                }
            },
            {
                "orderable": false,
                // Create an HTML select with all the versions of the data
                //TODO Correggi +01
                "render": function (row, type, val, meta) {
                    return  '<label><input type="checkbox" name="checkBoxA" class="form-control"/>A</label><label><input type="checkbox" name="checkBoxB" class="form-control"/>B</label><label><input type="checkbox" name="checkBoxC" class="form-control"/>C</label><label><input type="checkbox" name="checkBoxConcat" class="form-control"/>Concatenate</label>';}
                },
                { "data": "Process ID" },
                { "data": "Resource" },
                { "data": "Resource Class" },
                { "data": "Category" },
                { "data": "Format" },
                { "data": "Automaticity" },
                { "data": "Process type" },
                { "data": "Access" },
                { "data": "Real Time" },
                { "data": "Source" },
                { "data": "A" },
                { "data": "Status A" },
                { "data": "Time A" },
                // { "data": "Exec A" },
                { "data": "Last Update" },
                { "data": "Error A" },
                { "data": "B" },
                { "data": "Status B" },
                { "data": "Time B" },
                // { "data": "Exec B" },
                { "data": "Error B" },
                { "data": "C" },
                { "data": "Status C" },
                { "data": "Time C" },
                // { "data": "Exec C" },
                { "data": "Last Triples" },
                { "data": "Error C" },
                { "data": "D" },
                { "data": "Status D" },
                { "data": "Time D" },
                // { "data": "Exec D" },
                { "data": "Triples Count" },
                { "data": "Error D" },
                { "data": "E" },
                { "data": "Status E" },
                { "data": "Time E" },
                { "data": "Triples Count Repository" },
                // { "data": "Exec E" },
                { "data": "Error E" },
                { "data": "Period" },
                { "data": "Overtime" },
                { "data": "Parameters" },
                { "data": "Error" },
                { "data": "Description" }
        ],
        "columnDefs": [
            { className: "buttons", "targets": [ 0 ] },
            { className: "checkBoxes", "targets": [ 1 ] },
            { className: "Process ID", "targets": [ 2 ] },
            { className: "Resource", "targets": [ 3 ] },
            { className: "Resource Class", "targets": [ 4 ] },
            { className: "Category", "targets": [ 5 ] },
            { className: "Format", "targets": [ 6 ] },
            { className: "Automaticity", "targets": [ 7 ] },
            { className: "Process type", "targets": [ 8 ] },
            { className: "Access", "targets": [ 9 ] },
            { className: "Real Time", "targets": [ 10 ] },
            { className: "Source", "targets": [ 11 ] },
            { className: "A danger", "targets": [ 12 ] },
            { className: "Status A danger", "targets": [ 13 ] },
            { className: "Time A danger", "targets": [ 14 ] },
            // { className: "Exec A danger", "targets": [ 15 ] },
            { className: "Last Update danger", "targets": [ 15 ] },
            { className: "Error A danger", "targets": [ 16 ] },
            { className: "B active", "targets": [ 17 ] },
            { className: "Status B active", "targets": [ 18 ] },
            { className: "Time B active", "targets": [ 19 ] },
            // { className: "Exec B active", "targets": [ 20 ] },
            { className: "Error B active", "targets": [ 20 ] },
            { className: "C info", "targets": [ 21 ] },
            { className: "Status C info", "targets": [ 22 ] },
            { className: "Time C info", "targets": [ 23 ] },
            // { className: "Exec C info", "targets": [ 24 ] },
            { className: "Last Triples info", "targets": [24 ] },
            { className: "Error C info", "targets": [ 25 ] },
            { className: "D warning", "targets": [ 26 ] },
            { className: "Status D warning", "targets": [ 27 ] },
            { className: "Time D warning", "targets": [ 28 ] },
            // { className: "Exec D warning", "targets": [ 29 ] },
            { className: "Triples Count warning", "targets": [ 29 ] },
            { className: "Error D warning", "targets": [ 30 ] },
            { className: "E success", "targets": [ 31 ] },
            { className: "Status E success", "targets": [ 32 ] },
            { className: "Time E success", "targets": [ 33 ] },
            { className: "Triples Count Repository success", "targets": [ 34 ] },
            // { className: "Exec E success", "targets": [ 34 ] },
            { className: "Error E success", "targets": [ 35 ] },
            { className: "Period", "targets": [ 36 ] },
            { className: "Overtime", "targets": [ 37 ] },
            { className: "Parameters", "targets": [ 38 ] },
            { className: "Error", "targets": [ 39 ] },
            { className: "Description", "targets": [ 40 ] }
            ],
            "language": {
                "decimal": ",",
                "thousands": "."
            },
            "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
            "order": [[2, 'asc']],
            "pagingType": "full_numbers",
            "processing": true,
            "serverSide": true,
            "stateSave": true

    }).makeEditable();

以下是进口商品:

<script src="js/jquery/jquery-1.11.1.min.js"></script>
<script src="js/jquery/jquery-ui-1.11.2/jquery-ui.js" type="text/javascript"></script>
<script src="js/dataTables/jquery.dataTables.min.js"></script>
<script src="js/jquery/jquery.jeditable.js" type="text/javascript"></script>
<script src="js/jquery/jquery.dataTables.editable.js" type="text/javascript"></script>
<script src="js/jquery/jquery-validation-1.13.1/dist/jquery.validate.js" type="text/javascript"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<!--<script src="js/dataTables/jquery-1.10.1.dataTables.min.js"></script> -->
<script src="js/dataTables/dataTables.bootstrap.js"></script>
<script src="js/pageManager.js"></script>
<script>

有人知道可能出现什么问题吗?

0 个答案:

没有答案