blob: 3ba9549e1ebb18e701657559c7e9abae8c63533b [file] [log] [blame]
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(p){return t(p,window,document)})):"object"==typeof exports?module.exports=function(p,e){return p||(p=window),e&&e.fn.dataTable||(e=require("datatables.net")(p,e).$),t(e,0,p.document)}:t(jQuery,window,document)}((function(t,p,e,o){"use strict";var n=t.fn.dataTable;function a(p){var e=p.settings()[0];0===p.data().length?(e._pfEmpty.isEmptyState=!0,function(p){var e=p.settings()[0];e._pfEmpty.emptyState!==o&&0!==e._pfEmpty.emptyState.length&&e._pfEmpty.emptyState.removeClass("hidden"),e._pfEmpty.tbody!==o&&0!==e._pfEmpty.tbody.length&&e._pfEmpty.tbody.addClass("hidden"),e._pfEmpty.thead!==o&&0!==e._pfEmpty.thead.length&&e._pfEmpty.thead.addClass("hidden"),e._pfEmpty.toolbarActions!==o&&0!==e._pfEmpty.toolbarActions.length&&t("button",e._pfEmpty.toolbarActions).prop("disabled",!0),e._pfEmpty.toolbarActions!==o&&0!==e._pfEmpty.toolbarActions.length&&t("input",e._pfEmpty.toolbarActions).prop("disabled",!0),e._pfEmpty.toolbarResults!==o&&0!==e._pfEmpty.toolbarResults.length&&e._pfEmpty.toolbarResults.children().addClass("hidden"),e._pfEmpty.enableOnEmpty!==o&&t(e._pfEmpty.enableOnEmpty).prop("disabled",!1),e._pfEmpty.enableOnEmpty!==o&&t(e._pfEmpty.enableOnEmpty).prop("disabled",!1)}(p)):!0===e._pfEmpty.isEmptyState&&(e._pfEmpty.isEmptyState=!1,function(p){var e=p.settings()[0];e._pfEmpty.emptyState!==o&&0!==e._pfEmpty.emptyState.length&&e._pfEmpty.emptyState.addClass("hidden"),e._pfEmpty.tbody!==o&&0!==e._pfEmpty.tbody.length&&e._pfEmpty.tbody.removeClass("hidden"),e._pfEmpty.thead!==o&&0!==e._pfEmpty.thead.length&&e._pfEmpty.thead.removeClass("hidden"),e._pfEmpty.toolbarActions!==o&&0!==e._pfEmpty.toolbarActions.length&&t("button",e._pfEmpty.toolbarActions).prop("disabled",!1),e._pfEmpty.toolbarActions!==o&&0!==e._pfEmpty.toolbarActions.length&&t("input",e._pfEmpty.toolbarActions).prop("disabled",!1),e._pfEmpty.toolbarResults!==o&&0!==e._pfEmpty.toolbarResults.length&&e._pfEmpty.toolbarResults.children().removeClass("hidden")}(p))}return n.pfEmpty={},n.pfEmpty.init=function(p){var e=p.settings()[0],o=e.oInit.pfConfig?e.oInit.pfConfig:{};e._pfEmpty={},e._pfEmpty.emptyState=t(o.emptyStateSelector),e._pfEmpty.isEmptyState=!1,e._pfEmpty.tbody=t("tbody",p.table().container()),e._pfEmpty.thead=t("thead",p.table().container()),e._pfEmpty.toolbarActions=t(".toolbar-pf-actions",o.toolbarSelector),e._pfEmpty.toolbarResults=t(".toolbar-pf-results",o.toolbarSelector),p.on("draw.dt",(function(){a(p)})),a(p)},n.Api.register("pfEmpty.updateState()",(function(){return this.iterator("table",(function(t){update(new n.Api(t))}))})),t(e).on("init.dt",(function(t,p,e){"dt"===t.namespace&&n.pfEmpty.init(new n.Api(p))})),n.pfEmpty}));