jqgrid_utils 1.5.1 → 1.5.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.
@@ -117,6 +117,7 @@ console.log(_data);
117
117
  {
118
118
  col_model[i]['formatter'] = function (cell_value, o)
119
119
  {
120
+ cell_value = cell_value.toString();
120
121
  let value = cell_value;
121
122
  if(cell_value.length >= 8 && cell_value.indexOf(seperator) === -1)
122
123
  {
@@ -727,15 +728,26 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
727
728
  {
728
729
  pref = pref.slice(0, -1);
729
730
  }
730
-
731
- const _cell_val = self.__cell_format(cell_val, format);
732
-
733
- cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
731
+ const _cell_val = self.__cell_format(cell_val, format);
732
+ if(cell_val)
733
+ {
734
+ cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
735
+ }
736
+ else
737
+ {
738
+ cell_val = '';
739
+ }
734
740
  }
735
741
 
736
742
  }
737
-
738
- return cell_val;
743
+ if(cell_val)
744
+ {
745
+ return cell_val;
746
+ }
747
+ else
748
+ {
749
+ return '';
750
+ }
739
751
  };
740
752
  }
741
753
 
package/jqgrid_utils.js CHANGED
@@ -116,6 +116,7 @@ console.log(_data);
116
116
  {
117
117
  col_model[i]['formatter'] = function (cell_value, o)
118
118
  {
119
+ cell_value = cell_value.toString();
119
120
  let value = cell_value;
120
121
  if(cell_value.length >= 8 && cell_value.indexOf(seperator) === -1)
121
122
  {
@@ -726,15 +727,26 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
726
727
  {
727
728
  pref = pref.slice(0, -1);
728
729
  }
729
-
730
- const _cell_val = self.__cell_format(cell_val, format);
731
-
732
- cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
730
+ const _cell_val = self.__cell_format(cell_val, format);
731
+ if(cell_val)
732
+ {
733
+ cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
734
+ }
735
+ else
736
+ {
737
+ cell_val = '';
738
+ }
733
739
  }
734
740
 
735
741
  }
736
-
737
- return cell_val;
742
+ if(cell_val)
743
+ {
744
+ return cell_val;
745
+ }
746
+ else
747
+ {
748
+ return '';
749
+ }
738
750
  };
739
751
  }
740
752
 
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.5.1"
32
+ "version": "1.5.4"
33
33
  }