jqgrid_utils 1.2.2 → 1.2.3
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/README.md +3 -2
- package/dist/jqgrid_utils.js +6 -4
- package/jqgrid_utils.js +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ A module for Vanilla_website_utils
|
|
|
76
76
|
* [module.exports#add_link_details()](#exp_module_Vanilla_website_utils--module.exports+add_link_details) ⏏
|
|
77
77
|
* [module.exports#add_link_details_separator()](#exp_module_Vanilla_website_utils--module.exports+add_link_details_separator) ⏏
|
|
78
78
|
* [module.exports#__cell_format()](#exp_module_Vanilla_website_utils--module.exports+__cell_format) ⏏
|
|
79
|
-
* [module.exports#subgrid(_id, id, data_url)](#exp_module_Vanilla_website_utils--module.exports+subgrid) ⏏
|
|
79
|
+
* [module.exports#subgrid(_id, id, data_url, col_model)](#exp_module_Vanilla_website_utils--module.exports+subgrid) ⏏
|
|
80
80
|
* [module.exports#add_image(col_model, edit_field, size, link)](#exp_module_Vanilla_website_utils--module.exports+add_image) ⏏
|
|
81
81
|
|
|
82
82
|
<a name="exp_module_Vanilla_website_utils--module.exports+set_link"></a>
|
|
@@ -149,7 +149,7 @@ A module for Vanilla_website_utils
|
|
|
149
149
|
**Kind**: Exported function
|
|
150
150
|
<a name="exp_module_Vanilla_website_utils--module.exports+subgrid"></a>
|
|
151
151
|
|
|
152
|
-
### module.exports#subgrid(_id, id, data_url) ⏏
|
|
152
|
+
### module.exports#subgrid(_id, id, data_url, col_model) ⏏
|
|
153
153
|
**Kind**: Exported function
|
|
154
154
|
|
|
155
155
|
| Param | Type | Description |
|
|
@@ -157,6 +157,7 @@ A module for Vanilla_website_utils
|
|
|
157
157
|
| _id | <code>string</code> | row_id |
|
|
158
158
|
| id | <code>string</code> | data id |
|
|
159
159
|
| data_url | <code>object</code> | col_model for the table |
|
|
160
|
+
| col_model | <code>string</code> | Caption |
|
|
160
161
|
|
|
161
162
|
**Example**
|
|
162
163
|
```js
|
package/dist/jqgrid_utils.js
CHANGED
|
@@ -427,17 +427,20 @@ __cell_format(cell_value, format)
|
|
|
427
427
|
@param {string} - row_id
|
|
428
428
|
@param {string} - data id
|
|
429
429
|
@param {object} - col_model for the table
|
|
430
|
+
@param {string} - Caption
|
|
430
431
|
@example
|
|
431
432
|
* let data_url = api + '/phone_detail?f=data&_id=';
|
|
432
433
|
* let col_model_url = api + '/phone_detail?f=col_model';
|
|
433
434
|
* let col_model = JSON.parse(await vwu.aget_api(col_model_url))
|
|
434
435
|
*/
|
|
435
|
-
async subgrid(_id, id, data_url, col_model)
|
|
436
|
+
async subgrid(_id, id, data_url, col_model, caption='' )
|
|
436
437
|
{
|
|
438
|
+
caption = caption != '' ? caption + ' ' : '';
|
|
437
439
|
let url = data_url + id;
|
|
438
|
-
let $s1 = jQuery("<table
|
|
440
|
+
let $s1 = jQuery("<table style='margin: 5px 0' class='" + _id + "_t'></table>");
|
|
439
441
|
$s1.appendTo("#" + jQuery.jgrid.jqID(_id));
|
|
440
442
|
$s1.jqGrid({
|
|
443
|
+
caption: caption + id,
|
|
441
444
|
colModel: col_model,
|
|
442
445
|
datatype: "json",
|
|
443
446
|
url: url,
|
|
@@ -445,8 +448,7 @@ async subgrid(_id, id, data_url, col_model)
|
|
|
445
448
|
rownumbers: true,
|
|
446
449
|
autoencode: true,
|
|
447
450
|
sortname: "c1",
|
|
448
|
-
sortorder: "desc"
|
|
449
|
-
caption: id
|
|
451
|
+
sortorder: "desc"
|
|
450
452
|
});
|
|
451
453
|
}
|
|
452
454
|
|
package/jqgrid_utils.js
CHANGED
|
@@ -426,17 +426,20 @@ __cell_format(cell_value, format)
|
|
|
426
426
|
@param {string} - row_id
|
|
427
427
|
@param {string} - data id
|
|
428
428
|
@param {object} - col_model for the table
|
|
429
|
+
@param {string} - Caption
|
|
429
430
|
@example
|
|
430
431
|
* let data_url = api + '/phone_detail?f=data&_id=';
|
|
431
432
|
* let col_model_url = api + '/phone_detail?f=col_model';
|
|
432
433
|
* let col_model = JSON.parse(await vwu.aget_api(col_model_url))
|
|
433
434
|
*/
|
|
434
|
-
async subgrid(_id, id, data_url, col_model)
|
|
435
|
+
async subgrid(_id, id, data_url, col_model, caption='' )
|
|
435
436
|
{
|
|
437
|
+
caption = caption != '' ? caption + ' ' : '';
|
|
436
438
|
let url = data_url + id;
|
|
437
|
-
let $s1 = jQuery("<table
|
|
439
|
+
let $s1 = jQuery("<table style='margin: 5px 0' class='" + _id + "_t'></table>");
|
|
438
440
|
$s1.appendTo("#" + jQuery.jgrid.jqID(_id));
|
|
439
441
|
$s1.jqGrid({
|
|
442
|
+
caption: caption + id,
|
|
440
443
|
colModel: col_model,
|
|
441
444
|
datatype: "json",
|
|
442
445
|
url: url,
|
|
@@ -444,8 +447,7 @@ async subgrid(_id, id, data_url, col_model)
|
|
|
444
447
|
rownumbers: true,
|
|
445
448
|
autoencode: true,
|
|
446
449
|
sortname: "c1",
|
|
447
|
-
sortorder: "desc"
|
|
448
|
-
caption: id
|
|
450
|
+
sortorder: "desc"
|
|
449
451
|
});
|
|
450
452
|
}
|
|
451
453
|
|
package/package.json
CHANGED