jquery-datatables-rails-plus 1.0.1

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.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/images/dataTables/back_disabled.png +0 -0
  3. data/app/assets/images/dataTables/back_enabled.png +0 -0
  4. data/app/assets/images/dataTables/back_enabled_hover.png +0 -0
  5. data/app/assets/images/dataTables/extras/background.png +0 -0
  6. data/app/assets/images/dataTables/extras/button.png +0 -0
  7. data/app/assets/images/dataTables/extras/collection.png +0 -0
  8. data/app/assets/images/dataTables/extras/collection_hover.png +0 -0
  9. data/app/assets/images/dataTables/extras/copy.png +0 -0
  10. data/app/assets/images/dataTables/extras/copy_hover.png +0 -0
  11. data/app/assets/images/dataTables/extras/csv.png +0 -0
  12. data/app/assets/images/dataTables/extras/csv_hover.png +0 -0
  13. data/app/assets/images/dataTables/extras/filler.png +0 -0
  14. data/app/assets/images/dataTables/extras/insert.png +0 -0
  15. data/app/assets/images/dataTables/extras/loading-background.png +0 -0
  16. data/app/assets/images/dataTables/extras/pdf.png +0 -0
  17. data/app/assets/images/dataTables/extras/pdf_hover.png +0 -0
  18. data/app/assets/images/dataTables/extras/print.png +0 -0
  19. data/app/assets/images/dataTables/extras/print_hover.png +0 -0
  20. data/app/assets/images/dataTables/extras/xls.png +0 -0
  21. data/app/assets/images/dataTables/extras/xls_hover.png +0 -0
  22. data/app/assets/images/dataTables/favicon.ico +0 -0
  23. data/app/assets/images/dataTables/forward_disabled.png +0 -0
  24. data/app/assets/images/dataTables/forward_enabled.png +0 -0
  25. data/app/assets/images/dataTables/forward_enabled_hover.png +0 -0
  26. data/app/assets/images/dataTables/foundation/sort_asc.png +0 -0
  27. data/app/assets/images/dataTables/foundation/sort_asc_disabled.png +0 -0
  28. data/app/assets/images/dataTables/foundation/sort_both.png +0 -0
  29. data/app/assets/images/dataTables/foundation/sort_desc.png +0 -0
  30. data/app/assets/images/dataTables/foundation/sort_desc_disabled.png +0 -0
  31. data/app/assets/images/dataTables/minus.png +0 -0
  32. data/app/assets/images/dataTables/plus.png +0 -0
  33. data/app/assets/images/dataTables/sort_asc.png +0 -0
  34. data/app/assets/images/dataTables/sort_asc_disabled.png +0 -0
  35. data/app/assets/images/dataTables/sort_both.png +0 -0
  36. data/app/assets/images/dataTables/sort_desc.png +0 -0
  37. data/app/assets/images/dataTables/sort_desc_disabled.png +0 -0
  38. data/app/assets/javascripts/dataTables/bootstrap/2/jquery.dataTables.bootstrap.js +162 -0
  39. data/app/assets/javascripts/dataTables/bootstrap/3/jquery.dataTables.bootstrap.js +220 -0
  40. data/app/assets/javascripts/dataTables/extras/dataTables.autoFill.js +1013 -0
  41. data/app/assets/javascripts/dataTables/extras/dataTables.buttons.js +1607 -0
  42. data/app/assets/javascripts/dataTables/extras/dataTables.colReorder.js +1325 -0
  43. data/app/assets/javascripts/dataTables/extras/dataTables.colVis.js +1123 -0
  44. data/app/assets/javascripts/dataTables/extras/dataTables.fixedColumns.js +1518 -0
  45. data/app/assets/javascripts/dataTables/extras/dataTables.fixedHeader.js +627 -0
  46. data/app/assets/javascripts/dataTables/extras/dataTables.keyTable.js +839 -0
  47. data/app/assets/javascripts/dataTables/extras/dataTables.responsive.js +1149 -0
  48. data/app/assets/javascripts/dataTables/extras/dataTables.rowReorder.js +619 -0
  49. data/app/assets/javascripts/dataTables/extras/dataTables.scroller.js +1297 -0
  50. data/app/assets/javascripts/dataTables/extras/dataTables.select.js +1038 -0
  51. data/app/assets/javascripts/dataTables/extras/dataTables.tableTools.js +3230 -0
  52. data/app/assets/javascripts/dataTables/jquery.dataTables.api.fnFilterOnReturn.js +17 -0
  53. data/app/assets/javascripts/dataTables/jquery.dataTables.api.fnGetColumnData.js +54 -0
  54. data/app/assets/javascripts/dataTables/jquery.dataTables.api.fnReloadAjax.js +44 -0
  55. data/app/assets/javascripts/dataTables/jquery.dataTables.api.fnSetFilteringDelay.js +32 -0
  56. data/app/assets/javascripts/dataTables/jquery.dataTables.foundation.js +156 -0
  57. data/app/assets/javascripts/dataTables/jquery.dataTables.js +15212 -0
  58. data/app/assets/javascripts/dataTables/jquery.dataTables.sorting.ipAddress.js +44 -0
  59. data/app/assets/javascripts/dataTables/jquery.dataTables.sorting.numbersHtml.js +38 -0
  60. data/app/assets/javascripts/dataTables/jquery.dataTables.typeDetection.numbersHtml.js +56 -0
  61. data/app/assets/media/dataTables/extras/as3/ZeroClipboard.as +221 -0
  62. data/app/assets/media/dataTables/extras/as3/ZeroClipboardPdf.as +310 -0
  63. data/app/assets/media/dataTables/extras/as3/lib/AlivePDF.swc +0 -0
  64. data/app/assets/media/dataTables/extras/swf/copy_csv_xls.swf +0 -0
  65. data/app/assets/media/dataTables/extras/swf/copy_csv_xls_pdf.swf +0 -0
  66. data/app/assets/stylesheets/dataTables/bootstrap/2/jquery.dataTables.bootstrap.scss +232 -0
  67. data/app/assets/stylesheets/dataTables/bootstrap/3/jquery.dataTables.bootstrap.scss +371 -0
  68. data/app/assets/stylesheets/dataTables/extras/dataTables.autoFill.scss +24 -0
  69. data/app/assets/stylesheets/dataTables/extras/dataTables.colReorder.scss +14 -0
  70. data/app/assets/stylesheets/dataTables/extras/dataTables.colVis.scss +185 -0
  71. data/app/assets/stylesheets/dataTables/extras/dataTables.colvis.jqueryui.scss +41 -0
  72. data/app/assets/stylesheets/dataTables/extras/dataTables.fixedColumns.scss +25 -0
  73. data/app/assets/stylesheets/dataTables/extras/dataTables.fixedHeader.scss +7 -0
  74. data/app/assets/stylesheets/dataTables/extras/dataTables.keyTable.scss +7 -0
  75. data/app/assets/stylesheets/dataTables/extras/dataTables.responsive.scss +149 -0
  76. data/app/assets/stylesheets/dataTables/extras/dataTables.scroller.scss +44 -0
  77. data/app/assets/stylesheets/dataTables/extras/dataTables.tableTools.scss +361 -0
  78. data/app/assets/stylesheets/dataTables/jquery.dataTables.foundation.scss +222 -0
  79. data/app/assets/stylesheets/dataTables/jquery.dataTables.scss +455 -0
  80. data/app/assets/stylesheets/dataTables/src/demo_page.css +107 -0
  81. data/app/assets/stylesheets/dataTables/src/demo_table.css +575 -0
  82. data/app/assets/stylesheets/dataTables/src/demo_table_jui.css.scss +530 -0
  83. data/app/assets/stylesheets/dataTables/src/jquery.dataTables_themeroller.css +330 -0
  84. data/lib/generators/jquery/datatables/install_generator.rb +75 -0
  85. data/lib/jquery-datatables-rails-plus.rb +2 -0
  86. data/lib/jquery/datatables/rails/engine.rb +11 -0
  87. data/lib/jquery/datatables/rails/version.rb +7 -0
  88. metadata +200 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: de6cc748b0d0fb41333209ca6b10fa59f351c56d
