OpenSencillo  2016.106
Long live the simplicity of PHP
 All Data Structures Namespaces Files Functions Pages
dataTables.tableTools.js
1 
28 /* Global scope for TableTools for backwards compatibility.
29  * Will be removed in 2.3
30  */
31 var TableTools;
32 
33 (function(window, document, undefined) {
34 
35 
36 var factory = function( $, DataTable ) {
37 "use strict";
38 
39 
40 //include ZeroClipboard.js
41 //include TableTools.js
42 
43 /*
44  * Register a new feature with DataTables
45  */
46 if ( typeof $.fn.dataTable == "function" &&
47  typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
48  $.fn.dataTableExt.fnVersionCheck('1.9.0') )
49 {
50  $.fn.dataTableExt.aoFeatures.push( {
51  "fnInit": function( oDTSettings ) {
52  var oOpts = typeof oDTSettings.oInit.oTableTools != 'undefined' ?
53  oDTSettings.oInit.oTableTools : {};
54 
55  var oTT = new TableTools( oDTSettings.oInstance, oOpts );
56  TableTools._aInstances.push( oTT );
57 
58  return oTT.dom.container;
59  },
60  "cFeature": "T",
61  "sFeature": "TableTools"
62  } );
63 }
64 else
65 {
66  alert( "Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");
67 }
68 
69 
70 $.fn.dataTable.TableTools = TableTools;
71 $.fn.DataTable.TableTools = TableTools;
72 
73 
74 return TableTools;
75 }; // /factory
76 
77 
78 // Define as an AMD module if possible
79 if ( typeof define === 'function' && define.amd ) {
80  define( ['jquery', 'datatables'], factory );
81 }
82 else if ( typeof exports === 'object' ) {
83  // Node/CommonJS
84  factory( require('jquery'), require('datatables') );
85 }
86 else if ( jQuery && !jQuery.fn.dataTable.TableTools ) {
87  // Otherwise simply initialise as normal, stopping multiple evaluation
88  factory( jQuery, jQuery.fn.dataTable );
89 }
90 
91 
92 })(window, document);
93