@wavemaker/app-ng-runtime 11.10.4-rc.6085 → 11.10.5-next.27901

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.
@@ -456,6 +456,16 @@ $.widget('wm.datatable', {
456
456
  _rowData.$index = rowIndex + 1;
457
457
  self.options.generateRowExpansionCell(_rowData, rowIndex);
458
458
  $(this).empty().append(self.options.getRowExpansionAction(rowIndex));
459
+ var expandtitleExpr = $(this).children()[0].getAttribute('expandtitle.bind'),
460
+ collapsetitleExpr = $(this).children()[0].getAttribute('collapsetitle.bind');
461
+
462
+ if(expandtitleExpr) {
463
+ self.options.registerCollapseOrExpandTitleWatch(expandtitleExpr, _rowData, rowIndex, "expandtitle", $(this).children()[0]);
464
+ }
465
+ if(collapsetitleExpr) {
466
+ self.options.registerCollapseOrExpandTitleWatch(collapsetitleExpr, _rowData, rowIndex, "collapsetitle", $(this).children()[0]);
467
+ }
468
+
459
469
  });
460
470
  },
461
471
 
@@ -2908,8 +2918,8 @@ $.widget('wm.datatable', {
2908
2918
  rowData = _.clone(self.options.data[rowId]),
2909
2919
  $nextDetailRow = $row.next('tr.app-datagrid-detail-row'),
2910
2920
  isClosed = !$nextDetailRow.is(':visible'),
2911
- $icon = $row.find('[data-identifier="rowExpansionButtons"] i.app-icon');
2912
-
2921
+ $icon = $row.find('[data-identifier="rowExpansionButtons"] i.app-icon'),
2922
+ expandRowBtn = $row.find( 'button, a');
2913
2923
  rowData.$index = rowId + 1;
2914
2924
  if (isExpand && !isClosed) {
2915
2925
  return;
@@ -2919,7 +2929,10 @@ $.widget('wm.datatable', {
2919
2929
  }
2920
2930
  if (isClosed) {
2921
2931
  $row.addClass(self.options.cssClassNames.expandedRowClass);
2922
- $row.find( 'button, a').attr('title', self.options.rowDef.collapsetitle);
2932
+ if(self.options.rowDef.collapsetitle) expandRowBtn.attr('title', self.options.rowDef.collapsetitle);
2933
+ else {
2934
+ expandRowBtn.attr('title', expandRowBtn.attr('collapsetitle'));
2935
+ }
2923
2936
  $row.find( 'button, a').attr('aria-expanded', 'true');
2924
2937
  if (e && self.preparedData[rowId]._selected) {
2925
2938
  e.stopPropagation();
@@ -2942,7 +2955,10 @@ $.widget('wm.datatable', {
2942
2955
  $nextDetailRow.show();
2943
2956
  });
2944
2957
  } else {
2945
- $row.find( 'button, a').attr('title', self.options.rowDef.expandtitle);
2958
+ if(self.options.rowDef.expandtitle) expandRowBtn.attr('title', self.options.rowDef.expandtitle);
2959
+ else {
2960
+ expandRowBtn.attr('title', expandRowBtn.attr('expandtitle'));
2961
+ }
2946
2962
  self._collapseRow(e, rowData, rowId, $nextDetailRow, $icon);
2947
2963
  }
2948
2964
  },