datatable-message.js revision 40731a101f30570a8fe653d123035c7e836f92d1
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt SweeneyAdds support for a message container to appear in the table. This can be used
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeneyto indicate loading progress, lack of records, or any other communication
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt SweeneyFeatures added to `Y.DataTable`, and made available for custom classes at
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney`Y.DataTable.Message`.
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney@module datatable-message
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney@class DataTable.Sortable
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney@for DataTable
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt SweeneyY.namespace('DataTable').Message = Message = function () {};
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney Enables the display of messages in the table. Setting this to false will
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney prevent the message Node from being created and `showMessage` from doing
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @attribute showMessages
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @type {Boolean}
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @default true
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney Template used to generate the node that will be used to report messages.
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @property MESSAGE_TEMPLATE
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @type {HTML}
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @default <tbody class="{className}"><td class="{contentClass}" colspan="{colspan}"></td></tbody>
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney MESSAGE_TEMPLATE: '<tbody class="{className}"><tr><td class="{contentClass}" colspan="{colspan}"></td></tr></tbody>',
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney Hides the message node.
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @method hideMessage
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney @return {DataTable}
b0e8ba0bb1024f36f17e1c8c55f531698df8bec7Matt Sweeney hideMessage: function () {
if (!this._messageNode) {
this._initMessageNode();
if (content) {
this.hideMessage();
_afterMessageColumnsChange: function (e) {
var contentNode;
if (this._messageNode) {
if (contentNode) {
_afterMessageDataChange: function (e) {
this._uiSetMessage();
_afterShowMessagesChange: function (e) {
if (e.newVal) {
this._uiSetMessage(e);
} else if (this._messageNode) {
this._messageNode = null;
_bindMessageUI: function () {
initializer: function () {
this._initMessageStrings();
_initMessageNode: function () {
if (!this._messageNode) {
_initMessageStrings: function () {
_syncMessageUI: function () {
this._uiSetMessage();
_uiSetMessage: function (e) {
this.hideMessage();