[Pkg-javascript-commits] [datatables.js] 01/05: New upstream version 1.10.16+dfsg

Sascha Steinbiss satta at debian.org
Sun Sep 3 19:37:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

satta pushed a commit to branch master
in repository datatables.js.

commit 3a0834f6991f41ecd80d470f6b0ee8309b134374
Author: Sascha Steinbiss <satta at debian.org>
Date:   Sun Sep 3 21:32:08 2017 +0200

    New upstream version 1.10.16+dfsg
---
 build/examples.php                    |  17 ++---
 build/lib/DT_Example.php              |  15 ++++-
 css/dataTables.bootstrap.scss         |  12 +++-
 css/dataTables.bootstrap4.scss        |  31 ++++++---
 css/jquery.dataTables.scss            |  10 +--
 docs/api/cell().invalidate().xml      |   4 +-
 docs/api/one().xml                    |   2 +-
 docs/api/pluck().xml                  |  42 ++++++++++++
 docs/event/draw.xml                   |   4 +-
 docs/event/preDraw.xml                |  40 +++++++++++
 docs/option/columns.data.xml          |   2 +-
 docs/option/columns.orderData.xml     |   2 +-
 docs/option/columns.render.xml        |   4 +-
 docs/option/jQueryUI.xml              |  24 -------
 docs/option/language.info.xml         |  12 ++--
 docs/option/stateLoadCallback.xml     |   1 -
 js/DataTables.js                      |   6 +-
 js/api/api.core.js                    |   9 ---
 js/api/api.rows.js                    |   5 ++
 js/core/core.columns.js               |   3 +
 js/core/core.constructor.js           |  29 +-------
 js/core/core.length.js                |   7 +-
 js/ext/ext.classes.js                 |  53 ---------------
 js/integration/dataTables.jqueryui.js |  12 ++--
 js/model/model.defaults.js            |  20 ------
 js/model/model.settings.js            |   8 ---
 package.json                          |  30 ++++-----
 test/options/Options/lengthMenu.js    | 121 ++++++++++++++++++++++------------
 28 files changed, 271 insertions(+), 254 deletions(-)

