Skip to content

Commit bb2f54b

Browse files
committed
use only openoffice in the export available, modifies and set for datatables
1 parent 6d5e7ee commit bb2f54b

4 files changed

Lines changed: 14 additions & 79 deletions

File tree

assets/grocery_crud/themes/datatables/extras/TableTools/media/js/TableTools.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ TableTools.buttonBase = {
20662066
// Common button specific options
20672067
"sCharSet": "utf8",
20682068
"bBomInc": false,
2069-
"sFileName": "*.csv",
2069+
"sFileName": "*.ods",
20702070
"sFieldBoundary": "",
20712071
"sFieldSeperator": "\t",
20722072
"sNewLine": "auto",
@@ -2102,6 +2102,17 @@ TableTools.BUTTONS = {
21022102
}
21032103
} ),
21042104

2105+
"ods": $.extend( {}, TableTools.buttonBase, {
2106+
"sAction": "flash_save",
2107+
"sCharSet": "utf16le",
2108+
"bBomInc": true,
2109+
"sButtonClass": "DTTT_button_ods",/*DTTT_button_xls*/
2110+
"sButtonText": "Calc",
2111+
"fnClick": function( nButton, oConfig, flash ) {
2112+
this.fnSetText( flash, this.fnGetTableData(oConfig) );
2113+
}
2114+
} ),
2115+
21052116
"xls": $.extend( {}, TableTools.buttonBase, {
21062117
"sAction": "flash_save",
21072118
"sCharSet": "utf16le",
@@ -2335,7 +2346,7 @@ TableTools.DEFAULTS = {
23352346
"fnPreRowSelect": null,
23362347
"fnRowSelected": null,
23372348
"fnRowDeselected": null,
2338-
"aButtons": [ "copy", "csv", "xls", "pdf", "print" ],
2349+
"aButtons": [ "copy", "csv", "ods", "xls", "pdf", "print" ],
23392350
"oTags": {
23402351
"container": "div",
23412352
"button": "a", // We really want to use buttons here, but Firefox and IE ignore the

0 commit comments

Comments
 (0)