Flexigrid не работает с версией jQuery 3.41 - PullRequest
0 голосов
/ 14 октября 2019

Я обновляю мою версию jQuery с 1.11.0 до 3.4.1. Проблема в том, что функциональность flexigrid, используемая в Приложении, вообще не работает. Ниже приведен фрагмент кода, который вызывает проблему.

$("#comparePopupTable").flexigrid({
    url: "../compareDealPopupController/getDealDetails.do",
    type:"POST",
    preProcess: formatResults,
    dataType: "json",
    params: [/*{
        name: "timeStamp",
        value: getTimeStamp()
    }, */{
        name: "dealType",
        value: e
    }, {
        name: "buorCustomer",
        value: t
    }, {
        name: "businessorCustomerId",
        value: a
    }, {
        name: "isQuickSearch",
        value: l
    }, {
        name: "searchParameter",
        value: o
    }, {
        name: "searchvalue",
        value: i
    }, {
        name: "metricsId",
        value: d
    }, {
        name: "varOppId",
        value: g
    }, {
        name: "period",
        value: u
    }, , {
        name: "retainView",
        value: h
    }],
    colModel: [{
        display: '<input type="checkbox" class="clsHeader" id="chHeader" onclick = "fnSelectAll()"  />',
        name: "checkBox",
        width: 20,
        sortable: !1,
        align: "center"
    }, {
        display: p,
        name: "dealId",
        width: 252,
        sortable: !1,
        align: "left"
    }, {
        display: "Customer Name",
        name: "customername",
        width: 100,
        sortable: !1,
        align: "center",
        hide: s
    }, {
        display: "Deal Status",
        name: "dealstatus",
        width: 100,
        sortable: !1,
        align: "center",
        hide: s
    }, {
        display: 'Deal TCV </br>in M$<span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "tcv",
        width: 65,
        sortable: !0,
        align: "center"
    }, {
        display: '<span class="dealHeaderText">Deal CP%</span><span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "dealcp%",
        width: 60,
        sortable: !0,
        align: "center"
    }, {
        display: '<span class="dealHeaderText">' + u + ' Revenue Planned </br>in M$</span><span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "ltdplanedrevenue",
        width: 119,
        sortable: !0,
        align: "center"
    }, {
        display: u + ' Revenue Actual </br>in M$<span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "ltdactualrevenue",
        width: 109,
        sortable: !0,
        align: "center"
    }, {
        display: u + ' CP% Planned<span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "cp%plan",
        width: 90,
        sortable: !0,
        align: "center"
    }, {
        display: u + ' CP% Actual<span class="sort" id="dealsort" onclick="changesortclass(this)"></span>',
        name: "cp%actual",
        width: 90,
        sortable: !0,
        align: "center"
    }, {
        display: "",
        name: "url",
        width: 50,
        sortable: !1,
        align: "center"
    }, {
        display: "",
        name: "delete",
        width: 50,
        sortable: !1,
        align: "center",
        hide: n
    }, {
        display: "",
        name: "retainGroup",
        width: 50,
        sortable: !1,
        align: "center",
        hide: !n
    }],
    sortname: "",
    sortorder: "asc",
    nowrap: !1,
    usepager: !1,
    useRp: !1,
    rp: rowsInPage,
    showTableToggleBtn: !1,
    resizable: !1,
    width: "auto",
    height: 340,
    onSuccess: colorGridRows,
    singleSelect: !0,
    showToggleBtn: !1
})

Ниже приведена ошибка, полученная из консоли браузера -

Uncaught TypeError: Cannot read property 'name' of undefined
at jquery-3.4.1.min.js:2
at Function.each (jquery-3.4.1.min.js:2)
at Function.k.param (jquery-3.4.1.min.js:2)
at Function.ajax (jquery-3.4.1.min.js:2)
at Object.populate (<anonymous>:1:12316)
at Function.$.addFlex (<anonymous>:1:29835)
at HTMLDocument.<anonymous> (<anonymous>:1:30058)
at e (jquery-3.4.1.min.js:2)
at t (jquery-3.4.1.min.js:2)

Flexigrid работает нормально с jQuery версии 2.4,Кто-нибудь может помочь здесь?

...