diff --git a/build/examples.php b/build/examples.php
index cbddb37..6a5478e 100644
--- a/build/examples.php
+++ b/build/examples.php
@@ -251,14 +251,14 @@ else {
 // When updating these files, make sure you also update the `karma.config` tests
 // file to match versions.
 DT_Example::$lookup_libraries['js' ]['jquery']       = '//code.jquery.com/jquery-1.12.4.js';
-DT_Example::$lookup_libraries['js' ]['jqueryui']     = '//code.jquery.com/ui/1.11.4/jquery-ui.js';
-DT_Example::$lookup_libraries['css']['jqueryui']     = '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css';
+DT_Example::$lookup_libraries['js' ]['jqueryui']     = '//code.jquery.com/ui/1.12.1/jquery-ui.js';
+DT_Example::$lookup_libraries['css']['jqueryui']     = '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css';
 DT_Example::$lookup_libraries['js' ]['bootstrap']    = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js';
 DT_Example::$lookup_libraries['css']['bootstrap']    = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css';
-DT_Example::$lookup_libraries['js']['bootstrap4']    = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js';
-DT_Example::$lookup_libraries['css' ]['bootstrap4']  = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.css';
-DT_Example::$lookup_libraries['js' ]['semanticui']   = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.js';
-DT_Example::$lookup_libraries['css']['semanticui']   = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.css';
+DT_Example::$lookup_libraries['js']['bootstrap4']    = '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js|//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js';
+DT_Example::$lookup_libraries['css' ]['bootstrap4']  = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.css';
+DT_Example::$lookup_libraries['js' ]['semanticui']   = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js';
+DT_Example::$lookup_libraries['css']['semanticui']   = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css';
 DT_Example::$lookup_libraries['js' ]['material']     = '//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.js';
 DT_Example::$lookup_libraries['css']['material']     = '//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.css';
 DT_Example::$lookup_libraries['js' ]['foundation']   = '//cdnjs.cloudflare.com/ajax/libs/foundation/6.2.4/foundation.min.js';
@@ -269,8 +269,8 @@ DT_Example::$lookup_libraries['js' ]['uikit']        = '//cdnjs.cloudflare.com/a
 DT_Example::$lookup_libraries['css']['uikit']        = '//cdnjs.cloudflare.com/ajax/libs/uikit/2.24.3/css/uikit.min.css';
 DT_Example::$lookup_libraries['css']['font-awesome'] = '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css';
 DT_Example::$lookup_libraries['js']['jszip']         = '//cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js';
-DT_Example::$lookup_libraries['js']['pdfmake']       = '//cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/pdfmake.min.js';
-DT_Example::$lookup_libraries['js']['vfsfonts']      = '//cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/vfs_fonts.js';
+DT_Example::$lookup_libraries['js']['pdfmake']       = '//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js';
+DT_Example::$lookup_libraries['js']['vfsfonts']      = '//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js';
 DT_Example::$lookup_libraries['js']['moment']        = '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js';
 
 function multiple ( $value, $fn )
@@ -792,6 +792,7 @@ function json_files ( $out_dir )
 	$out = [];
 	for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) {
 		$out[] = [
+			'id'         => $json[$i]['id'],
 			'name'       => $json[$i]['first_name'] .' '. $json[$i]['last_name'],
 			'position'   => $json[$i]['position'],
 			'salary'     => '$'.number_format($json[$i]['salary']),
diff --git a/build/lib/DT_Example.php b/build/lib/DT_Example.php
index 3518982..61391af 100644
--- a/build/lib/DT_Example.php
+++ b/build/lib/DT_Example.php
@@ -513,7 +513,13 @@ class DT_Example
 			}
 
 			if ( $type === 'js' ) {
-				$out[] = '<script type="text/javascript" language="javascript" src="'.$file.'"></script>';
+				$a = strpos( $file, '|' ) !== false ?
+					explode( '|', $file ) :
+					array( $file );
+
+				for ( $j=0, $jen=count($a) ; $j<$jen ; $j++ ) {
+					$out[] = '<script type="text/javascript" language="javascript" src="'.$a[$j].'"></script>';
+				}
 			}
 			else {
 				$out[] = '<link rel="stylesheet" type="text/css" href="'.$file.'">';
@@ -705,6 +711,13 @@ DT_Example::$tables['ajax'] = array(
 	'body'    => false
 );
 
+DT_Example::$tables['ajax-id'] = array(
+	'columns' => array( 'id', 'name', 'position', 'office', 'extn', 'start_date', 'salary' ),
+	'header'  => true,
+	'footer'  => true,
+	'body'    => false
+);
+
 DT_Example::$tables['ajax-sequence'] = array(
 	'columns' => array( 'sequence', 'name', 'position', 'office', 'start_date', 'salary' ),
 	'header'  => true,
diff --git a/css/dataTables.bootstrap.scss b/css/dataTables.bootstrap.scss
index fb47286..61cea3b 100644
--- a/css/dataTables.bootstrap.scss
+++ b/css/dataTables.bootstrap.scss
@@ -166,9 +166,15 @@ div.dataTables_scrollBody {
 	}
 }
 
-div.dataTables_scrollFoot > table {
-	margin-top: 0 !important;
-	border-top: none;
+div.dataTables_scrollFoot {
+	> .dataTables_scrollFootInner {
+		box-sizing: content-box;
+
+		> table {
+			margin-top: 0 !important;
+			border-top: none;
+		}
+	}
 }
 
 
diff --git a/css/dataTables.bootstrap4.scss b/css/dataTables.bootstrap4.scss
index e9e1ec7..96520c8 100644
--- a/css/dataTables.bootstrap4.scss
+++ b/css/dataTables.bootstrap4.scss
@@ -169,9 +169,15 @@ div.dataTables_scrollBody {
 	}
 }
 
-div.dataTables_scrollFoot table {
-	margin-top: 0 !important;
-	border-top: none;
+div.dataTables_scrollFoot {
+	> .dataTables_scrollFootInner {
+		box-sizing: content-box;
+
+		> table {
+			margin-top: 0 !important;
+			border-top: none;
+		}
+	}
 }
 
 
@@ -194,19 +200,26 @@ div.dataTables_scrollFoot table {
 //
 
 // Condensed
-table.dataTable.table-condensed {
+table.dataTable.table-sm {
 	> thead > tr > th {
 		padding-right: 20px;
 	}
 
-	.sorting:after,
-	.sorting_asc:after,
-	.sorting_desc:after {
-		top: 6px;
-		right: 6px;
+	.sorting,
+	.sorting_asc,
+	.sorting_desc {
+		&:before {
+			top: 5px;
+			right: 0.85em;
+		}
+
+		&:after {
+			top: 5px;
+		}
 	}
 }
 
+
 // Frustratingly the border-collapse:collapse used by Bootstrap makes the column
 // width calculations when using scrolling impossible to align columns. We have
 // to use `border-collapse: separate`
diff --git a/css/jquery.dataTables.scss b/css/jquery.dataTables.scss
index 750adfc..10aa011 100644
--- a/css/jquery.dataTables.scss
+++ b/css/jquery.dataTables.scss
@@ -109,13 +109,6 @@ table.dataTable {
 			.sorting_desc_disabled {
 				cursor: pointer;
 				*cursor: hand;
-			}
-
-			.sorting,
-			.sorting_asc,
-			.sorting_desc,
-			.sorting_asc_disabled,
-			.sorting_desc_disabled {
 				background-repeat: no-repeat;
 				background-position: center right;
 			}
@@ -393,7 +386,6 @@ table.dataTable {
 table.dataTable,
 table.dataTable th,
 table.dataTable td {
-	-webkit-box-sizing: content-box;
 	        box-sizing: content-box;
 }
 
@@ -556,7 +548,7 @@ table.dataTable td {
 			border-bottom: $table-header-border;
 		}
 
-		div.dataTables_scrollHead > table,
+		div.dataTables_scrollHead table.dataTable,
 		div.dataTables_scrollBody > table {
 			border-bottom: none;
 		}
diff --git a/docs/api/cell().invalidate().xml b/docs/api/cell().invalidate().xml
index ec2c071..0ea9bee 100644
--- a/docs/api/cell().invalidate().xml
+++ b/docs/api/cell().invalidate().xml
@@ -22,11 +22,13 @@
 	</type>
 
 	<description>
+		<![CDATA[
 		DataTables holds cached information about the contents of each cell in the table to increase performance of table operations such as ordering and searching. If you were to modify the contents of a cell (for DOM data source tables) or the array / object values (for Ajax / JS source tables) DataTables wouldn't know that this has happened. This method can be used to tell DataTables to re-read the information from the data source for the row (be it from the DOM or objects / arrays - whatev [...]
 
-		This provides an alternative to using `dt-api cell().data()` and `dt-api row().data()` when changing cell values. Typically the `data` methods are preferred over the invalidation methods, as they use less code, but where the invalidation methods really shine is when the data source for the table are external objects which can be updated using that objects own methods.
+		This provides an alternative to using `dt-api cell().data()` and `dt-api row().data()` when changing cell values. Typically the `data` methods are preferred over the invalidation methods, as they use less code, but where the invalidation methods really shine is when the data source for the table are external objects which can be updated using that objects' own methods.
 
 		Prior to <span class="since">DataTables 1.10.4</span> this method actually invalidated the whole row. As of <span class="since">1.10.4</span> only the cell in question is invalidated.
+		]]>
 	</description>
 
 	<example title="Increment a cell's value and then invalidate and redraw the table"><![CDATA[
diff --git a/docs/api/one().xml b/docs/api/one().xml
index 75904c1..c648aa8 100644
--- a/docs/api/one().xml
+++ b/docs/api/one().xml
@@ -25,7 +25,7 @@
 		* `dt-api off()` - Stop listening for events
 		* `dt-api one()` - Listen for a single event.
 
-		This `dt-api one()` method is used to listen for DataTables an event from DataTables and then immediately remove that event once it has fired for the first time. Simply pass in the event you wish to listen for an provide a callback function which will be activated, and then removed, when the event is triggered by DataTables.
+		This `dt-api one()` method is used to listen for DataTables an event from DataTables and then immediately remove that event once it has fired for the first time. Simply pass in the event you wish to listen for and provide a callback function which will be activated, and then removed, when the event is triggered by DataTables.
 	</description>
 
 	<example title="Listen for only the first `dt-event xhr` event from DataTables"><![CDATA[
diff --git a/docs/api/pluck().xml b/docs/api/pluck().xml
index 7597c86..d9acf99 100644
--- a/docs/api/pluck().xml
+++ b/docs/api/pluck().xml
@@ -64,4 +64,46 @@ var names = table
 
 ]]></example>
 
+	<example title="Nested data - get the `salary` data property by using `pluck()` twice."><![CDATA[
+var table = $('#example').DataTable({
+  "data": [
+    {
+      "name": "Tiger Nixon",
+      "hr": {
+        "position": "System Architect",
+        "salary": "$320,800",
+        "start_date": "2011/04/25"
+      }
+    },
+    {
+      "name": "Garrett Winters",
+      "hr": {
+        "position": "Accountant",
+        "salary": "$170,750",
+        "start_date": "2011/07/25"
+      }
+    },
+    {
+      "name": "Ashton Cox",
+      "hr": {
+        "position": "Junior Technical Author",
+        "salary": "$86,000",
+        "start_date": "2009/01/12"
+      }
+    }
+	],
+	"columns": [
+		{ "data": "name" },
+		{ "data": "hr.position" }
+	]
+);
+
+var saleries = table
+	.rows()
+	.data()
+	.pluck( 'hr' )
+	.pluck( 'salary' );
+
+]]></example>
+
 </dt-api>
\ No newline at end of file
diff --git a/docs/event/draw.xml b/docs/event/draw.xml
index f61504d..d46d8b6 100644
--- a/docs/event/draw.xml
+++ b/docs/event/draw.xml
@@ -24,9 +24,9 @@
 	</description>
 
 	<example title="Log to console on each draw"><![CDATA[
-$('#example').dataTable();
+var table = $('#example').DataTable();
 
-$('#example').on( 'draw.dt', function () {
+table.on( 'draw', function () {
 	console.log( 'Redraw occurred at: '+new Date().getTime() );
 } );
 ]]></example>
diff --git a/docs/event/preDraw.xml b/docs/event/preDraw.xml
new file mode 100644
index 0000000..ee92197
--- /dev/null
+++ b/docs/event/preDraw.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dt-event>
+	<name>preDraw</name>
+	<summary>Pre-draw event - triggered as the table is about to be redrawn.</summary>
+	<since>1.10</since>
+
+	<type type="function">
+		<signature>function( e, settings )</signature>
+		<parameter type="object" name="e">
+			jQuery event object
+		</parameter>
+		<parameter type="DataTables.Settings" name="settings">
+			DataTables settings object
+		</parameter>
+		<scope>HTML table element</scope>
+	</type>
+
+	<description>
+		This event is triggered when DataTables starts its draw action (finally resulting in the `-event draw` event) and can be used to inform you of this state.
+
+        This event can also be used to cancel the draw by returning `false` from the event handler. Please note that if you do this it can leave the table in an unpredicable state as any settings are not reset to their values from before the draw action - for example using `-api order()` to change the ordering of the table, but if the draw action is cancelled the data will still have been ordered internally in DataTables, but just not displayed.
+	</description>
+
+	<example title="Log time taken to draw the page"><![CDATA[
+var table = $('#example').DataTable();
+var startTime;
+
+table
+    .on( 'preDraw', function () {
+        startTime = new Date().getTime();
+    } )
+    .on( 'draw.dt', function () {
+        console.log( 'Redraw took at: '+(new Date().getTime()-startTime)+'mS' );
+    } );
+]]></example>
+
+	<related type="option">drawCallback</related>
+	<related type="api">draw()</related>
+	<related type="event">draw</related>
+</dt-event>
\ No newline at end of file
diff --git a/docs/option/columns.data.xml b/docs/option/columns.data.xml
index 676cd72..bc8f986 100644
--- a/docs/option/columns.data.xml
+++ b/docs/option/columns.data.xml
@@ -14,7 +14,7 @@
 			Read and write an object property to and from the data source. There are three 'special' options that can be used in the string to alter how DataTables reads the data from the source object:
 
 			* `.` - Dotted Javascript notation. Just as you use a `.` in Javascript to read from nested objects, so to can the options specified in `data`. For example: `browser.version` or `browser.name`. If your object parameter name contains a period, use `\\` to escape it - i.e. `first\\.name`.
-			* `[]` - Array notation. DataTables can automatically combine data from and array source, joining the data with the characters provided between the two brackets. For example: `name[, ]` would provide a comma-space separated list from the source array. If no characters are provided between the brackets, the original array source is returned.
+			* `[]` - Array notation. DataTables can automatically combine data from an array source, joining the data with the characters provided between the two brackets. For example: `name[, ]` would provide a comma-space separated list from the source array. If no characters are provided between the brackets, the original array source is returned.
 			* `()` - Function notation. Adding `()` to the end of a parameter will execute a function of the name given. For example: `browser()` for a simple function on the data source, `browser.version()` for a function in a nested property or even `browser().version` to get an object property if the function called returns an object. Note that function notation is recommended for use in `render` rather than `data` as it is much simpler to use as a renderer.
 		</description>
 	</type>
diff --git a/docs/option/columns.orderData.xml b/docs/option/columns.orderData.xml
index fccc03e..8a1f8da 100644
--- a/docs/option/columns.orderData.xml
+++ b/docs/option/columns.orderData.xml
@@ -17,7 +17,7 @@
 	<description>
 		Allows a column's sorting to take either the data from a different (often hidden) column as the data to sort, or data from multiple columns.
 
-		A common example of this is a table which contains first and last name columns next to each other, it is intuitive that they would be linked together to multi-column sort. Another example, with a single column, is the case where the data shown to the end user is not directly sortable itself (a column with images in it), but there is some meta data than can be sorted (e.g. file name) - note that [orthogonal data](/manual/data/orthogonal) is an alternative method that can be used for this.
+		A common example of this is a table which contains first and last name columns next to each other, it is intuitive that they would be linked together to multi-column sort. Another example, with a single column, is the case where the data shown to the end user is not directly sortable itself (a column with images in it), but there is some meta data than can be sorted (e.g. file name) - note that [orthogonal data](/manual/data/orthogonal-data) is an alternative method that can be used for this.
 	</description>
 
 	<example title="Using `orderData` to define multi-column sorting with `dt-init columnDefs`"><![CDATA[
diff --git a/docs/option/columns.render.xml b/docs/option/columns.render.xml
index dd37b1c..55051dc 100644
--- a/docs/option/columns.render.xml
+++ b/docs/option/columns.render.xml
@@ -168,7 +168,7 @@ $('#example').dataTable( {
   "columnDefs": [ {
     "targets": 0,
     "data": "download_link",
-    "render": function ( data, type, full, meta ) {
+    "render": function ( data, type, row, meta ) {
       return '<a href="'+data+'">Download</a>';
     }
   } ]
@@ -180,7 +180,7 @@ $('#example').dataTable( {
   "columnDefs": [ {
     "targets": 4,
     "data": "description",
-    "render": function ( data, type, full, meta ) {
+    "render": function ( data, type, row, meta ) {
       return type === 'display' && data.length > 40 ?
       	'<span title="'+data+'">'+data.substr( 0, 38 )+'...</span>' :
       	data;
diff --git a/docs/option/jQueryUI.xml b/docs/option/jQueryUI.xml
deleted file mode 100644
index 04a00b8..0000000
--- a/docs/option/jQueryUI.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<dt-option group="feature">
-	<name>jQueryUI</name>
-	<summary>Use markup and classes for the table to be themed by jQuery UI ThemeRoller.</summary>
-	<since>1.10</since>
-	<deprecated>1.10 - To be removed in v1.11, where upon this functionality will be provided by a plug-in. See DataTables [styling options](//datatables.net/manual/styling/jqueryui) for more information.</deprecated>
-
-	<type type="boolean" />
-	<default value="false" />
-
-	<description>
-		DataTables can be styled by a number of CSS library packages, included jQuery UI, Twitter Bootstrap and Foundation. Although Bootstrap, Foundation and other libraries require a plug-in, jQuery UI ThemeRoller support is built into DataTables and can be enabled simply with this parameter. When enabled, DataTables will use markup and classes created for jQuery UI ThemeRoller, making it very easy to integrate your tables with jQuery UI.
-
-		When enabled, you will likely want to load the `jquery.dataTables_themeroller.css` file that is included in the DataTables package (`path media/css`) as ThemeRoller does not provide all of the styles needed by DataTables.
-
-		Note that this feature is deprecated in DataTables 1.10 and will be removed in 1.11, where upon this feature will be provided by plug-ins, matching the other style libraries. Please see the [DataTables jQuery UI styling documentation](//datatables.net/manual/styling/jqueryui) for more information about the new method of styling the table using jQuery UI.
-	</description>
-
-	<example title="Enable jQuery UI ThemeRoller support"><![CDATA[
-$('#example').dataTable( {
-  "jQueryUI": true
-} );
-]]></example>
-</dt-option>
diff --git a/docs/option/language.info.xml b/docs/option/language.info.xml
index 206a74f..dfc8a07 100644
--- a/docs/option/language.info.xml
+++ b/docs/option/language.info.xml
@@ -12,12 +12,12 @@
 
 		These tokens can be placed anywhere in the string, or removed as needed by the language requires:
 		
-		* `\_START\_` - Display index of the first record on the current page
-		* `\_END\_` - Display index of the last record on the current page
-		* `\_TOTAL\_` - Number of records in the table after filtering
-		* `\_MAX\_` - Number of records in the table without filtering
-		* `\_PAGE\_` - Current page number
-		* `\_PAGES\_` - Total number of pages of data in the table
+		* `_START_` - Display index of the first record on the current page
+		* `_END_` - Display index of the last record on the current page
+		* `_TOTAL_` - Number of records in the table after filtering
+		* `_MAX_` - Number of records in the table without filtering
+		* `_PAGE_` - Current page number
+		* `_PAGES_` - Total number of pages of data in the table
 	</description>
 
 	<example title="Show page count"><![CDATA[
diff --git a/docs/option/stateLoadCallback.xml b/docs/option/stateLoadCallback.xml
index 95b7657..cef8bef 100644
--- a/docs/option/stateLoadCallback.xml
+++ b/docs/option/stateLoadCallback.xml
@@ -36,7 +36,6 @@ $('#example').DataTable( {
 	stateLoadCallback: function (settings, callback) {
 		$.ajax( {
 			url: '/state_load',
-			async: false,
 			dataType: 'json',
 			success: function (json) {
 				callback( json );
diff --git a/js/DataTables.js b/js/DataTables.js
index 5164237..0ba378b 100644
--- a/js/DataTables.js
+++ b/js/DataTables.js
@@ -1,11 +1,11 @@
-/*! DataTables 1.10.15
+/*! DataTables 1.10.16
  * ©2008-2017 SpryMedia Ltd - datatables.net/license
  */
 
 /**
  * @summary     DataTables
  * @description Paginate, search and order HTML tables
- * @version     1.10.15
+ * @version     1.10.16
  * @file        jquery.dataTables.js
  * @author      SpryMedia Ltd
  * @contact     www.datatables.net
@@ -169,7 +169,7 @@
 	 *  @type string
 	 *  @default Version number
 	 */
-	DataTable.version = "1.10.15";
+	DataTable.version = "1.10.16";
 
 	/**
 	 * Private data store, containing all of the settings objects that are
diff --git a/js/api/api.core.js b/js/api/api.core.js
index 831752e..2d02e48 100644
--- a/js/api/api.core.js
+++ b/js/api/api.core.js
@@ -114,15 +114,6 @@ _api_register( 'destroy()', function ( remove ) {
 			classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
 		);
 
-		if ( settings.bJUI ) {
-			$('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach();
-			$('th, td', thead).each( function () {
-				var wrapper = $('div.'+classes.sSortJUIWrapper, this);
-				$(this).append( wrapper.contents() );
-				wrapper.detach();
-			} );
-		}
-
 		// Add the TR elements back into the table in their original order
 		jqTbody.children().detach();
 		jqTbody.append( rows );
diff --git a/js/api/api.rows.js b/js/api/api.rows.js
index e544807..584d4d8 100644
--- a/js/api/api.rows.js
+++ b/js/api/api.rows.js
@@ -206,6 +206,11 @@ _api_registerPlural( 'rows().remove()', 'row().remove()', function () {
 		_fnDeleteIndex( settings.aiDisplay, row );
 		_fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes
 
+		// For server-side processing tables - subtract the deleted row from the count
+		if ( settings._iRecordsDisplay > 0 ) {
+			settings._iRecordsDisplay--;
+		}
+
 		// Check for an 'overflow' they case for displaying the table
 		_fnLengthOverflow( settings );
 
diff --git a/js/core/core.columns.js b/js/core/core.columns.js
index 7c9454b..7b0675a 100644
--- a/js/core/core.columns.js
+++ b/js/core/core.columns.js
@@ -81,6 +81,9 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
 		{
 			oOptions.sClass = oOptions.className;
 		}
+		if ( oOptions.sClass ) {
+			th.addClass( oOptions.sClass );
+		}
 
 		$.extend( oCol, oOptions );
 		_fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
diff --git a/js/core/core.constructor.js b/js/core/core.constructor.js
index 6847fc7..c9ab8ad 100644
--- a/js/core/core.constructor.js
+++ b/js/core/core.constructor.js
@@ -147,8 +147,7 @@ _fnMap( oSettings, oInit, [
 	[ "iCookieDuration", "iStateDuration" ], // backwards compat
 	[ "oSearch", "oPreviousSearch" ],
 	[ "aoSearchCols", "aoPreSearchCols" ],
-	[ "iDisplayLength", "_iDisplayLength" ],
-	[ "bJQueryUI", "bJUI" ]
+	[ "iDisplayLength", "_iDisplayLength" ]
 ] );
 _fnMap( oSettings.oScroll, oInit, [
 	[ "sScrollX", "sX" ],
@@ -178,31 +177,7 @@ _fnBrowserDetect( oSettings );
 
 var oClasses = oSettings.oClasses;
 
-// @todo Remove in 1.11
-if ( oInit.bJQueryUI )
-{
-	/* Use the JUI classes object for display. You could clone the oStdClasses object if
-	 * you want to have multiple tables with multiple independent classes
-	 */
-	$.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );
-
-	if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" )
-	{
-		/* Set the DOM to use a layout suitable for jQuery UI's theming */
-		oSettings.sDom = '<"H"lfr>t<"F"ip>';
-	}
-
-	if ( ! oSettings.renderer ) {
-		oSettings.renderer = 'jqueryui';
-	}
-	else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) {
-		oSettings.renderer.header = 'jqueryui';
-	}
-}
-else
-{
-	$.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
-}
+$.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
 $this.addClass( oClasses.sTable );
 
 
diff --git a/js/core/core.length.js b/js/core/core.length.js
index c48182c..21d8991 100644
--- a/js/core/core.length.js
+++ b/js/core/core.length.js
@@ -34,7 +34,12 @@ function _fnFeatureHtmlLength ( settings )
 	} );
 
 	for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
-		select[0][ i ] = new Option( language[i], lengths[i] );
+		select[0][ i ] = new Option(
+			typeof language[i] === 'number' ?
+				settings.fnFormatNumber( language[i] ) :
+				language[i],
+			lengths[i]
+		);
 	}
 
 	var div = $('<div><label/></div>').addClass( classes.sLength );
diff --git a/js/ext/ext.classes.js b/js/ext/ext.classes.js
index 5ea8843..06a2a98 100644
--- a/js/ext/ext.classes.js
+++ b/js/ext/ext.classes.js
@@ -61,56 +61,3 @@ $.extend( DataTable.ext.classes, {
 	"sJUIHeader": "",
 	"sJUIFooter": ""
 } );
-
-
-(function() {
-
-// Reused strings for better compression. Closure compiler appears to have a
-// weird edge case where it is trying to expand strings rather than use the
-// variable version. This results in about 200 bytes being added, for very
-// little preference benefit since it this run on script load only.
-var _empty = '';
-_empty = '';
-
-var _stateDefault = _empty + 'ui-state-default';
-var _sortIcon     = _empty + 'css_right ui-icon ui-icon-';
-var _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix';
-
-$.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, {
-	/* Full numbers paging buttons */
-	"sPageButton":         "fg-button ui-button "+_stateDefault,
-	"sPageButtonActive":   "ui-state-disabled",
-	"sPageButtonDisabled": "ui-state-disabled",
-
-	/* Features */
-	"sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
-		"ui-buttonset-multi paging_", /* Note that the type is postfixed */
-
-	/* Sorting */
-	"sSortAsc":            _stateDefault+" sorting_asc",
-	"sSortDesc":           _stateDefault+" sorting_desc",
-	"sSortable":           _stateDefault+" sorting",
-	"sSortableAsc":        _stateDefault+" sorting_asc_disabled",
-	"sSortableDesc":       _stateDefault+" sorting_desc_disabled",
-	"sSortableNone":       _stateDefault+" sorting_disabled",
-	"sSortJUIAsc":         _sortIcon+"triangle-1-n",
-	"sSortJUIDesc":        _sortIcon+"triangle-1-s",
-	"sSortJUI":            _sortIcon+"carat-2-n-s",
-	"sSortJUIAscAllowed":  _sortIcon+"carat-1-n",
-	"sSortJUIDescAllowed": _sortIcon+"carat-1-s",
-	"sSortJUIWrapper":     "DataTables_sort_wrapper",
-	"sSortIcon":           "DataTables_sort_icon",
-
-	/* Scrolling */
-	"sScrollHead": "dataTables_scrollHead "+_stateDefault,
-	"sScrollFoot": "dataTables_scrollFoot "+_stateDefault,
-
-	/* Misc */
-	"sHeaderTH":  _stateDefault,
-	"sFooterTH":  _stateDefault,
-	"sJUIHeader": _headerFooter+" ui-corner-tl ui-corner-tr",
-	"sJUIFooter": _headerFooter+" ui-corner-bl ui-corner-br"
-} );
-
-}());
-
diff --git a/js/integration/dataTables.jqueryui.js b/js/integration/dataTables.jqueryui.js
index 64d4325..b060a3e 100644
--- a/js/integration/dataTables.jqueryui.js
+++ b/js/integration/dataTables.jqueryui.js
@@ -86,7 +86,7 @@ $.extend( DataTable.ext.classes, {
 
 DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, classes ) {
 	// Calculate what the unsorted class should be
-	var noSortAppliedClass = sort_prefix+'carat-2-n-s';
+	var noSortAppliedClass = sort_prefix+'caret-2-n-s';
 	var asc = $.inArray('asc', column.asSorting) !== -1;
 	var desc = $.inArray('desc', column.asSorting) !== -1;
 
@@ -94,10 +94,10 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, clas
 		noSortAppliedClass = '';
 	}
 	else if ( asc && !desc ) {
-		noSortAppliedClass = sort_prefix+'carat-1-n';
+		noSortAppliedClass = sort_prefix+'caret-1-n';
 	}
 	else if ( !asc && desc ) {
-		noSortAppliedClass = sort_prefix+'carat-1-s';
+		noSortAppliedClass = sort_prefix+'caret-1-s';
 	}
 
 	// Setup the DOM structure
@@ -130,9 +130,9 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, clas
 			.removeClass(
 				sort_prefix+'triangle-1-n' +" "+
 				sort_prefix+'triangle-1-s' +" "+
-				sort_prefix+'carat-2-n-s' +" "+
-				sort_prefix+'carat-1-n' +" "+
-				sort_prefix+'carat-1-s'
+				sort_prefix+'caret-2-n-s' +" "+
+				sort_prefix+'caret-1-n' +" "+
+				sort_prefix+'caret-1-s'
 			)
 			.addClass( columns[ colIdx ] == 'asc' ?
 				sort_prefix+'triangle-1-n' : columns[ colIdx ] == 'desc' ?
diff --git a/js/model/model.defaults.js b/js/model/model.defaults.js
index 99d31bb..4b0b3f7 100644
--- a/js/model/model.defaults.js
+++ b/js/model/model.defaults.js
@@ -519,26 +519,6 @@ DataTable.defaults = {
 
 
 	/**
-	 * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
-	 * slightly different and additional mark-up from what DataTables has
-	 * traditionally used).
-	 *  @type boolean
-	 *  @default false
-	 *
-	 *  @dtopt Features
-	 *  @name DataTable.defaults.jQueryUI
-	 *
-	 *  @example
-	 *    $(document).ready( function() {
-	 *      $('#example').dataTable( {
-	 *        "jQueryUI": true
-	 *      } );
-	 *    } );
-	 */
-	"bJQueryUI": false,
-
-
-	/**
 	 * Allows the end user to select the size of a formatted page from a select
 	 * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).
 	 *  @type boolean
diff --git a/js/model/model.settings.js b/js/model/model.settings.js
index bb1a326..e32362f 100644
--- a/js/model/model.settings.js
+++ b/js/model/model.settings.js
@@ -749,14 +749,6 @@ DataTable.models.oSettings = {
 	"_iRecordsDisplay": 0,
 
 	/**
-	 * Flag to indicate if jQuery UI marking and classes should be used.
-	 * Note that this parameter will be set by the initialisation routine. To
-	 * set a default use {@link DataTable.defaults}.
-	 *  @type boolean
-	 */
-	"bJUI": null,
-
-	/**
 	 * The classes to use for the table
 	 *  @type object
 	 *  @default {}
diff --git a/package.json b/package.json
index 1dcdc0e..e3980dc 100644
--- a/package.json
+++ b/package.json
@@ -3,23 +3,21 @@
   "version": "1.10.12",
   "description": "DataTables source files. Please note that this package does not include the built files. Use the `datatables.net` package!",
   "scripts": {
-    "build-debug":       "cd build; ./make.sh build debug",
-    "build":             "cd build; ./make.sh build",
-
-    "test":              "./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-watch":        "./node_modules/karma/bin/karma start test/karma.conf.js",
-
-    "test-autofill":     "DT_EXTENSION='AutoFill' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-buttons":      "DT_EXTENSION='Buttons' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-colreorder":   "DT_EXTENSION='ColReorder' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-editor":       "DT_EXTENSION='Editor' ./node_modules/karma/bin/karma start test/karma.conf.js",
+    "build-debug": "cd build; ./make.sh build debug",
+    "build": "cd build; ./make.sh build",
+    "test": "./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-watch": "./node_modules/karma/bin/karma start test/karma.conf.js",
+    "test-autofill": "DT_EXTENSION='AutoFill' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-buttons": "DT_EXTENSION='Buttons' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-colreorder": "DT_EXTENSION='ColReorder' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-editor": "DT_EXTENSION='Editor' ./node_modules/karma/bin/karma start test/karma.conf.js",
     "test-fixedcolumns": "DT_EXTENSION='FixedColumns' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-fixedheader":  "DT_EXTENSION='FixedHeader' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-responsive":   "DT_EXTENSION='Responsive' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-rowgroup":     "DT_EXTENSION='RowGroup' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-rowreorder":   "DT_EXTENSION='RowReorder' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-scroller":     "DT_EXTENSION='Scroller' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
-    "test-select":       "DT_EXTENSION='Select' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run"
+    "test-fixedheader": "DT_EXTENSION='FixedHeader' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-responsive": "DT_EXTENSION='Responsive' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-rowgroup": "DT_EXTENSION='RowGroup' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-rowreorder": "DT_EXTENSION='RowReorder' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-scroller": "DT_EXTENSION='Scroller' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
+    "test-select": "DT_EXTENSION='Select' ./node_modules/karma/bin/karma start test/karma.conf.js --single-run"
   },
   "repository": {
     "type": "git",
diff --git a/test/options/Options/lengthMenu.js b/test/options/Options/lengthMenu.js
index 22692a2..e8ca93a 100644
--- a/test/options/Options/lengthMenu.js
+++ b/test/options/Options/lengthMenu.js
@@ -1,51 +1,88 @@
-describe( "LengthMenu", function() {
-	dt.libs( {
-		js:  [ 'jquery', 'datatables' ],
-		css: [ 'datatables' ]
-	} );
-	//Test the text of the menu as well.
-
-	// "aLengthMenu": [
-    //     [10, 25, 50, 100, -1],
-    //     [10, 25, 50, 100, "All"]
-    // ],
-	describe("Check the defaults", function () {
-		dt.html( 'basic' );
-		it("Check default values", function () {
-			$('#example').dataTable( );
-			expect($('#example').DataTable().settings()[0].aLengthMenu).toEqual([10, 25, 50, 100]);
-		});
-		it("Setting to default values makes no difference", function () {
-			$('#example').dataTable( {
-				"lengthMenu": [10, 25, 50, 100],
-				"destroy": "true"
-			});
-			expect($('#example').DataTable().settings()[0].aLengthMenu).toEqual([10, 25, 50, 100]);
+describe('LengthMenu', function() {
+	dt.libs({
+		js: ['jquery', 'datatables'],
+		css: ['datatables']
+	});
+
+	dt.html('basic');
+
+	it('Check default values', function() {
+		$('#example').dataTable();
+
+		var options = $('select option');
+		expect(options.eq(0).text()).toBe('10');
+		expect(options.eq(1).text()).toBe('25');
+		expect(options.eq(2).text()).toBe('50');
+		expect(options.eq(3).text()).toBe('100');
+	});
+
+	it('Setting to default values makes no difference', function() {
+		$('#example').dataTable({
+			lengthMenu: [10, 25, 50, 100],
+			destroy: true
 		});
+
+		var options = $('select option');
+		expect(options.eq(0).text()).toBe('10');
+		expect(options.eq(1).text()).toBe('25');
+		expect(options.eq(2).text()).toBe('50');
+		expect(options.eq(3).text()).toBe('100');
 	});
-	describe("Check when enabled", function () {
-		dt.html( 'basic' );
-		it("Change length Menu", function () {
-
-			$('#example').dataTable( {
-				"lengthMenu": [1,10,15]
-			});
-			expect($('#example').DataTable().settings()[0].aLengthMenu).toEqual([1,10,15]);
+
+	dt.html('basic');
+
+	it('Change length Menu', function() {
+		$('#example').dataTable({
+			lengthMenu: [1, 10, 15]
 		});
-		it("Change length Menu- Second time", function () {
 
-			$('#example').dataTable( {
-				"lengthMenu": [3,15,32],
-				"destroy": "true"
-			});
-			expect($('#example').DataTable().settings()[0].aLengthMenu).toEqual([3,15,32]);
+		var options = $('select option');
+		expect(options.eq(0).text()).toBe('1');
+		expect(options.eq(1).text()).toBe('10');
+		expect(options.eq(2).text()).toBe('15');
+
+		expect(options.get(0).value).toBe('1');
+		expect(options.get(1).value).toBe('10');
+		expect(options.get(2).value).toBe('15');
+	});
+
+	dt.html('basic');
+
+	it('Use different language strings', function() {
+		$('#example').dataTable({
+			lengthMenu: [[10, 25, 50, -1], [10, 25, 50, 'All']]
 		});
-		it("Change back to default", function () {
-			$('#example').dataTable( {
-				"destroy": "true"
-			});
-			expect($('#example').DataTable().settings()[0].aLengthMenu).toEqual([10, 25, 50, 100]);
+
+		var options = $('select option');
+		expect(options.eq(0).text()).toBe('10');
+		expect(options.eq(1).text()).toBe('25');
+		expect(options.eq(2).text()).toBe('50');
+		expect(options.eq(3).text()).toBe('All');
+
+		expect(options.get(0).value).toBe('10');
+		expect(options.get(1).value).toBe('25');
+		expect(options.get(2).value).toBe('50');
+		expect(options.get(3).value).toBe('-1');
+	});
+
+	dt.html('basic');
+
+	it('Large numbers are formatted for thousands', function() {
+		$('#example').dataTable({
+			lengthMenu: [[10, 25, 50, 10000, -1], [10, 25, 50, 10000, 'All']]
 		});
 
+		var options = $('select option');
+		expect(options.eq(0).text()).toBe('10');
+		expect(options.eq(1).text()).toBe('25');
+		expect(options.eq(2).text()).toBe('50');
+		expect(options.eq(3).text()).toBe('10,000');
+		expect(options.eq(4).text()).toBe('All');
+
+		expect(options.get(0).value).toBe('10');
+		expect(options.get(1).value).toBe('25');
+		expect(options.get(2).value).toBe('50');
+		expect(options.get(3).value).toBe('10000');
+		expect(options.get(4).value).toBe('-1');
 	});
 });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/datatables.js.git



More information about the Pkg-javascript-commits mailing list