jqgrid_utils 1.29.0 → 1.30.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.
Files changed (2) hide show
  1. package/README.md +42 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -37,6 +37,7 @@ A module for Jqgrid_utils
37
37
  * [module.exports#_date112_to_DMY(cell_value, seperator)](#exp_module_Jqgrid_utils--module.exports+_date112_to_DMY) ⏏
38
38
  * [module.exports#date112_to_DMY(col_model, edit_field, seperator)](#exp_module_Jqgrid_utils--module.exports+date112_to_DMY) ⏏
39
39
  * [module.exports#add_formatter(col_model, edit_field, formatter)](#exp_module_Jqgrid_utils--module.exports+add_formatter) ⏏
40
+ * [module.exports#natural_sort(col_model, column_name)](#exp_module_Jqgrid_utils--module.exports+natural_sort) ⇒ <code>array</code> ⏏
40
41
  * [module.exports#add_html_formatter(col_model, edit_field, html)](#exp_module_Jqgrid_utils--module.exports+add_html_formatter) ⇒ <code>array</code> ⏏
41
42
  * [module.exports#add_ok_button(col_model, fields)](#exp_module_Jqgrid_utils--module.exports+add_ok_button) ⇒ <code>array</code> ⏏
42
43
  * [module.exports#get_filled_cell_table_data(_grid, fields)](#exp_module_Jqgrid_utils--module.exports+get_filled_cell_table_data) ⇒ <code>array</code> ⏏
@@ -59,6 +60,7 @@ A module for Jqgrid_utils
59
60
  * [module.exports#s_hide_del_icon()](#exp_module_Jqgrid_utils--module.exports+s_hide_del_icon) ⏏
60
61
  * [module.exports#hide_del_icon()](#exp_module_Jqgrid_utils--module.exports+hide_del_icon) ⏏
61
62
  * [module.exports#add_link_details_csv(col_model, url, edit_field, attr, keys, format, seperator)](#exp_module_Jqgrid_utils--module.exports+add_link_details_csv) ⏏
63
+ * [module.exports#compare(obj, column1, column2, style)](#exp_module_Jqgrid_utils--module.exports+compare) ⏏
62
64
  * [module.exports#set_styles(obj, style_column)](#exp_module_Jqgrid_utils--module.exports+set_styles) ⏏
63
65
  * [module.exports#add_link_details(col_model, url, edit_field, attr, keys)](#exp_module_Jqgrid_utils--module.exports+add_link_details) ⏏
64
66
  * [module.exports#add_link_details_separator(col_model, url, edit_field, attr, keys)](#exp_module_Jqgrid_utils--module.exports+add_link_details_separator) ⏏
@@ -301,6 +303,24 @@ Add Formatter
301
303
  var jqu = new Jqgrid_utils();
302
304
  col_model = await jqu.add_formatter(col_model,'select',{ formatter: "select", formatoptions: {value: "1:ok;0:fail", defaultValue: "1" }})
303
305
  ```
306
+ <a name="exp_module_Jqgrid_utils--module.exports+natural_sort"></a>
307
+
308
+ ### module.exports#natural\_sort(col_model, column_name) ⇒ <code>array</code> ⏏
309
+ Natural Sort Column
310
+
311
+ **Kind**: Exported function
312
+ **Returns**: <code>array</code> - - col_model
313
+
314
+ | Param | Type | Description |
315
+ | --- | --- | --- |
316
+ | col_model | <code>array</code> | grid col_model |
317
+ | column_name | <code>string</code> | string columns names for natural sorting |
318
+
319
+ **Example**
320
+ ```js
321
+ var jqu = new Jqgrid_utils();
322
+ col_model = await jqu.natural_sort(col_model,'colunmename');
323
+ ```
304
324
  <a name="exp_module_Jqgrid_utils--module.exports+add_html_formatter"></a>
305
325
 
306
326
  ### module.exports#add\_html\_formatter(col_model, edit_field, html) ⇒ <code>array</code> ⏏
@@ -702,6 +722,28 @@ Convert a cell into a link/url with data from another cell and spit the value by
702
722
  var jqu = new Jqgrid_utils();
703
723
  col_model = await jqu.add_link_details_csv(col_model, host + '/html/report.html' , 'tags','target="_blank"',{"tags":"tags"},',');
704
724
  ```
725
+ <a name="exp_module_Jqgrid_utils--module.exports+compare"></a>
726
+
727
+ ### module.exports#compare(obj, column1, column2, style) ⏏
728
+ Compare 2 columns and give them a style class when they have different content
729
+ http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods
730
+
731
+ **Kind**: Exported function
732
+
733
+ | Param | Type | Description |
734
+ | --- | --- | --- |
735
+ | obj | <code>object</code> | grid object |
736
+ | column1 | <code>string</code> | first column |
737
+ | column2 | <code>string</code> | second column |
738
+ | style | <code>string</code> | css class name |
739
+
740
+ **Example**
741
+ ```js
742
+ loadComplete: async function()
743
+ {
744
+ await jqu.compare(this,'value','value_report','greenlight');
745
+ }
746
+ ```
705
747
  <a name="exp_module_Jqgrid_utils--module.exports+set_styles"></a>
706
748
 
707
749
  ### module.exports#set\_styles(obj, style_column) ⏏
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  {
30
30
  "test": "echo \"Error: no test specified\" && exit 1"
31
31
  },
32
- "version": "1.29.0"
32
+ "version": "1.30.0"
33
33
  }