@kie-tools.dashbuilder-client.dist.org.dashbuilder.DashbuilderRuntime.js.patternfly.dataTables.pfResize.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-dashbuilder-ui
Show all versions of quarkus-dashbuilder-ui
Dashbuilder extension Web Bundle
!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function($){return factory($,window,document)}):"object"==typeof exports?module.exports=function(root,$){return root||(root=window),$&&$.fn.dataTable||($=require("datatables.net")(root,$).$),factory($,root,root.document)}:factory(jQuery,window,document)}(function($,window,document,undefined){"use strict";function isIE(){return/(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent)}function resetTableCells(dt,actions){actions!==undefined&&0!==actions.length&&$(actions).each(function(index,el){$(el).css({height:"auto"})})}function resize(dt){var actions=$(BUTTON_ACTIONS_SELECTOR+", "+KEBAB_ACTIONS_SELECTOR,dt.table().container());resetTableCells(dt,actions),resizeInlineActions(dt,actions)}function resizeInlineActions(dt,actions){actions!==undefined&&0!==actions.length&&$(actions).each(function(index,el){var parent=$(el).parent("td");parent!==undefined&&0!==parent.length&&$(el).css({height:parent[0].clientHeight})})}var DataTable=$.fn.dataTable,BUTTON_ACTIONS_SELECTOR="td.table-view-pf-actions .table-view-pf-btn",KEBAB_ACTIONS_SELECTOR="td.table-view-pf-actions .dropdown";return DataTable.pfResize={},DataTable.pfResize.init=function(dt){var ctx=dt.settings()[0];ctx._pfResize={},isIE()&&($(window).on("resize",function(){resize(dt)}),resize(dt))},DataTable.Api.register("pfResize.resize()",function(){return this.iterator("table",function(ctx){resize(new DataTable.Api(ctx))})}),$(document).on("init.dt",function(e,ctx,json){"dt"===e.namespace&&DataTable.pfResize.init(new DataTable.Api(ctx))}),DataTable.pfResize});