jqgrid_utils 1.4.3 → 1.4.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/dist/jqgrid_utils.js +16 -13
- package/jqgrid_utils.js +16 -13
- package/package.json +1 -1
package/dist/jqgrid_utils.js
CHANGED
|
@@ -229,21 +229,24 @@ loadComplete: function(){
|
|
|
229
229
|
*/
|
|
230
230
|
async grid_set_caption(_grid, data=[])
|
|
231
231
|
{
|
|
232
|
-
|
|
233
|
-
let count = 0;
|
|
234
|
-
if(data.length === 0)
|
|
232
|
+
if(_grid)
|
|
235
233
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
234
|
+
const grid = jQuery(_grid);
|
|
235
|
+
let count = 0;
|
|
236
|
+
if(data.length === 0)
|
|
237
|
+
{
|
|
238
|
+
count = grid.jqGrid('getGridParam', 'records');
|
|
239
|
+
}
|
|
240
|
+
else
|
|
241
|
+
{
|
|
242
|
+
count = data.length;
|
|
243
|
+
}
|
|
244
|
+
let caption = grid.jqGrid("getGridParam", "caption");
|
|
245
|
+
const reg = /\d.*x/;
|
|
246
|
+
const new_caption = caption.replace(reg, "");
|
|
247
|
+
grid.jqGrid('setCaption', new_caption + " " + count + 'x');
|
|
246
248
|
}
|
|
249
|
+
}
|
|
247
250
|
|
|
248
251
|
/**
|
|
249
252
|
@alias module:Jqgrid_utils
|
package/jqgrid_utils.js
CHANGED
|
@@ -228,21 +228,24 @@ loadComplete: function(){
|
|
|
228
228
|
*/
|
|
229
229
|
async grid_set_caption(_grid, data=[])
|
|
230
230
|
{
|
|
231
|
-
|
|
232
|
-
let count = 0;
|
|
233
|
-
if(data.length === 0)
|
|
231
|
+
if(_grid)
|
|
234
232
|
{
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
233
|
+
const grid = jQuery(_grid);
|
|
234
|
+
let count = 0;
|
|
235
|
+
if(data.length === 0)
|
|
236
|
+
{
|
|
237
|
+
count = grid.jqGrid('getGridParam', 'records');
|
|
238
|
+
}
|
|
239
|
+
else
|
|
240
|
+
{
|
|
241
|
+
count = data.length;
|
|
242
|
+
}
|
|
243
|
+
let caption = grid.jqGrid("getGridParam", "caption");
|
|
244
|
+
const reg = /\d.*x/;
|
|
245
|
+
const new_caption = caption.replace(reg, "");
|
|
246
|
+
grid.jqGrid('setCaption', new_caption + " " + count + 'x');
|
|
245
247
|
}
|
|
248
|
+
}
|
|
246
249
|
|
|
247
250
|
/**
|
|
248
251
|
@alias module:Jqgrid_utils
|
package/package.json
CHANGED