@wavemaker/app-ng-runtime 12.0.0-next.45096 → 12.0.0-next.45097

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-ng-runtime",
3
- "version": "12.0.0-next.45096",
3
+ "version": "12.0.0-next.45097",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -70,7 +70,7 @@ $.widget('wm.datatable', {
70
70
  rowDef: {
71
71
  position: '0',
72
72
  closeothers: false,
73
- columnwidth: '30px'
73
+ columnwidth: '50px'
74
74
  },
75
75
  summaryRow: false,
76
76
  summaryRowDefs: [],
@@ -120,7 +120,7 @@ $.widget('wm.datatable', {
120
120
  'style': 'text-align: center;',
121
121
  'textAlignment': 'center',
122
122
  'show': true,
123
- 'width': '30px'
123
+ 'width': '50px'
124
124
  },
125
125
  'rowIndex': {
126
126
  'field': 'rowIndex',
@@ -325,7 +325,7 @@ $.widget('wm.datatable', {
325
325
  $th.addClass(headerClasses);
326
326
  /* For custom columns, show display name if provided, else don't show any label. */
327
327
  if (field === 'checkbox') {
328
- $th.append('<input type="checkbox" />');
328
+ $th.append(self._getCheckbox());
329
329
  }
330
330
  $th.append('<span class="header-data">' + headerLabel + '</span>');
331
331
  if (sortEnabled) { //If sort info is present, show the sort icon for that column on grid render
@@ -574,16 +574,10 @@ $.widget('wm.datatable', {
574
574
  $tbody.append(rowTemplate);
575
575
  if (self.options.rowExpansionEnabled) {
576
576
  var rowHeight = self.options.rowDef.height;
577
- var rowPosition = self.options.rowDef.position;
578
- var colSpanLength = _.filter(self.preparedHeaderData, function(c) {return c.show}).length - 1;
579
- var $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td></td><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
577
+ var colSpanLength = _.filter(self.preparedHeaderData, function(c) {return c.show}).length;
578
+ var $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
580
579
  '<div class="row-overlay"><div class="row-status"><i class="' + self.options.loadingicon + '"></i></div></div><div class="details-section"></div>' +
581
580
  '</td></tr>');
582
- if(rowPosition === "-1"){
583
- $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
584
- '<div class="row-overlay"><div class="row-status"><i class="' + self.options.loadingicon + '"></i></div></div><div class="details-section"></div>' +
585
- '</td><td></td></tr>');
586
- }
587
581
  if (rowHeight) {
588
582
  $tr.find('div.row-overlay').css('min-height', rowHeight);
589
583
  }
@@ -638,15 +632,32 @@ $.widget('wm.datatable', {
638
632
  _getCheckboxTemplate: function (row, isMultiSelectCol) {
639
633
  var checked = row._checked === true ? ' checked' : '',
640
634
  disabled = row.disabed ? ' disabled' : '',
641
- chkBoxName = isMultiSelectCol ? 'gridMultiSelect' : '';
642
- return '<input name="' + chkBoxName + '" type="checkbox"' + checked + disabled + '/>';
635
+ chkBoxName = isMultiSelectCol ? 'gridMultiSelect' : '',
636
+ labelClass = row._checked === true ? '' : 'unchecked';
637
+
638
+ return this._getCheckbox(labelClass, chkBoxName, checked, disabled);
639
+ },
640
+
641
+ /* Return checkbox literal */
642
+ _getCheckbox: function (labelClass = '', chkBoxName = '', checked = '', disabled = '') {
643
+ return `<div class="app-checkbox checkbox">
644
+ <label class="${labelClass}">
645
+ <input type="checkbox" name="${chkBoxName}" ${checked} ${disabled} role="checkbox">
646
+ <span class="caption"></span>
647
+ </label>
648
+ </div>`
643
649
  },
644
650
 
645
651
  /* Returns the radio template. */
646
652
  _getRadioTemplate: function (row) {
647
653
  var checked = row._checked === true ? ' checked' : '',
648
654
  disabled = row.disabed ? ' disabled' : '';
649
- return '<input type="radio" rowSelectInput name="" value=""' + checked + disabled + '/>';
655
+ return `<div class="radio app-radio">
656
+ <label>
657
+ <input type="radio" rowSelectInput name="" value="" ${checked} ${disabled}>
658
+ <span class="caption"></span>
659
+ </label>
660
+ </div>`;
650
661
  },
651
662
 
652
663
  /* Returns the table cell template. */