/* global FusionPageBuilderViewManager, fusionAllElements, FusionEvents, FusionApp */ var FusionPageBuilder = FusionPageBuilder || {}; ( function() { FusionPageBuilder.Navigator = Backbone.Model.extend( { defaults: { // see _getNavItemObject() function for this object format. navigatorItems: null, // An object with the views that are collapsed. collapsedItems: {}, // If is either a page/column/element... etc. library navigator. This will not display some buttons. navigatorType: '' }, verifiedNestedRowsForCollapse: {}, initialize: function() { this.update = _.debounce( this.update.bind( this ), 20 ); // Used for nested columns added. this.listenTo( FusionEvents, 'fusion-columns-added', this.update ); this.listenTo( FusionEvents, 'fusion-content-changed', this.update ); this.listenTo( FusionEvents, 'fusion-element-removed', this.update ); this.listenTo( FusionEvents, 'fusion-column-resized', this.update ); this.listenTo( FusionEvents, 'fusion-cancel-nested-row-changes', this.restoreNestedRowCollapsible ); }, /** * Update all the attributes. This will also trigger render if necessary. */ update: function() { var navigatorItems = this.getNavigatorItems(); this.setNavigatorType(); this.setNewNestedRowsToCollapsible( navigatorItems ); // this will render if it's changed. this.set( 'navigatorItems', navigatorItems ); }, getNavigatorItems: function() { var elementViews = FusionPageBuilderViewManager.getViews(), index, navItems = [], elType, isContainerView, isCheckoutForm, isNextPageView, isFormStep; this._updateModelsToViewsMap( elementViews ); for ( index in elementViews ) { if ( 'object' !== typeof elementViews[ index ] ) { continue; // eslint-disable-line no-continue } elType = elementViews[ index ].model.get( 'element_type' ); isContainerView = ( 'fusion_builder_container' === elType ); isNextPageView = ( 'fusion_builder_next_page' === elType ); isCheckoutForm = ( 'fusion_woo_checkout_form' === elType ); isFormStep = ( 'fusion_builder_form_step' === elType ); // Construct all the containers, with their children in order. // Only the children are in order, and not the containers themselves. if ( isContainerView || ( isNextPageView && ! elementViews[ index ].$el.hasClass( 'fusion-builder-next-page-last' ) ) || isCheckoutForm || isFormStep ) { navItems.push( this._getNavItemObject( elementViews[ index ] ) ); } } navItems = this._orderByDisplayedContainers( navItems ); return navItems; }, setNavigatorType: function() { this.set( 'navigatorType', FusionApp.data.fusion_element_type ); }, setNewNestedRowsToCollapsible( navigatorItems ) { var i, j, k, l, item, collapsedItems = this.get( 'collapsedItems' ); if ( ! Array.isArray( navigatorItems ) ) { return; } for ( i = 0; i < navigatorItems.length; i++ ) { // containers for ( j = 0; j < navigatorItems[ i ].children.length; j++ ) { // rows for ( k = 0; k < navigatorItems[ i ].children[ j ].children.length; k++ ) { // columns for ( l = 0; l < navigatorItems[ i ].children[ j ].children[ k ].children.length; l++ ) { // elements or nested rows. item = navigatorItems[ i ].children[ j ].children[ k ].children[ l ]; // eslint-disable-next-line max-depth if ( 'fusion_builder_row_inner' === item.type && 'undefined' === typeof this.verifiedNestedRowsForCollapse[ item.view.cid ] ) { this.verifiedNestedRowsForCollapse[ item.view.cid ] = true; collapsedItems[ item.view.cid ] = true; } } } } } this.set( 'collapsedItems', collapsedItems ); }, /** * When a nested row is canceled from editing, the view cid changes, * so that the collapsible refreshes to default state of collapsed. * */ restoreNestedRowCollapsible( data ) { var oldStatus, collapsedItems = this.get( 'collapsedItems' ); if ( 'object' !== typeof data.oldView || ! data.oldView.cid || 'object' !== typeof data.newView || ! data.newView.cid ) { return; } oldStatus = collapsedItems[ data.oldView.cid ] ? collapsedItems[ data.oldView.cid ] : false; if ( ! oldStatus ) { this.verifiedNestedRowsForCollapse[ data.newView.cid ] = true; } else { this.verifiedNestedRowsForCollapse[ data.newView.cid ] = true; collapsedItems[ data.newView.cid ] = true; } this.set( 'collapsedItems', collapsedItems ); }, _updateModelsToViewsMap: function( elementViews ) { var index; this.modelsToViewsMap = []; this.viewsCidToViewsMap = []; for ( index in elementViews ) { if ( 'object' !== typeof elementViews[ index ] ) { continue; // eslint-disable-line no-continue } this.modelsToViewsMap[ elementViews[ index ].model.cid ] = elementViews[ index ]; this.viewsCidToViewsMap[ elementViews[ index ].cid ] = elementViews[ index ]; } }, _getNavItemObject: function( view ) { return { view: view, model: view.model, name: this._getElementDisplayName( view ), type: view.model.get( 'element_type' ), // An array with items of the same type as this. children: this._getNavigationChildrenItems( view ) }; }, _getNavigationChildrenItems: function( view ) { var model, children = [], childView, i; if ( ! view.model || ! view.model.children || ! view.model.children.length ) { return children; } for ( i = 0; i < view.model.children.length; i++ ) { model = view.model.children.models[ i ]; if ( 'object' === typeof this.modelsToViewsMap[ model.cid ] && 'multi_element_child' !== model.get( 'multi' ) ) { childView = this.modelsToViewsMap[ model.cid ]; children.push( this._getNavItemObject( childView ) ); } } return children; }, _orderByDisplayedContainers: function( navItems ) { var previewIframe = jQuery( '#fb-preview' ), containers, orderedItems = [], j, index; if ( ! previewIframe.length ) { return navItems; } containers = previewIframe[ 0 ].contentWindow.jQuery( '#fusion_builder_container > .fusion-builder-container, #fusion_builder_container > .fusion-builder-next-page, #fusion_builder_container > .fusion-checkout-form, #fusion_builder_container > .fusion-builder-form-step' ); for ( index = 0; index < containers.length; index++ ) { for ( j = 0; j < navItems.length; j++ ) { if ( navItems[ j ].view.$el.is( containers.eq( index ) ) ) { orderedItems.push( navItems[ j ] ); } } } return orderedItems; }, _getElementDisplayName: function( view ) { var elType = view.model.get( 'element_type' ), params; params = view.model.get( 'params' ); if ( params && params.admin_label ) { return _.unescape( params.admin_label ); } // Return the element name. if ( fusionAllElements[ elType ] && fusionAllElements[ elType ].name ) { return fusionAllElements[ elType ].name; } return elType; } } ); }( jQuery ) ); ai_document_write=document.write;document.write=function(a){"interactive"==document.readyState?(console.error("document.write called after page load: ",a),"undefined"!=typeof ai_js_errors&&ai_js_errors.push(["document.write called after page load",a,0])):ai_document_write.call(document,a)}; !function(n){"use strict";n.fn.awbAnimateContentBoxes=function(){"IntersectionObserver"in window?n.each(fusion.getObserverSegmentation(n(".fusion-content-boxes.content-boxes-timeline-layout, .fusion-content-boxes.fusion-delayed-animation")),function(e){var o=fusion.getAnimationIntersectionData(e),t=new IntersectionObserver(function(e,o){n.each(e,function(e,i){var a,s,r=n(i.target),u=0;fusion.shouldObserverEntryAnimate(i,o)&&(r.find(".content-box-column").each(function(){var e=n(this),o=e.find(".fusion-animated");setTimeout(function(){o.css("visibility","visible"),a=o.data("animationtype"),s=o.data("animationduration"),o.addClass(a),s&&o.css("animation-duration",s+"s"),(r.hasClass("content-boxes-timeline-horizontal")||r.hasClass("content-boxes-timeline-vertical"))&&e.addClass("fusion-appear"),setTimeout(function(){o.removeClass(a)},1e3*s)},u),u+=parseInt(r.attr("data-animation-delay"),10)}),t.unobserve(i.target))})},o);n(this).each(function(){t.observe(this)})}):n(".fusion-content-boxes.content-boxes-timeline-layout .content-box-column .fusion-animated, .fusion-content-boxes.fusion-delayed-animation .content-box-column .fusion-animated").each(function(){var e=n(this).closest(".fusion-content-boxes");(e.hasClass("content-boxes-timeline-horizontal")||e.hasClass("content-boxes-timeline-vertical"))&&e.find(".content-box-column").addClass("fusion-appear"),n(this).css("visibility","visible")})}}(jQuery),jQuery(window).on("load",function(){"function"==typeof jQuery.fn.equalHeights&&(jQuery(".content-boxes-icon-boxed").each(function(){jQuery(this).find(".content-box-column .content-wrapper-boxed").equalHeights(),jQuery(this).find(".content-box-column .content-wrapper-boxed").css("overflow","visible")}),jQuery(window).on("fusion-resize-horizontal",function(){jQuery(".content-boxes-icon-boxed").each(function(){jQuery(this).find(".content-box-column .content-wrapper-boxed").equalHeights(),jQuery(this).find(".content-box-column .content-wrapper-boxed").css("overflow","visible")})}),jQuery(".content-boxes-clean-vertical").each(function(){jQuery(this).find(".content-box-column .col").equalHeights(),jQuery(this).find(".content-box-column .col").css("overflow","visible")}),jQuery(window).on("fusion-resize-horizontal",function(){jQuery(".content-boxes-clean-vertical").each(function(){jQuery(this).find(".content-box-column .col").equalHeights(),jQuery(this).find(".content-box-column .col").css("overflow","visible")})}),jQuery(".content-boxes-clean-horizontal").each(function(){jQuery(this).find(".content-box-column .col").equalHeights(),jQuery(this).find(".content-box-column .col").css("overflow","visible")}),jQuery(window).on("fusion-resize-horizontal",function(){jQuery(".content-boxes-clean-horizontal").each(function(){jQuery(this).find(".content-box-column .col").equalHeights(),jQuery(this).find(".content-box-column .col").css("overflow","visible")})}))}),jQuery(document).ready(function(){jQuery(".link-area-box").on("click",function(){jQuery(this).data("link")&&("_blank"===jQuery(this).data("link-target")?(window.open(jQuery(this).data("link"),"_blank"),jQuery(this).find(".heading-link").removeAttr("href"),jQuery(this).find(".fusion-read-more").removeAttr("href")):jQuery("body").hasClass("fusion-builder-live")||("#"===jQuery(this).data("link").substring(0,1)?jQuery(this).fusion_scroll_to_anchor_target():window.location=jQuery(this).data("link")),jQuery(this).find(".heading-link").attr("target",""),jQuery(this).find(".fusion-read-more").attr("target",""))}),jQuery(".link-type-button").each(function(){var n;1<=jQuery(this).parents(".content-boxes-clean-vertical").length&&(n=jQuery(".fusion-read-more-button").outerHeight(),jQuery(this).find(".fusion-read-more-button").css("top",n/2))}),jQuery(".link-area-link-icon .fusion-read-more-button, .link-area-link-icon .fusion-read-more, .link-area-link-icon .heading").on("mouseenter",function(){jQuery(this).parents(".link-area-link-icon").addClass("link-area-link-icon-hover")}),jQuery(".link-area-link-icon .fusion-read-more-button, .link-area-link-icon .fusion-read-more, .link-area-link-icon .heading").on("mouseleave",function(){jQuery(this).parents(".link-area-link-icon").removeClass("link-area-link-icon-hover")}),jQuery(".link-area-box").on("mouseenter",function(){jQuery(this).addClass("link-area-box-hover")}),jQuery(".link-area-box").on("mouseleave",function(){jQuery(this).removeClass("link-area-box-hover")}),jQuery(window).awbAnimateContentBoxes()}); https://aarohienutrifood.com/post-sitemap.xml 2024-11-11T09:51:48+00:00 https://aarohienutrifood.com/page-sitemap.xml 2026-04-27T11:23:16+00:00 https://aarohienutrifood.com/footer-sitemap.xml 2024-12-06T13:37:25+00:00 https://aarohienutrifood.com/gva_header-sitemap.xml 2025-04-28T12:28:07+00:00 https://aarohienutrifood.com/category-sitemap.xml 2024-11-11T09:51:48+00:00