+ <b>Auto content padding on fixed navbar & breadcrumbs</b>.
+ Navbar's content and height is often predictable and when navbar is fixed we can add appropriate padding to content area using CSS.
+
+ But when navbar is fixed and its content size and height is not predictable we may need to add the necessary padding to content area dynamically using Javascript.
+
+ It's not often needed and you can have good results using CSS3 media queries to add necessary paddings based on window size.
+*/
+(function($ , undefined) {
+
+ var navbar = $('.navbar').eq(0);
+ var navbar_container = $('.navbar-container').eq(0);
+
+ var sidebar = $('.sidebar').eq(0);
+
+ var main_container = $('.main-container').get(0);
+ return nav.clientHeight;//we don't use nav.scrollHeight here, because hover submenus are considered in calculating scrollHeight despite position=absolute!
+ }
+
+
+
+ var initiate = function(on_page_load) {
+ if( _initiated ) return;
+ if( !self.sidebar_fixed ) return;//eligible??
+ //return if we want scrollbars only on "fixed" sidebar and sidebar is not "fixed" yet!
+ var $sidebar = $(sidebar), nav_list = $sidebar.find('.nav-list').get(0);
+ $sidebar.attr('data-sidebar-hover', 'true');
+
+ sidebars.push($sidebar);
+
+ var sidebar_vars = {};
+ var old_ie = ace.vars['old_ie'];
+
+
+
+ var scroll_right = false;
+ //scroll style class
+ var hasHoverDelay = self.settings.sub_hover_delay || false;
+
+ if(hasTouch && hasHoverDelay) self.settings.sub_hover_delay = parseInt(Math.max(self.settings.sub_hover_delay, 2500));//for touch device, delay is at least 2.5sec
+
+ var $window = $(window);
+ //navbar used for adding extra offset from top when adjusting submenu
+ var $navbar = $('.navbar').eq(0);
+ var navbar_fixed = $navbar.css('position') == 'fixed';
+ The widget box reload button/event handler. You should use your own handler. An example is available at <i class="text-info">examples/widgets.html</i>.
+ <u><i class="glyphicon glyphicon-flash"></i> You don't need this. Used for demo only</u>
+*/
+
+(function($ , undefined) {
+
+ //***default action for reload in this demo
+ //you should remove this and add your own handler for each specific .widget-box
+ //when data is finished loading or processing is done you can call $box.trigger('reloaded.ace.widget')
+ $(document).on('reload.ace.widget', '.widget-box', function (ev) {
+ var $box = $(this);
+
+ //trigger the reloaded event to remove the spinner icon after 1-2 seconds
+ var type = (inner_call === true && hasFile && files[i] instanceof File) ? $.trim(files[i].type) : '';
+ var can_preview = hasFileReader && this.settings.thumbnail
+ &&
+ ( (type.length > 0 && type.match('image')) || (type.length == 0 && format == 'image') )//the second one is for older Android's default browser which gives an empty text for file.type
+ launch_help_modal(url , true);//add to history list
+ }
+ });
+ }
+
+
+ if( !help_modal.hasClass('in') ) {
+ if( document.body.lastChild != help_modal[0] ) $(document.body).append(help_modal);//move it to become the last child of body
+ help_modal.modal('show');
+
+ setBodyHeight();
+ }
+
+ help_modal.find('.modal-title').wrapInner("<span class='hidden' />").append('<i class="fa fa-spinner fa-spin blue bigger-125"></i>');
+ var content = $('.onpage-help-content');
+ content.addClass('hidden')
+
+ $(document.body).removeClass('modal-open');//modal by default hides body scrollbars, but we don't want to do so, because on modal hide, a winow resize is triggered
+
+ var parts = section_name.match(/file\:(.*?)\:(.+)/i);
+The plugin assumes that each series has a single data value, and that each
+value is a positive integer or zero. Negative numbers don't make sense for a
+pie chart, and have unpredictable results. The values do NOT need to be
+passed in as percentages; the plugin will calculate the total and per-slice
+percentages internally.
+
+* Created by Brian Medendorp
+
+* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
+
+The plugin supports these options:
+
+ series: {
+ pie: {
+ show: true/false
+ radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
+ innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
+ startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
+ tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
+ offset: {
+ top: integer value to move the pie up or down
+ left: integer value to move the pie left or right, or 'auto'
+ },
+ stroke: {
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
+ width: integer pixel width of the stroke
+ },
+ label: {
+ show: true/false, or 'auto'
+ formatter: a user-defined function that modifies the text/style of the label text
+ radius: 0-1 for percentage of fullsize, or a specified pixel length
+ background: {
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
+ opacity: 0-1
+ },
+ threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
+ },
+ combine: {
+ threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
+ label: any text value of what the combined slice should be labeled
+ }
+ highlight: {
+ opacity: 0-1
+ }
+ }
+ }
+
+More detail and specific examples can be found in the included HTML file.
+
+*/
+
+(function($) {
+
+ // Maximum redraw attempts when fitting labels within the plot
+
+ var REDRAW_ATTEMPTS = 10;
+
+ // Factor by which to shrink the pie when fitting labels within the plot
+
+ var REDRAW_SHRINK = 0.95;
+
+ function init(plot) {
+
+ var canvas = null,
+ target = null,
+ options = null,
+ maxRadius = null,
+ centerLeft = null,
+ centerTop = null,
+ processed = false,
+ ctx = null;
+
+ // interactive variables
+
+ var highlights = [];
+
+ // add hook to determine if pie plugin in enabled, and then perform necessary operations
+ // maintains backwards compatibility with < 3.8, will be removed in the future
+ if (this.$element.children('.steps-container').length === 0) {
+ this.$element.addClass('no-steps-container');
+ if (window && window.console && window.console.warn) {
+ window.console.warn('please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup');