1

同じページでjqGridとthickboxを使用するのに問題があります。配列データを更新するために「reloadGrid」メソッドを使用しています。

jqGrid init:

jQuery("#tablaCompromisos").jqGrid({
        datatype: "local",            
        height: 270,
        width: 1000,
        colNames: ['ID', 'Nombre Reunión', 'Reunión', 'Descripción', 'Cierre', 'Estado', 'Prioridad', 'Responsable R1', 'Responsable 2', 'Categoría'],
        cmTemplate: {
            resizable: false
        },
        colModel: [
                    { width: 60, name: 'idCompromiso', index: 'idCompromiso', sorttype: "int", align: "center" },
                { width: 300, name: 'reunion.nombre', index: 'reunion.nombre', sorttype: "string" },
                { width: 90, name: 'fechaReunion', index: 'fechaReunion', sorttype: "string", align: 'center', formatter: 'date', formatoptions: { newformat: 'd/M/Y' }, classes: 'reuFecha' },
                { width: 300, name: 'descCompromiso', index: 'descCompromiso', sorttype: "string", classes: 'compDesc' },
                { width: 90, name: 'fechaCierre', index: 'fechaCierre', sorttype: "string", align: 'center', classes: 'fechaCierre', formatter: 'date', formatoptions: { newformat: 'd/M/Y'} },
                { width: 60, name: 'estado.nombre', index: 'estado.orden', sorttype: "int", align: 'center', classes: 'estado', formatter: fomatoEstado },
                { width: 90, name: 'prioridad.nombre', index: 'prioridad.orden', sorttype: "int", align: 'center', formatter: fomatoPrioridad, classes: 'prioridad' },
                { name: 'responsableR1.nombre', index: 'responsableR1.nombre', sorttype: "string", classes: 'resp1' },
                { name: 'responsableR2.nombre', index: 'responsableR2.nombre', sorttype: "string", classes: 'resp2' },
                { name: 'categoria.nombre', index: 'categoria.orden', sorttype: "string", classes: 'categoria' }
                ],
        multiselect: false,
        caption: "Listado de compromisos según filtro",
        rowNum: 11,
        pager: "#tablaCompromisosPag",
        autowidth: false,
        shrinkToFit: false,
        altRows: true
    });

更新方法:

$("#tablaCompromisos").jqGrid('clearGridData').jqGrid('setGridParam', { datatype: 'local', data: CargarDatosGrilla() }).trigger("reloadGrid");

それはすべて大丈夫ですが、リンクをクリックした後:

<a onclick="cargarGraficoAvance();return false;" title="Ver gráfico de avance" class="thickbox" href="#TB_inline?height=410&amp;width=610&amp;inlineId=wrapperGrafico">11,11</a>

次の呼び出し

$("#tablaCompromisos").jqGrid('clearGridData').jqGrid('setGridParam', { datatype: 'local', data: CargarDatosGrilla() }).trigger("reloadGrid");

tsがnullであるため、updatepagerメソッドでエラーをスローします。

ts is null
http://localhost/gestion/js/jquery.jqGrid.src.js
Line 1578

理由 :

$(window).unload(function () {
   ts = null;
});

「ts=null」の呼び出しを避けてメソッドを変更しましたが、別の修正がありますか?その変更を行うことによって他の影響がありますか?

前もって感謝します

4

1 に答える 1

1

修正:

http://core.trac.wordpress.org/ticket/19189

Thickbox.js ファイルにパッチを適用する必要があります。

http://core.trac.wordpress.org/attachment/ticket/19189/19189-2.patch

于 2012-04-05T15:14:30.247 に答える