datatables.net-bs 1.10.9 → 1.10.10

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.
package/Readme.md CHANGED
@@ -19,7 +19,7 @@ npm install datatables.net-bs
19
19
 
20
20
  ```
21
21
  var $ = require( 'jquery' );
22
- require( 'datatables.net-bs' )( $ );
22
+ require( 'datatables.net-bs' )( window, $ );
23
23
  ```
24
24
 
25
25
  ### bower
@@ -54,6 +54,16 @@ div.dataTables_wrapper div.dataTables_paginate ul.pagination {
54
54
  margin: 2px 0;
55
55
  white-space: nowrap;
56
56
  }
57
+ div.dataTables_wrapper div.dataTables_processing {
58
+ position: absolute;
59
+ top: 50%;
60
+ left: 50%;
61
+ width: 200px;
62
+ margin-left: -100px;
63
+ margin-top: -26px;
64
+ text-align: center;
65
+ padding: 1em 0;
66
+ }
57
67
 
58
68
  table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
59
69
  table.dataTable thead > tr > td.sorting_asc,
@@ -165,3 +175,13 @@ table.table-bordered.dataTable tbody td {
165
175
  div.dataTables_scrollHead table.table-bordered {
166
176
  border-bottom-width: 0;
167
177
  }
178
+
179
+ div.table-responsive > div.dataTables_wrapper > div.row {
180
+ margin: 0;
181
+ }
182
+ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
183
+ padding-left: 0;
184
+ }
185
+ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
186
+ padding-right: 0;
187
+ }
@@ -1,5 +1,5 @@
1
1
  /*! DataTables Bootstrap 3 integration
2
- * ©2011-2014 SpryMedia Ltd - datatables.net/license
2
+ * ©2011-2015 SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
5
5
  /**
@@ -10,10 +10,37 @@
10
10
  * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
11
11
  * for further information.
12
12
  */
13
- (function(window, document, undefined){
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
+ }
14
33
 
15
- var factory = function( $, DataTable ) {
16
- "use strict";
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;
17
44
 
18
45
 
19
46
  /* Set the defaults for DataTables initialisation */
@@ -30,7 +57,8 @@ $.extend( true, DataTable.defaults, {
30
57
  $.extend( DataTable.ext.classes, {
31
58
  sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
32
59
  sFilterInput: "form-control input-sm",
33
- sLengthSelect: "form-control input-sm"
60
+ sLengthSelect: "form-control input-sm",
61
+ sProcessing: "dataTables_processing panel panel-default"
34
62
  } );
35
63
 
36
64
 
@@ -39,13 +67,14 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
39
67
  var api = new DataTable.Api( settings );
40
68
  var classes = settings.oClasses;
41
69
  var lang = settings.oLanguage.oPaginate;
70
+ var aria = settings.oLanguage.oAria.paginate || {};
42
71
  var btnDisplay, btnClass, counter=0;
43
72
 
44
73
  var attach = function( container, buttons ) {
45
74
  var i, ien, node, button;
46
75
  var clickHandler = function ( e ) {
47
76
  e.preventDefault();
48
- if ( !$(e.currentTarget).hasClass('disabled') ) {
77
+ if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
49
78
  api.page( e.data.action ).draw( 'page' );
50
79
  }
51
80
  };
@@ -62,7 +91,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
62
91
 
63
92
  switch ( button ) {
64
93
  case 'ellipsis':
65
- btnDisplay = '…';
94
+ btnDisplay = '…';
66
95
  btnClass = 'disabled';
67
96
  break;
68
97
 
@@ -107,6 +136,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
107
136
  .append( $('<a>', {
108
137
  'href': '#',
109
138
  'aria-controls': settings.sTableId,
139
+ 'aria-label': aria[ button ],
110
140
  'data-dt-idx': counter,
111
141
  'tabindex': settings.iTabIndex
112
142
  } )
@@ -185,22 +215,6 @@ if ( DataTable.TableTools ) {
185
215
  } );
186
216
  }
187
217
 
188
- }; // /factory
189
-
190
-
191
- // Define as an AMD module if possible
192
- if ( typeof define === 'function' && define.amd ) {
193
- define( ['jquery', 'datatables'], factory );
194
- }
195
- else if ( typeof exports === 'object' ) {
196
- // Node/CommonJS
197
- factory( require('jquery'), require('datatables') );
198
- }
199
- else if ( jQuery ) {
200
- // Otherwise simply initialise as normal, stopping multiple evaluation
201
- factory( jQuery, jQuery.fn.dataTable );
202
- }
203
-
204
-
205
- })(window, document);
206
218
 
219
+ return DataTable;
220
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datatables.net-bs",
3
- "version": "1.10.9",
3
+ "version": "1.10.10",
4
4
  "description": "DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)",
5
5
  "files": [
6
6
  "js/dataTables.bootstrap.js",