jqgrid_utils 1.1.9 → 1.2.0

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 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
+ ```
@@ -381,15 +381,19 @@ __cell_format(cell_value, format)
381
381
 
382
382
 
383
383
 
384
-
385
- //let data_url = api + '/phone_detail?f=data&_id=';
386
- // let col_model_url = api + '/phone_detail?f=col_model';
387
- // let col_model = JSON.parse(await vwu.aget_api(col_model_url))
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
+ */
388
393
  async subgrid(_id, id, data_url, col_model)
389
394
  {
390
395
  let url = data_url + id;
391
396
  let $s1 = jQuery("<table id='" + _id + "_t'></table>");
392
- let data = jQuery(this).getLocalRow(id);
393
397
  $s1.appendTo("#" + jQuery.jgrid.jqID(_id));
394
398
  $s1.jqGrid({
395
399
  colModel: col_model,
@@ -400,7 +404,7 @@ async subgrid(_id, id, data_url, col_model)
400
404
  autoencode: true,
401
405
  sortname: "c1",
402
406
  sortorder: "desc",
403
- caption: data.name
407
+ caption: id
404
408
  });
405
409
  }
406
410
 
package/jqgrid_utils.js CHANGED
@@ -380,15 +380,19 @@ __cell_format(cell_value, format)
380
380
 
381
381
 
382
382
 
383
-
384
- //let data_url = api + '/phone_detail?f=data&_id=';
385
- // let col_model_url = api + '/phone_detail?f=col_model';
386
- // let col_model = JSON.parse(await vwu.aget_api(col_model_url))
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
+ */
387
392
  async subgrid(_id, id, data_url, col_model)
388
393
  {
389
394
  let url = data_url + id;
390
395
  let $s1 = jQuery("<table id='" + _id + "_t'></table>");
391
- let data = jQuery(this).getLocalRow(id);
392
396
  $s1.appendTo("#" + jQuery.jgrid.jqID(_id));
393
397
  $s1.jqGrid({
394
398
  colModel: col_model,
@@ -399,7 +403,7 @@ async subgrid(_id, id, data_url, col_model)
399
403
  autoencode: true,
400
404
  sortname: "c1",
401
405
  sortorder: "desc",
402
- caption: data.name
406
+ caption: id
403
407
  });
404
408
  }
405
409
 
package/package.json CHANGED
@@ -28,5 +28,5 @@
28
28
  {
29
29
  "test": "echo \"Error: no test specified\" && exit 1"
30
30
  },
31
- "version": "1.1.9"
31
+ "version": "1.2.0"
32
32
  }