patternfly-sass 3.3.3 → 3.3.4
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.js +5 -5
- data/assets/javascripts/patternfly.min.js +1 -1
- data/bower.json +2 -2
- data/lib/patternfly-sass/version.rb +2 -2
- data/spec/html/area-charts.html +50 -40
- data/spec/html/bar-charts.html +192 -131
- data/spec/html/cards.html +437 -418
- data/spec/html/donut-charts.html +165 -131
- data/spec/html/index.html +3 -0
- data/spec/html/layout-alt-fixed-inner-scroll.html +437 -418
- data/spec/html/layout-alt-fixed-with-footer-inner-scroll.html +437 -418
- data/spec/html/layout-alt-fixed-with-footer.html +437 -418
- data/spec/html/layout-alt-fixed.html +437 -418
- data/spec/html/line-charts.html +120 -86
- data/spec/html/list-view.html +128 -95
- data/spec/html/pie-charts.html +107 -78
- data/spec/html/utilization-bar-charts.html +69 -0
- data/spec/html/vertical-navigation-without-icons.html +205 -205
- data/spec/html/vertical-navigation.html +205 -205
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d73b0c3b147199751702dd6b90885253788369b
|
4
|
+
data.tar.gz: f9bcf1ffac951b86791970fd79942525dc4a8568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e35a186aec8ff5b27f7b292d3225373456db22bd6f67dc0c57e39416b8f22cc60f8d21993c6f54e59e5cc1ac785abfd05a6fdb02ed0fb3b58ec989ef5e9b75
|
7
|
+
data.tar.gz: e0ec85bebe308b6f8a989ff39615edd653b49070f5fbe0f7fd254041971d1c1cf5f3ccb3a920931b0cec2facf4cad739fad09e6f4e0ad01282d1015d6029f8cf
|
@@ -606,8 +606,8 @@
|
|
606
606
|
},
|
607
607
|
getDefaultDonutSize = function () {
|
608
608
|
return {
|
609
|
-
height: 171
|
610
|
-
width
|
609
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
610
|
+
// Don't set a width here, the default is to center horizontally in the parent container
|
611
611
|
};
|
612
612
|
},
|
613
613
|
getDefaultDonutColors = function () {
|
@@ -647,8 +647,8 @@
|
|
647
647
|
},
|
648
648
|
getDefaultPieSize = function () {
|
649
649
|
return {
|
650
|
-
height: 171
|
651
|
-
width
|
650
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
651
|
+
// Don't set a width here, default is to center horizontally in the parent container
|
652
652
|
};
|
653
653
|
},
|
654
654
|
getDefaultPieColors = function () {
|
@@ -998,7 +998,7 @@
|
|
998
998
|
|
999
999
|
// Set up an event listener for the node
|
1000
1000
|
node.children('.treegrid-node').on('click', function (e) {
|
1001
|
-
if (typeof options.callback === 'function') {
|
1001
|
+
if (options && typeof options.callback === 'function') {
|
1002
1002
|
options.callback(e);
|
1003
1003
|
}
|
1004
1004
|
|
@@ -1 +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 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 zero or more characters or ? to match a single character).</li><li>Clear the search field, then click Search to return to the 20 most recent records.</li></ul>",sSearch:""},sPaginationType:"bootstrap_input"}),$.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:-1===oSettings._iDisplayLength?0:Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength),iTotalPages:-1===oSettings._iDisplayLength?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){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]/)){var iNewStart=oSettings._iDisplayLength*(this.value-1);if(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;ien>i;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";$.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,breakpoints={tablet:768,desktop:1024},checkNavState=function(){var width=$(window).width();navElement.removeClass("hidden show-mobile-nav collapsed"),bodyContentElement.removeClass("collapsed-nav hidden-nav"),(width<breakpoints.desktop||explicitCollapse)&&(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width<breakpoints.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){enableTransitions();var inMobileState=bodyContentElement.hasClass("hidden-nav");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")?void 0:!1})},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),0>charsRemaining?$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";$.pfPaletteColors={black:"#030303",black100:"#fafafa",black200:"#ededed",black300:"#d1d1d1",black400:"#bbbbbb",black500:"#8b8d8f",black600:"#72767b",black700:"#4d5258",black800:"#393f44",black900:"#292e34",blue:"#0088ce",blue100:"#bee1f4",blue200:"#7dc3e8",blue300:"#39a5dc",blue400:"#0088ce",blue500:"#00659c",blue600:"#004368",blue700:"#002235",gold:"#f0ab00",gold100:"#fbeabc",gold200:"#f9d67a",gold300:"#f5c12e",gold400:"#f0ab00",gold500:"#b58100",gold600:"#795600",gold700:"#3d2c00",orange:"#ec7a08",orange100:"#fbdebf",orange200:"#f7bd7f",orange300:"#f39d3c",orange400:"#ec7a08",orange500:"#b35c00",orange600:"#773d00",orange700:"#3b1f00",lightBlue:"#00b9e4",lightBlue100:"#beedf9",lightBlue200:"#7cdbf3",lightBlue300:"#35caed",lightBlue400:"#00b9e4",lightBlue500:"#008bad",lightBlue600:"#005c73",lightBlue700:"#002d39",green:"#3f9c35",green100:"#cfe7cd",green200:"#9ecf99",green300:"#6ec664",green400:"#3f9c35",green500:"#2d7623",green600:"#1e4f18",green700:"#0f280d",lightGreen:"#92d400",lightGreen100:"#e4f5bc",lightGreen200:"#c8eb79",lightGreen300:"#ace12e",lightGreen400:"#92d400",lightGreen500:"#6ca100",lightGreen600:"#486b00",lightGreen700:"#253600",cyan:"#007a87",cyan100:"#bedee1",cyan200:"#7dbdc3",cyan300:"#3a9ca6",cyan400:"#007a87",cyan500:"#005c66",cyan600:"#003d44",cyan700:"#001f22",purple:"#703fec",purple100:"#c7bfff",purple200:"#a18fff",purple300:"#8461f7",purple400:"#703fec",purple500:"#582fc0",purple600:"#40199a",purple700:"#1f0066",red:"#cc0000",red100:"#cc0000",red200:"#a30000",red300:"#8b0000",red400:"#470000",red500:"#2c0000"}}(jQuery),function($){"use strict";$.fn.pfSetDonutChartTitle=function(selector,primary,secondary){var donutChartRightTitle=window.d3.select(selector).select("text.c3-chart-arcs-title");donutChartRightTitle.text(""),donutChartRightTitle.insert("tspan").text(primary).classed("donut-title-big-pf",!0).attr("dy",0).attr("x",0),donutChartRightTitle.insert("tspan").text(secondary).classed("donut-title-small-pf",!0).attr("dy",20).attr("x",0)},$.fn.pfDonutTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return'<table class="c3-tooltip"> <tr> <td><span style="background-color:'+color(d[0].id)+'"></span><strong>'+d[0].value+"</strong> "+d[0].name+"</td> <td>"+Math.round(1e3*d[0].ratio)/10+"%</td> </tr></table>"},$.fn.pfGetUtilizationDonutTooltipContentsFn=function(units){return function(d){return'<span class="donut-tooltip-pf" style="white-space: nowrap;">'+Math.round(1e3*d[0].ratio)/10+"% "+units+" "+d[0].name+"</span>"}},$.fn.pfGetBarChartTooltipContentsFn=function(categories){return function(d){var name=categories?categories[d[0].index]:d[0].index;return'<table class="c3-tooltip"> <tr> <td><strong>'+name+":</td> <td>"+d[0].value+"</td> </tr></table>"}},$.fn.pfSingleLineChartTooltipContentsFn=function(categories){return function(d){var name=categories?categories[d[0].index]:d[0].index;return'<table class="c3-tooltip"> <tr> <td><strong>'+name+":</td> <td>"+d[0].value+"</td> </tr></table>"}},$.fn.pfPieTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return $().pfDonutTooltipContents(d,defaultTitleFormat,defaultValueFormat,color)},$.fn.c3ChartDefaults=function(){var getDefaultColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.blue300,$.pfPaletteColors.green,$.pfPaletteColors.orange,$.pfPaletteColors.red]}},getDefaultBarGrid=function(){return{y:{show:!0}}},getDefaultBarTooltip=function(categories){return{contents:$().pfGetBarChartTooltipContentsFn(categories)}},getDefaultBarLegend=function(){return{show:!1}},getDefaultBarConfig=function(categories){return{color:this.getDefaultColors(),grid:this.getDefaultBarGrid(),tooltip:this.getDefaultBarTooltip(categories),legend:this.getDefaultBarLegend()}},getDefaultGroupedBarGrid=function(){return{y:{show:!0}}},getDefaultGroupedBarLegend=function(){return{show:!0,position:"bottom"}},getDefaultGroupedBarConfig=function(){return{color:this.getDefaultColors(),grid:this.getDefaultGroupedBarGrid(),legend:this.getDefaultGroupedBarLegend()}},getDefaultDonut=function(title){return{title:title,label:{show:!1},width:11}},getDefaultDonutSize=function(){return{height:171,width:171}},getDefaultDonutColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.black300]}},getDefaultDonutTooltip=function(){return{show:!1}},getDefaultDonutLegend=function(){return{show:!1}},getDefaultDonutConfig=function(title){return{donut:this.getDefaultDonut(title),size:this.getDefaultDonutSize(),legend:this.getDefaultDonutLegend(),color:this.getDefaultDonutColors(),tooltip:this.getDefaultDonutTooltip()}},getDefaultPie=function(){return{expand:!0,label:{show:!1}}},getDefaultPieSize=function(){return{height:171,width:171}},getDefaultPieColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.black300]}},getDefaultPieTooltip=function(){return{contents:$().pfPieTooltipContents}},getDefaultPieLegend=function(){return{show:!1}},getDefaultPieConfig=function(){return{pie:this.getDefaultPie(),size:this.getDefaultPieSize(),legend:this.getDefaultPieLegend(),color:this.getDefaultPieColors(),tooltip:this.getDefaultPieTooltip()}},getDefaultSparklineArea=function(){return{zerobased:!0}},getDefaultSparklineSize=function(){return{height:60}},getDefaultSparklineAxis=function(){return{x:{show:!1},y:{show:!1}}},getDefaultSparklineLegend=function(){return{show:!1}},getDefaultSparklinePoint=function(){return{r:1,focus:{expand:{r:4}}}},getDefaultSparklineTooltip=function(){return{contents:function(d){return'<span class="c3-tooltip-sparkline">'+d[0].value+" "+d[0].name+"</span>"}}},getDefaultSparklineConfig=function(){return{area:getDefaultSparklineArea(),size:getDefaultSparklineSize(),axis:getDefaultSparklineAxis(),color:getDefaultColors(),legend:getDefaultSparklineLegend(),point:getDefaultSparklinePoint(),tooltip:getDefaultSparklineTooltip()}},getDefaultLineAxis=function(){return{x:{show:!0},y:{show:!0}}},getDefaultLineGrid=function(){return{x:{show:!1},y:{show:!0}}},getDefaultLineLegend=function(){return{show:!0}},getDefaultLinePoint=function(){return{r:3,focus:{expand:{r:5}}}},getDefaultLineConfig=function(){return{axis:getDefaultLineAxis(),grid:getDefaultLineGrid(),color:getDefaultColors(),legend:getDefaultLineLegend(),point:getDefaultLinePoint()}},getDefaultSingleLineTooltip=function(){return{contents:$().pfGetBarChartTooltipContentsFn()}},getDefaultSingleLineLegend=function(){return{show:!1}},getDefaultSingleLineConfig=function(){return{axis:getDefaultLineAxis(),grid:getDefaultLineGrid(),color:getDefaultColors(),legend:getDefaultSingleLineLegend(),point:getDefaultLinePoint(),tooltip:getDefaultSingleLineTooltip()}},getDefaultAreaAxis=function(){return getDefaultLineAxis()},getDefaultAreaGrid=function(){return getDefaultLineGrid()},getDefaultAreaLegend=function(){return getDefaultLineLegend()},getDefaultAreaPoint=function(){return getDefaultLinePoint()},getDefaultAreaConfig=function(){return{axis:getDefaultAreaAxis(),grid:getDefaultAreaGrid(),color:getDefaultColors(),legend:getDefaultAreaLegend(),point:getDefaultAreaPoint()}},getDefaultSingleAreaTooltip=function(){return{contents:$().pfGetBarChartTooltipContentsFn()}},getDefaultSingleAreaLegend=function(){return getDefaultSingleLineLegend()},getDefaultSingleAreaConfig=function(){return{axis:getDefaultAreaAxis(),grid:getDefaultAreaGrid(),color:getDefaultColors(),legend:getDefaultSingleAreaLegend(),point:getDefaultAreaPoint(),tooltip:getDefaultSingleAreaTooltip()}};return{getDefaultColors:getDefaultColors,getDefaultBarGrid:getDefaultBarGrid,getDefaultBarTooltip:getDefaultBarTooltip,getDefaultBarLegend:getDefaultBarLegend,getDefaultBarConfig:getDefaultBarConfig,getDefaultGroupedBarGrid:getDefaultGroupedBarGrid,getDefaultGroupedBarLegend:getDefaultGroupedBarLegend,getDefaultGroupedBarConfig:getDefaultGroupedBarConfig,getDefaultDonut:getDefaultDonut,getDefaultDonutSize:getDefaultDonutSize,getDefaultDonutColors:getDefaultDonutColors,getDefaultDonutTooltip:getDefaultDonutTooltip,getDefaultDonutLegend:getDefaultDonutLegend,getDefaultDonutConfig:getDefaultDonutConfig,getDefaultPie:getDefaultPie,getDefaultPieSize:getDefaultPieSize,getDefaultPieColors:getDefaultPieColors,getDefaultPieTooltip:getDefaultPieTooltip,getDefaultPieLegend:getDefaultPieLegend,getDefaultPieConfig:getDefaultPieConfig,getDefaultSparklineArea:getDefaultSparklineArea,getDefaultSparklineSize:getDefaultSparklineSize,getDefaultSparklineAxis:getDefaultSparklineAxis,getDefaultSparklineLegend:getDefaultSparklineLegend,getDefaultSparklinePoint:getDefaultSparklinePoint,getDefaultSparklineTooltip:getDefaultSparklineTooltip,getDefaultSparklineConfig:getDefaultSparklineConfig,getDefaultLineAxis:getDefaultLineAxis,getDefaultLineGrid:getDefaultLineGrid,getDefaultLineLegend:getDefaultLineLegend,getDefaultLinePoint:getDefaultLinePoint,getDefaultLineConfig:getDefaultLineConfig,getDefaultSingleLineTooltip:getDefaultSingleLineTooltip,getDefaultSingleLineConfig:getDefaultSingleLineConfig,getDefaultAreaAxis:getDefaultAreaAxis,getDefaultAreaGrid:getDefaultAreaGrid,getDefaultAreaLegend:getDefaultAreaLegend,getDefaultAreaPoint:getDefaultAreaPoint,getDefaultAreaConfig:getDefaultAreaConfig,getDefaultSingleAreaTooltip:getDefaultSingleAreaTooltip,getDefaultSingleAreaConfig:getDefaultSingleAreaConfig}}}(jQuery),function($){"use strict";$.fn.initCollapseHeights=function(){var setCollapseHeights,parentElement=this;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,25>bodyHeight&&(bodyHeight=25,overflowY="auto"),parentElement.find('[data-toggle="collapse"]').each($.proxy(function(i,element){var $element,selector,$target;$element=$(element),selector=$element.attr("data-target"),selector||(selector=$element.attr("href")),$target=$(selector),$target.css({"max-height":bodyHeight+"px","overflow-y":"auto"})},parentElement)).end(),openPanel&&openPanel.length>0&&openPanel.addClass("in"),parentElement.css({"overflow-y":overflowY})},setCollapseHeights(),$(window).resize(setCollapseHeights)}}(jQuery),function($){"use strict";function getParent(rows,node){var parent=node.attr("data-parent");return"string"==typeof parent?parent=isNaN(parent)?rows.closest(parent):$(rows[parseInt(parent,10)]):void 0}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){"function"==typeof options.callback&&options.callback(e);var icon=node.find("span.expand-icon");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,breakpoints={tablet:768,desktop:1200},inMobileState=function(){return bodyContentElement.hasClass("hidden-nav")},forceResize=function(){setTimeout(function(){window.dispatchEvent&&window.dispatchEvent(new Event("resize")),$(document).fireEvent&&$(document).fireEvent("onresize")},100)},showSecondaryMenu=function(){(inMobileState()||!subDesktop)&&(navElement.addClass("secondary-visible-pf"),bodyContentElement.addClass("secondary-visible-pf")),subDesktop||forceResize()},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")})},showSecondaryMenuForItem=function(item){item.find(".nav-pf-persistent-secondary").length>0?showSecondaryMenu():(hideSecondaryMenu(),navElement.removeClass("show-mobile-nav"))},setActiveItem=function(item){$(document).find(".nav-pf-vertical > .list-group > .list-group-item").each(function(index,element){$(element).hasClass("active")&&$(element).removeClass("active")}),item.hasClass("active")||item.addClass("active")},setSecondaryActiveItem=function($parent,item){var parentItem=$(document).find('[data-target="#'+$parent.attr("id")+'"]');$parent.find(".list-group > .list-group-item").each(function(index,element){$(element).removeClass("active")}),item.addClass("active"),setActiveItem($(parentItem))},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"))},checkNavState=function(){var makeSecondaryVisible,width=$(window).width();width<breakpoints.tablet?navElement.hasClass("hidden")||(navElement.addClass("hidden"),navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),bodyContentElement.addClass("hidden-nav"),updateSecondaryCollapsedState(!1),explicitCollapse=!1):navElement.hasClass("hidden")&&(navElement.removeClass("hidden show-mobile-nav"),bodyContentElement.removeClass("hidden-nav")),width<breakpoints.desktop?(subDesktop||(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width>=breakpoints.tablet&&hideSecondaryMenu(),subDesktop=!0):(makeSecondaryVisible=subDesktop&&navElement.find(".persistent-secondary.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()},bindMenuBehavior=function(){toggleNavBarButton.on("click",function(e){enableTransitions(),inMobileState()?navElement.hasClass("show-mobile-nav")?navElement.removeClass("show-mobile-nav"):(hideSecondaryMenu(),navElement.addClass("show-mobile-nav")):navElement.hasClass("collapsed")?expandMenu():collapseMenu()})},forceHideSecondaryMenu=function(){navElement.addClass("force-hide-secondary-nav-pf"),setTimeout(function(){navElement.removeClass("force-hide-secondary-nav-pf")},500)},bindMenuItemsBehavior=function(handleSelection){$(document).on("click.pf.secondarynav.data-api",".nav-pf-vertical > .list-group > .list-group-item",function(element){var $this=$(this);showSecondaryMenuForItem($this),inMobileState()&&$this.find(".nav-pf-persistent-secondary").length>0?$this.addClass("mobile-nav-item-pf"):handleSelection&&setActiveItem($this)}),$(document).find(".nav-pf-persistent-secondary").each(function(index,element){var $e=$(element);handleSelection&&$e.on("click.pf.secondarynav.data-api",function(event){event.stopImmediatePropagation()}),$e.on("click.pf.secondarynav.data-api",".list-group > .list-group-item",function(event){updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setSecondaryActiveItem($e,$(this)),event.stopImmediatePropagation())}),$e.on("click.pf.secondarynav.data-api",'[data-toggle="collapse-secondary-nav"]',function(e){var $this=$(this);inMobileState()?(hideSecondaryMenu(),forceHideSecondaryMenu()):$this.hasClass("collapsed")?(updateSecondaryCollapsedState(!1,$this),$(window).width()<breakpoints.desktop&&forceHideSecondaryMenu()):$this.parents(".persistent-secondary.active").length>0?updateSecondaryCollapsedState(!0,$this):forceHideSecondaryMenu(),navElement.removeClass("hover-secondary-nav-pf"),handleSelection&&e.stopImmediatePropagation()})}),$(document).on("mouseover.pf.secondarynav.data-api",".persistent-secondary",function(e){inMobileState()||navElement.addClass("hover-secondary-nav-pf")}),$(document).on("mouseout.pf.secondarynav.data-api",".persistent-secondary",function(e){navElement.removeClass("hover-secondary-nav-pf")})},setTooltips=function(){$('.nav-pf-vertical [data-toggle="tooltip"]').tooltip({container:"body",delay:{show:"500",hide:"200"}}),$(".nav-pf-vertical").on("show.bs.tooltip",function(e){return $(this).hasClass("collapsed")?void 0:!1})},init=function(handleItemSelections){checkNavState(),bindMenuBehavior(),bindMenuItemsBehavior(handleItemSelections),setTooltips()};$(window).on("resize",function(){checkNavState(),enableTransitions()}),init(handleItemSelections)}}(jQuery);
|
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 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 zero or more characters or ? to match a single character).</li><li>Clear the search field, then click Search to return to the 20 most recent records.</li></ul>",sSearch:""},sPaginationType:"bootstrap_input"}),$.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:-1===oSettings._iDisplayLength?0:Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength),iTotalPages:-1===oSettings._iDisplayLength?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){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]/)){var iNewStart=oSettings._iDisplayLength*(this.value-1);if(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;ien>i;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";$.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,breakpoints={tablet:768,desktop:1024},checkNavState=function(){var width=$(window).width();navElement.removeClass("hidden show-mobile-nav collapsed"),bodyContentElement.removeClass("collapsed-nav hidden-nav"),(width<breakpoints.desktop||explicitCollapse)&&(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width<breakpoints.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){enableTransitions();var inMobileState=bodyContentElement.hasClass("hidden-nav");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")?void 0:!1})},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),0>charsRemaining?$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";$.pfPaletteColors={black:"#030303",black100:"#fafafa",black200:"#ededed",black300:"#d1d1d1",black400:"#bbbbbb",black500:"#8b8d8f",black600:"#72767b",black700:"#4d5258",black800:"#393f44",black900:"#292e34",blue:"#0088ce",blue100:"#bee1f4",blue200:"#7dc3e8",blue300:"#39a5dc",blue400:"#0088ce",blue500:"#00659c",blue600:"#004368",blue700:"#002235",gold:"#f0ab00",gold100:"#fbeabc",gold200:"#f9d67a",gold300:"#f5c12e",gold400:"#f0ab00",gold500:"#b58100",gold600:"#795600",gold700:"#3d2c00",orange:"#ec7a08",orange100:"#fbdebf",orange200:"#f7bd7f",orange300:"#f39d3c",orange400:"#ec7a08",orange500:"#b35c00",orange600:"#773d00",orange700:"#3b1f00",lightBlue:"#00b9e4",lightBlue100:"#beedf9",lightBlue200:"#7cdbf3",lightBlue300:"#35caed",lightBlue400:"#00b9e4",lightBlue500:"#008bad",lightBlue600:"#005c73",lightBlue700:"#002d39",green:"#3f9c35",green100:"#cfe7cd",green200:"#9ecf99",green300:"#6ec664",green400:"#3f9c35",green500:"#2d7623",green600:"#1e4f18",green700:"#0f280d",lightGreen:"#92d400",lightGreen100:"#e4f5bc",lightGreen200:"#c8eb79",lightGreen300:"#ace12e",lightGreen400:"#92d400",lightGreen500:"#6ca100",lightGreen600:"#486b00",lightGreen700:"#253600",cyan:"#007a87",cyan100:"#bedee1",cyan200:"#7dbdc3",cyan300:"#3a9ca6",cyan400:"#007a87",cyan500:"#005c66",cyan600:"#003d44",cyan700:"#001f22",purple:"#703fec",purple100:"#c7bfff",purple200:"#a18fff",purple300:"#8461f7",purple400:"#703fec",purple500:"#582fc0",purple600:"#40199a",purple700:"#1f0066",red:"#cc0000",red100:"#cc0000",red200:"#a30000",red300:"#8b0000",red400:"#470000",red500:"#2c0000"}}(jQuery),function($){"use strict";$.fn.pfSetDonutChartTitle=function(selector,primary,secondary){var donutChartRightTitle=window.d3.select(selector).select("text.c3-chart-arcs-title");donutChartRightTitle.text(""),donutChartRightTitle.insert("tspan").text(primary).classed("donut-title-big-pf",!0).attr("dy",0).attr("x",0),donutChartRightTitle.insert("tspan").text(secondary).classed("donut-title-small-pf",!0).attr("dy",20).attr("x",0)},$.fn.pfDonutTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return'<table class="c3-tooltip"> <tr> <td><span style="background-color:'+color(d[0].id)+'"></span><strong>'+d[0].value+"</strong> "+d[0].name+"</td> <td>"+Math.round(1e3*d[0].ratio)/10+"%</td> </tr></table>"},$.fn.pfGetUtilizationDonutTooltipContentsFn=function(units){return function(d){return'<span class="donut-tooltip-pf" style="white-space: nowrap;">'+Math.round(1e3*d[0].ratio)/10+"% "+units+" "+d[0].name+"</span>"}},$.fn.pfGetBarChartTooltipContentsFn=function(categories){return function(d){var name=categories?categories[d[0].index]:d[0].index;return'<table class="c3-tooltip"> <tr> <td><strong>'+name+":</td> <td>"+d[0].value+"</td> </tr></table>"}},$.fn.pfSingleLineChartTooltipContentsFn=function(categories){return function(d){var name=categories?categories[d[0].index]:d[0].index;return'<table class="c3-tooltip"> <tr> <td><strong>'+name+":</td> <td>"+d[0].value+"</td> </tr></table>"}},$.fn.pfPieTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return $().pfDonutTooltipContents(d,defaultTitleFormat,defaultValueFormat,color)},$.fn.c3ChartDefaults=function(){var getDefaultColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.blue300,$.pfPaletteColors.green,$.pfPaletteColors.orange,$.pfPaletteColors.red]}},getDefaultBarGrid=function(){return{y:{show:!0}}},getDefaultBarTooltip=function(categories){return{contents:$().pfGetBarChartTooltipContentsFn(categories)}},getDefaultBarLegend=function(){return{show:!1}},getDefaultBarConfig=function(categories){return{color:this.getDefaultColors(),grid:this.getDefaultBarGrid(),tooltip:this.getDefaultBarTooltip(categories),legend:this.getDefaultBarLegend()}},getDefaultGroupedBarGrid=function(){return{y:{show:!0}}},getDefaultGroupedBarLegend=function(){return{show:!0,position:"bottom"}},getDefaultGroupedBarConfig=function(){return{color:this.getDefaultColors(),grid:this.getDefaultGroupedBarGrid(),legend:this.getDefaultGroupedBarLegend()}},getDefaultDonut=function(title){return{title:title,label:{show:!1},width:11}},getDefaultDonutSize=function(){return{height:171}},getDefaultDonutColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.black300]}},getDefaultDonutTooltip=function(){return{show:!1}},getDefaultDonutLegend=function(){return{show:!1}},getDefaultDonutConfig=function(title){return{donut:this.getDefaultDonut(title),size:this.getDefaultDonutSize(),legend:this.getDefaultDonutLegend(),color:this.getDefaultDonutColors(),tooltip:this.getDefaultDonutTooltip()}},getDefaultPie=function(){return{expand:!0,label:{show:!1}}},getDefaultPieSize=function(){return{height:171}},getDefaultPieColors=function(){return{pattern:[$.pfPaletteColors.blue,$.pfPaletteColors.black300]}},getDefaultPieTooltip=function(){return{contents:$().pfPieTooltipContents}},getDefaultPieLegend=function(){return{show:!1}},getDefaultPieConfig=function(){return{pie:this.getDefaultPie(),size:this.getDefaultPieSize(),legend:this.getDefaultPieLegend(),color:this.getDefaultPieColors(),tooltip:this.getDefaultPieTooltip()}},getDefaultSparklineArea=function(){return{zerobased:!0}},getDefaultSparklineSize=function(){return{height:60}},getDefaultSparklineAxis=function(){return{x:{show:!1},y:{show:!1}}},getDefaultSparklineLegend=function(){return{show:!1}},getDefaultSparklinePoint=function(){return{r:1,focus:{expand:{r:4}}}},getDefaultSparklineTooltip=function(){return{contents:function(d){return'<span class="c3-tooltip-sparkline">'+d[0].value+" "+d[0].name+"</span>"}}},getDefaultSparklineConfig=function(){return{area:getDefaultSparklineArea(),size:getDefaultSparklineSize(),axis:getDefaultSparklineAxis(),color:getDefaultColors(),legend:getDefaultSparklineLegend(),point:getDefaultSparklinePoint(),tooltip:getDefaultSparklineTooltip()}},getDefaultLineAxis=function(){return{x:{show:!0},y:{show:!0}}},getDefaultLineGrid=function(){return{x:{show:!1},y:{show:!0}}},getDefaultLineLegend=function(){return{show:!0}},getDefaultLinePoint=function(){return{r:3,focus:{expand:{r:5}}}},getDefaultLineConfig=function(){return{axis:getDefaultLineAxis(),grid:getDefaultLineGrid(),color:getDefaultColors(),legend:getDefaultLineLegend(),point:getDefaultLinePoint()}},getDefaultSingleLineTooltip=function(){return{contents:$().pfGetBarChartTooltipContentsFn()}},getDefaultSingleLineLegend=function(){return{show:!1}},getDefaultSingleLineConfig=function(){return{axis:getDefaultLineAxis(),grid:getDefaultLineGrid(),color:getDefaultColors(),legend:getDefaultSingleLineLegend(),point:getDefaultLinePoint(),tooltip:getDefaultSingleLineTooltip()}},getDefaultAreaAxis=function(){return getDefaultLineAxis()},getDefaultAreaGrid=function(){return getDefaultLineGrid()},getDefaultAreaLegend=function(){return getDefaultLineLegend()},getDefaultAreaPoint=function(){return getDefaultLinePoint()},getDefaultAreaConfig=function(){return{axis:getDefaultAreaAxis(),grid:getDefaultAreaGrid(),color:getDefaultColors(),legend:getDefaultAreaLegend(),point:getDefaultAreaPoint()}},getDefaultSingleAreaTooltip=function(){return{contents:$().pfGetBarChartTooltipContentsFn()}},getDefaultSingleAreaLegend=function(){return getDefaultSingleLineLegend()},getDefaultSingleAreaConfig=function(){return{axis:getDefaultAreaAxis(),grid:getDefaultAreaGrid(),color:getDefaultColors(),legend:getDefaultSingleAreaLegend(),point:getDefaultAreaPoint(),tooltip:getDefaultSingleAreaTooltip()}};return{getDefaultColors:getDefaultColors,getDefaultBarGrid:getDefaultBarGrid,getDefaultBarTooltip:getDefaultBarTooltip,getDefaultBarLegend:getDefaultBarLegend,getDefaultBarConfig:getDefaultBarConfig,getDefaultGroupedBarGrid:getDefaultGroupedBarGrid,getDefaultGroupedBarLegend:getDefaultGroupedBarLegend,getDefaultGroupedBarConfig:getDefaultGroupedBarConfig,getDefaultDonut:getDefaultDonut,getDefaultDonutSize:getDefaultDonutSize,getDefaultDonutColors:getDefaultDonutColors,getDefaultDonutTooltip:getDefaultDonutTooltip,getDefaultDonutLegend:getDefaultDonutLegend,getDefaultDonutConfig:getDefaultDonutConfig,getDefaultPie:getDefaultPie,getDefaultPieSize:getDefaultPieSize,getDefaultPieColors:getDefaultPieColors,getDefaultPieTooltip:getDefaultPieTooltip,getDefaultPieLegend:getDefaultPieLegend,getDefaultPieConfig:getDefaultPieConfig,getDefaultSparklineArea:getDefaultSparklineArea,getDefaultSparklineSize:getDefaultSparklineSize,getDefaultSparklineAxis:getDefaultSparklineAxis,getDefaultSparklineLegend:getDefaultSparklineLegend,getDefaultSparklinePoint:getDefaultSparklinePoint,getDefaultSparklineTooltip:getDefaultSparklineTooltip,getDefaultSparklineConfig:getDefaultSparklineConfig,getDefaultLineAxis:getDefaultLineAxis,getDefaultLineGrid:getDefaultLineGrid,getDefaultLineLegend:getDefaultLineLegend,getDefaultLinePoint:getDefaultLinePoint,getDefaultLineConfig:getDefaultLineConfig,getDefaultSingleLineTooltip:getDefaultSingleLineTooltip,getDefaultSingleLineConfig:getDefaultSingleLineConfig,getDefaultAreaAxis:getDefaultAreaAxis,getDefaultAreaGrid:getDefaultAreaGrid,getDefaultAreaLegend:getDefaultAreaLegend,getDefaultAreaPoint:getDefaultAreaPoint,getDefaultAreaConfig:getDefaultAreaConfig,getDefaultSingleAreaTooltip:getDefaultSingleAreaTooltip,getDefaultSingleAreaConfig:getDefaultSingleAreaConfig}}}(jQuery),function($){"use strict";$.fn.initCollapseHeights=function(){var setCollapseHeights,parentElement=this;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,25>bodyHeight&&(bodyHeight=25,overflowY="auto"),parentElement.find('[data-toggle="collapse"]').each($.proxy(function(i,element){var $element,selector,$target;$element=$(element),selector=$element.attr("data-target"),selector||(selector=$element.attr("href")),$target=$(selector),$target.css({"max-height":bodyHeight+"px","overflow-y":"auto"})},parentElement)).end(),openPanel&&openPanel.length>0&&openPanel.addClass("in"),parentElement.css({"overflow-y":overflowY})},setCollapseHeights(),$(window).resize(setCollapseHeights)}}(jQuery),function($){"use strict";function getParent(rows,node){var parent=node.attr("data-parent");return"string"==typeof parent?parent=isNaN(parent)?rows.closest(parent):$(rows[parseInt(parent,10)]):void 0}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){options&&"function"==typeof options.callback&&options.callback(e);var icon=node.find("span.expand-icon");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,breakpoints={tablet:768,desktop:1200},inMobileState=function(){return bodyContentElement.hasClass("hidden-nav")},forceResize=function(){setTimeout(function(){window.dispatchEvent&&window.dispatchEvent(new Event("resize")),$(document).fireEvent&&$(document).fireEvent("onresize")},100)},showSecondaryMenu=function(){(inMobileState()||!subDesktop)&&(navElement.addClass("secondary-visible-pf"),bodyContentElement.addClass("secondary-visible-pf")),subDesktop||forceResize()},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")})},showSecondaryMenuForItem=function(item){item.find(".nav-pf-persistent-secondary").length>0?showSecondaryMenu():(hideSecondaryMenu(),navElement.removeClass("show-mobile-nav"))},setActiveItem=function(item){$(document).find(".nav-pf-vertical > .list-group > .list-group-item").each(function(index,element){$(element).hasClass("active")&&$(element).removeClass("active")}),item.hasClass("active")||item.addClass("active")},setSecondaryActiveItem=function($parent,item){var parentItem=$(document).find('[data-target="#'+$parent.attr("id")+'"]');$parent.find(".list-group > .list-group-item").each(function(index,element){$(element).removeClass("active")}),item.addClass("active"),setActiveItem($(parentItem))},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"))},checkNavState=function(){var makeSecondaryVisible,width=$(window).width();width<breakpoints.tablet?navElement.hasClass("hidden")||(navElement.addClass("hidden"),navElement.removeClass("collapsed"),bodyContentElement.removeClass("collapsed-nav"),bodyContentElement.addClass("hidden-nav"),updateSecondaryCollapsedState(!1),explicitCollapse=!1):navElement.hasClass("hidden")&&(navElement.removeClass("hidden show-mobile-nav"),bodyContentElement.removeClass("hidden-nav")),width<breakpoints.desktop?(subDesktop||(navElement.addClass("collapsed"),bodyContentElement.addClass("collapsed-nav")),width>=breakpoints.tablet&&hideSecondaryMenu(),subDesktop=!0):(makeSecondaryVisible=subDesktop&&navElement.find(".persistent-secondary.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()},bindMenuBehavior=function(){toggleNavBarButton.on("click",function(e){enableTransitions(),inMobileState()?navElement.hasClass("show-mobile-nav")?navElement.removeClass("show-mobile-nav"):(hideSecondaryMenu(),navElement.addClass("show-mobile-nav")):navElement.hasClass("collapsed")?expandMenu():collapseMenu()})},forceHideSecondaryMenu=function(){navElement.addClass("force-hide-secondary-nav-pf"),setTimeout(function(){navElement.removeClass("force-hide-secondary-nav-pf")},500)},bindMenuItemsBehavior=function(handleSelection){$(document).on("click.pf.secondarynav.data-api",".nav-pf-vertical > .list-group > .list-group-item",function(element){var $this=$(this);showSecondaryMenuForItem($this),inMobileState()&&$this.find(".nav-pf-persistent-secondary").length>0?$this.addClass("mobile-nav-item-pf"):handleSelection&&setActiveItem($this)}),$(document).find(".nav-pf-persistent-secondary").each(function(index,element){var $e=$(element);handleSelection&&$e.on("click.pf.secondarynav.data-api",function(event){event.stopImmediatePropagation()}),$e.on("click.pf.secondarynav.data-api",".list-group > .list-group-item",function(event){updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setSecondaryActiveItem($e,$(this)),event.stopImmediatePropagation())}),$e.on("click.pf.secondarynav.data-api",'[data-toggle="collapse-secondary-nav"]',function(e){var $this=$(this);inMobileState()?(hideSecondaryMenu(),forceHideSecondaryMenu()):$this.hasClass("collapsed")?(updateSecondaryCollapsedState(!1,$this),$(window).width()<breakpoints.desktop&&forceHideSecondaryMenu()):$this.parents(".persistent-secondary.active").length>0?updateSecondaryCollapsedState(!0,$this):forceHideSecondaryMenu(),navElement.removeClass("hover-secondary-nav-pf"),handleSelection&&e.stopImmediatePropagation()})}),$(document).on("mouseover.pf.secondarynav.data-api",".persistent-secondary",function(e){inMobileState()||navElement.addClass("hover-secondary-nav-pf")}),$(document).on("mouseout.pf.secondarynav.data-api",".persistent-secondary",function(e){navElement.removeClass("hover-secondary-nav-pf")})},setTooltips=function(){$('.nav-pf-vertical [data-toggle="tooltip"]').tooltip({container:"body",delay:{show:"500",hide:"200"}}),$(".nav-pf-vertical").on("show.bs.tooltip",function(e){return $(this).hasClass("collapsed")?void 0:!1})},init=function(handleItemSelections){checkNavState(),bindMenuBehavior(),bindMenuItemsBehavior(handleItemSelections),setTooltips()};$(window).on("resize",function(){checkNavState(),enableTransitions()}),init(handleItemSelections)}}(jQuery);
|
data/bower.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "patternfly-sass",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.4",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"homepage": "https://www.patternfly.org",
|
6
6
|
"authors": [
|
@@ -44,6 +44,6 @@
|
|
44
44
|
"jquery": "~2.1.4",
|
45
45
|
"matchHeight": "~0.7.0",
|
46
46
|
"eonasdan-bootstrap-datetimepicker": "~4.17.37",
|
47
|
-
"moment": "~2.11.
|
47
|
+
"moment": "~2.11.0"
|
48
48
|
}
|
49
49
|
}
|
data/spec/html/area-charts.html
CHANGED
@@ -43,50 +43,60 @@
|
|
43
43
|
These examples are included for development testing purposes. For official documentation, see <a href="https://www.patternfly.org" class="alert-link">https://www.patternfly.org</a>, <a href="http://getbootstrap.com" class="alert-link">http://getbootstrap.com</a>, and <a href="http://c3js.org/">http://c3js.org/</a>
|
44
44
|
</div>
|
45
45
|
<hr>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
46
|
+
<h2>Area Chart</h2>
|
47
|
+
<div class="row">
|
48
|
+
<div class="col-lg-6 col-sm-12">
|
49
|
+
<div id="areaChart" class="line-chart-pf"></div>
|
50
|
+
<script>
|
51
|
+
var areaChartDataColumns = [
|
52
|
+
['data1', 350, 400, 350, 0],
|
53
|
+
['data2', 140, 100, 150, 205, 145, 50],
|
54
|
+
['data3', 10, 60, 90, 10, 325, 400],
|
55
|
+
['data4', 260, 10, 305, 100, 50, 150]
|
56
|
+
];
|
57
|
+
var singleAreaChartDataColumns = [
|
58
|
+
['data2', 140, 100, 150, 205, 145, 50]
|
59
|
+
];
|
59
60
|
|
60
|
-
|
61
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
62
|
+
var areaChartConfig = c3ChartDefaults.getDefaultAreaConfig();
|
63
|
+
areaChartConfig.bindto = '#areaChart';
|
64
|
+
areaChartConfig.data = {
|
65
|
+
columns: areaChartDataColumns,
|
66
|
+
type: 'area-spline'
|
67
|
+
};
|
68
|
+
var areaChart = c3.generate(areaChartConfig);
|
69
|
+
</script>
|
61
70
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
<h2>Single Area Chart</h2>
|
74
|
+
<div class="row">
|
75
|
+
<div class="col-lg-6 col-sm-12">
|
76
|
+
<div id="singleAreaChart" class="line-chart-pf"></div>
|
77
|
+
<script>
|
78
|
+
var areaChartDataColumns = [
|
79
|
+
['data1', 350, 400, 350, 0],
|
80
|
+
['data2', 140, 100, 150, 205, 145, 50],
|
81
|
+
['data3', 10, 60, 90, 10, 325, 400],
|
82
|
+
['data4', 260, 10, 305, 100, 50, 150]
|
83
|
+
];
|
84
|
+
var singleAreaChartDataColumns = [
|
85
|
+
['data2', 140, 100, 150, 205, 145, 50]
|
86
|
+
];
|
71
87
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
88
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
89
|
+
var singleAreaChartConfig = c3ChartDefaults.getDefaultSingleAreaConfig();
|
90
|
+
singleAreaChartConfig.bindto = '#singleAreaChart';
|
91
|
+
singleAreaChartConfig.data = {
|
92
|
+
columns: singleAreaChartDataColumns,
|
93
|
+
type: 'area-spline'
|
94
|
+
};
|
95
|
+
var singleAreaChart = c3.generate(singleAreaChartConfig);
|
96
|
+
</script>
|
80
97
|
|
81
|
-
|
82
|
-
|
83
|
-
singleAreaChartConfig.bindto = '#singleAreaChart';
|
84
|
-
singleAreaChartConfig.data = {
|
85
|
-
columns: singleAreaChartDataColumns,
|
86
|
-
type: 'area-spline'
|
87
|
-
};
|
88
|
-
var singleAreaChart = c3.generate(singleAreaChartConfig);
|
89
|
-
</script>
|
98
|
+
</div>
|
99
|
+
</div>
|
90
100
|
|
91
101
|
</div><!-- /container -->
|
92
102
|
</body>
|
data/spec/html/bar-charts.html
CHANGED
@@ -43,137 +43,198 @@
|
|
43
43
|
These examples are included for development testing purposes. For official documentation, see <a href="https://www.patternfly.org" class="alert-link">https://www.patternfly.org</a>, <a href="http://getbootstrap.com" class="alert-link">http://getbootstrap.com</a>, and <a href="http://c3js.org/">http://c3js.org/</a>
|
44
44
|
</div>
|
45
45
|
<hr>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
46
|
+
<h2>Vertical Bar Chart</h2>
|
47
|
+
<div class="row">
|
48
|
+
<div class="col-lg-4 col-sm-6 col-xs-12">
|
49
|
+
<div id="verticalBarChart"></div>
|
50
|
+
<script>
|
51
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
52
|
+
|
53
|
+
var chartUrls = [
|
54
|
+
'https://www.gogole.com',
|
55
|
+
'https://www.yahoo.com',
|
56
|
+
'https://www.bing.com/',
|
57
|
+
'https://duckduckgo.com/'
|
58
|
+
];
|
59
|
+
var categories = ['Q1', 'Q2', 'Q3', 'Q4'];
|
60
|
+
var columnsData = [
|
61
|
+
['data1', 400, 360, 320, 175]
|
62
|
+
];
|
63
|
+
|
64
|
+
var verticalBarChartConfig = $().c3ChartDefaults().getDefaultBarConfig(categories);
|
65
|
+
verticalBarChartConfig.bindto = '#verticalBarChart';
|
66
|
+
verticalBarChartConfig.axis = {
|
67
|
+
x: {
|
68
|
+
categories: categories,
|
69
|
+
type: 'category'
|
70
|
+
}
|
71
|
+
};
|
72
|
+
verticalBarChartConfig.data = {
|
73
|
+
type: 'bar',
|
74
|
+
columns: columnsData,
|
75
|
+
// optional drilldown behavior
|
76
|
+
onclick: function (d, element) {
|
77
|
+
window.location = chartUrls[d.index];
|
78
|
+
}
|
79
|
+
};
|
80
|
+
var verticalBarChart = c3.generate(verticalBarChartConfig);
|
81
|
+
</script>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
<h2>Grouped Vertical Bar Chart</h2>
|
86
|
+
<div class="row">
|
87
|
+
<div class="col-lg-4 col-sm-6 col-xs-12">
|
88
|
+
<div id="groupedVerticalBarChart"></div>
|
89
|
+
<script>
|
90
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
91
|
+
|
92
|
+
var chartUrls = [
|
93
|
+
'https://www.gogole.com',
|
94
|
+
'https://www.yahoo.com',
|
95
|
+
'https://www.bing.com/',
|
96
|
+
'https://duckduckgo.com/'
|
97
|
+
];
|
98
|
+
var categories = ['Q1', 'Q2', 'Q3', 'Q4'];
|
99
|
+
var columnsData = [
|
100
|
+
['data1', 400, 360, 320, 175]
|
101
|
+
];
|
102
|
+
|
103
|
+
var groupedcCategories = ['2013', '2014', '2015'];
|
104
|
+
var groupedColumnsData = [
|
105
|
+
['Q1', 400, 250, 375],
|
106
|
+
['Q2', 355, 305, 300],
|
107
|
+
['Q3', 315, 340, 276],
|
108
|
+
['Q4', 180, 390, 190]
|
109
|
+
];
|
110
|
+
var groupedColors = {
|
111
|
+
pattern: [
|
112
|
+
$.pfPaletteColors.red,
|
113
|
+
$.pfPaletteColors.blue,
|
114
|
+
$.pfPaletteColors.orange,
|
115
|
+
$.pfPaletteColors.green
|
116
|
+
]
|
117
|
+
};
|
118
|
+
|
119
|
+
var groupedVerticalBarChartConfig = $().c3ChartDefaults().getDefaultGroupedBarConfig();
|
120
|
+
groupedVerticalBarChartConfig.bindto = '#groupedVerticalBarChart';
|
121
|
+
groupedVerticalBarChartConfig.axis = {
|
122
|
+
x: {
|
123
|
+
categories: groupedcCategories,
|
124
|
+
type: 'category'
|
125
|
+
}
|
126
|
+
};
|
127
|
+
groupedVerticalBarChartConfig.data = {
|
128
|
+
type: 'bar',
|
129
|
+
columns: groupedColumnsData,
|
130
|
+
// optional drilldown behavior
|
131
|
+
onclick: function (d, element) {
|
132
|
+
window.location = chartUrls[d.index];
|
133
|
+
}
|
134
|
+
};
|
135
|
+
groupedVerticalBarChartConfig.color = groupedColors;
|
136
|
+
var groupedVerticalBarChart = c3.generate(groupedVerticalBarChartConfig);
|
137
|
+
</script>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
<h2>Horizontal Bar Chart</h2>
|
142
|
+
<div class="row">
|
143
|
+
<div class="col-lg-4 col-sm-6 col-xs-12">
|
144
|
+
<div id="horizontalBarChart"></div>
|
145
|
+
<script>
|
146
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
147
|
+
|
148
|
+
var chartUrls = [
|
149
|
+
'https://www.gogole.com',
|
150
|
+
'https://www.yahoo.com',
|
151
|
+
'https://www.bing.com/',
|
152
|
+
'https://duckduckgo.com/'
|
153
|
+
];
|
154
|
+
var categories = ['Q1', 'Q2', 'Q3', 'Q4'];
|
155
|
+
var columnsData = [
|
156
|
+
['data1', 400, 360, 320, 175]
|
157
|
+
];
|
158
|
+
|
159
|
+
var horizontalBarChartConfig = $().c3ChartDefaults().getDefaultBarConfig(categories);
|
160
|
+
horizontalBarChartConfig.bindto = '#horizontalBarChart';
|
161
|
+
horizontalBarChartConfig.axis = {
|
162
|
+
rotated: true,
|
163
|
+
x: {
|
164
|
+
categories: categories,
|
165
|
+
type: 'category'
|
166
|
+
}
|
167
|
+
};
|
168
|
+
horizontalBarChartConfig.data = {
|
169
|
+
type: 'bar',
|
170
|
+
columns: columnsData,
|
171
|
+
// optional drilldown behavior
|
172
|
+
onclick: function (d, element) {
|
173
|
+
window.location = chartUrls[d.index];
|
174
|
+
}
|
175
|
+
};
|
176
|
+
var horizontalBarChart = c3.generate(horizontalBarChartConfig);
|
177
|
+
</script>
|
178
|
+
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
<h2>Grouped Horizontal Bar Chart</h2>
|
182
|
+
<div class="row">
|
183
|
+
<div class="col-lg-4 col-sm-6 col-xs-12">
|
184
|
+
<div id="groupedHorizontalBarChart"></div>
|
185
|
+
<script>
|
186
|
+
var c3ChartDefaults = $().c3ChartDefaults();
|
187
|
+
|
188
|
+
var chartUrls = [
|
189
|
+
'https://www.gogole.com',
|
190
|
+
'https://www.yahoo.com',
|
191
|
+
'https://www.bing.com/',
|
192
|
+
'https://duckduckgo.com/'
|
193
|
+
];
|
194
|
+
var categories = ['Q1', 'Q2', 'Q3', 'Q4'];
|
195
|
+
var columnsData = [
|
196
|
+
['data1', 400, 360, 320, 175]
|
197
|
+
];
|
198
|
+
|
199
|
+
var groupedcCategories = ['2013', '2014', '2015'];
|
200
|
+
var groupedColumnsData = [
|
201
|
+
['Q1', 400, 250, 375],
|
202
|
+
['Q2', 355, 305, 300],
|
203
|
+
['Q3', 315, 340, 276],
|
204
|
+
['Q4', 180, 390, 190]
|
205
|
+
];
|
206
|
+
var groupedColors = {
|
207
|
+
pattern: [
|
208
|
+
$.pfPaletteColors.red,
|
209
|
+
$.pfPaletteColors.blue,
|
210
|
+
$.pfPaletteColors.orange,
|
211
|
+
$.pfPaletteColors.green
|
212
|
+
]
|
213
|
+
};
|
214
|
+
|
215
|
+
var groupedHorizontalBarChartConfig = $().c3ChartDefaults().getDefaultGroupedBarConfig();
|
216
|
+
groupedHorizontalBarChartConfig.bindto = '#groupedHorizontalBarChart';
|
217
|
+
groupedHorizontalBarChartConfig.axis = {
|
218
|
+
rotated: true,
|
219
|
+
x: {
|
220
|
+
categories: groupedcCategories,
|
221
|
+
type: 'category'
|
222
|
+
}
|
223
|
+
};
|
224
|
+
groupedHorizontalBarChartConfig.data = {
|
225
|
+
type: 'bar',
|
226
|
+
columns: groupedColumnsData,
|
227
|
+
// optional drilldown behavior
|
228
|
+
onclick: function (d, element) {
|
229
|
+
window.location = chartUrls[d.index];
|
230
|
+
}
|
231
|
+
};
|
232
|
+
groupedHorizontalBarChartConfig.color = groupedColors;
|
233
|
+
var groupedHorizontalBarChart = c3.generate(groupedHorizontalBarChartConfig);
|
234
|
+
</script>
|
235
|
+
|
236
|
+
</div>
|
237
|
+
</div>
|
177
238
|
|
178
239
|
</div><!-- /container -->
|
179
240
|
</body>
|