1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-01 13:24:10 +01:00

Add defaults for aDataSort and sServerMethod (the two new parameters that have been introduced since the last release)

This commit is contained in:
Allan Jardine 2011-11-26 13:45:08 +00:00
parent dcf88a2609
commit cc265bcb09
3 changed files with 76 additions and 2 deletions

View File

@ -8485,6 +8485,7 @@
*/ */
"sScrollXInner": "", "sScrollXInner": "",
/** /**
* Enable vertical scrolling. Vertical scrolling will constrain the DataTable * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
* to the given height, an enable scrolling for any data which overflows the * to the given height, an enable scrolling for any data which overflows the
@ -8503,7 +8504,25 @@
* } ); * } );
* } ); * } );
*/ */
"sScrollY": "" "sScrollY": "",
/**
* Set the HTTP method that is used to make the Ajax call for server-side
* processing or Ajax sourced data.
* @type string
* @default GET
*
* @example
* $(document).ready(function() {
* $('#example').dataTable( {
* "bServerSide": true,
* "sAjaxSource": "scripts/post.php",
* "sServerMethod": "POST"
* } );
* } );
*/
"sServerMethod": "GET"
}; };

View File

@ -5,6 +5,42 @@
* @namespace * @namespace
*/ */
DataTable.models.oInitColumns = { DataTable.models.oInitColumns = {
/**
* Allows a column's sorting to take multiple columns into account when
* doing a sort. For example first name / last name columns make sense to
* do a multi-column sort over the two columns.
* @type array
* @default [] <i>Takes the value of the column index automatically</i>
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
* { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
* { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "aDataSort": [ 0, 1 ] },
* { "aDataSort": [ 1, 0 ] },
* { "aDataSort": [ 2, 3, 4 ] },
* null,
* null
* ]
* } );
* } );
*/
"aDataSort": [],
/** /**
* You can control the default sorting direction, and even alter the behaviour * You can control the default sorting direction, and even alter the behaviour
* of the sort handler (i.e. only allow ascending sorting etc) using this * of the sort handler (i.e. only allow ascending sorting etc) using this

View File

@ -1644,6 +1644,7 @@ DataTable.models.oInit = {
*/ */
"sScrollXInner": "", "sScrollXInner": "",
/** /**
* Enable vertical scrolling. Vertical scrolling will constrain the DataTable * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
* to the given height, an enable scrolling for any data which overflows the * to the given height, an enable scrolling for any data which overflows the
@ -1662,6 +1663,24 @@ DataTable.models.oInit = {
* } ); * } );
* } ); * } );
*/ */
"sScrollY": "" "sScrollY": "",
/**
* Set the HTTP method that is used to make the Ajax call for server-side
* processing or Ajax sourced data.
* @type string
* @default GET
*
* @example
* $(document).ready(function() {
* $('#example').dataTable( {
* "bServerSide": true,
* "sAjaxSource": "scripts/post.php",
* "sServerMethod": "POST"
* } );
* } );
*/
"sServerMethod": "GET"
}; };