patternfly-sass 3.13.0 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/javascripts/patternfly-functions.js +1137 -0
- data/assets/javascripts/patternfly-functions.min.js +1 -0
- data/assets/javascripts/patternfly-settings.js +506 -0
- data/assets/javascripts/patternfly-settings.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfEmpty.js +244 -0
- data/assets/javascripts/patternfly.dataTables.pfEmpty.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfFilter.js +421 -0
- data/assets/javascripts/patternfly.dataTables.pfFilter.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfResize.js +214 -0
- data/assets/javascripts/patternfly.dataTables.pfResize.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfSelect.js +281 -0
- data/assets/javascripts/patternfly.dataTables.pfSelect.min.js +1 -0
- data/assets/javascripts/patternfly.js +692 -652
- data/assets/javascripts/patternfly.min.js +2 -2
- data/assets/stylesheets/_patternfly.scss +1 -0
- data/assets/stylesheets/patternfly/_datatables.scss +17 -49
- data/assets/stylesheets/patternfly/_table-view.scss +170 -0
- data/bower.json +1 -1
- data/lib/patternfly-sass/version.rb +2 -2
- data/package.json +70 -0
- data/spec/html/about-modal.html +1 -0
- data/spec/html/accordions.html +1 -0
- data/spec/html/alerts.html +1 -0
- data/spec/html/area-charts.html +1 -0
- data/spec/html/badges.html +1 -0
- data/spec/html/bar-charts.html +1 -0
- data/spec/html/basic.html +368 -418
- data/spec/html/blank-slate.html +2 -1
- data/spec/html/bootstrap-combobox.html +1 -0
- data/spec/html/bootstrap-datepicker.html +1 -0
- data/spec/html/bootstrap-select.html +1 -0
- data/spec/html/bootstrap-switch.html +1 -0
- data/spec/html/bootstrap-touchspin.html +1 -0
- data/spec/html/bootstrap-treeview-2.html +1 -0
- data/spec/html/bootstrap-treeview.html +1 -0
- data/spec/html/breadcrumbs.html +1 -0
- data/spec/html/buttons.html +1 -0
- data/spec/html/card-view-card-variations.html +1 -0
- data/spec/html/card-view-multi-select.html +1 -0
- data/spec/html/card-view-single-select.html +1 -0
- data/spec/html/cards.html +1 -0
- data/spec/html/code.html +1 -0
- data/spec/html/dashboard.html +1 -0
- data/spec/html/dist/css/patternfly-additions.css +143 -52
- data/spec/html/dist/css/patternfly-additions.css.map +1 -1
- data/spec/html/dist/css/patternfly-additions.min.css +1 -1
- data/spec/html/dist/css/patternfly-additions.min.css.map +1 -1
- data/spec/html/dist/css/patternfly.min.css +2 -2
- data/spec/html/dist/css/patternfly.min.css.map +1 -1
- data/spec/html/donut-charts.html +1 -0
- data/spec/html/dropdowns.html +1 -0
- data/spec/html/form.html +1 -0
- data/spec/html/forms.html +1 -0
- data/spec/html/horizontal-navigation.html +1 -0
- data/spec/html/icons.html +1 -0
- data/spec/html/index.html +10 -6
- data/spec/html/infotip.html +1 -0
- data/spec/html/labels.html +1 -0
- data/spec/html/line-charts.html +1 -0
- data/spec/html/list-group.html +1 -0
- data/spec/html/list-view-compound-expansion.html +1 -0
- data/spec/html/list-view-rows.html +1 -0
- data/spec/html/list-view-simple-expansion.html +1 -0
- data/spec/html/list-view.html +1 -0
- data/spec/html/login.html +1 -0
- data/spec/html/modals.html +1 -0
- data/spec/html/navbar.html +1 -0
- data/spec/html/notification-drawer-horizontal-nav.html +1 -0
- data/spec/html/notification-drawer-vertical-nav.html +1 -0
- data/spec/html/pagination.html +1 -0
- data/spec/html/panels.html +1 -0
- data/spec/html/pie-charts.html +1 -0
- data/spec/html/popovers.html +1 -0
- data/spec/html/progress-bars.html +1 -0
- data/spec/html/search.html +1 -0
- data/spec/html/spinner.html +1 -0
- data/spec/html/tab.html +373 -420
- data/spec/html/{datatables-columns.html → table-view-columns.html} +9 -7
- data/spec/html/table-view-navbar.html +532 -0
- data/spec/html/table-view.html +422 -0
- data/spec/html/tables.html +1 -0
- data/spec/html/tabs.html +1 -0
- data/spec/html/time-picker.html +1 -0
- data/spec/html/toast.html +1 -0
- data/spec/html/toolbar.html +1 -0
- data/spec/html/tooltip.html +1 -0
- data/spec/html/typography-2.html +1 -1
- data/spec/html/typography.html +1 -0
- data/spec/html/utilization-bar-charts.html +1 -0
- data/spec/html/vertical-navigation-primary-only.html +1 -0
- data/spec/html/vertical-navigation-with-badges.html +1 -0
- data/spec/html/vertical-navigation-with-secondary.html +1 -0
- data/spec/html/vertical-navigation-with-tertiary-no-icons.html +1 -0
- data/spec/html/vertical-navigation-with-tertiary-pins.html +1 -0
- data/spec/html/wizard.html +1 -0
- metadata +22 -6
- data/spec/html/datatables.html +0 -472
@@ -0,0 +1 @@
|
|
1
|
+
!function($){"use strict";$.fn.sidebar=function(){var documentHeight=0,navbarpfHeight=0,colHeight=0;$(".navbar-pf .navbar-toggle").is(":hidden")&&(documentHeight=$(document).height(),navbarpfHeight=$(".navbar-pf").outerHeight(),colHeight=documentHeight-navbarpfHeight),$(".sidebar-pf").parent(".row").children('[class*="col-"]').css({"min-height":colHeight})},$(document).ready(function(){$(".sidebar-pf").length>0&&0===$(".datatable").length&&$.fn.sidebar()}),$(window).resize(function(){$(".sidebar-pf").length>0&&$.fn.sidebar()})}(jQuery),function($){"use strict";$.fn.popovers=function(){return this.popover(),this.filter("[data-close=true]").each(function(index,element){var $this=$(element),title=$this.attr("data-original-title")+'<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';$this.attr("data-original-title",title)}),this.on("click",function(e){var $this=$(this),$title=$this.next(".popover").find(".popover-title");$title.find(".close").parent(".popover-title").addClass("closable"),$title.find(".close").on("click",function(){$this.popover("hide")}),e.preventDefault()}),this}}(jQuery),function($){"use strict";$.fn.dataTableExt&&($.extend(!0,$.fn.dataTable.defaults,{bDestroy:!0,bAutoWidth:!1,iDisplayLength:20,sDom:"<'dataTables_header' f i r ><'table-responsive' t ><'dataTables_footer' p >",oLanguage:{sInfo:"Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> Items",sInfoFiltered:"(of <b>_MAX_</b>)",sInfoEmpty:"Showing <b>0</b> Results",sZeroRecords:"<p>Suggestions</p><ul><li>Check the javascript regular expression syntax of the search term.</li><li>Check that the correct menu option is chosen (token ID vs. user ID).</li><li>Use wildcards (* to match 0 or more characters, + to match 1 or more characters, ? to match 0 or 1 character).</li><li>Clear the search field, then click Search to return to the 20 most recent records.</li></ul>",sSearch:""},sPaginationType:"bootstrap_input",oSearch:{sSearch:"",bRegex:!0,bSmart:!1}}),$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper"}),$.fn.dataTableExt.oApi.fnPagingInfo=function(oSettings){return{iStart:oSettings._iDisplayStart,iEnd:oSettings.fnDisplayEnd(),iLength:oSettings._iDisplayLength,iTotal:oSettings.fnRecordsTotal(),iFilteredTotal:oSettings.fnRecordsDisplay(),iPage:oSettings._iDisplayLength===-1?0:Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength),iTotalPages:oSettings._iDisplayLength===-1?0:Math.ceil(oSettings.fnRecordsDisplay()/oSettings._iDisplayLength)}},$.extend($.fn.dataTableExt.oPagination,{bootstrap_input:{fnInit:function(oSettings,nPaging,fnDraw){var els,nInput,fnClickHandler=function(e){e.preventDefault(),oSettings.oApi._fnPageChange(oSettings,e.data.action)&&fnDraw(oSettings)};$(nPaging).append('<ul class="pagination"> <li class="first disabled"><span class="i fa fa-angle-double-left"></span></li> <li class="prev disabled"><span class="i fa fa-angle-left"></span></li></ul><div class="pagination-input"> <input type="text" class="paginate_input"> <span class="paginate_of">of <b>3</b></span></div><ul class="pagination"> <li class="next disabled"><span class="i fa fa-angle-right"></span></li> <li class="last disabled"><span class="i fa fa-angle-double-right"></span></li></ul>'),els=$("li",nPaging),$(els[0]).bind("click.DT",{action:"first"},fnClickHandler),$(els[1]).bind("click.DT",{action:"previous"},fnClickHandler),$(els[2]).bind("click.DT",{action:"next"},fnClickHandler),$(els[3]).bind("click.DT",{action:"last"},fnClickHandler),nInput=$("input",nPaging),$(nInput).keyup(function(e){var iNewStart;if(38===e.which||39===e.which?this.value+=1:(37===e.which||40===e.which)&&this.value>1&&(this.value-=1),""!==this.value&&this.value.match(/[0-9]/)){if(iNewStart=oSettings._iDisplayLength*(this.value-1),iNewStart>=oSettings.fnRecordsDisplay())return oSettings._iDisplayStart=(Math.ceil((oSettings.fnRecordsDisplay()-1)/oSettings._iDisplayLength)-1)*oSettings._iDisplayLength,void fnDraw(oSettings);oSettings._iDisplayStart=iNewStart,fnDraw(oSettings)}})},fnUpdate:function(oSettings,fnDraw){var i,oPaging=oSettings.oInstance.fnPagingInfo(),an=oSettings.aanFeatures.p,ien=an.length,iPages=Math.ceil(oSettings.fnRecordsDisplay()/oSettings._iDisplayLength),iCurrentPage=Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength)+1;for(i=0;i<ien;i+=1)$(".paginate_input",an[i]).val(iCurrentPage).siblings(".paginate_of").find("b").html(iPages),0===oPaging.iPage?($("li.first",an[i]).addClass("disabled"),$("li.prev",an[i]).addClass("disabled")):($("li.first",an[i]).removeClass("disabled"),$("li.prev",an[i]).removeClass("disabled")),oPaging.iPage===oPaging.iTotalPages-1||0===oPaging.iTotalPages?($("li.next",an[i]).addClass("disabled"),$("li.last",an[i]).addClass("disabled")):($("li.next",an[i]).removeClass("disabled"),$("li.last",an[i]).removeClass("disabled"))}}}))}(jQuery),function($){"use strict";void 0!==patternfly&&($.pfBreakpoints=patternfly.pfBreakpoints)}(jQuery),function($){"use strict";$.fn.navigation=function(){var navElement=$(".layout-pf-alt-fixed .nav-pf-vertical-alt"),bodyContentElement=$(".container-pf-alt-nav-pf-vertical-alt"),toggleNavBarButton=$(".navbar-toggle"),explicitCollapse=!1,checkNavState=function(){var width=$(window).width();navElement.removeClass("hidden show-mobile-nav collapsed"),bodyContentElement.removeClass("collapsed-nav hidden-nav"),(width<$.pfBreakpoints.desktop||explicitCollapse)&&(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width<$.pfBreakpoints.tablet&&(navElement.addClass("hidden"),navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),bodyContentElement.addClass("hidden-nav"))},collapseMenu=function(){navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav"),explicitCollapse=!0},enableTransitions=function(){$("html").addClass("transitions")},expandMenu=function(){navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),explicitCollapse=!1},bindMenuBehavior=function(){toggleNavBarButton.on("click",function(e){var inMobileState=bodyContentElement.hasClass("hidden-nav");enableTransitions(),inMobileState&&navElement.hasClass("show-mobile-nav")?navElement.removeClass("show-mobile-nav"):inMobileState?navElement.addClass("show-mobile-nav"):navElement.hasClass("collapsed")?expandMenu():collapseMenu()})},setTooltips=function(){$('.nav-pf-vertical-alt [data-toggle="tooltip"]').tooltip({container:"body",delay:{show:"500",hide:"200"}}),$(".nav-pf-vertical-alt").on("show.bs.tooltip",function(e){return $(this).hasClass("collapsed")})},init=function(){checkNavState(),bindMenuBehavior(),setTooltips()};$(window).on("resize",function(){checkNavState(),enableTransitions()}),init()},$(document).ready(function(){$(".nav-pf-vertical-alt").length>0&&$.fn.navigation()})}(jQuery),function($){"use strict";$.fn.countRemainingChars=function(options){var settings=$.extend({charsMaxLimit:100,charsWarnRemaining:5,blockInputAtMaxLimit:!1},options),$taFld=this,$countFld=$("#"+settings.countFld).text(settings.charsMaxLimit),charsRemainingFn=function(charsLength){var charsRemaining=settings.charsMaxLimit-charsLength;$countFld.text(charsRemaining),$countFld.toggleClass("chars-warn-remaining-pf",charsRemaining<=settings.charsWarnRemaining),charsRemaining<0?$taFld.trigger("overCharsMaxLimitEvent",$taFld.attr("id")):$taFld.trigger("underCharsMaxLimitEvent",$taFld.attr("id"))};return this.on("paste",function(event){setTimeout(function(){var maxTxt,charsLength=$taFld.val().length;settings.blockInputAtMaxLimit&&charsLength>settings.charsMaxLimit&&(maxTxt=$taFld.val(),maxTxt=maxTxt.substring(0,settings.charsMaxLimit),$taFld.val(maxTxt),charsLength=$taFld.val().length),charsRemainingFn(charsLength)},100)}),this.keyup(function(event){charsRemainingFn($taFld.val().length)}),this.keydown(function(event){var charsLength=$taFld.val().length;settings.blockInputAtMaxLimit&&charsLength>=settings.charsMaxLimit&&8!==event.keyCode&&event.preventDefault()}),this}}(jQuery),function($){"use strict";void 0!==patternfly&&($.pfPaletteColors=patternfly.pfPaletteColors)}(jQuery),function($){"use strict";void 0!==patternfly&&($.fn.pfSetDonutChartTitle=patternfly.pfSetDonutChartTitle,$.fn.pfDonutTooltipContents=patternfly.pfDonutTooltipContents,$.fn.pfGetUtilizationDonutTooltipContentsFn=patternfly.pfGetUtilizationDonutTooltipContentsFn,$.fn.pfGetBarChartTooltipContentsFn=patternfly.pfGetBarChartTooltipContentsFn,$.fn.pfSingleLineChartTooltipContentsFn=patternfly.pfSingleLineChartTooltipContentsFn,$.fn.pfPieTooltipContents=patternfly.pfPieTooltipContents,$.fn.c3ChartDefaults=patternfly.c3ChartDefaults)}(jQuery),function($){"use strict";$.fn.initCollapseHeights=function(scrollSelector){var setCollapseHeights,parentElement=this,targetScrollSelector=scrollSelector;setCollapseHeights=function(){var height,openPanel,contentHeight,bodyHeight,overflowY="hidden";height=parentElement.height(),openPanel=parentElement.find(".collapse.in"),openPanel&&openPanel.length>0&&openPanel.removeClass("in"),contentHeight=0,parentElement.children().each($.proxy(function(i,element){var $element=$(element);contentHeight+=$element.outerHeight(!0)},parentElement)).end(),bodyHeight=height-contentHeight,bodyHeight<25&&(bodyHeight=25,overflowY="auto"),openPanel&&openPanel.length>0&&openPanel.addClass("in"),setTimeout(function(){parentElement.find('[data-toggle="collapse"]').each($.proxy(function(i,element){var $element,selector,$target,scrollElement,innerHeight=0;$element=$(element),selector=$element.attr("data-target"),selector||(selector=$element.attr("href")),$target=$(selector),scrollElement=$target,targetScrollSelector&&(scrollElement=$target.find(targetScrollSelector),1===scrollElement.length?(innerHeight=0,$target.children().each($.proxy(function(j,sibling){var $sibling=$(sibling);sibling!==scrollElement[0]&&(innerHeight+=$sibling.outerHeight(!0))},$target)).end(),bodyHeight-=innerHeight):scrollElement=$target),scrollElement.css({"max-height":bodyHeight-innerHeight+"px","overflow-y":"auto"})},parentElement)).end(),parentElement.css({"overflow-y":overflowY})},100)},setCollapseHeights(),$(window).resize(setCollapseHeights)}}(jQuery),function($){"use strict";function getParent(rows,node){var parent=node.attr("data-parent");if("string"==typeof parent)return parent=isNaN(parent)?rows.closest(parent):$(rows[parseInt(parent,10)])}function renderItem(item,parent){parent&&(parent.find(".treegrid-node > span.expand-icon").toggleClass("fa-angle-right",parent.hasClass("collapsed")).toggleClass("fa-angle-down",!parent.hasClass("collapsed")),item.toggleClass("hidden",parent.hasClass("collapsed")),parent.hasClass("collapsed")&&item.addClass("collapsed"))}function reStripe(tree){tree.find("tbody > tr").removeClass("odd"),tree.find("tbody > tr:not(.hidden):odd").addClass("odd")}$.fn.treegrid=function(options){var i,rows,_this;rows=this.find("tbody > tr"),_this=this,$.each(rows,function(){var node,parent;if(node=$(this),parent=getParent(rows,node),node.children(".treegrid-node").prepend('<span class="icon expand-icon fa"/>'),node.children(".treegrid-node").on("click",function(e){var icon=node.find("span.expand-icon");options&&"function"==typeof options.callback&&options.callback(e),icon.hasClass("fa-angle-right")&&node.removeClass("collapsed"),icon.hasClass("fa-angle-down")&&node.addClass("collapsed"),$.each(rows.slice(rows.index(node)+1),function(){renderItem($(this),getParent(rows,$(this)))}),reStripe(_this)}),parent){for(i=parent.find(".treegrid-node > span.indent").length+1;i>0;i-=1)node.children(".treegrid-node").prepend('<span class="indent"/>');renderItem(node,parent)}}),reStripe(_this)}}(jQuery),function($){"use strict";$.fn.setupVerticalNavigation=function(handleItemSelections){var navElement=$(".nav-pf-vertical"),bodyContentElement=$(".container-pf-nav-pf-vertical"),toggleNavBarButton=$(".navbar-toggle"),explicitCollapse=!1,subDesktop=!1,hoverDelay=500,hideDelay=hoverDelay+200,inMobileState=function(){return bodyContentElement.hasClass("hidden-nav")},forceResize=function(delay){setTimeout(function(){window.dispatchEvent&&window.dispatchEvent(new Event("resize")),$(document).fireEvent&&$(document).fireEvent("onresize")},delay)},showSecondaryMenu=function(){!inMobileState()&&subDesktop||(navElement.addClass("secondary-visible-pf"),bodyContentElement.addClass("secondary-visible-pf")),subDesktop||forceResize(100)},hideSecondaryMenu=function(){navElement.removeClass("secondary-visible-pf"),bodyContentElement.removeClass("secondary-visible-pf"),navElement.find(".mobile-nav-item-pf").each(function(index,item){$(item).removeClass("mobile-nav-item-pf")})},setPrimaryActiveItem=function(item){$(document).find(".nav-pf-vertical > .list-group > .list-group-item.active").each(function(index,element){$(element).removeClass("active")}),item.addClass("active")},setSecondaryActiveItem=function(item,$primaryParent){$(document).find(".nav-pf-secondary-nav > .list-group > .list-group-item.active").each(function(index,element){$(element).removeClass("active")}),item.addClass("active"),setPrimaryActiveItem($primaryParent)},setTertiaryActiveItem=function(item,$secondaryParent,$primaryParent){$(document).find(".nav-pf-tertiary-nav > .list-group > .list-group-item.active").each(function(index,element){$(element).removeClass("active")}),item.addClass("active"),setSecondaryActiveItem($secondaryParent,$primaryParent)},updateSecondaryMenuDisplayAfterSelection=function(){inMobileState()?(navElement.removeClass("show-mobile-nav"),hideSecondaryMenu(),navElement.find(".mobile-nav-item-pf").each(function(index,item){$(item).removeClass("mobile-nav-item-pf")})):showSecondaryMenu()},updateSecondaryCollapsedState=function(setCollapsed,collapsedItem){setCollapsed?(collapsedItem.addClass("collapsed"),navElement.addClass("collapsed-secondary-nav-pf"),bodyContentElement.addClass("collapsed-secondary-nav-pf")):(collapsedItem?collapsedItem.removeClass("collapsed"):navElement.find('[data-toggle="collapse-secondary-nav"]').each(function(index,element){var $e=$(element);$e.removeClass("collapsed")}),navElement.removeClass("collapsed-secondary-nav-pf"),bodyContentElement.removeClass("collapsed-secondary-nav-pf"))},updateTertiaryCollapsedState=function(setCollapsed,collapsedItem){setCollapsed?(collapsedItem.addClass("collapsed"),navElement.addClass("collapsed-tertiary-nav-pf"),bodyContentElement.addClass("collapsed-tertiary-nav-pf"),updateSecondaryCollapsedState(!1)):(collapsedItem?collapsedItem.removeClass("collapsed"):navElement.find('[data-toggle="collapse-tertiary-nav"]').each(function(index,element){var $e=$(element);$e.removeClass("collapsed")}),navElement.removeClass("collapsed-tertiary-nav-pf"),bodyContentElement.removeClass("collapsed-tertiary-nav-pf"))},updateMobileMenu=function(selected,secondaryItem){$(document).find(".list-group-item.mobile-nav-item-pf").each(function(index,item){$(item).removeClass("mobile-nav-item-pf")}),$(document).find(".list-group-item.mobile-secondary-item-pf").each(function(index,item){$(item).removeClass("mobile-secondary-item-pf")}),selected?(selected.addClass("mobile-nav-item-pf"),secondaryItem?(secondaryItem.addClass("mobile-secondary-item-pf"),navElement.removeClass("show-mobile-secondary"),navElement.addClass("show-mobile-tertiary")):(navElement.addClass("show-mobile-secondary"),navElement.removeClass("show-mobile-tertiary"))):(navElement.removeClass("show-mobile-secondary"),navElement.removeClass("show-mobile-tertiary"))},checkNavState=function(){var makeSecondaryVisible,width=$(window).width();width<$.pfBreakpoints.tablet?navElement.hasClass("hidden")||(navElement.addClass("hidden"),navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),bodyContentElement.addClass("hidden-nav"),updateSecondaryCollapsedState(!1),updateTertiaryCollapsedState(!1),explicitCollapse=!1):navElement.hasClass("hidden")&&(navElement.removeClass("hidden show-mobile-nav"),bodyContentElement.removeClass("hidden-nav")),width<$.pfBreakpoints.desktop?(subDesktop||(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width>=$.pfBreakpoints.tablet&&hideSecondaryMenu(),subDesktop=!0):(makeSecondaryVisible=subDesktop&&navElement.find(".secondary-nav-item-pf.active").length>0,subDesktop=!1,makeSecondaryVisible&&showSecondaryMenu()),explicitCollapse?(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")):(navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"))},collapseMenu=function(){navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav"),subDesktop&&hideSecondaryMenu(),explicitCollapse=!0},enableTransitions=function(){$("html").addClass("transitions")},expandMenu=function(){navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),explicitCollapse=!1,subDesktop||forceResize(100)},bindMenuBehavior=function(){toggleNavBarButton.on("click",function(e){enableTransitions(),inMobileState()?navElement.hasClass("show-mobile-nav")?navElement.removeClass("show-mobile-nav"):(updateMobileMenu(),navElement.addClass("show-mobile-nav")):navElement.hasClass("collapsed")?(window.localStorage.setItem("patternfly-navigation-primary","expanded"),expandMenu()):(window.localStorage.setItem("patternfly-navigation-primary","collapsed"),collapseMenu())})},forceHideSecondaryMenu=function(){navElement.addClass("force-hide-secondary-nav-pf"),setTimeout(function(){navElement.removeClass("force-hide-secondary-nav-pf")},500)},bindMenuItemsBehavior=function(handleSelection){$(document).find(".nav-pf-vertical > .list-group > .list-group-item").each(function(index,primaryItem){var $primaryItem=$(primaryItem);$primaryItem.on("click.pf.secondarynav.data-api",function(event){var $secondaryItem,tertiaryItem,$this=$(this);$this.hasClass("secondary-nav-item-pf")?inMobileState()?updateMobileMenu($this):handleSelection&&($secondaryItem=$($primaryItem.find(".nav-pf-secondary-nav > .list-group > .list-group-item")[0]),$secondaryItem.hasClass("tertiary-nav-item-pf")?(tertiaryItem=$secondaryItem.find(".nav-pf-tertiary-nav > .list-group > .list-group-item")[0],setTertiaryActiveItem($(tertiaryItem),$secondaryItem,$primaryItem)):setSecondaryActiveItem($secondaryItem,$this),event.stopImmediatePropagation()):(hideSecondaryMenu(),inMobileState()&&(updateMobileMenu(),navElement.removeClass("show-mobile-nav")),handleSelection&&(setPrimaryActiveItem($this),event.stopImmediatePropagation()))}),$primaryItem.find(".nav-pf-secondary-nav > .list-group > .list-group-item").each(function(index,secondaryItem){var $secondaryItem=$(secondaryItem);$secondaryItem.on("click.pf.secondarynav.data-api",function(event){var tertiaryItem,$this=$(this);$this.hasClass("tertiary-nav-item-pf")?inMobileState()?(updateMobileMenu($this,$primaryItem),event.stopImmediatePropagation()):handleSelection&&(tertiaryItem=$secondaryItem.find(".nav-pf-tertiary-nav > .list-group > .list-group-item")[0],setTertiaryActiveItem($(tertiaryItem),$secondaryItem,$primaryItem),event.stopImmediatePropagation()):(inMobileState()&&(updateMobileMenu(),navElement.removeClass("show-mobile-nav")),updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setSecondaryActiveItem($secondaryItem,$primaryItem),event.stopImmediatePropagation()))}),$secondaryItem.find(".nav-pf-tertiary-nav > .list-group > .list-group-item").each(function(index,tertiaryItem){var $tertiaryItem=$(tertiaryItem);$tertiaryItem.on("click.pf.secondarynav.data-api",function(event){inMobileState()&&(updateMobileMenu(),navElement.removeClass("show-mobile-nav")),updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setTertiaryActiveItem($tertiaryItem,$secondaryItem,$primaryItem),event.stopImmediatePropagation())})})})}),$(document).find(".secondary-nav-item-pf").each(function(index,secondaryItem){var $secondaryItem=$(secondaryItem);$secondaryItem.on("click.pf.secondarynav.data-api",'[data-toggle="collapse-secondary-nav"]',function(e){var $this=$(this);inMobileState()?(updateMobileMenu(),e.stopImmediatePropagation()):$this.hasClass("collapsed")?(window.localStorage.setItem("patternfly-navigation-secondary","expanded"),window.localStorage.setItem("patternfly-navigation-tertiary","expanded"),updateSecondaryCollapsedState(!1,$this),forceHideSecondaryMenu()):(window.localStorage.setItem("patternfly-navigation-secondary","collapsed"),updateSecondaryCollapsedState(!0,$this)),navElement.removeClass("hover-secondary-nav-pf"),handleSelection&&e.stopImmediatePropagation()}),$secondaryItem.find(".tertiary-nav-item-pf").each(function(index,primaryItem){var $primaryItem=$(primaryItem);$primaryItem.on("click.pf.tertiarynav.data-api",'[data-toggle="collapse-tertiary-nav"]',function(e){var $this=$(this);inMobileState()?(updateMobileMenu($secondaryItem),e.stopImmediatePropagation()):$this.hasClass("collapsed")?(window.localStorage.setItem("patternfly-navigation-secondary","expanded"),window.localStorage.setItem("patternfly-navigation-tertiary","expanded"),updateTertiaryCollapsedState(!1,$this),forceHideSecondaryMenu()):(window.localStorage.setItem("patternfly-navigation-tertiary","collapsed"),updateTertiaryCollapsedState(!0,$this)),navElement.removeClass("hover-secondary-nav-pf"),navElement.removeClass("hover-tertiary-nav-pf"),handleSelection&&e.stopImmediatePropagation()})})}),$(document).on("mouseenter.pf.tertiarynav.data-api",".secondary-nav-item-pf",function(e){var $this=$(this);inMobileState()||(void 0!==$this[0].navUnHoverTimeout?(clearTimeout($this[0].navUnHoverTimeout),$this[0].navUnHoverTimeout=void 0):void 0===$this[0].navHoverTimeout&&($this[0].navHoverTimeout=setTimeout(function(){navElement.addClass("hover-secondary-nav-pf"),$this.addClass("is-hover"),$this[0].navHoverTimeout=void 0},hoverDelay)))}),$(document).on("mouseleave.pf.tertiarynav.data-api",".secondary-nav-item-pf",function(e){var $this=$(this);void 0!==$this[0].navHoverTimeout?(clearTimeout($this[0].navHoverTimeout),$this[0].navHoverTimeout=void 0):void 0===$this[0].navUnHoverTimeout&&($this[0].navUnHoverTimeout=setTimeout(function(){navElement.find(".secondary-nav-item-pf.is-hover").length<=1&&navElement.removeClass("hover-secondary-nav-pf"),$this.removeClass("is-hover"),$this[0].navUnHoverTimeout=void 0},hideDelay))}),$(document).on("mouseover.pf.tertiarynav.data-api",".tertiary-nav-item-pf",function(e){var $this=$(this);inMobileState()||(void 0!==$this[0].navUnHoverTimeout?(clearTimeout($this[0].navUnHoverTimeout),$this[0].navUnHoverTimeout=void 0):void 0===$this[0].navHoverTimeout&&($this[0].navHoverTimeout=setTimeout(function(){navElement.addClass("hover-tertiary-nav-pf"),$this.addClass("is-hover"),$this[0].navHoverTimeout=void 0},hoverDelay)))}),$(document).on("mouseout.pf.tertiarynav.data-api",".tertiary-nav-item-pf",function(e){var $this=$(this);void 0!==$this[0].navHoverTimeout?(clearTimeout($this[0].navHoverTimeout),$this[0].navHoverTimeout=void 0):void 0===$this[0].navUnHoverTimeout&&($this[0].navUnHoverTimeout=setTimeout(function(){navElement.find(".tertiary-nav-item-pf.is-hover").length<=1&&navElement.removeClass("hover-tertiary-nav-pf"),$this.removeClass("is-hover"),$this[0].navUnHoverTimeout=void 0},hideDelay))})},loadFromLocalStorage=function(){inMobileState()||("collapsed"===window.localStorage.getItem("patternfly-navigation-primary")&&collapseMenu(),$(".nav-pf-vertical.nav-pf-vertical-collapsible-menus").length>0&&("collapsed"===window.localStorage.getItem("patternfly-navigation-secondary")&&updateSecondaryCollapsedState(!0,$(".secondary-nav-item-pf.active [data-toggle=collapse-secondary-nav]")),"collapsed"===window.localStorage.getItem("patternfly-navigation-tertiary")&&updateTertiaryCollapsedState(!0,$(".tertiary-nav-item-pf.active [data-toggle=collapse-tertiary-nav]"))))},setTooltips=function(){var tooltipOptions={container:"body",placement:"bottom",delay:{show:"500",hide:"200"},template:'<div class="nav-pf-vertical-tooltip tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'};$('.nav-pf-vertical [data-toggle="tooltip"]').tooltip(tooltipOptions),$(".nav-pf-vertical").on("show.bs.tooltip",function(e){return $(this).hasClass("collapsed")})},init=function(handleItemSelections){navElement.addClass("hide-nav-pf"),bodyContentElement.addClass("hide-nav-pf"),checkNavState(),bindMenuBehavior(),bindMenuItemsBehavior(handleItemSelections),setTooltips(),loadFromLocalStorage(),navElement.removeClass("hide-nav-pf"),bodyContentElement.removeClass("hide-nav-pf"),forceResize(250)};$(window).on("resize",function(){checkNavState(),enableTransitions()}),init(handleItemSelections)}}(jQuery);
|
@@ -0,0 +1,506 @@
|
|
1
|
+
(function (window) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var patternfly = {
|
5
|
+
version: "3.13.0"
|
6
|
+
};
|
7
|
+
|
8
|
+
// Util: PatternFly Palette colors
|
9
|
+
patternfly.pfPaletteColors = {
|
10
|
+
black: '#030303',
|
11
|
+
black100: '#fafafa',
|
12
|
+
black200: '#ededed',
|
13
|
+
black300: '#d1d1d1',
|
14
|
+
black400: '#bbbbbb',
|
15
|
+
black500: '#8b8d8f',
|
16
|
+
black600: '#72767b',
|
17
|
+
black700: '#4d5258',
|
18
|
+
black800: '#393f44',
|
19
|
+
black900: '#292e34',
|
20
|
+
blue: '#0088ce',
|
21
|
+
blue100: '#bee1f4',
|
22
|
+
blue200: '#7dc3e8',
|
23
|
+
blue300: '#39a5dc',
|
24
|
+
blue400: '#0088ce',
|
25
|
+
blue500: '#00659c',
|
26
|
+
blue600: '#004368',
|
27
|
+
blue700: '#002235',
|
28
|
+
gold: '#f0ab00',
|
29
|
+
gold100: '#fbeabc',
|
30
|
+
gold200: '#f9d67a',
|
31
|
+
gold300: '#f5c12e',
|
32
|
+
gold400: '#f0ab00',
|
33
|
+
gold500: '#b58100',
|
34
|
+
gold600: '#795600',
|
35
|
+
gold700: '#3d2c00',
|
36
|
+
orange: '#ec7a08',
|
37
|
+
orange100: '#fbdebf',
|
38
|
+
orange200: '#f7bd7f',
|
39
|
+
orange300: '#f39d3c',
|
40
|
+
orange400: '#ec7a08',
|
41
|
+
orange500: '#b35c00',
|
42
|
+
orange600: '#773d00',
|
43
|
+
orange700: '#3b1f00',
|
44
|
+
lightBlue: '#00b9e4',
|
45
|
+
lightBlue100: '#beedf9',
|
46
|
+
lightBlue200: '#7cdbf3',
|
47
|
+
lightBlue300: '#35caed',
|
48
|
+
lightBlue400: '#00b9e4',
|
49
|
+
lightBlue500: '#008bad',
|
50
|
+
lightBlue600: '#005c73',
|
51
|
+
lightBlue700: '#002d39',
|
52
|
+
green: '#3f9c35',
|
53
|
+
green100: '#cfe7cd',
|
54
|
+
green200: '#9ecf99',
|
55
|
+
green300: '#6ec664',
|
56
|
+
green400: '#3f9c35',
|
57
|
+
green500: '#2d7623',
|
58
|
+
green600: '#1e4f18',
|
59
|
+
green700: '#0f280d',
|
60
|
+
lightGreen: '#92d400',
|
61
|
+
lightGreen100: '#e4f5bc',
|
62
|
+
lightGreen200: '#c8eb79',
|
63
|
+
lightGreen300: '#ace12e',
|
64
|
+
lightGreen400: '#92d400',
|
65
|
+
lightGreen500: '#6ca100',
|
66
|
+
lightGreen600: '#486b00',
|
67
|
+
lightGreen700: '#253600',
|
68
|
+
cyan: '#007a87',
|
69
|
+
cyan100: '#bedee1',
|
70
|
+
cyan200: '#7dbdc3',
|
71
|
+
cyan300: '#3a9ca6',
|
72
|
+
cyan400: '#007a87',
|
73
|
+
cyan500: '#005c66',
|
74
|
+
cyan600: '#003d44',
|
75
|
+
cyan700: '#001f22',
|
76
|
+
purple: '#703fec',
|
77
|
+
purple100: '#c7bfff',
|
78
|
+
purple200: '#a18fff',
|
79
|
+
purple300: '#8461f7',
|
80
|
+
purple400: '#703fec',
|
81
|
+
purple500: '#582fc0',
|
82
|
+
purple600: '#40199a',
|
83
|
+
purple700: '#1f0066',
|
84
|
+
red: '#cc0000',
|
85
|
+
red100: '#cc0000',
|
86
|
+
red200: '#a30000',
|
87
|
+
red300: '#8b0000',
|
88
|
+
red400: '#470000',
|
89
|
+
red500: '#2c0000'
|
90
|
+
};
|
91
|
+
|
92
|
+
// Util: PatternFly C3 Chart Defaults
|
93
|
+
patternfly.pfSetDonutChartTitle = function (selector, primary, secondary) {
|
94
|
+
var donutChartRightTitle = window.d3.select(selector).select('text.c3-chart-arcs-title');
|
95
|
+
donutChartRightTitle.text("");
|
96
|
+
donutChartRightTitle.insert('tspan').text(primary).classed('donut-title-big-pf', true).attr('dy', 0).attr('x', 0);
|
97
|
+
donutChartRightTitle.insert('tspan').text(secondary).classed('donut-title-small-pf', true).attr('dy', 20).attr('x', 0);
|
98
|
+
};
|
99
|
+
|
100
|
+
patternfly.pfDonutTooltipContents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
101
|
+
return '<table class="c3-tooltip">' +
|
102
|
+
' <tr>' +
|
103
|
+
' <td><span style="background-color:' + color(d[0].id) + '"></span>' + '<strong>' + d[0].value + '</strong> ' + d[0].name + '</td>' +
|
104
|
+
' <td>' + (Math.round(d[0].ratio * 1000) / 10) + '%</td>' +
|
105
|
+
' </tr>' +
|
106
|
+
'</table>';
|
107
|
+
};
|
108
|
+
|
109
|
+
patternfly.pfGetUtilizationDonutTooltipContentsFn = function (units) {
|
110
|
+
return function (d) {
|
111
|
+
return '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
|
112
|
+
(Math.round(d[0].ratio * 1000) / 10) + '%' + ' ' + units + ' ' + d[0].name +
|
113
|
+
'</span>';
|
114
|
+
};
|
115
|
+
};
|
116
|
+
|
117
|
+
patternfly.pfGetBarChartTooltipContentsFn = function (categories) {
|
118
|
+
return function (d) {
|
119
|
+
var name = categories ? categories[d[0].index] : d[0].index;
|
120
|
+
return '<table class="c3-tooltip">' +
|
121
|
+
' <tr>' +
|
122
|
+
' <td><strong>' + name + ':</td>' +
|
123
|
+
' <td>' + d[0].value + '</td>' +
|
124
|
+
' </tr>' +
|
125
|
+
'</table>';
|
126
|
+
};
|
127
|
+
};
|
128
|
+
|
129
|
+
patternfly.pfSingleLineChartTooltipContentsFn = function (categories) {
|
130
|
+
return function (d) {
|
131
|
+
var name = categories ? categories[d[0].index] : d[0].index;
|
132
|
+
return '<table class="c3-tooltip">' +
|
133
|
+
' <tr>' +
|
134
|
+
' <td><strong>' + name + ':</td>' +
|
135
|
+
' <td>' + d[0].value + '</td>' +
|
136
|
+
' </tr>' +
|
137
|
+
'</table>';
|
138
|
+
};
|
139
|
+
};
|
140
|
+
|
141
|
+
patternfly.pfPieTooltipContents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
142
|
+
return patternfly.pfDonutTooltipContents(d, defaultTitleFormat, defaultValueFormat, color);
|
143
|
+
};
|
144
|
+
|
145
|
+
patternfly.c3ChartDefaults = function () {
|
146
|
+
var
|
147
|
+
getDefaultColors = function () {
|
148
|
+
return {
|
149
|
+
pattern: [
|
150
|
+
patternfly.pfPaletteColors.blue,
|
151
|
+
patternfly.pfPaletteColors.blue300,
|
152
|
+
patternfly.pfPaletteColors.green,
|
153
|
+
patternfly.pfPaletteColors.orange,
|
154
|
+
patternfly.pfPaletteColors.red
|
155
|
+
]
|
156
|
+
};
|
157
|
+
},
|
158
|
+
getDefaultBarGrid = function () {
|
159
|
+
return {
|
160
|
+
y: {
|
161
|
+
show: true
|
162
|
+
}
|
163
|
+
};
|
164
|
+
},
|
165
|
+
getDefaultBarTooltip = function (categories) {
|
166
|
+
return {
|
167
|
+
contents: patternfly.pfGetBarChartTooltipContentsFn(categories)
|
168
|
+
};
|
169
|
+
},
|
170
|
+
getDefaultBarLegend = function () {
|
171
|
+
return {
|
172
|
+
show: false
|
173
|
+
};
|
174
|
+
},
|
175
|
+
getDefaultBarConfig = function (categories) {
|
176
|
+
return {
|
177
|
+
color: this.getDefaultColors(),
|
178
|
+
grid: this.getDefaultBarGrid(),
|
179
|
+
tooltip: this.getDefaultBarTooltip(categories),
|
180
|
+
legend: this.getDefaultBarLegend()
|
181
|
+
};
|
182
|
+
},
|
183
|
+
getDefaultGroupedBarGrid = function () {
|
184
|
+
return {
|
185
|
+
y: {
|
186
|
+
show: true
|
187
|
+
}
|
188
|
+
};
|
189
|
+
},
|
190
|
+
getDefaultGroupedBarLegend = function () {
|
191
|
+
return {
|
192
|
+
show: true,
|
193
|
+
position: 'bottom'
|
194
|
+
};
|
195
|
+
},
|
196
|
+
getDefaultGroupedBarConfig = function () {
|
197
|
+
return {
|
198
|
+
color: this.getDefaultColors(),
|
199
|
+
grid: this.getDefaultGroupedBarGrid(),
|
200
|
+
legend: this.getDefaultGroupedBarLegend()
|
201
|
+
};
|
202
|
+
},
|
203
|
+
getDefaultDonut = function (title) {
|
204
|
+
return {
|
205
|
+
title: title,
|
206
|
+
label: {
|
207
|
+
show: false
|
208
|
+
},
|
209
|
+
width: 11
|
210
|
+
};
|
211
|
+
},
|
212
|
+
getDefaultDonutSize = function () {
|
213
|
+
return {
|
214
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
215
|
+
// Don't set a width here, the default is to center horizontally in the parent container
|
216
|
+
};
|
217
|
+
},
|
218
|
+
getDefaultDonutColors = function () {
|
219
|
+
return {
|
220
|
+
pattern: [
|
221
|
+
patternfly.pfPaletteColors.blue,
|
222
|
+
patternfly.pfPaletteColors.black300
|
223
|
+
]
|
224
|
+
};
|
225
|
+
},
|
226
|
+
getDefaultDonutTooltip = function () {
|
227
|
+
return {
|
228
|
+
show: false
|
229
|
+
};
|
230
|
+
},
|
231
|
+
getDefaultDonutLegend = function () {
|
232
|
+
return {
|
233
|
+
show: false
|
234
|
+
};
|
235
|
+
},
|
236
|
+
getDefaultDonutConfig = function (title) {
|
237
|
+
return {
|
238
|
+
donut: this.getDefaultDonut(title),
|
239
|
+
size: this.getDefaultDonutSize(),
|
240
|
+
legend: this.getDefaultDonutLegend(),
|
241
|
+
color: this.getDefaultDonutColors(),
|
242
|
+
tooltip: this.getDefaultDonutTooltip()
|
243
|
+
};
|
244
|
+
},
|
245
|
+
getDefaultPie = function () {
|
246
|
+
return {
|
247
|
+
expand: true,
|
248
|
+
label: {
|
249
|
+
show: false
|
250
|
+
}
|
251
|
+
};
|
252
|
+
},
|
253
|
+
getDefaultPieSize = function () {
|
254
|
+
return {
|
255
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
256
|
+
// Don't set a width here, default is to center horizontally in the parent container
|
257
|
+
};
|
258
|
+
},
|
259
|
+
getDefaultPieColors = function () {
|
260
|
+
return {
|
261
|
+
pattern: [
|
262
|
+
patternfly.pfPaletteColors.blue,
|
263
|
+
patternfly.pfPaletteColors.black300
|
264
|
+
]
|
265
|
+
};
|
266
|
+
},
|
267
|
+
getDefaultPieTooltip = function () {
|
268
|
+
return {
|
269
|
+
contents: $().pfPieTooltipContents
|
270
|
+
};
|
271
|
+
},
|
272
|
+
getDefaultPieLegend = function () {
|
273
|
+
return {
|
274
|
+
show: false
|
275
|
+
};
|
276
|
+
},
|
277
|
+
getDefaultPieConfig = function () {
|
278
|
+
return {
|
279
|
+
pie: this.getDefaultPie(),
|
280
|
+
size: this.getDefaultPieSize(),
|
281
|
+
legend: this.getDefaultPieLegend(),
|
282
|
+
color: this.getDefaultPieColors(),
|
283
|
+
tooltip: this.getDefaultPieTooltip()
|
284
|
+
};
|
285
|
+
},
|
286
|
+
getDefaultSparklineArea = function () {
|
287
|
+
return {
|
288
|
+
zerobased: true
|
289
|
+
};
|
290
|
+
},
|
291
|
+
getDefaultSparklineSize = function () {
|
292
|
+
return {
|
293
|
+
height: 60
|
294
|
+
};
|
295
|
+
},
|
296
|
+
getDefaultSparklineAxis = function () {
|
297
|
+
return {
|
298
|
+
x: {
|
299
|
+
show: false
|
300
|
+
},
|
301
|
+
y: {
|
302
|
+
show: false
|
303
|
+
}
|
304
|
+
};
|
305
|
+
},
|
306
|
+
getDefaultSparklineLegend = function () {
|
307
|
+
return {
|
308
|
+
show: false
|
309
|
+
};
|
310
|
+
},
|
311
|
+
getDefaultSparklinePoint = function () {
|
312
|
+
return {
|
313
|
+
r: 1,
|
314
|
+
focus: {
|
315
|
+
expand: {
|
316
|
+
r: 4
|
317
|
+
}
|
318
|
+
}
|
319
|
+
};
|
320
|
+
},
|
321
|
+
getDefaultSparklineTooltip = function () {
|
322
|
+
return {
|
323
|
+
// because a sparkline should only contain a single data column,
|
324
|
+
// the tooltip will only work for a single data column
|
325
|
+
contents: function (d) {
|
326
|
+
return '<span class="c3-tooltip-sparkline">' + d[0].value + ' ' + d[0].name + '</span>';
|
327
|
+
}
|
328
|
+
};
|
329
|
+
},
|
330
|
+
getDefaultSparklineConfig = function () {
|
331
|
+
return {
|
332
|
+
area: getDefaultSparklineArea(),
|
333
|
+
size: getDefaultSparklineSize(),
|
334
|
+
axis: getDefaultSparklineAxis(),
|
335
|
+
color: getDefaultColors(),
|
336
|
+
legend: getDefaultSparklineLegend(),
|
337
|
+
point: getDefaultSparklinePoint(),
|
338
|
+
tooltip: getDefaultSparklineTooltip()
|
339
|
+
};
|
340
|
+
},
|
341
|
+
getDefaultLineAxis = function () {
|
342
|
+
return {
|
343
|
+
x: {
|
344
|
+
show: true
|
345
|
+
},
|
346
|
+
y: {
|
347
|
+
show: true
|
348
|
+
}
|
349
|
+
};
|
350
|
+
},
|
351
|
+
getDefaultLineGrid = function () {
|
352
|
+
return {
|
353
|
+
x: {
|
354
|
+
show: false
|
355
|
+
},
|
356
|
+
y: {
|
357
|
+
show: true
|
358
|
+
}
|
359
|
+
};
|
360
|
+
},
|
361
|
+
getDefaultLineLegend = function () {
|
362
|
+
return {
|
363
|
+
show: true
|
364
|
+
};
|
365
|
+
},
|
366
|
+
getDefaultLinePoint = function () {
|
367
|
+
return {
|
368
|
+
r: 3,
|
369
|
+
focus: {
|
370
|
+
expand: {
|
371
|
+
r: 5
|
372
|
+
}
|
373
|
+
}
|
374
|
+
};
|
375
|
+
},
|
376
|
+
getDefaultLineConfig = function () {
|
377
|
+
return {
|
378
|
+
axis: getDefaultLineAxis(),
|
379
|
+
grid: getDefaultLineGrid(),
|
380
|
+
color: getDefaultColors(),
|
381
|
+
legend: getDefaultLineLegend(),
|
382
|
+
point: getDefaultLinePoint()
|
383
|
+
};
|
384
|
+
},
|
385
|
+
getDefaultSingleLineTooltip = function () {
|
386
|
+
return {
|
387
|
+
contents: $().pfGetBarChartTooltipContentsFn()
|
388
|
+
};
|
389
|
+
},
|
390
|
+
getDefaultSingleLineLegend = function () {
|
391
|
+
return {
|
392
|
+
show: false
|
393
|
+
};
|
394
|
+
},
|
395
|
+
getDefaultSingleLineConfig = function () {
|
396
|
+
return {
|
397
|
+
axis: getDefaultLineAxis(),
|
398
|
+
grid: getDefaultLineGrid(),
|
399
|
+
color: getDefaultColors(),
|
400
|
+
legend: getDefaultSingleLineLegend(),
|
401
|
+
point: getDefaultLinePoint(),
|
402
|
+
tooltip: getDefaultSingleLineTooltip()
|
403
|
+
};
|
404
|
+
},
|
405
|
+
getDefaultAreaAxis = function () {
|
406
|
+
return getDefaultLineAxis();
|
407
|
+
},
|
408
|
+
getDefaultAreaGrid = function () {
|
409
|
+
return getDefaultLineGrid();
|
410
|
+
},
|
411
|
+
getDefaultAreaLegend = function () {
|
412
|
+
return getDefaultLineLegend();
|
413
|
+
},
|
414
|
+
getDefaultAreaPoint = function () {
|
415
|
+
return getDefaultLinePoint();
|
416
|
+
},
|
417
|
+
getDefaultAreaConfig = function () {
|
418
|
+
return {
|
419
|
+
axis: getDefaultAreaAxis(),
|
420
|
+
grid: getDefaultAreaGrid(),
|
421
|
+
color: getDefaultColors(),
|
422
|
+
legend: getDefaultAreaLegend(),
|
423
|
+
point: getDefaultAreaPoint()
|
424
|
+
};
|
425
|
+
},
|
426
|
+
getDefaultSingleAreaTooltip = function () {
|
427
|
+
return {
|
428
|
+
contents: $().pfGetBarChartTooltipContentsFn()
|
429
|
+
};
|
430
|
+
},
|
431
|
+
getDefaultSingleAreaLegend = function () {
|
432
|
+
return getDefaultSingleLineLegend();
|
433
|
+
},
|
434
|
+
getDefaultSingleAreaConfig = function () {
|
435
|
+
return {
|
436
|
+
axis: getDefaultAreaAxis(),
|
437
|
+
grid: getDefaultAreaGrid(),
|
438
|
+
color: getDefaultColors(),
|
439
|
+
legend: getDefaultSingleAreaLegend(),
|
440
|
+
point: getDefaultAreaPoint(),
|
441
|
+
tooltip: getDefaultSingleAreaTooltip()
|
442
|
+
};
|
443
|
+
};
|
444
|
+
return {
|
445
|
+
getDefaultColors: getDefaultColors,
|
446
|
+
getDefaultBarGrid: getDefaultBarGrid,
|
447
|
+
getDefaultBarTooltip: getDefaultBarTooltip,
|
448
|
+
getDefaultBarLegend: getDefaultBarLegend,
|
449
|
+
getDefaultBarConfig: getDefaultBarConfig,
|
450
|
+
getDefaultGroupedBarGrid: getDefaultGroupedBarGrid,
|
451
|
+
getDefaultGroupedBarLegend: getDefaultGroupedBarLegend,
|
452
|
+
getDefaultGroupedBarConfig: getDefaultGroupedBarConfig,
|
453
|
+
getDefaultDonut: getDefaultDonut,
|
454
|
+
getDefaultDonutSize: getDefaultDonutSize,
|
455
|
+
getDefaultDonutColors: getDefaultDonutColors,
|
456
|
+
getDefaultDonutTooltip: getDefaultDonutTooltip,
|
457
|
+
getDefaultDonutLegend: getDefaultDonutLegend,
|
458
|
+
getDefaultDonutConfig: getDefaultDonutConfig,
|
459
|
+
getDefaultPie: getDefaultPie,
|
460
|
+
getDefaultPieSize: getDefaultPieSize,
|
461
|
+
getDefaultPieColors: getDefaultPieColors,
|
462
|
+
getDefaultPieTooltip: getDefaultPieTooltip,
|
463
|
+
getDefaultPieLegend: getDefaultPieLegend,
|
464
|
+
getDefaultPieConfig: getDefaultPieConfig,
|
465
|
+
getDefaultSparklineArea: getDefaultSparklineArea,
|
466
|
+
getDefaultSparklineSize: getDefaultSparklineSize,
|
467
|
+
getDefaultSparklineAxis: getDefaultSparklineAxis,
|
468
|
+
getDefaultSparklineLegend: getDefaultSparklineLegend,
|
469
|
+
getDefaultSparklinePoint: getDefaultSparklinePoint,
|
470
|
+
getDefaultSparklineTooltip: getDefaultSparklineTooltip,
|
471
|
+
getDefaultSparklineConfig: getDefaultSparklineConfig,
|
472
|
+
getDefaultLineAxis: getDefaultLineAxis,
|
473
|
+
getDefaultLineGrid: getDefaultLineGrid,
|
474
|
+
getDefaultLineLegend: getDefaultLineLegend,
|
475
|
+
getDefaultLinePoint: getDefaultLinePoint,
|
476
|
+
getDefaultLineConfig: getDefaultLineConfig,
|
477
|
+
getDefaultSingleLineTooltip: getDefaultSingleLineTooltip,
|
478
|
+
getDefaultSingleLineConfig: getDefaultSingleLineConfig,
|
479
|
+
getDefaultAreaAxis: getDefaultAreaAxis,
|
480
|
+
getDefaultAreaGrid: getDefaultAreaGrid,
|
481
|
+
getDefaultAreaLegend: getDefaultAreaLegend,
|
482
|
+
getDefaultAreaPoint: getDefaultAreaPoint,
|
483
|
+
getDefaultAreaConfig: getDefaultAreaConfig,
|
484
|
+
getDefaultSingleAreaTooltip: getDefaultSingleAreaTooltip,
|
485
|
+
getDefaultSingleAreaConfig: getDefaultSingleAreaConfig
|
486
|
+
};
|
487
|
+
};
|
488
|
+
|
489
|
+
// definition of breakpoint sizes for tablet and desktop modes
|
490
|
+
patternfly.pfBreakpoints = {
|
491
|
+
'tablet': 768,
|
492
|
+
'desktop': 1200
|
493
|
+
};
|
494
|
+
|
495
|
+
if (typeof define === 'function' && define.amd) {
|
496
|
+
define("patternfly", function () {
|
497
|
+
return patternfly;
|
498
|
+
});
|
499
|
+
} else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
|
500
|
+
module.exports = patternfly;
|
501
|
+
} else {
|
502
|
+
window.patternfly = patternfly;
|
503
|
+
}
|
504
|
+
|
505
|
+
})(window);
|
506
|
+
|