4
+ data.tar.gz: 689e3af0b8f71dc44994e5bcbfb013749df4cb9a
5
+ SHA512:
6
+ metadata.gz: d9013c874e099e56ced9d7bd681232b15c2da7e325745fec2f5ed9012dded9664089eeeb055a2b74cc6a75985d839679d3ae76170ce62ca663d85c4d0a2ed8c1
7
+ data.tar.gz: 9be35fb1bdf194d53be929d2fa7edeb0ffe333040a1484b0760abe665de9b1704b58ff9064c884a4793df8a51cf215c26f6415e603fe2d16502cef69ba96196f
@@ -0,0 +1,162 @@
1
+ /*! DataTables Bootstrap 2 integration
2
+ * ©2011-2014 SpryMedia Ltd - datatables.net/license
3
+ */
4
+
5
+ /**
6
+ * DataTables integration for Bootstrap 2. This requires Bootstrap 2 and
7
+ * DataTables 1.10 or newer.
8
+ *
9
+ * This file sets the defaults and adds options to DataTables to style its
10
+ * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
11
+ * for further information.
12
+ */
13
+ (function(window, document, $, DataTable, undefined){
14
+
15
+ $.extend( true, DataTable.defaults, {
16
+ "dom":
17
+ "<'row-fluid'<'span6'l><'span6'f>r>" +
18
+ "<'row-fluid'<'span12't>>" +
19
+ "<'row-fluid'<'span6'i><'span6'p>>",
20
+ renderer: 'bootstrap'
21
+ } );
22
+
23
+
24
+ /* Default class modification */
25
+ $.extend( DataTable.ext.classes, {
26
+ sWrapper: "dataTables_wrapper form-inline dt-bootstrap"
27
+ } );
28
+
29
+
30
+ /* Bootstrap paging button renderer */
31
+ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
32
+ var api = new DataTable.Api( settings );
33
+ var classes = settings.oClasses;
34
+ var lang = settings.oLanguage.oPaginate;
35
+ var btnDisplay, btnClass;
36
+
37
+ var attach = function( container, buttons ) {
38
+ var i, ien, node, button;
39
+ var clickHandler = function ( e ) {
40
+ e.preventDefault();
41
+ if ( !$(e.currentTarget).hasClass('disabled') ) {
42
+ api.page( e.data.action ).draw( false );
43
+ }
44
+ };
45
+
46
+ for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
47
+ button = buttons[i];
48
+
49
+ if ( $.isArray( button ) ) {
50
+ attach( container, button );
51
+ }
52
+ else {
53
+ btnDisplay = '';
54
+ btnClass = '';
55
+
56
+ switch ( button ) {
57
+ case 'ellipsis':
58
+ btnDisplay = '&hellip;';
59
+ btnClass = 'disabled';
60
+ break;
61
+
62
+ case 'first':
63
+ btnDisplay = lang.sFirst;
64
+ btnClass = button + (page > 0 ?
65
+ '' : ' disabled');
66
+ break;
67
+
68
+ case 'previous':
69
+ btnDisplay = lang.sPrevious;
70
+ btnClass = button + (page > 0 ?
71
+ '' : ' disabled');
72
+ break;
73
+
74
+ case 'next':
75
+ btnDisplay = lang.sNext;
76
+ btnClass = button + (page < pages-1 ?
77
+ '' : ' disabled');
78
+ break;
79
+
80
+ case 'last':
81
+ btnDisplay = lang.sLast;
82
+ btnClass = button + (page < pages-1 ?
83
+ '' : ' disabled');
84
+ break;
85
+
86
+ default:
87
+ btnDisplay = button + 1;
88
+ btnClass = page === button ?
89
+ 'active' : '';
90
+ break;
91
+ }
92
+
93
+ if ( btnDisplay ) {
94
+ node = $('<li>', {
95
+ 'class': classes.sPageButton+' '+btnClass,
96
+ 'aria-controls': settings.sTableId,
97
+ 'tabindex': settings.iTabIndex,
98
+ 'id': idx === 0 && typeof button === 'string' ?
99
+ settings.sTableId +'_'+ button :
100
+ null
101
+ } )
102
+ .append( $('<a>', {
103
+ 'href': '#'
104
+ } )
105
+ .html( btnDisplay )
106
+ )
107
+ .appendTo( container );
108
+
109
+ settings.oApi._fnBindAction(
110
+ node, {action: button}, clickHandler
111
+ );
112
+ }
113
+ }
114
+ }
115
+ };
116
+
117
+ attach(
118
+ $(host).empty().html('<div class="pagination"><ul/></div>').find('ul'),
119
+ buttons
120
+ );
121
+ };
122
+
123
+
124
+ /*
125
+ * TableTools Bootstrap compatibility
126
+ * Required TableTools 2.1+
127
+ */
128
+ if ( DataTable.TableTools ) {
129
+ // Set the classes that TableTools uses to something suitable for Bootstrap
130
+ $.extend( true, DataTable.TableTools.classes, {
131
+ "container": "DTTT btn-group",
132
+ "buttons": {
133
+ "normal": "btn",
134
+ "disabled": "disabled"
135
+ },
136
+ "collection": {
137
+ "container": "DTTT_dropdown dropdown-menu",
138
+ "buttons": {
139
+ "normal": "",
140
+ "disabled": "disabled"
141
+ }
142
+ },
143
+ "print": {
144
+ "info": "DTTT_print_info modal"
145
+ },
146
+ "select": {
147
+ "row": "active"
148
+ }
149
+ } );
150
+
151
+ // Have the collection use a bootstrap compatible dropdown
152
+ $.extend( true, DataTable.TableTools.DEFAULTS.oTags, {
153
+ "collection": {
154
+ "container": "ul",
155
+ "button": "li",
156
+ "liner": "a"
157
+ }
158
+ } );
159
+ }
160
+
161
+
162
+ })(window, document, jQuery, jQuery.fn.dataTable);
@@ -0,0 +1,220 @@
1
+ /*! DataTables Bootstrap 3 integration
2
+ * ©2011-2015 SpryMedia Ltd - datatables.net/license
3
+ */
4
+
5
+ /**
6
+ * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
7
+ * DataTables 1.10 or newer.
8
+ *
9
+ * This file sets the defaults and adds options to DataTables to style its
10
+ * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
11
+ * for further information.
12
+ */
13
+ (function( factory ){
14
+ if ( typeof define === 'function' && define.amd ) {
15
+ // AMD
16
+ define( ['jquery', 'datatables.net'], function ( $ ) {
17
+ return factory( $, window, document );
18
+ } );
19
+ }
20
+ else if ( typeof exports === 'object' ) {
21
+ // CommonJS
22
+ module.exports = function (root, $) {
23
+ if ( ! root ) {
24
+ root = window;
25
+ }
26
+
27
+ if ( ! $ || ! $.fn.dataTable ) {
28
+ // Require DataTables, which attaches to jQuery, including
29
+ // jQuery if needed and have a $ property so we can access the
30
+ // jQuery object that is used
31
+ $ = require('datatables.net')(root, $).$;
32
+ }
33
+
34
+ return factory( $, root, root.document );
35
+ };
36
+ }
37
+ else {
38
+ // Browser
39
+ factory( jQuery, window, document );
40
+ }
41
+ }(function( $, window, document, undefined ) {
42
+ 'use strict';
43
+ var DataTable = $.fn.dataTable;
44
+
45
+
46
+ /* Set the defaults for DataTables initialisation */
47
+ $.extend( true, DataTable.defaults, {
48
+ dom:
49
+ "<'row'<'col-sm-6'l><'col-sm-6'f>>" +
50
+ "<'row'<'col-sm-12'tr>>" +
51
+ "<'row'<'col-sm-5'i><'col-sm-7'p>>",
52
+ renderer: 'bootstrap'
53
+ } );
54
+
55
+
56
+ /* Default class modification */
57
+ $.extend( DataTable.ext.classes, {
58
+ sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
59
+ sFilterInput: "form-control input-sm",
60
+ sLengthSelect: "form-control input-sm",
61
+ sProcessing: "dataTables_processing panel panel-default"
62
+ } );
63
+
64
+
65
+ /* Bootstrap paging button renderer */
66
+ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
67
+ var api = new DataTable.Api( settings );
68
+ var classes = settings.oClasses;
69
+ var lang = settings.oLanguage.oPaginate;
70
+ var aria = settings.oLanguage.oAria.paginate || {};
71
+ var btnDisplay, btnClass, counter=0;
72
+
73
+ var attach = function( container, buttons ) {
74
+ var i, ien, node, button;
75
+ var clickHandler = function ( e ) {
76
+ e.preventDefault();
77
+ if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
78
+ api.page( e.data.action ).draw( 'page' );
79
+ }
80
+ };
81
+
82
+ for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
83
+ button = buttons[i];
84
+
85
+ if ( $.isArray( button ) ) {
86
+ attach( container, button );
87
+ }
88
+ else {
89
+ btnDisplay = '';
90
+ btnClass = '';
91
+
92
+ switch ( button ) {
93
+ case 'ellipsis':
94
+ btnDisplay = '&#x2026;';
95
+ btnClass = 'disabled';
96
+ break;
97
+
98
+ case 'first':
99
+ btnDisplay = lang.sFirst;
100
+ btnClass = button + (page > 0 ?
101
+ '' : ' disabled');
102
+ break;
103
+
104
+ case 'previous':
105
+ btnDisplay = lang.sPrevious;
106
+ btnClass = button + (page > 0 ?
107
+ '' : ' disabled');
108
+ break;
109
+
110
+ case 'next':
111
+ btnDisplay = lang.sNext;
112
+ btnClass = button + (page < pages-1 ?
113
+ '' : ' disabled');
114
+ break;
115
+
116
+ case 'last':
117
+ btnDisplay = lang.sLast;
118
+ btnClass = button + (page < pages-1 ?
119
+ '' : ' disabled');
120
+ break;
121
+
122
+ default:
123
+ btnDisplay = button + 1;
124
+ btnClass = page === button ?
125
+ 'active' : '';
126
+ break;
127
+ }
128
+
129
+ if ( btnDisplay ) {
130
+ node = $('<li>', {
131
+ 'class': classes.sPageButton+' '+btnClass,
132
+ 'id': idx === 0 && typeof button === 'string' ?
133
+ settings.sTableId +'_'+ button :
134
+ null
135
+ } )
136
+ .append( $('<a>', {
137
+ 'href': '#',
138
+ 'aria-controls': settings.sTableId,
139
+ 'aria-label': aria[ button ],
140
+ 'data-dt-idx': counter,
141
+ 'tabindex': settings.iTabIndex
142
+ } )
143
+ .html( btnDisplay )
144
+ )
145
+ .appendTo( container );
146
+
147
+ settings.oApi._fnBindAction(
148
+ node, {action: button}, clickHandler
149
+ );
150
+
151
+ counter++;
152
+ }
153
+ }
154
+ }
155
+ };
156
+
157
+ // IE9 throws an 'unknown error' if document.activeElement is used
158
+ // inside an iframe or frame.
159
+ var activeEl;
160
+
161
+ try {
162
+ // Because this approach is destroying and recreating the paging
163
+ // elements, focus is lost on the select button which is bad for
164
+ // accessibility. So we want to restore focus once the draw has
165
+ // completed
166
+ activeEl = $(host).find(document.activeElement).data('dt-idx');
167
+ }
168
+ catch (e) {}
169
+
170
+ attach(
171
+ $(host).empty().html('<ul class="pagination"/>').children('ul'),
172
+ buttons
173
+ );
174
+
175
+ if ( activeEl ) {
176
+ $(host).find( '[data-dt-idx='+activeEl+']' ).focus();
177
+ }
178
+ };
179
+
180
+
181
+ /*
182
+ * TableTools Bootstrap compatibility
183
+ * Required TableTools 2.1+
184
+ */
185
+ if ( DataTable.TableTools ) {
186
+ // Set the classes that TableTools uses to something suitable for Bootstrap
187
+ $.extend( true, DataTable.TableTools.classes, {
188
+ "container": "DTTT btn-group",
189
+ "buttons": {
190
+ "normal": "btn btn-default",
191
+ "disabled": "disabled"
192
+ },
193
+ "collection": {
194
+ "container": "DTTT_dropdown dropdown-menu",
195
+ "buttons": {
196
+ "normal": "",
197
+ "disabled": "disabled"
198
+ }
199
+ },
200
+ "print": {
201
+ "info": "DTTT_print_info"
202
+ },
203
+ "select": {
204
+ "row": "active"
205
+ }
206
+ } );
207
+
208
+ // Have the collection use a bootstrap compatible drop down
209
+ $.extend( true, DataTable.TableTools.DEFAULTS.oTags, {
210
+ "collection": {
211
+ "container": "ul",
212
+ "button": "li",
213
+ "liner": "a"
214
+ }
215
+ } );
216
+ }
217
+
218
+
219
+ return DataTable;
220
+ }));