-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port for #28080 to 24.6
- Loading branch information
Showing
4 changed files
with
91 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,41 @@ | ||
$(document).ready(function () { | ||
var pageTitle = document.title; | ||
var columnDefs; | ||
if(pageTitle.includes('Most Efficient Large Language Models for AI PC')) | ||
{ | ||
columnDefs= [ | ||
{ "visible": false, "targets": [3,4,6] } | ||
] | ||
} | ||
else | ||
{ | ||
columnDefs=[] | ||
} | ||
var columnDefs = []; | ||
|
||
var table = $('table.modeldata').DataTable({ | ||
responsive: true, | ||
"autoWidth": false, | ||
stateSave: true, | ||
language: { | ||
buttons: { | ||
colvisRestore: "Show all columns" | ||
} | ||
}, | ||
lengthMenu: [ | ||
[10, 25, 50, -1], | ||
['10 rows', '25 rows', '50 rows', 'Show all rows'] | ||
], | ||
"columnDefs": columnDefs, | ||
layout: { | ||
topStart: { | ||
buttons: [ | ||
'pageLength', | ||
{ | ||
extend: 'colvis', | ||
postfixButtons: ['colvisRestore'], | ||
}, | ||
{ | ||
extend: 'print', | ||
text: 'Print pdf', | ||
exportOptions: { | ||
columns: ':visible' | ||
var tables = $('table.modeldata'); | ||
for (let table of tables) { | ||
var hidden = table.getAttribute('data-columns-hidden'); | ||
columnDefs = [{ "visible": false, "targets": JSON.parse(hidden) }] | ||
$(table).DataTable({ | ||
responsive: true, | ||
"autoWidth": false, | ||
language: { | ||
buttons: { | ||
colvisRestore: "Restore default" | ||
} | ||
}, | ||
lengthMenu: [ | ||
[10, 25, 50, -1], | ||
['10 rows', '25 rows', '50 rows', 'Show all records'] | ||
], | ||
"columnDefs": columnDefs, | ||
layout: { | ||
topStart: { | ||
buttons: [ | ||
'pageLength', | ||
{ | ||
extend: 'colvis', | ||
postfixButtons: ['colvisRestore'], | ||
}, | ||
{ | ||
extend: 'print', | ||
text: 'Print pdf', | ||
exportOptions: { | ||
columns: ':visible' | ||
} | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
} | ||
}); |