jqgrid_utils 1.1.8 → 1.2.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/README.md +18 -0
- package/dist/jqgrid_utils.js +11 -8
- package/jqgrid_utils.js +11 -8
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -53,3 +53,21 @@ Discover All Functions:
|
|
|
53
53
|
grid_load_complete;
|
|
54
54
|
},
|
|
55
55
|
```
|
|
56
|
+
|
|
57
|
+
<a name="subgrid"></a>
|
|
58
|
+
|
|
59
|
+
## subgrid(_id, id, data_url)
|
|
60
|
+
**Kind**: global function
|
|
61
|
+
|
|
62
|
+
| Param | Type | Description |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| _id | <code>string</code> | row_id |
|
|
65
|
+
| id | <code>string</code> | data id |
|
|
66
|
+
| data_url | <code>object</code> | col_model for the table |
|
|
67
|
+
|
|
68
|
+
**Example**
|
|
69
|
+
```js
|
|
70
|
+
let data_url = api + '/phone_detail?f=data&_id=';
|
|
71
|
+
let col_model_url = api + '/phone_detail?f=col_model';
|
|
72
|
+
let col_model = JSON.parse(await vwu.aget_api(col_model_url));
|
|
73
|
+
```
|
package/dist/jqgrid_utils.js
CHANGED
|
@@ -381,16 +381,19 @@ __cell_format(cell_value, format)
|
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
384
|
+
/**
|
|
385
|
+
@param {string} - row_id
|
|
386
|
+
@param {string} - data id
|
|
387
|
+
@param {object} - col_model for the table
|
|
388
|
+
@example
|
|
389
|
+
* let data_url = api + '/phone_detail?f=data&_id=';
|
|
390
|
+
* let col_model_url = api + '/phone_detail?f=col_model';
|
|
391
|
+
* let col_model = JSON.parse(await vwu.aget_api(col_model_url))
|
|
392
|
+
*/
|
|
393
|
+
async subgrid(_id, id, data_url, col_model)
|
|
389
394
|
{
|
|
390
|
-
let col_model = JSON.parse(await aget_api(col_model_url));
|
|
391
395
|
let url = data_url + id;
|
|
392
396
|
let $s1 = jQuery("<table id='" + _id + "_t'></table>");
|
|
393
|
-
let data = jQuery(this).getLocalRow(id);
|
|
394
397
|
$s1.appendTo("#" + jQuery.jgrid.jqID(_id));
|
|
395
398
|
$s1.jqGrid({
|
|
396
399
|
colModel: col_model,
|
|
@@ -401,7 +404,7 @@ async subgrid(_id, id, data_url, col_model_url)
|
|
|
401
404
|
autoencode: true,
|
|
402
405
|
sortname: "c1",
|
|
403
406
|
sortorder: "desc",
|
|
404
|
-
caption:
|
|
407
|
+
caption: id
|
|
405
408
|
});
|
|
406
409
|
}
|
|
407
410
|
|
package/jqgrid_utils.js
CHANGED
|
@@ -380,16 +380,19 @@ __cell_format(cell_value, format)
|
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
383
|
+
/**
|
|
384
|
+
@param {string} - row_id
|
|
385
|
+
@param {string} - data id
|
|
386
|
+
@param {object} - col_model for the table
|
|
387
|
+
@example
|
|
388
|
+
* let data_url = api + '/phone_detail?f=data&_id=';
|
|
389
|
+
* let col_model_url = api + '/phone_detail?f=col_model';
|
|
390
|
+
* let col_model = JSON.parse(await vwu.aget_api(col_model_url))
|
|
391
|
+
*/
|
|
392
|
+
async subgrid(_id, id, data_url, col_model)
|
|
388
393
|
{
|
|
389
|
-
let col_model = JSON.parse(await aget_api(col_model_url));
|
|
390
394
|
let url = data_url + id;
|
|
391
395
|
let $s1 = jQuery("<table id='" + _id + "_t'></table>");
|
|
392
|
-
let data = jQuery(this).getLocalRow(id);
|
|
393
396
|
$s1.appendTo("#" + jQuery.jgrid.jqID(_id));
|
|
394
397
|
$s1.jqGrid({
|
|
395
398
|
colModel: col_model,
|
|
@@ -400,7 +403,7 @@ async subgrid(_id, id, data_url, col_model_url)
|
|
|
400
403
|
autoencode: true,
|
|
401
404
|
sortname: "c1",
|
|
402
405
|
sortorder: "desc",
|
|
403
|
-
caption:
|
|
406
|
+
caption: id
|
|
404
407
|
});
|
|
405
408
|
}
|
|
406
409
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author":
|
|
3
3
|
{
|
|
4
|
-
"name": "veto@myridia.com"
|
|
4
|
+
"name": "veto@myridia.com",
|
|
5
|
+
"url": "https://www.npmjs.com/package/jqgrid_utils"
|
|
5
6
|
},
|
|
6
7
|
"dependencies":
|
|
7
8
|
{},
|
|
@@ -28,5 +29,5 @@
|
|
|
28
29
|
{
|
|
29
30
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
30
31
|
},
|
|
31
|
-
"version": "1.1
|
|
32
|
+
"version": "1.2.1"
|
|
32
33
|
}
|