10 __coverage__['build/datatable-message/datatable-message.js'] = {"path":"build/datatable-message/datatable-message.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0,0],"15":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":29},"end":{"line":1,"column":48}}},"2":{"name":"(anonymous_2)","line":28,"loc":{"start":{"line":28,"column":45},"end":{"line":28,"column":57}}},"3":{"name":"(anonymous_3)","line":66,"loc":{"start":{"line":66,"column":17},"end":{"line":66,"column":29}}},"4":{"name":"(anonymous_4)","line":84,"loc":{"start":{"line":84,"column":17},"end":{"line":84,"column":36}}},"5":{"name":"(anonymous_5)","line":120,"loc":{"start":{"line":120,"column":32},"end":{"line":120,"column":44}}},"6":{"name":"(anonymous_6)","line":143,"loc":{"start":{"line":143,"column":29},"end":{"line":143,"column":41}}},"7":{"name":"(anonymous_7)","line":156,"loc":{"start":{"line":156,"column":30},"end":{"line":156,"column":43}}},"8":{"name":"(anonymous_8)","line":176,"loc":{"start":{"line":176,"column":20},"end":{"line":176,"column":32}}},"9":{"name":"(anonymous_9)","line":194,"loc":{"start":{"line":194,"column":17},"end":{"line":194,"column":29}}},"10":{"name":"(anonymous_10)","line":213,"loc":{"start":{"line":213,"column":22},"end":{"line":213,"column":34}}},"11":{"name":"(anonymous_11)","line":233,"loc":{"start":{"line":233,"column":25},"end":{"line":233,"column":37}}},"12":{"name":"(anonymous_12)","line":256,"loc":{"start":{"line":256,"column":20},"end":{"line":256,"column":32}}},"13":{"name":"(anonymous_13)","line":275,"loc":{"start":{"line":275,"column":19},"end":{"line":275,"column":32}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":290,"column":106}},"2":{"start":{"line":12,"column":0},"end":{"line":12,"column":12}},"3":{"start":{"line":28,"column":0},"end":{"line":28,"column":60}},"4":{"start":{"line":30,"column":0},"end":{"line":45,"column":2}},"5":{"start":{"line":47,"column":0},"end":{"line":282,"column":3}},"6":{"start":{"line":67,"column":8},"end":{"line":68,"column":53}},"7":{"start":{"line":70,"column":8},"end":{"line":70,"column":20}},"8":{"start":{"line":85,"column":8},"end":{"line":85,"column":57}},"9":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":88,"column":12},"end":{"line":88,"column":36}},"11":{"start":{"line":91,"column":8},"end":{"line":104,"column":9}},"12":{"start":{"line":92,"column":12},"end":{"line":103,"column":13}},"13":{"start":{"line":93,"column":16},"end":{"line":95,"column":38}},"14":{"start":{"line":97,"column":16},"end":{"line":98,"column":60}},"15":{"start":{"line":102,"column":16},"end":{"line":102,"column":35}},"16":{"start":{"line":106,"column":8},"end":{"line":106,"column":20}},"17":{"start":{"line":121,"column":8},"end":{"line":121,"column":24}},"18":{"start":{"line":123,"column":8},"end":{"line":132,"column":9}},"19":{"start":{"line":124,"column":12},"end":{"line":125,"column":63}},"20":{"start":{"line":127,"column":12},"end":{"line":131,"column":13}},"21":{"start":{"line":130,"column":16},"end":{"line":130,"column":72}},"22":{"start":{"line":144,"column":8},"end":{"line":144,"column":29}},"23":{"start":{"line":157,"column":8},"end":{"line":165,"column":9}},"24":{"start":{"line":158,"column":12},"end":{"line":158,"column":34}},"25":{"start":{"line":159,"column":15},"end":{"line":165,"column":9}},"26":{"start":{"line":160,"column":12},"end":{"line":161,"column":57}},"27":{"start":{"line":163,"column":12},"end":{"line":163,"column":53}},"28":{"start":{"line":164,"column":12},"end":{"line":164,"column":37}},"29":{"start":{"line":177,"column":8},"end":{"line":178,"column":53}},"30":{"start":{"line":180,"column":8},"end":{"line":180,"column":80}},"31":{"start":{"line":182,"column":8},"end":{"line":183,"column":54}},"32":{"start":{"line":195,"column":8},"end":{"line":195,"column":35}},"33":{"start":{"line":197,"column":8},"end":{"line":199,"column":9}},"34":{"start":{"line":198,"column":12},"end":{"line":198,"column":77}},"35":{"start":{"line":201,"column":8},"end":{"line":201,"column":67}},"36":{"start":{"line":202,"column":8},"end":{"line":202,"column":67}},"37":{"start":{"line":214,"column":8},"end":{"line":223,"column":9}},"38":{"start":{"line":215,"column":12},"end":{"line":220,"column":20}},"39":{"start":{"line":222,"column":12},"end":{"line":222,"column":77}},"40":{"start":{"line":235,"column":8},"end":{"line":236,"column":46}},"41":{"start":{"line":257,"column":8},"end":{"line":257,"column":29}},"42":{"start":{"line":276,"column":8},"end":{"line":280,"column":9}},"43":{"start":{"line":277,"column":12},"end":{"line":277,"column":65}},"44":{"start":{"line":279,"column":12},"end":{"line":279,"column":31}},"45":{"start":{"line":285,"column":0},"end":{"line":287,"column":1}},"46":{"start":{"line":286,"column":4},"end":{"line":286,"column":41}}},"branchMap":{"1":{"line":85,"type":"binary-expr","locations":[{"start":{"line":85,"column":22},"end":{"line":85,"column":45}},{"start":{"line":85,"column":49},"end":{"line":85,"column":56}}]},"2":{"line":87,"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":87,"column":8}},{"start":{"line":87,"column":8},"end":{"line":87,"column":8}}]},"3":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":8},"end":{"line":91,"column":8}},{"start":{"line":91,"column":8},"end":{"line":91,"column":8}}]},"4":{"line":92,"type":"if","locations":[{"start":{"line":92,"column":12},"end":{"line":92,"column":12}},{"start":{"line":92,"column":12},"end":{"line":92,"column":12}}]},"5":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":8},"end":{"line":123,"column":8}},{"start":{"line":123,"column":8},"end":{"line":123,"column":8}}]},"6":{"line":127,"type":"if","locations":[{"start":{"line":127,"column":12},"end":{"line":127,"column":12}},{"start":{"line":127,"column":12},"end":{"line":127,"column":12}}]},"7":{"line":157,"type":"if","locations":[{"start":{"line":157,"column":8},"end":{"line":157,"column":8}},{"start":{"line":157,"column":8},"end":{"line":157,"column":8}}]},"8":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":15},"end":{"line":159,"column":15}},{"start":{"line":159,"column":15},"end":{"line":159,"column":15}}]},"9":{"line":197,"type":"if","locations":[{"start":{"line":197,"column":8},"end":{"line":197,"column":8}},{"start":{"line":197,"column":8},"end":{"line":197,"column":8}}]},"10":{"line":214,"type":"if","locations":[{"start":{"line":214,"column":8},"end":{"line":214,"column":8}},{"start":{"line":214,"column":8},"end":{"line":214,"column":8}}]},"11":{"line":219,"type":"binary-expr","locations":[{"start":{"line":219,"column":29},"end":{"line":219,"column":56}},{"start":{"line":219,"column":60},"end":{"line":219,"column":61}}]},"12":{"line":235,"type":"binary-expr","locations":[{"start":{"line":235,"column":35},"end":{"line":235,"column":54}},{"start":{"line":235,"column":58},"end":{"line":235,"column":60}}]},"13":{"line":276,"type":"if","locations":[{"start":{"line":276,"column":8},"end":{"line":276,"column":8}},{"start":{"line":276,"column":8},"end":{"line":276,"column":8}}]},"14":{"line":277,"type":"binary-expr","locations":[{"start":{"line":277,"column":30},"end":{"line":277,"column":31}},{"start":{"line":277,"column":35},"end":{"line":277,"column":44}},{"start":{"line":277,"column":49},"end":{"line":277,"column":63}}]},"15":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":0},"end":{"line":285,"column":0}},{"start":{"line":285,"column":0},"end":{"line":285,"column":0}}]}},"code":["(function () { YUI.add('datatable-message', function (Y, NAME) {","","/**","Adds support for a message container to appear in the table. This can be used","to indicate loading progress, lack of records, or any other communication","needed.","","@module datatable","@submodule datatable-message","@since 3.5.0","**/","var Message;","","/**","_API docs for this extension are included in the DataTable class._","","Adds support for a message container to appear in the table. This can be used","to indicate loading progress, lack of records, or any other communication","needed.","","Features added to `Y.DataTable`, and made available for custom classes at","`Y.DataTable.Message`.","","@class DataTable.Message","@for DataTable","@since 3.5.0","**/","Y.namespace('DataTable').Message = Message = function () {};","","Message.ATTRS = {"," /**"," Enables the display of messages in the table. Setting this to false will"," prevent the message Node from being created and `showMessage` from doing"," anything.",""," @attribute showMessages"," @type {Boolean}"," @default true"," @since 3.5.0"," **/"," showMessages: {"," value: true,"," validator: Y.Lang.isBoolean"," }","};","","Y.mix(Message.prototype, {"," /**"," Template used to generate the node that will be used to report messages.",""," @property MESSAGE_TEMPLATE"," @type {HTML}"," @default <tbody class=\"{className}\"><td class=\"{contentClass}\" colspan=\"{colspan}\"></td></tbody>"," @since 3.5.0"," **/"," MESSAGE_TEMPLATE: '<tbody class=\"{className}\"><tr><td class=\"{contentClass}\" colspan=\"{colspan}\"></td></tr></tbody>',",""," /**"," Hides the message node.",""," @method hideMessage"," @return {DataTable}"," @chainable"," @since 3.5.0"," **/"," hideMessage: function () {"," this.get('boundingBox').removeClass("," this.getClassName('message', 'visible'));",""," return this;"," },",""," /**"," Display the message node and set its content to `message`. If there is a"," localized `strings` entry for the value of `message`, that string will be"," used.",""," @method showMessage"," @param {String} message The message name or message itself to display"," @return {DataTable}"," @chainable"," @since 3.5.0"," **/"," showMessage: function (message) {"," var content = this.getString(message) || message;",""," if (!this._messageNode) {"," this._initMessageNode();"," }",""," if (this.get('showMessages')) {"," if (content) {"," this._messageNode.one("," '.' + this.getClassName('message', 'content'))"," .setHTML(content);",""," this.get('boundingBox').addClass("," this.getClassName('message','visible'));"," } else {"," // TODO: is this right?"," // If no message provided, remove the message node."," this.hideMessage();"," }"," }",""," return this;"," },",""," //--------------------------------------------------------------------------"," // Protected methods"," //--------------------------------------------------------------------------"," /**"," Updates the colspan of the `<td>` used to display the messages.",""," @method _afterMessageColumnsChange"," @param {EventFacade} e The columnsChange event"," @protected"," @since 3.5.0"," **/"," _afterMessageColumnsChange: function () {"," var contentNode;",""," if (this._messageNode) {"," contentNode = this._messageNode.one("," '.' + this.getClassName('message', 'content'));",""," if (contentNode) {"," // FIXME: This needs to become a class extension plus a view or"," // plugin for the table view."," contentNode.set('colSpan', this._displayColumns.length);"," }"," }"," },",""," /**"," Relays to `_uiSetMessage` to hide or show the message node.",""," @method _afterMessageDataChange"," @param {EventFacade} e The dataChange event"," @protected"," @since 3.5.0"," **/"," _afterMessageDataChange: function () {"," this._uiSetMessage();"," },",""," /**"," Removes the message node if `showMessages` is `false`, or relays to"," `_uiSetMessage` if `true`.",""," @method _afterShowMessagesChange"," @param {EventFacade} e The showMessagesChange event"," @protected"," @since 3.5.0"," **/"," _afterShowMessagesChange: function (e) {"," if (e.newVal) {"," this._uiSetMessage(e);"," } else if (this._messageNode) {"," this.get('boundingBox').removeClass("," this.getClassName('message', 'visible'));",""," this._messageNode.remove().destroy(true);"," this._messageNode = null;"," }"," },",""," /**"," Binds the events necessary to keep the message node in sync with the current"," table and configuration state.",""," @method _bindMessageUI"," @protected"," @since 3.5.0"," **/"," _bindMessageUI: function () {"," this.after(['dataChange', '*:add', '*:remove', '*:reset'],"," Y.bind('_afterMessageDataChange', this));",""," this.after('columnsChange', Y.bind('_afterMessageColumnsChange', this));",""," this.after('showMessagesChange',"," Y.bind('_afterShowMessagesChange', this));"," },",""," /**"," Merges in the message related strings and hooks into the rendering cycle to"," also render and bind the message node.",""," @method initializer"," @protected"," @since 3.5.0"," **/"," initializer: function () {"," this._initMessageStrings();",""," if (this.get('showMessages')) {"," this.after('table:renderBody', Y.bind('_initMessageNode', this));"," }",""," this.after(Y.bind('_bindMessageUI', this), this, 'bindUI');"," this.after(Y.bind('_syncMessageUI', this), this, 'syncUI');"," },",""," /**"," Creates the `_messageNode` property from the configured `MESSAGE_TEMPLATE`"," and inserts it before the `<table>`'s `<tbody>` node.",""," @method _initMessageNode"," @protected"," @since 3.5.0"," **/"," _initMessageNode: function () {"," if (!this._messageNode) {"," this._messageNode = Y.Node.create("," Y.Lang.sub(this.MESSAGE_TEMPLATE, {"," className: this.getClassName('message'),"," contentClass: this.getClassName('message', 'content'),"," colspan: this._displayColumns.length || 1"," }));",""," this._tableNode.insertBefore(this._messageNode, this._tbodyNode);"," }"," },",""," /**"," Add the messaging related strings to the `strings` map.",""," @method _initMessageStrings"," @protected"," @since 3.5.0"," **/"," _initMessageStrings: function () {"," // Not a valueFn because other class extensions will want to add to it"," this.set('strings', Y.mix((this.get('strings') || {}),"," Y.Intl.get('datatable-message')));"," },",""," /**"," Node used to display messages from `showMessage`.",""," @property _messageNode"," @type {Node}"," @value `undefined` (not initially set)"," @since 3.5.0"," **/"," //_messageNode: null,",""," /**"," Synchronizes the message UI with the table state.",""," @method _syncMessageUI"," @protected"," @since 3.5.0"," **/"," _syncMessageUI: function () {"," this._uiSetMessage();"," },",""," /**"," Calls `hideMessage` or `showMessage` as appropriate based on the presence of"," records in the `data` ModelList.",""," This is called when `data` is reset or records are added or removed. Also,"," if the `showMessages` attribute is updated. In either case, if the"," triggering event has a `message` property on the EventFacade, it will be"," passed to `showMessage` (if appropriate). If no such property is on the"," facade, the `emptyMessage` will be used (see the strings).",""," @method _uiSetMessage"," @param {EventFacade} e The columnsChange event"," @protected"," @since 3.5.0"," **/"," _uiSetMessage: function (e) {"," if (!this.data.size()) {"," this.showMessage((e && e.message) || 'emptyMessage');"," } else {"," this.hideMessage();"," }"," }","});","","","if (Y.Lang.isFunction(Y.DataTable)) {"," Y.Base.mix(Y.DataTable, [ Message ]);","}","","","}, '3.13.0', {\"requires\": [\"datatable-base\"], \"lang\": [\"en\", \"fr\", \"es\", \"hu\", \"it\"], \"skinnable\": true});","","}());"]};