libre-jqgrid 4.17.2 → 4.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tscache/all/hashes/free-jqgrid.d.ts-74303c8b076937117540c0cb798f2053 +1 -0
- package/.tscache/all/hashes/test.ts-0d81877a31bc5d7ac52dd35a66602f01 +1 -0
- package/.tscache/all/timestamp +0 -0
- package/dist/css/ui.jqgrid.css +1618 -0
- package/dist/css/ui.jqgrid.min.css +4 -0
- package/dist/css/ui.jqgrid.min.css.map +1 -0
- package/dist/i18n/grid.locale-ar.js +198 -0
- package/dist/i18n/grid.locale-bg.js +201 -0
- package/dist/i18n/grid.locale-bs.js +230 -0
- package/dist/i18n/grid.locale-ca.js +204 -0
- package/dist/i18n/grid.locale-cn.js +237 -0
- package/dist/i18n/grid.locale-cs.js +197 -0
- package/dist/i18n/grid.locale-da.js +196 -0
- package/dist/i18n/grid.locale-de.js +240 -0
- package/dist/i18n/grid.locale-el.js +195 -0
- package/dist/i18n/grid.locale-en.js +256 -0
- package/dist/i18n/grid.locale-es.js +202 -0
- package/dist/i18n/grid.locale-fa.js +211 -0
- package/dist/i18n/grid.locale-fi.js +201 -0
- package/dist/i18n/grid.locale-fr.js +197 -0
- package/dist/i18n/grid.locale-gl.js +197 -0
- package/dist/i18n/grid.locale-he.js +198 -0
- package/dist/i18n/grid.locale-hr.js +231 -0
- package/dist/i18n/grid.locale-hu.js +196 -0
- package/dist/i18n/grid.locale-id.js +238 -0
- package/dist/i18n/grid.locale-is.js +197 -0
- package/dist/i18n/grid.locale-it.js +189 -0
- package/dist/i18n/grid.locale-ja.js +203 -0
- package/dist/i18n/grid.locale-kr.js +194 -0
- package/dist/i18n/grid.locale-lt.js +199 -0
- package/dist/i18n/grid.locale-me.js +198 -0
- package/dist/i18n/grid.locale-nl.js +208 -0
- package/dist/i18n/grid.locale-no.js +180 -0
- package/dist/i18n/grid.locale-pl.js +204 -0
- package/dist/i18n/grid.locale-pt-br.js +210 -0
- package/dist/i18n/grid.locale-pt.js +196 -0
- package/dist/i18n/grid.locale-ro.js +210 -0
- package/dist/i18n/grid.locale-ru.js +196 -0
- package/dist/i18n/grid.locale-sk.js +198 -0
- package/dist/i18n/grid.locale-sl.js +230 -0
- package/dist/i18n/grid.locale-sr.js +199 -0
- package/dist/i18n/grid.locale-sv.js +198 -0
- package/dist/i18n/grid.locale-th.js +195 -0
- package/dist/i18n/grid.locale-tr.js +197 -0
- package/dist/i18n/grid.locale-tw.js +199 -0
- package/dist/i18n/grid.locale-ua.js +199 -0
- package/dist/i18n/grid.locale-vi.js +238 -0
- package/dist/i18n/min/grid.locale-ar.js +10 -0
- package/dist/i18n/min/grid.locale-ar.js.map +1 -0
- package/dist/i18n/min/grid.locale-bg.js +10 -0
- package/dist/i18n/min/grid.locale-bg.js.map +1 -0
- package/dist/i18n/min/grid.locale-ca.js +15 -0
- package/dist/i18n/min/grid.locale-ca.js.map +1 -0
- package/dist/i18n/min/grid.locale-cn.js +10 -0
- package/dist/i18n/min/grid.locale-cn.js.map +1 -0
- package/dist/i18n/min/grid.locale-cs.js +11 -0
- package/dist/i18n/min/grid.locale-cs.js.map +1 -0
- package/dist/i18n/min/grid.locale-da.js +10 -0
- package/dist/i18n/min/grid.locale-da.js.map +1 -0
- package/dist/i18n/min/grid.locale-de.js +21 -0
- package/dist/i18n/min/grid.locale-de.js.map +1 -0
- package/dist/i18n/min/grid.locale-el.js +10 -0
- package/dist/i18n/min/grid.locale-el.js.map +1 -0
- package/dist/i18n/min/grid.locale-en.js +11 -0
- package/dist/i18n/min/grid.locale-en.js.map +1 -0
- package/dist/i18n/min/grid.locale-es.js +16 -0
- package/dist/i18n/min/grid.locale-es.js.map +1 -0
- package/dist/i18n/min/grid.locale-fa.js +8 -0
- package/dist/i18n/min/grid.locale-fa.js.map +1 -0
- package/dist/i18n/min/grid.locale-fi.js +11 -0
- package/dist/i18n/min/grid.locale-fi.js.map +1 -0
- package/dist/i18n/min/grid.locale-fr.js +10 -0
- package/dist/i18n/min/grid.locale-fr.js.map +1 -0
- package/dist/i18n/min/grid.locale-gl.js +9 -0
- package/dist/i18n/min/grid.locale-gl.js.map +1 -0
- package/dist/i18n/min/grid.locale-he.js +10 -0
- package/dist/i18n/min/grid.locale-he.js.map +1 -0
- package/dist/i18n/min/grid.locale-hr.js +11 -0
- package/dist/i18n/min/grid.locale-hr.js.map +1 -0
- package/dist/i18n/min/grid.locale-hu.js +10 -0
- package/dist/i18n/min/grid.locale-hu.js.map +1 -0
- package/dist/i18n/min/grid.locale-id.js +10 -0
- package/dist/i18n/min/grid.locale-id.js.map +1 -0
- package/dist/i18n/min/grid.locale-is.js +9 -0
- package/dist/i18n/min/grid.locale-is.js.map +1 -0
- package/dist/i18n/min/grid.locale-it.js +2 -0
- package/dist/i18n/min/grid.locale-it.js.map +1 -0
- package/dist/i18n/min/grid.locale-ja.js +10 -0
- package/dist/i18n/min/grid.locale-ja.js.map +1 -0
- package/dist/i18n/min/grid.locale-kr.js +2 -0
- package/dist/i18n/min/grid.locale-kr.js.map +1 -0
- package/dist/i18n/min/grid.locale-lt.js +10 -0
- package/dist/i18n/min/grid.locale-lt.js.map +1 -0
- package/dist/i18n/min/grid.locale-me.js +10 -0
- package/dist/i18n/min/grid.locale-me.js.map +1 -0
- package/dist/i18n/min/grid.locale-nl.js +2 -0
- package/dist/i18n/min/grid.locale-nl.js.map +1 -0
- package/dist/i18n/min/grid.locale-no.js +2 -0
- package/dist/i18n/min/grid.locale-no.js.map +1 -0
- package/dist/i18n/min/grid.locale-pl.js +18 -0
- package/dist/i18n/min/grid.locale-pl.js.map +1 -0
- package/dist/i18n/min/grid.locale-pt-br.js +21 -0
- package/dist/i18n/min/grid.locale-pt-br.js.map +1 -0
- package/dist/i18n/min/grid.locale-pt.js +9 -0
- package/dist/i18n/min/grid.locale-pt.js.map +1 -0
- package/dist/i18n/min/grid.locale-ro.js +10 -0
- package/dist/i18n/min/grid.locale-ro.js.map +1 -0
- package/dist/i18n/min/grid.locale-ru.js +10 -0
- package/dist/i18n/min/grid.locale-ru.js.map +1 -0
- package/dist/i18n/min/grid.locale-sk.js +10 -0
- package/dist/i18n/min/grid.locale-sk.js.map +1 -0
- package/dist/i18n/min/grid.locale-sr.js +10 -0
- package/dist/i18n/min/grid.locale-sr.js.map +1 -0
- package/dist/i18n/min/grid.locale-sv.js +10 -0
- package/dist/i18n/min/grid.locale-sv.js.map +1 -0
- package/dist/i18n/min/grid.locale-th.js +10 -0
- package/dist/i18n/min/grid.locale-th.js.map +1 -0
- package/dist/i18n/min/grid.locale-tr.js +10 -0
- package/dist/i18n/min/grid.locale-tr.js.map +1 -0
- package/dist/i18n/min/grid.locale-tw.js +11 -0
- package/dist/i18n/min/grid.locale-tw.js.map +1 -0
- package/dist/i18n/min/grid.locale-ua.js +10 -0
- package/dist/i18n/min/grid.locale-ua.js.map +1 -0
- package/dist/i18n/min/grid.locale-vi.js +10 -0
- package/dist/i18n/min/grid.locale-vi.js.map +1 -0
- package/dist/jquery.jqgrid.min.js +11 -0
- package/dist/jquery.jqgrid.min.js.map +1 -0
- package/{js/jquery.jqgrid.src.js.1 → dist/jquery.jqgrid.src.js} +1 -1
- package/dist/modules/grid.base.js +8518 -0
- package/dist/modules/grid.celledit.js +673 -0
- package/dist/modules/grid.common.js +844 -0
- package/dist/modules/grid.custom.js +1795 -0
- package/dist/modules/grid.filter.js +897 -0
- package/dist/modules/grid.formedit.js +2537 -0
- package/dist/modules/grid.grouping.js +737 -0
- package/dist/modules/grid.import.js +251 -0
- package/dist/modules/grid.inlinedit.js +784 -0
- package/dist/modules/grid.jqueryui.js +965 -0
- package/dist/modules/grid.pivot.js +862 -0
- package/dist/modules/grid.subgrid.js +379 -0
- package/dist/modules/grid.tbltogrid.js +141 -0
- package/dist/modules/grid.treegrid.js +683 -0
- package/dist/modules/jqdnr.js +188 -0
- package/dist/modules/jqmodal.js +292 -0
- package/dist/modules/jquery.fmatter.js +1061 -0
- package/dist/modules/jsonxml.js +343 -0
- package/dist/modules/min/grid.base.js +11 -0
- package/dist/modules/min/grid.base.js.map +1 -0
- package/dist/modules/min/grid.celledit.js +2 -0
- package/dist/modules/min/grid.celledit.js.map +1 -0
- package/dist/modules/min/grid.common.js +2 -0
- package/dist/modules/min/grid.common.js.map +1 -0
- package/dist/modules/min/grid.custom.js +2 -0
- package/dist/modules/min/grid.custom.js.map +1 -0
- package/dist/modules/min/grid.filter.js +2 -0
- package/dist/modules/min/grid.filter.js.map +1 -0
- package/dist/modules/min/grid.formedit.js +2 -0
- package/dist/modules/min/grid.formedit.js.map +1 -0
- package/dist/modules/min/grid.grouping.js +2 -0
- package/dist/modules/min/grid.grouping.js.map +1 -0
- package/dist/modules/min/grid.import.js +2 -0
- package/dist/modules/min/grid.import.js.map +1 -0
- package/dist/modules/min/grid.inlinedit.js +2 -0
- package/dist/modules/min/grid.inlinedit.js.map +1 -0
- package/dist/modules/min/grid.jqueryui.js +2 -0
- package/dist/modules/min/grid.jqueryui.js.map +1 -0
- package/dist/modules/min/grid.pivot.js +2 -0
- package/dist/modules/min/grid.pivot.js.map +1 -0
- package/dist/modules/min/grid.subgrid.js +2 -0
- package/dist/modules/min/grid.subgrid.js.map +1 -0
- package/dist/modules/min/grid.tbltogrid.js +2 -0
- package/dist/modules/min/grid.tbltogrid.js.map +1 -0
- package/dist/modules/min/grid.treegrid.js +2 -0
- package/dist/modules/min/grid.treegrid.js.map +1 -0
- package/dist/modules/min/jqdnr.js +2 -0
- package/dist/modules/min/jqdnr.js.map +1 -0
- package/dist/modules/min/jqmodal.js +2 -0
- package/dist/modules/min/jqmodal.js.map +1 -0
- package/dist/modules/min/jquery.fmatter.js +2 -0
- package/dist/modules/min/jquery.fmatter.js.map +1 -0
- package/dist/modules/min/jsonxml.js +2 -0
- package/dist/modules/min/jsonxml.js.map +1 -0
- package/dist/plugins/css/ui.multiselect.css +30 -0
- package/dist/plugins/css/ui.multiselect.min.css +2 -0
- package/dist/plugins/css/ui.multiselect.min.css.map +1 -0
- package/dist/plugins/grid.odata.js +1313 -0
- package/dist/plugins/jqgrid_download.js +109 -0
- package/dist/plugins/jquery.contextmenu-ui.js +304 -0
- package/dist/plugins/jquery.contextmenu.js +174 -0
- package/dist/plugins/jquery.createcontexmenufromnavigatorbuttons.js +172 -0
- package/dist/plugins/jquery.jqgrid.showhidecolumnmenu.js +201 -0
- package/dist/plugins/min/grid.odata.js +11 -0
- package/dist/plugins/min/grid.odata.js.map +1 -0
- package/dist/plugins/min/jquery.contextmenu-ui.js +26 -0
- package/dist/plugins/min/jquery.contextmenu-ui.js.map +1 -0
- package/dist/plugins/min/jquery.contextmenu.js +19 -0
- package/dist/plugins/min/jquery.contextmenu.js.map +1 -0
- package/dist/plugins/min/jquery.createcontexmenufromnavigatorbuttons.js +12 -0
- package/dist/plugins/min/jquery.createcontexmenufromnavigatorbuttons.js.map +1 -0
- package/dist/plugins/min/jquery.jqgrid.showhidecolumnmenu.js +10 -0
- package/dist/plugins/min/jquery.jqgrid.showhidecolumnmenu.js.map +1 -0
- package/dist/plugins/min/ui.multiselect.js +30 -0
- package/dist/plugins/min/ui.multiselect.js.map +1 -0
- package/dist/plugins/ui.multiselect.js +389 -0
- package/dist/ts/free-jqgrid.d.ts +2132 -0
- package/js/jquery.jqgrid.min.js +1 -1
- package/js/jquery.jqgrid.min.js.map +1 -1
- package/js/jquery.jqgrid.src.js +8 -3
- package/libre-jqgrid-4.17.4.tgz +0 -0
- package/package.json +1 -1
- package/.github/workflows/npm.yml +0 -47
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jqGrid extension for constructing Grid Data from external file
|
|
3
|
+
* Tony Tomov tony@trirand.com, http://trirand.com/blog/
|
|
4
|
+
* Dual licensed under the MIT and GPL licenses:
|
|
5
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
6
|
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
|
7
|
+
**/
|
|
8
|
+
|
|
9
|
+
/*jshint eqeqeq:false, eqnull:true, devel:true */
|
|
10
|
+
/*global jQuery, define, xmlJsonClass, exports, module, require */
|
|
11
|
+
/*jslint browser: true, devel: true, white: true */
|
|
12
|
+
(function (global, factory) {
|
|
13
|
+
"use strict";
|
|
14
|
+
if (typeof define === "function" && define.amd) {
|
|
15
|
+
// AMD. Register as an anonymous module.
|
|
16
|
+
define([
|
|
17
|
+
"jquery",
|
|
18
|
+
"./grid.base",
|
|
19
|
+
"./jsonxml"
|
|
20
|
+
], function ($) {
|
|
21
|
+
return factory($, global);
|
|
22
|
+
});
|
|
23
|
+
} else if (typeof module === "object" && module.exports) {
|
|
24
|
+
// Node/CommonJS
|
|
25
|
+
module.exports = function (root, $) {
|
|
26
|
+
if (!root) {
|
|
27
|
+
root = window;
|
|
28
|
+
}
|
|
29
|
+
if ($ === undefined) {
|
|
30
|
+
// require("jquery") returns a factory that requires window to
|
|
31
|
+
// build a jQuery instance, we normalize how we use modules
|
|
32
|
+
// that require this pattern but the window provided is a noop
|
|
33
|
+
// if it's defined (how jquery works)
|
|
34
|
+
$ = typeof window !== "undefined" ?
|
|
35
|
+
require("jquery") :
|
|
36
|
+
require("jquery")(root);
|
|
37
|
+
}
|
|
38
|
+
require("./grid.base");
|
|
39
|
+
require("./jsonxml");
|
|
40
|
+
factory($, root);
|
|
41
|
+
return $;
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
// Browser globals
|
|
45
|
+
factory(jQuery, global);
|
|
46
|
+
}
|
|
47
|
+
}(typeof window !== "undefined" ? window : this, function ($, window) {
|
|
48
|
+
"use strict";
|
|
49
|
+
var jgrid = $.jgrid;
|
|
50
|
+
// begin module grid.import
|
|
51
|
+
$.jgrid.extend({
|
|
52
|
+
jqGridImport: function (o) {
|
|
53
|
+
o = $.extend({
|
|
54
|
+
imptype: "xml", // xml, json, xmlstring, jsonstring
|
|
55
|
+
impstring: "",
|
|
56
|
+
impurl: "",
|
|
57
|
+
mtype: "GET",
|
|
58
|
+
impData: {},
|
|
59
|
+
xmlGrid: {
|
|
60
|
+
config: "roots>grid",
|
|
61
|
+
data: "roots>rows"
|
|
62
|
+
},
|
|
63
|
+
jsonGrid: {
|
|
64
|
+
config: "grid",
|
|
65
|
+
data: "data"
|
|
66
|
+
},
|
|
67
|
+
ajaxOptions: {}
|
|
68
|
+
}, o || {});
|
|
69
|
+
return this.each(function () {
|
|
70
|
+
var $t = this,
|
|
71
|
+
xmlConvert = function (xml, options) {
|
|
72
|
+
var cnfg = $(options.xmlGrid.config, xml)[0], xmldata = $(options.xmlGrid.data, xml)[0], jstr, jstr1, key, svdatatype;
|
|
73
|
+
if (xmlJsonClass.xml2json) {
|
|
74
|
+
jstr = xmlJsonClass.xml2json(cnfg, " ");
|
|
75
|
+
jstr = JSON.parse(jstr);
|
|
76
|
+
for (key in jstr) {
|
|
77
|
+
if (jstr.hasOwnProperty(key)) {
|
|
78
|
+
jstr1 = jstr[key];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (jstr1 !== undefined) {
|
|
82
|
+
if (xmldata) {
|
|
83
|
+
// save the datatype
|
|
84
|
+
svdatatype = jstr.grid.datatype;
|
|
85
|
+
jstr.grid.datatype = "xmlstring";
|
|
86
|
+
jstr.grid.datastr = xml;
|
|
87
|
+
$($t).jqGrid(jstr1).jqGrid("setGridParam", { datatype: svdatatype });
|
|
88
|
+
} else {
|
|
89
|
+
$($t).jqGrid(jstr1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
(jgrid.defaults != null && $.jgrid.isFunction(jgrid.defaults.fatalError) ? jgrid.defaults.fatalError : alert)("xml2json or parse are not present");
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
jsonConvert = function (jsonstr, options) {
|
|
97
|
+
if (jsonstr && typeof jsonstr === "string") {
|
|
98
|
+
var json = JSON.parse(jsonstr),
|
|
99
|
+
gprm = json[options.jsonGrid.config],
|
|
100
|
+
jdata = json[options.jsonGrid.data], svdatatype;
|
|
101
|
+
|
|
102
|
+
if (jdata) {
|
|
103
|
+
svdatatype = gprm.datatype;
|
|
104
|
+
gprm.datatype = "jsonstring";
|
|
105
|
+
gprm.datastr = jdata;
|
|
106
|
+
$($t).jqGrid(gprm).jqGrid("setGridParam", { datatype: svdatatype });
|
|
107
|
+
} else {
|
|
108
|
+
$($t).jqGrid(gprm);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
xmld;
|
|
113
|
+
switch (o.imptype) {
|
|
114
|
+
case "xml":
|
|
115
|
+
$.ajax($.extend({
|
|
116
|
+
url: o.impurl,
|
|
117
|
+
type: o.mtype,
|
|
118
|
+
data: o.impData,
|
|
119
|
+
dataType: "xml",
|
|
120
|
+
context: o,
|
|
121
|
+
complete: function (jqXHR) {
|
|
122
|
+
if ((jqXHR.status < 300 || jqXHR.status === 304) && (jqXHR.status !== 0 || jqXHR.readyState !== 4)) {
|
|
123
|
+
xmlConvert(jqXHR.responseXML, this);
|
|
124
|
+
$($t).triggerHandler("jqGridImportComplete", [jqXHR, this]);
|
|
125
|
+
if ($.jgrid.isFunction(this.importComplete)) {
|
|
126
|
+
this.importComplete(jqXHR);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, o.ajaxOptions));
|
|
131
|
+
break;
|
|
132
|
+
case "xmlstring":
|
|
133
|
+
// we need to make just the conversion and use the same code as xml
|
|
134
|
+
if (o.impstring && typeof o.impstring === "string") {
|
|
135
|
+
xmld = $.parseXML(o.impstring);
|
|
136
|
+
if (xmld) {
|
|
137
|
+
xmlConvert(xmld, o);
|
|
138
|
+
$($t).triggerHandler("jqGridImportComplete", [xmld, o]);
|
|
139
|
+
if ($.jgrid.isFunction(o.importComplete)) {
|
|
140
|
+
o.importComplete(xmld);
|
|
141
|
+
}
|
|
142
|
+
o.impstring = null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
case "json":
|
|
147
|
+
$.ajax($.extend({
|
|
148
|
+
url: o.impurl,
|
|
149
|
+
type: o.mtype,
|
|
150
|
+
data: o.impData,
|
|
151
|
+
dataType: "json",
|
|
152
|
+
context: o,
|
|
153
|
+
complete: function (jqXHR) {
|
|
154
|
+
try {
|
|
155
|
+
if ((jqXHR.status < 300 || jqXHR.status === 304) && (jqXHR.status !== 0 || jqXHR.readyState !== 4)) {
|
|
156
|
+
jsonConvert(jqXHR.responseText, this);
|
|
157
|
+
$($t).triggerHandler("jqGridImportComplete", [jqXHR, this]);
|
|
158
|
+
if ($.jgrid.isFunction(this.importComplete)) {
|
|
159
|
+
this.importComplete(jqXHR);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} catch (ignore) { }
|
|
163
|
+
}
|
|
164
|
+
}, o.ajaxOptions));
|
|
165
|
+
break;
|
|
166
|
+
case "jsonstring":
|
|
167
|
+
if (o.impstring && typeof o.impstring === "string") {
|
|
168
|
+
jsonConvert(o.impstring, o);
|
|
169
|
+
$($t).triggerHandler("jqGridImportComplete", [o.impstring, o]);
|
|
170
|
+
if ($.jgrid.isFunction(o.importComplete)) {
|
|
171
|
+
o.importComplete(o.impstring);
|
|
172
|
+
}
|
|
173
|
+
o.impstring = null;
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
jqGridExport: function (o) {
|
|
180
|
+
o = $.extend({
|
|
181
|
+
exptype: "xmlstring",
|
|
182
|
+
root: "grid",
|
|
183
|
+
ident: "\t"
|
|
184
|
+
}, o || {});
|
|
185
|
+
var ret = null;
|
|
186
|
+
this.each(function () {
|
|
187
|
+
if (!this.grid) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
var key, gprm = $.extend(true, {}, $(this).jqGrid("getGridParam"));
|
|
191
|
+
// we need to check for:
|
|
192
|
+
// 1.multiselect, 2.subgrid 3. treegrid and remove the unneded columns from colNames
|
|
193
|
+
if (gprm.rownumbers) {
|
|
194
|
+
gprm.colNames.splice(0, 1);
|
|
195
|
+
gprm.colModel.splice(0, 1);
|
|
196
|
+
}
|
|
197
|
+
if (gprm.multiselect) {
|
|
198
|
+
gprm.colNames.splice(0, 1);
|
|
199
|
+
gprm.colModel.splice(0, 1);
|
|
200
|
+
}
|
|
201
|
+
if (gprm.subGrid) {
|
|
202
|
+
gprm.colNames.splice(0, 1);
|
|
203
|
+
gprm.colModel.splice(0, 1);
|
|
204
|
+
}
|
|
205
|
+
gprm.knv = null;
|
|
206
|
+
if (gprm.treeGrid) {
|
|
207
|
+
for (key in gprm.treeReader) {
|
|
208
|
+
if (gprm.treeReader.hasOwnProperty(key)) {
|
|
209
|
+
gprm.colNames.splice(gprm.colNames.length - 1);
|
|
210
|
+
gprm.colModel.splice(gprm.colModel.length - 1);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
switch (o.exptype) {
|
|
215
|
+
case "xmlstring":
|
|
216
|
+
ret = "<" + o.root + ">" + xmlJsonClass.json2xml(gprm, o.ident) + "</" + o.root + ">";
|
|
217
|
+
break;
|
|
218
|
+
case "jsonstring":
|
|
219
|
+
ret = "{" + xmlJsonClass.toJson(gprm, o.root, o.ident, false) + "}";
|
|
220
|
+
if (gprm.postData.filters !== undefined) {
|
|
221
|
+
ret = ret.replace(/filters":"/, "filters\":");
|
|
222
|
+
ret = ret.replace(/\}\]\}"/, "}]}");
|
|
223
|
+
}
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
return ret;
|
|
228
|
+
},
|
|
229
|
+
excelExport: function (o) {
|
|
230
|
+
o = $.extend({
|
|
231
|
+
exptype: "remote",
|
|
232
|
+
url: null,
|
|
233
|
+
oper: "oper",
|
|
234
|
+
tag: "excel",
|
|
235
|
+
exportOptions: {}
|
|
236
|
+
}, o || {});
|
|
237
|
+
return this.each(function () {
|
|
238
|
+
var pdata;
|
|
239
|
+
if (!this.grid) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (o.exptype === "remote") {
|
|
243
|
+
pdata = $.extend({}, this.p.postData, o.exportOptions);
|
|
244
|
+
pdata[o.oper] = o.tag;
|
|
245
|
+
window.location = o.url + (o.url != null && o.url.indexOf("?") >= 0 ? "&" : "?") + $.param(pdata);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
// end module grid.import
|
|
251
|
+
}));
|