jqgrid_utils 1.24.0 → 1.25.1
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/#jqgrid_utils.js# +1690 -0
- package/dist/jqgrid_utils.js +35 -1
- package/jqgrid_utils.js +35 -1
- package/package.json +1 -1
package/dist/jqgrid_utils.js
CHANGED
|
@@ -702,7 +702,6 @@ console.log(_data);
|
|
|
702
702
|
{
|
|
703
703
|
if(col_model[i]['name'] === field)
|
|
704
704
|
{
|
|
705
|
-
console.log("fffffffF");
|
|
706
705
|
col_model[i]['hidden'] = true;
|
|
707
706
|
}
|
|
708
707
|
}
|
|
@@ -1164,6 +1163,41 @@ col_model = await jqu.add_link_details_csv(col_model, host + '/html/report.html'
|
|
|
1164
1163
|
}
|
|
1165
1164
|
|
|
1166
1165
|
|
|
1166
|
+
/**
|
|
1167
|
+
* Set styles to individual cells, what are defined in a dedicated column
|
|
1168
|
+
@alias module:Jqgrid_utils
|
|
1169
|
+
@param {object} - grid object
|
|
1170
|
+
@param {string} - name of the column what includes the style values what need to be in a strinify json format
|
|
1171
|
+
@example
|
|
1172
|
+
var jqu = new Jqgrid_utils();
|
|
1173
|
+
loadComplete: async function() {
|
|
1174
|
+
await jqu.set_styles(this);
|
|
1175
|
+
},
|
|
1176
|
+
*/
|
|
1177
|
+
async set_styles(obj,style_column='styles')
|
|
1178
|
+
{
|
|
1179
|
+
|
|
1180
|
+
const rows = jQuery(obj).jqGrid('getGridParam','data');
|
|
1181
|
+
for(let i in rows) {
|
|
1182
|
+
if(rows[i][style_column])
|
|
1183
|
+
{
|
|
1184
|
+
const styles = JSON.parse(rows[i][style_column]);
|
|
1185
|
+
for(let ii in styles)
|
|
1186
|
+
{
|
|
1187
|
+
const rowid = rows[i]['id'];
|
|
1188
|
+
const name = ii;
|
|
1189
|
+
if(rows[i].hasOwnProperty(name))
|
|
1190
|
+
{
|
|
1191
|
+
jQuery("#grid").jqGrid('setCell',rowid,name,"",styles[ii]);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1167
1201
|
/**
|
|
1168
1202
|
* Convert a cell into a link/url with data from another cell
|
|
1169
1203
|
@alias module:Jqgrid_utils
|
package/jqgrid_utils.js
CHANGED
|
@@ -701,7 +701,6 @@ console.log(_data);
|
|
|
701
701
|
{
|
|
702
702
|
if(col_model[i]['name'] === field)
|
|
703
703
|
{
|
|
704
|
-
console.log("fffffffF");
|
|
705
704
|
col_model[i]['hidden'] = true;
|
|
706
705
|
}
|
|
707
706
|
}
|
|
@@ -1163,6 +1162,41 @@ col_model = await jqu.add_link_details_csv(col_model, host + '/html/report.html'
|
|
|
1163
1162
|
}
|
|
1164
1163
|
|
|
1165
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* Set styles to individual cells, what are defined in a dedicated column
|
|
1167
|
+
@alias module:Jqgrid_utils
|
|
1168
|
+
@param {object} - grid object
|
|
1169
|
+
@param {string} - name of the column what includes the style values what need to be in a strinify json format
|
|
1170
|
+
@example
|
|
1171
|
+
var jqu = new Jqgrid_utils();
|
|
1172
|
+
loadComplete: async function() {
|
|
1173
|
+
await jqu.set_styles(this);
|
|
1174
|
+
},
|
|
1175
|
+
*/
|
|
1176
|
+
async set_styles(obj,style_column='styles')
|
|
1177
|
+
{
|
|
1178
|
+
|
|
1179
|
+
const rows = jQuery(obj).jqGrid('getGridParam','data');
|
|
1180
|
+
for(let i in rows) {
|
|
1181
|
+
if(rows[i][style_column])
|
|
1182
|
+
{
|
|
1183
|
+
const styles = JSON.parse(rows[i][style_column]);
|
|
1184
|
+
for(let ii in styles)
|
|
1185
|
+
{
|
|
1186
|
+
const rowid = rows[i]['id'];
|
|
1187
|
+
const name = ii;
|
|
1188
|
+
if(rows[i].hasOwnProperty(name))
|
|
1189
|
+
{
|
|
1190
|
+
jQuery("#grid").jqGrid('setCell',rowid,name,"",styles[ii]);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1166
1200
|
/**
|
|
1167
1201
|
* Convert a cell into a link/url with data from another cell
|
|
1168
1202
|
@alias module:Jqgrid_utils
|
package/package.json
CHANGED