{"size": 2517, "ext": "js", "max_stars_repo_path": "ajax/libs/yui/3.7.0pr2/datatable-message/datatable-message-min.js", "max_stars_repo_name": "algolia/cdnjs", "max_stars_repo_stars_event_min_datetime": "2015-02-20T16:11:30.000Z", "max_stars_repo_stars_event_max_datetime": "2017-05-15T11:50:44.000Z", "max_issues_repo_path": "ajax/libs/yui/3.7.0pr2/datatable-message/datatable-message-min.js", "max_issues_repo_name": "algolia/cdnjs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ajax/libs/yui/3.7.0pr2/datatable-message/datatable-message-min.js", "max_forks_repo_name": "algolia/cdnjs", "max_forks_repo_forks_event_min_datetime": "2015-07-14T16:16:05.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-10T08:15:54.000Z"}
{"max_stars_count": 5, "max_issues_count": null, "max_forks_count": 4, "avg_line_length": 2517.0, "max_line_length": 2517, "alphanum_fraction": 0.7791021057}
YUI.add("datatable-message",function(Y,NAME){var Message;Y.namespace("DataTable").Message=Message=function(){},Message.ATTRS={showMessages:{value:!0,validator:Y.Lang.isBoolean}},Y.mix(Message.prototype,{MESSAGE_TEMPLATE:'<tbody class="{className}"><tr><td class="{contentClass}" colspan="{colspan}"></td></tr></tbody>',hideMessage:function(){return this.get("boundingBox").removeClass(this.getClassName("message","visible")),this},showMessage:function(message){var content=this.getString(message)||message;return this._messageNode||this._initMessageNode(),this.get("showMessages")&&(content?(this._messageNode.one("."+this.getClassName("message","content")).setHTML(content),this.get("boundingBox").addClass(this.getClassName("message","visible"))):this.hideMessage()),this},_afterMessageColumnsChange:function(e){var contentNode;this._messageNode&&(contentNode=this._messageNode.one("."+this.getClassName("message","content")),contentNode&&contentNode.set("colSpan",this._displayColumns.length))},_afterMessageDataChange:function(e){this._uiSetMessage()},_afterShowMessagesChange:function(e){e.newVal?this._uiSetMessage(e):this._messageNode&&(this.get("boundingBox").removeClass(this.getClassName("message","visible")),this._messageNode.remove().destroy(!0),this._messageNode=null)},_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))},initializer:function(){this._initMessageStrings(),this.get("showMessages")&&this.after("renderBody",Y.bind("_initMessageNode",this)),this.after(Y.bind("_bindMessageUI",this),this,"bindUI"),this.after(Y.bind("_syncMessageUI",this),this,"syncUI")},_initMessageNode:function(){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))},_initMessageStrings:function(){this.set("strings",Y.mix(this.get("strings")||{},Y.Intl.get("datatable-message")))},_syncMessageUI:function(){this._uiSetMessage()},_uiSetMessage:function(e){this.data.size()?this.hideMessage():this.showMessage(e&&e.message||"emptyMessage")}}),Y.Lang.isFunction(Y.DataTable)&&Y.Base.mix(Y.DataTable,[Message])},"@VERSION@",{requires:["datatable-base"],lang:["en"],skinnable:!0})