Skip to content

Commit

Permalink
c5a357ce8da2234ecd2bbd99d6fdc541253802fd Update: Alias none and `al…
Browse files Browse the repository at this point in the history
…l` to have an optional `dtr-` prefix, to make it clear that they are responsive properties

CT-1418

ccc1c01f476ca582c0250cd611724f732f7c11db Merge branch 'master' of github.com:DataTables/Responsive

Sync to source repo @ccc1c01f476ca582c0250cd611724f732f7c11db
  • Loading branch information
AllanJard committed Jan 25, 2022
1 parent 7af62c4 commit 62e5581
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
],
"src-repo": "http://github.com/DataTables/Responsive",
"last-tag": "2.2.9",
"last-sync": "ba72cda685dc5e8394a109355dfa7bef5dfead2d"
"last-sync": "ccc1c01f476ca582c0250cd611724f732f7c11db"
}
12 changes: 8 additions & 4 deletions js/dataTables.responsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ $.extend( Responsive.prototype, {
includeIn: [],
auto: false,
control: false,
never: className.match(/\bnever\b/) ? true : false,
never: className.match(/\b(dtr\-)?never\b/) ? true : false,
priority: priority
};
} );
Expand Down Expand Up @@ -537,15 +537,15 @@ $.extend( Responsive.prototype, {
for ( var k=0, ken=classNames.length ; k<ken ; k++ ) {
var className = classNames[k].trim();

if ( className === 'all' ) {
if ( className === 'all' || className === 'dtr-all' ) {
// Include in all
hasClass = true;
col.includeIn = $.map( breakpoints, function (a) {
return a.name;
} );
return;
}
else if ( className === 'none' || col.never ) {
else if ( className === 'none' || className === 'dtr-none' || col.never ) {
// Include in none (default) and no auto
hasClass = true;
return;
Expand Down Expand Up @@ -633,8 +633,12 @@ $.extend( Responsive.prototype, {
var details = this.c.details;

if ( details && details.type !== false ) {
var renderer = typeof details.renderer === 'string'
? Responsive.renderer[details.renderer]()
: details.renderer;

var res = details.display( row, update, function () {
return details.renderer(
return renderer(
dt, row[0], that._detailsObj(row[0])
);
} );
Expand Down
Loading

0 comments on commit 62e5581

Please sign in to comment.