From 478d7f4de64e61c044c779acdb99178b8a9295df Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 15 Dec 2011 12:45:42 +0000 Subject: [PATCH] Column model should just use nulls where the defaults will override it --- media/js/jquery.dataTables.js | 27 +++++++++------------------ media/src/model/model.column.js | 27 +++++++++------------------ 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index f349db22..248f2967 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -7128,9 +7128,8 @@ * columns to be sorted on (typically it will be a single integer pointing * at itself, but that doesn't need to be the case). * @type array - * @default [] */ - "aDataSort": [], + "aDataSort": null, /** * Define the sorting directions that are applied to the column, in sequence @@ -7139,24 +7138,21 @@ * Sort it again (click again) and it will move on to the next index. * Repeat until loop. * @type array - * @default ['asc', 'desc'] */ - "asSorting": ['asc', 'desc'], + "asSorting": null, /** * Flag to indicate if the column is searchable, and thus should be included * in the filtering or not. * @type boolean - * @default true */ - "bSearchable": true, + "bSearchable": null, /** * Flag to indicate if the column is sortable or not. * @type boolean - * @default true */ - "bSortable": true, + "bSortable": null, /** * When using fnRender, you have two options for what to do with the data, @@ -7168,17 +7164,15 @@ * use of the 'type' that it gives, allowing (potentially) different data to * be used for sorting, filtering, display and type detection. * @type boolean - * @default true * @deprecated */ - "bUseRendered": true, + "bUseRendered": null, /** * Flag to indicate if the column is currently visible in the table or not * @type boolean - * @default true */ - "bVisible": true, + "bVisible": null, /** * Flag to indicate to the type detection method if the automatic type @@ -7289,9 +7283,8 @@ * a "work around" we provide this option. It will append its value to the * text that is found to be the longest string for the column - i.e. padding. * @type string - * @default Empty string */ - "sContentPadding": "", + "sContentPadding": null, /** * Allows a default value to be given for a column's data, and will be used @@ -7306,9 +7299,8 @@ * Name for the column, allowing reference to the column by name as well as * by index (needs a lookup to work by name). * @type string - * @default Empty string */ - "sName": '', + "sName": null, /** * Custom sorting data type - defines which of the available plug-ins in @@ -7336,9 +7328,8 @@ /** * Title of the column - what is seen in the TH element (nTh). * @type string - * @default Empty string - automatically detected */ - "sTitle": '', + "sTitle": null, /** * Column sorting and filtering type diff --git a/media/src/model/model.column.js b/media/src/model/model.column.js index ccc61ce4..9f076c36 100644 --- a/media/src/model/model.column.js +++ b/media/src/model/model.column.js @@ -21,9 +21,8 @@ DataTable.models.oColumn = { * columns to be sorted on (typically it will be a single integer pointing * at itself, but that doesn't need to be the case). * @type array - * @default [] */ - "aDataSort": [], + "aDataSort": null, /** * Define the sorting directions that are applied to the column, in sequence @@ -32,24 +31,21 @@ DataTable.models.oColumn = { * Sort it again (click again) and it will move on to the next index. * Repeat until loop. * @type array - * @default ['asc', 'desc'] */ - "asSorting": ['asc', 'desc'], + "asSorting": null, /** * Flag to indicate if the column is searchable, and thus should be included * in the filtering or not. * @type boolean - * @default true */ - "bSearchable": true, + "bSearchable": null, /** * Flag to indicate if the column is sortable or not. * @type boolean - * @default true */ - "bSortable": true, + "bSortable": null, /** * When using fnRender, you have two options for what to do with the data, @@ -61,17 +57,15 @@ DataTable.models.oColumn = { * use of the 'type' that it gives, allowing (potentially) different data to * be used for sorting, filtering, display and type detection. * @type boolean - * @default true * @deprecated */ - "bUseRendered": true, + "bUseRendered": null, /** * Flag to indicate if the column is currently visible in the table or not * @type boolean - * @default true */ - "bVisible": true, + "bVisible": null, /** * Flag to indicate to the type detection method if the automatic type @@ -182,9 +176,8 @@ DataTable.models.oColumn = { * a "work around" we provide this option. It will append its value to the * text that is found to be the longest string for the column - i.e. padding. * @type string - * @default Empty string */ - "sContentPadding": "", + "sContentPadding": null, /** * Allows a default value to be given for a column's data, and will be used @@ -199,9 +192,8 @@ DataTable.models.oColumn = { * Name for the column, allowing reference to the column by name as well as * by index (needs a lookup to work by name). * @type string - * @default Empty string */ - "sName": '', + "sName": null, /** * Custom sorting data type - defines which of the available plug-ins in @@ -229,9 +221,8 @@ DataTable.models.oColumn = { /** * Title of the column - what is seen in the TH element (nTh). * @type string - * @default Empty string - automatically detected */ - "sTitle": '', + "sTitle": null, /** * Column sorting and filtering type