JavaScript must be installed and enabled to use these boards.
Your browser appears to have JavaScript disabled or does not support JavaScript. Please refer to your browser's help file to determine how to enable JavaScript.
\\n\\t\\t\\t\\t\\t\\tSorry, unable to complete the action you requested.\\n\\t\\t\\t\\t\\t<\\/p>\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\n\\t\\t\\t<\\/div>\\n\\n\\t\\t\\t\\n\\t\\t<\\/div>\";LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ec4c91cc', 'disableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'VOOJ24ychR6jQhKYuwVWvSgTxV4JgSwFg6nVJ4UYZsk.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189ec2090b2_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ec9ad41b', 'disableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'ISLveW3w9EvVvLHeP3FXHdf94zBJQy3DroRJYngtLNo.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189ec2090b2_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching for users...","emptyText":"No Matches","successText":"Users found:","defaultText":"Enter a user name or rank","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ecbf7a0f', 'disableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'R163TsU5uj2lrKELPU_Wmr5XQEetzE5ldRYrqQpyRuk.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_1e9189ec2090b2","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport({"ajaxOptionsParam":{"event":"LITHIUM:userExistsQuery","parameters":{"javascript.ignore_combine_and_minify":"true"}},"tokenId":"ajax","elementSelector":"#userSearchField_1e9189ec2090b2","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_1e9189ec2090b2_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"lkiXfb411Id9xkI1gIsNWIaT5Vpd4STlJAn7pmHu-mk."}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ece3e31d', 'disableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'TIFvoJnl5pN437qHtRwCdi-svCH7Qmd6QGZDdfYBWM4.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_1e9189ec2090b2_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ed022fb1', 'disableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'sdbe7hAV80h-gj4r3RWZC9swkMapBcLUp5nNZW0DZ9k.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_1e9189ec2090b2","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.Link({"linkSelector":"a.lia-link-ticket-post-action"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_1e9189ec2090b2', 'enableAutoComplete', '#ajaxfeedback_1e9189ec2090b2_0', 'LITHIUM:ajaxError', {}, 'ee5XDgVVw26YGynbpiXUB_5g04tERrisNpVUoDDfouk.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_1e9189ec2090b2","tooltipContentSelector":"#link_1e9189ec2090b2_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_1e9189ec2090b2_0-tooltip-element","events":{"def":"focus mouseover keydown,blur mouseout keydown"},"hideOnLeave":true}); LITHIUM.HelpIcon({"selectors":{"helpIconSelector":".help-icon .lia-img-icon-help"}}); LITHIUM.SearchAutoCompleteToggle({"containerSelector":"#searchautocompletetoggle_1e9189ec2090b2","enableAutoCompleteSelector":".search-autocomplete-toggle-link","enableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:enableAutoComplete","disableAutoCompleteSelector":".lia-autocomplete-toggle-off","disableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:disableAutoComplete","autoCompleteSelector":".lia-autocomplete-input"}); LITHIUM.SearchForm({"asSearchActionIdSelector":".lia-as-search-action-id","useAutoComplete":true,"selectSelector":".lia-search-form-granularity","useClearSearchButton":false,"buttonSelector":".lia-button-searchForm-action","asSearchActionIdParamName":"as-search-action-id","formSelector":"#lia-searchformV32_1e9189ec2090b2","asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_1e9189ec2090b2_0:not(.lia-js-hidden)","clearSearchButtonSelector":null}); LITHIUM.Form.resetFieldForFocusFound(); (function($) { document.querySelector('a.login-link').classList.add('homepage-nav-login'); })(LITHIUM.jQuery); ;(function($){ $(document).ready(function() { $(".custom-user-menu-v2 .nav-link").click(function(e) { e.preventDefault(); $(".nav-popover.profile").toggleClass('show'); }); $(".search-toggle-action-icon-plus").on("click",function(e){ e.preventDefault(); $(this).parent().find(".plus-bar-main-content").toggle(); }); //User Avatar $('.header-tab-nav li span').click(function() { $('.header-tab-nav li span').removeClass("active"); if(this.id == 'profile'){ $('span#profile').addClass("active"); $('.header-tab-nav-content > div#profile-list-wrapper').show(); $('.header-tab-nav-content > div#admin-list-wrapper').hide(); $('.header-tab-nav-content > div#profile-list-wrapper').removeClass('profile-menu-dropdown'); } if(this.id == 'admin'){ $('span#admin').addClass("active"); $('.header-tab-nav-content > div#profile-list-wrapper').hide(); $('.header-tab-nav-content > div#admin-list-wrapper').show(); $('.header-tab-nav-content > div#profile-list-wrapper').addClass('profile-menu-dropdown'); } var indexer = $(this).index(); //gets the current index of (this) which is #header-tab-nav li $('.header-tab-nav-content > div:eq(' + indexer + ')').fadeIn(); //uses whatever index the link has to open the corresponding box }); $(this).mouseup(function (e){ var customButton = $('.nav-popover.profile'); if(!$('.custom-menu-caret').is(e.target) && $('.custom-menu-caret').has(e.target).length === 0){ if(!customButton.is(e.target) && customButton.has(e.target).length === 0){ if (!$('.custom-user-menu-v2 > .nav-link').is(e.target) && $('.custom-user-menu-v2 > .nav-link').has(e.target).length === 0) { customButton.removeClass('show'); } } } var menuWrapper = $('.menu-wrapper'); if(!menuWrapper.is(e.target) && menuWrapper.has(e.target).length === 0){ if (!$('.menu').is(e.target) && $('.menu').has(e.target).length === 0) { menuWrapper.removeClass('offcanvas'); } } var container = $(".plus-bar-main-content"); var customButton = $(".search-toggle-action-icon-plus"); if (!customButton.is(e.target) && customButton.has(e.target).length === 0) { container.hide(); } if(!$('.lang-picker-wrapper').is(e.target) && $('.lang-picker-wrapper').has(e.target).length === 0){ if (!$('.lang-picker').is(e.target) && $('.lang-picker').has(e.target).length === 0) { $('.lang-picker').removeClass('show'); } } }); //SCROLL JS $(window).scroll(function(e) { e.preventDefault(); if($('.nav-popover.profile').hasClass("show")){ if ($(this).scrollTop() > 0) { $('.nav-popover.profile').removeClass("show"); } else { $('.nav-popover.profile').addClass("show"); } } if($('.nav-popover.get-hubspot').hasClass("show")){ if ($(this).scrollTop() > 0) { $('.nav-popover.get-hubspot').removeClass("show"); } else { $('.nav-popover.get-hubspot').addClass("show"); } } if ($(this).scrollTop() > 0) { $('.search-input.lia-search-input-message').blur(); $('.plus-bar-main-content').hide(); } }); }); jQuery('.lang-picker-wrapper').click(function(){ jQuery(".lang-picker").toggleClass('show'); }); jQuery('.lia-cat-sub-editor-modal .lia-ui-modal-footer .lia-button-Submit-action').live('click',function(){ setTimeout( function() { location.reload(true); },1000); }); })(LITHIUM.jQuery); ;(function($){ var langMap = { 'en':'hubspot_community_en', 'es':'hubspot_community_es', 'fr':'hubspot_community_fr', 'ja':'hubspot_community_jp', 'pt-br':'hubspot_community_pt', 'de':'hubspot_community_de' } var nodeType = "category"; var langScope = langMap['en']; var isSearchPage = jQuery('body').hasClass('SearchPage'); var isIdeasLandingPage = jQuery('body').hasClass('ideaslandingpage'); if (nodeType === "community" && !isSearchPage && !isIdeasLandingPage) { var inputFormFilter = ''; var inputFormLocation = ''; $('form.SearchForm').append(inputFormFilter).append(inputFormLocation); } else if (nodeType === "community" && isIdeasLandingPage) { var searchUrl = "/t5/forums/searchpage/tab/message?filter=location&location=idea-board:HubSpot_Ideas&collapse_discussion=true"; var query = jQuery('.SearchForm .lia-search-input-message').val(); jQuery(document).on('submit', 'form.SearchForm', function(e) { e.preventDefault(); var newQ = "&q=" + document.querySelector('.SearchForm .lia-search-input-wrapper input.search-input').value; window.location = window.location.origin + searchUrl + newQ; }) } })(LITHIUM.jQuery) LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189ed7d3995","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189ed7d3995_0","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189ed7d3995_1","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189ed7d3995_2","feedbackSelector":".InfoMessage"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189edb294ee', 'disableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'NfmAV6eQ3Ybh9z4zcQ3B8OLaSffbLYJxkftcbLqUxso.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189ed7d3995_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189edd0f367', 'disableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'dlN6NPhlixXWrjR-QZQwuGCpeBANjoWuYPlGcFXjzSA.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189ed7d3995_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching for users...","emptyText":"No Matches","successText":"Users found:","defaultText":"Enter a user name or rank","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ede907d0', 'disableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'WAb9oI6qjH7z8EzTjDQ55Sg3WFqXV_3X-Grm8aP8yic.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_1e9189ed7d3995","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport({"ajaxOptionsParam":{"event":"LITHIUM:userExistsQuery","parameters":{"javascript.ignore_combine_and_minify":"true"}},"tokenId":"ajax","elementSelector":"#userSearchField_1e9189ed7d3995","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_1e9189ed7d3995_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"Is98RkFpivdDCjg_sUQWKsjvi4zjXV9vZmnIwDsHTh0."}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ee03c6da', 'disableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'pp2m0j_l5OKkGpvL0UH4sgHjTH_k6X-QZ6HirAd8_6w.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_1e9189ed7d3995_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189ee1ed49a', 'disableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'kKXEJmc_QTSEcrsg3rUfOgFMJuuACLVviolaTb705Uk.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_1e9189ed7d3995","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_1e9189ed7d3995', 'enableAutoComplete', '#ajaxfeedback_1e9189ed7d3995_0', 'LITHIUM:ajaxError', {}, 'neeS1MjVWr2oZbhataUJ8HhFznzE9k4AglDgZAT3sOc.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_1e9189ed7d3995","tooltipContentSelector":"#link_1e9189ed7d3995_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_1e9189ed7d3995_0-tooltip-element","events":{"def":"focus mouseover keydown,blur mouseout keydown"},"hideOnLeave":true}); LITHIUM.HelpIcon({"selectors":{"helpIconSelector":".help-icon .lia-img-icon-help"}}); LITHIUM.SearchAutoCompleteToggle({"containerSelector":"#searchautocompletetoggle_1e9189ed7d3995","enableAutoCompleteSelector":".search-autocomplete-toggle-link","enableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:enableAutoComplete","disableAutoCompleteSelector":".lia-autocomplete-toggle-off","disableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:disableAutoComplete","autoCompleteSelector":".lia-autocomplete-input"}); LITHIUM.SearchForm({"asSearchActionIdSelector":".lia-as-search-action-id","useAutoComplete":true,"selectSelector":".lia-search-form-granularity","useClearSearchButton":false,"buttonSelector":".lia-button-searchForm-action","asSearchActionIdParamName":"as-search-action-id","formSelector":"#lia-searchformV32_1e9189ed7d3995","nodesModel":{"user|user":{"title":"Users","inputSelector":".lia-search-input-user"},"resources_fr|category":{"title":"Search Category: Ressources","inputSelector":".lia-search-input-message"},"mjmao93648|community":{"title":"Search Community: Ressources","inputSelector":".lia-search-input-message"}},"asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_1e9189ed7d3995_0:not(.lia-js-hidden)","clearSearchButtonSelector":null}); (function($) { document.querySelector('a.login-link').classList.add('homepage-nav-login'); })(LITHIUM.jQuery); (function($) { if ( $('.lia-notification-feed-page-link').length ) { $('.lia-notification-feed-page-link').addClass('nav-notifs'); } if ( $('.private-notes-link').length ) { $('.private-notes-link').addClass('nav-mail'); } })(LITHIUM.jQuery); ;(function($){ $('.custom-search-focus').on('click', function() { $('.lia-search-input-message').focus(); }); })(LITHIUM.jQuery); // Pull in global jQuery reference if (document.querySelectorAll('.lia-component-admin-widget-moderation-manager')[0]) { document.querySelectorAll('.lia-component-admin-widget-moderation-manager')[0].href = "/t5/bizapps/page/tab/community%3Amoderation?filter=includeForums&sort_by=-topicPostDate&include_forums=true&collapse_discussion=true" } ;(function($) { $("#get-hubspot-free").click(function(){ $("#get-hubspot").toggleClass("show"); }); // Closes dropdown boxes when clicking outside of the box // click listener applied inline, function in script tag window.onclick = function(e) { if (e.target?.matches && !e.target?.matches('#get-hubspot-free')) { if (document.getElementById("get-hubspot")) { if (document.getElementById("get-hubspot").classList.contains('show')) { document.getElementById("get-hubspot").classList.remove('show'); } } } if (e.target?.matches && !e.target?.matches('#current-language')) { if (document.getElementById("lang-picker-global")) { if (document.getElementById("lang-picker-global").classList.contains('show')) { document.getElementById("lang-picker-global").classList.remove('show'); } } } }; $(window).scroll(function(){ if ($(this).scrollTop() > 65) { $('.forum-nav-bar').addClass('ch-sticky'); $('.community-header-nav').addClass('ch-space'); } else { $('.forum-nav-bar').removeClass('ch-sticky'); $('.community-header-nav').removeClass('ch-space');; } }); $('span.custom-menu-caret').on('click',function(){ $(this).siblings('.nav-popover.profile').toggleClass('show'); }); })(LITHIUM.jQuery); (function($) { $(document).ready(function(){ try{ var PostURl = '' if('category'==='board'){ var PostURl = '/t5/forums/postpage/board-id/resources_fr' }else if('category'==='category') { var PostURl = '/t5/forums/postpage/category-id/resources_fr'} var searchSelector = $('.custom-search-wrapper .lia-autocomplete-container .lia-autocomplete-footer'); var data = "Can't find what you're looking for? Ask A Question "; $(data).insertAfter(searchSelector[0]); }catch(err){ console.log(err); } }); })(LITHIUM.jQuery); (function($) { $(document).ready(function(){ $('.lia-quilt-idea-exchange-page-filtered-v2 .custom-v2-banner .search-input, .lia-quilt-idea-page-filtered .custom-v2-banner .search-input').attr('placeholder', 'Search for Ideas'); }); })(LITHIUM.jQuery); ;(function($){ var langMap = { 'en':'hubspot_community_en', 'es':'hubspot_community_es', 'fr':'hubspot_community_fr', 'ja':'hubspot_community_jp', 'pt-br':'hubspot_community_pt', 'de':'hubspot_community_de' } var nodeType = "category"; var langScope = langMap['en']; var isSearchPage = jQuery('body').hasClass('SearchPage'); var isIdeasLandingPage = jQuery('body').hasClass('ideaslandingpage'); if (nodeType === "community" && !isSearchPage && !isIdeasLandingPage) { var inputFormFilter = ''; var inputFormLocation = ''; $('form.SearchForm').append(inputFormFilter).append(inputFormLocation); } else if (nodeType === "community" && isIdeasLandingPage) { var searchUrl = "/t5/forums/searchpage/tab/message?filter=location&location=idea-board:HubSpot_Ideas&collapse_discussion=true"; var query = jQuery('.SearchForm .lia-search-input-message').val(); jQuery(document).on('submit', 'form.SearchForm', function(e) { e.preventDefault(); var newQ = "&q=" + document.querySelector('.SearchForm .lia-search-input-wrapper input.search-input').value; window.location = window.location.origin + searchUrl + newQ; }) } })(LITHIUM.jQuery) LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189f08b5a03","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189f08b5a03_0","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189f08b5a03_1","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_1e9189f08b5a03_2","feedbackSelector":".InfoMessage"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189f0c0742b', 'disableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, 'LBxZ24fMTNW7xYonlkPpEnoMDGcnNAyXvQ_Jef1zoEE.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189f08b5a03_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189f0dd704c', 'disableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, '7TO0RwPFjPZO1m7AzUcNoHO4RfM5ktfWO2XJRAom_YQ.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_1e9189f08b5a03_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching for users...","emptyText":"No Matches","successText":"Users found:","defaultText":"Enter a user name or rank","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189f0f5003f', 'disableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, 'e9yYcfTxO7TM9OAVFP5xQW5qLcE5fUc7nL0CseQpLPc.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_1e9189f08b5a03","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport({"ajaxOptionsParam":{"event":"LITHIUM:userExistsQuery","parameters":{"javascript.ignore_combine_and_minify":"true"}},"tokenId":"ajax","elementSelector":"#userSearchField_1e9189f08b5a03","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_1e9189f08b5a03_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"Fb_MjLibL0DT3i3imAnMtEI3eqAVI3Ew-hDYUxPRopY."}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189f10d4609', 'disableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, '4F0qg6PsLbgUFFTHPFFncHhmJpgab0BWXv2nmo1e_n8.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_1e9189f08b5a03_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AutoComplete({"options":{"triggerTextLength":0,"updateInputOnSelect":true,"loadingText":"Searching...","emptyText":"No Matches","successText":"Results:","defaultText":"Enter a search word","disabled":false,"footerContent":[{"scripts":"\n\n;(function($){LITHIUM.Link=function(params){var $doc=$(document);function handler(event){var $link=$(this);var token=$link.data('lia-action-token');if($link.data('lia-ajax')!==true&&token!==undefined){if(event.isPropagationStopped()===false&&event.isImmediatePropagationStopped()===false&&event.isDefaultPrevented()===false){event.stop();var $form=$('',{method:'POST',action:$link.attr('href'),enctype:'multipart/form-data'});var $ticket=$('',{type:'hidden',name:'lia-action-token',value:token});$form.append($ticket);$(document.body).append($form);$form.submit();$doc.trigger('click');}}}\nif($doc.data('lia-link-action-handler')===undefined){$doc.data('lia-link-action-handler',true);$doc.on('click.link-action',params.linkSelector,handler);$.fn.on=$.wrap($.fn.on,function(proceed){var ret=proceed.apply(this,$.makeArray(arguments).slice(1));if(this.is(document)){$doc.off('click.link-action',params.linkSelector,handler);proceed.call(this,'click.link-action',params.linkSelector,handler);}\nreturn ret;});}}})(LITHIUM.jQuery);\r\n\nLITHIUM.Link({\n \"linkSelector\" : \"a.lia-link-ticket-post-action\"\n});LITHIUM.AjaxSupport.fromLink('#disableAutoComplete_1e9189f1226856', 'disableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, 'rR93klkKihFfQ0fckSgdZxtjF8SoHoA3BgrcqXP95P4.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_1e9189f08b5a03","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_1e9189f08b5a03', 'enableAutoComplete', '#ajaxfeedback_1e9189f08b5a03_0', 'LITHIUM:ajaxError', {}, 'Rc1l4xqIaiNnHg5ONgYgd6ADnucIhrgs_aoGAzy9grA.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_1e9189f08b5a03","tooltipContentSelector":"#link_1e9189f08b5a03_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_1e9189f08b5a03_0-tooltip-element","events":{"def":"focus mouseover keydown,blur mouseout keydown"},"hideOnLeave":true}); LITHIUM.HelpIcon({"selectors":{"helpIconSelector":".help-icon .lia-img-icon-help"}}); LITHIUM.SearchAutoCompleteToggle({"containerSelector":"#searchautocompletetoggle_1e9189f08b5a03","enableAutoCompleteSelector":".search-autocomplete-toggle-link","enableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:enableAutoComplete","disableAutoCompleteSelector":".lia-autocomplete-toggle-off","disableAutocompleteSuccessEvent":"LITHIUM:ajaxSuccess:disableAutoComplete","autoCompleteSelector":".lia-autocomplete-input"}); LITHIUM.SearchForm({"asSearchActionIdSelector":".lia-as-search-action-id","useAutoComplete":true,"selectSelector":".lia-search-form-granularity","useClearSearchButton":false,"buttonSelector":".lia-button-searchForm-action","asSearchActionIdParamName":"as-search-action-id","formSelector":"#lia-searchformV32_1e9189f08b5a03","nodesModel":{"user|user":{"title":"Users","inputSelector":".lia-search-input-user"},"resources_fr|category":{"title":"Search Category: Ressources","inputSelector":".lia-search-input-message"},"mjmao93648|community":{"title":"Search Community: Ressources","inputSelector":".lia-search-input-message"}},"asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_1e9189f08b5a03_0:not(.lia-js-hidden)","clearSearchButtonSelector":null}); ;(function($){ var getBlogAuthorStatus = function (boardId) { var userId = 'null'; var queryUrl = "/plugins/custom/hubspot/hubspot/has-node-publish-permission?board_id=" + boardId + "&user_id=" + userId; $.ajax({ url: queryUrl, method: "GET", success: function(data, status) { if (data.hasPermission) { // show button // show create post button // set create post button href $('.create-post-wrapper').show(); $('#create').attr('href','/t5/forums/postpage/board-id/' + boardId); } else { // hide button $('.create-post-wrapper').hide(); } } }); } function checkSubscribed(){ $("#followResources").css('display', 'none'); if($("li.resources-list-item.active").attr('data-node') != "resources"){ if($("li.resources-list-item.active").attr('subscribe-data') == "unsubscribed" ) { $("#followResources").text("Subscribe"); $("#followResources").attr('subscribe-data',"subscribe-btn"); } else{ $("#followResources").text("Unsubscribe"); $("#followResources").attr('subscribe-data',"unsubscribe-btn"); } $("#followResources").css('display', 'inline-block'); } } checkSubscribed(); var setLabelFilters = function(nodeId, nodeType, activeFilter, callback) { if ($('#Category_all').hasClass('active')){var nodeType = 'category';}else{var nodeType = 'board';} var queryUrl = "/plugins/custom/hubspot/hubspot/labels-by-node?node_id=" + nodeId + "&node_type=" + nodeType; $.ajax({ url: queryUrl, method: "GET", success: function(data, status) { var isActive = ''; if (!activeFilter) { var isActive = ' active' } var activeLabelExists = false; var labelList = $('ul.label-filter-list'); labelList.empty(); var labelItem = $('').addClass('filter-by-label-item filter-item' + isActive).text("All labels").data('label',"All labels"); isActive = '' labelList.append(labelItem); data.labels.forEach(function(label) { if (activeFilter) { if (label.toLowerCase() === activeFilter.toLowerCase()) { isActive = 'active'; activeLabelExists = true; } $('#selected-label').text(activeFilter); } labelItem = $('').addClass('filter-by-label-item filter-item ' + isActive).text(label).data('label',label); labelList.append(labelItem); isActive = ''; }); if (!activeLabelExists) { $('#selected-label').text("All labels"); $('.filter-by-label-item:first-child').addClass('active'); } if (callback) { callback(activeLabelExists); } } }) } var setListingHeader = function(header) { $('#resources-listing-header').text(header); } var buildMessagesQuery = function(queryParam, keepLabelsQuery) { var query = window.location.search.replace('?',''); var newQuery = ""; if (query.indexOf(queryParam.key) > -1) { var queryArr = query.split('&'); for (a=0;a < queryArr.length;a++) { if (queryArr[a].indexOf(queryParam.key) > -1) { queryArr[a] = queryParam.key + "=" + queryParam.val; } if (queryArr[a].indexOf('page') > -1 || queryArr[a].indexOf('labels') > -1 && !keepLabelsQuery) { queryArr.splice(a,1); } } newQuery = "?" + queryArr.join('&'); } else if (query.length == 0) { newQuery = "?" + queryParam.key + "=" + queryParam.val; } else { newQuery = "?" + query + "&" + queryParam.key + "=" + queryParam.val; } updateUrlQuery(newQuery); return newQuery; } var updateUrlQuery = function(query) { var url = window.location.origin + window.location.pathname + query; window.history.pushState({}, '', url); } var getMessages = function(query, keepLabelsQuery, nodeTypeVar ='') { var queryUrl = "/plugins/custom/hubspot/hubspot/resources" + buildMessagesQuery(query, keepLabelsQuery); $.ajax({ url: queryUrl+nodeTypeVar, method: "GET", success: function(data, status) { window.hubspotCommunity.appendListingTiles(data, $('#resources-list'), 1); return(true); } }); } var doSpinner = function() { var spinnerTarget = $("#resources-list"); window.hubspotCommunity.appendLoadingSpinner(spinnerTarget); } $('li.resources-list-item').on('click', function(e) { e.preventDefault(); var thisNode = $(this).data('node'); if ($(this).hasClass('active') && $('#resources-list li').length){ return; }; doSpinner(); $('li.resources-list-item').each(function() { $(this).removeClass('active'); }) $(this).addClass('active'); if (thisNode == 'resources') { var nodeId = 'resources'; var nodeType = 'category'; // hide create post button $('.create-post-wrapper').hide(); } else if (this.id =='Category_all') { // hide create post button $('.create-post-wrapper').hide(); var nodeType = 'category'; console.log('this dynamic'); } else { // Check to see if user has create post options var nodeId = thisNode; var nodeType = 'board'; getBlogAuthorStatus(thisNode); } if(this.id !='Category_all') { var nodeType = 'board'; } var activeLabel = $('.filter-by-label-item.active').data('label'); if (activeLabel === "All labels") { activeLabel = false; } var headerText = $(this).text(); checkSubscribed(); setLabelFilters(nodeId, nodeType, activeLabel, function(keepLabelsQuery) { var nodeTypeVar = '&node_type='+ nodeType; getMessages({ key: "node_id", val: thisNode }, keepLabelsQuery,nodeTypeVar); setListingHeader(headerText); }); }); let urlString = window.location.href, testUrl = new URL(urlString), node_ID_value = testUrl.searchParams.get("node_id"); console.log(node_ID_value); var storeTimeInterval = setInterval(function(){ if(window.hubspotCommunity){ if($('#resources-list li').length <= 0){ console.log('click Hua'); if(urlString.includes('HubSpot-Advocates') && node_ID_value == null){ $('.resources-tabs-wrapper .resources-list').find("li[data-node='hubspot-advocates']").click(); }else { $('.resources-tabs-wrapper .resources-list').find("li[data-node="+node_ID_value+"]").click(); } } clearInterval(storeTimeInterval); } }, 100); $(document).on('click', 'li.filter-by-label-item', function() { doSpinner(); if ($(this).hasClass('active')) return; var labelVal = $(this).data('label'); if (labelVal === "All labels") labelVal = ''; if ($('#Category_all').hasClass('active')){var nodeType = 'category';}else{var nodeType = 'board';} var nodeTypeVar = '&node_type='+ nodeType; getMessages({ key: "labels", val: labelVal }, true,nodeTypeVar); $('li.filter-by-label-item').each(function() { $(this).removeClass('active'); }) $(this).addClass('active'); $("#selected-label").text($(this).data('label')); $('.resources-filters-dropdown').addClass('hide'); $('.filter-by-label-wrapper').removeClass('active'); }); $(document).on('click', '.filter-dropdown-toggle', function() { if ($('.filter-by-label-wrapper').hasClass('active')) { $('.resources-filters-dropdown').addClass('hide'); } else { $('.resources-filters-dropdown').removeClass('hide'); } $('.filter-by-label-wrapper').toggleClass('active'); }) $(document).on('click', 'li.order-by-option.filter-item', function() { doSpinner(); if ($(this).hasClass('active')) return; var orderByValue = $(this).data('orderby') $("#selected-order-by").text($(this).text()); $('.order-by-dropdown').addClass('hide'); $('.order-by-wrapper').removeClass('active'); if ($('#Category_all').hasClass('active')){var nodeType = 'category';}else{var nodeType = 'board';} var nodeTypeVar = '&node_type='+ nodeType; getMessages({ key: "order_by", val: $(this).data('orderby') }, true,nodeTypeVar); $('.order-by-option').each(function() { if ($(this).data('orderby') != orderByValue) $(this).removeClass('active'); else $(this).addClass('active'); }) }); $(document).on('click', '.order-by-dropdown-toggle', function() { if ($('.order-by-wrapper').hasClass('active')) { $('.order-by-dropdown').addClass('hide'); } else { $('.order-by-dropdown').removeClass('hide'); } $('.order-by-wrapper').toggleClass('active'); }) $(document).on('click', function(e) { var classList = e.target.classList.toString(); if (e.target.classList.toString().indexOf('filter-dropdown-toggle') == -1 && classList.indexOf('filter-by-label-item') == -1) { $('.resources-filters-dropdown').addClass('hide'); $('.filter-by-label-wrapper').removeClass('active') } if (e.target.classList.toString().indexOf('order-by-dropdown-toggle') == -1 && classList.indexOf('order-by-option') == -1) { $('.order-by-dropdown').addClass('hide'); $('.order-by-wrapper').removeClass('active') } }); var queryList = window.location.search.replace('?','').split('&'); var keyVal; var key; var val; var currentNode; var currentNodeType; var currentLabel; var currentOrderByText; var currentOrderByKey; for (i = 0; i < queryList.length; i++) { keyVal = queryList[i].split('='); key = decodeURI(keyVal[0]); val = decodeURI(keyVal[1]); if (key == "node_id" && val !== 'resources') { currentNode = val; currentNodeType = 'board'; } else if (key == "labels") { currentLabel = val; } else if (key == "order_by") { currentOrderByText = val; currentOrderByKey = key; var checkOrder = false; $(".order-by-option").each(function(){ if($(this).text() == currentOrderByText) { checkOrder = true; } }) if(!checkOrder){var currentOrderByText = "Last updated";var currentOrderByKey = "last_updated"; } } } if (!currentNode) { currentNode = 'resources'; currentNodeType = "category"; } else { getBlogAuthorStatus(currentNode); } if (currentLabel) { setLabelFilters(currentNode, currentNodeType, currentLabel); } else { setLabelFilters(currentNode, currentNodeType); } if (currentOrderByText) { $('#selected-order-by').text(currentOrderByText); $('li.order-by-option').each(function() { if ($(this).data('orderby') == currentOrderByText) $(this).addClass('active'); else $(this).removeClass('active'); }) } if (currentNode) { setListingHeader($("[data-node='" + currentNode + "']").text()); } $(document).on('click', '#followResources', function(event) { var bId = $("li.resources-list-item.active").attr('data-node'); var classbtn = $(this).attr('subscribe-data'); $(this).attr("disabled", true); $.ajax ({ url: '/plugins/custom/hubspot/hubspot/forum-subscription', data: {'forumId':bId,'ClassBtn':classbtn}, type: 'post', success: function(data) { location.reload(); } }); }); })(LITHIUM.jQuery); (function($) { var MessageListEmpty = 'No posts to display!'; if($('#Category_all').hasClass('active')){var nodeType = 'category';}else{var nodeType = 'board';} var nodeTypeVar = '&node_type='+ nodeType; console.log(nodeTypeVar); function buildGlobalObject() { window.hubspotCommunity = { appendLoadingSpinner: function(jqueryElementToAppendTo) { // prevent footer from jumping up during loading $('.lia-quilt-row-footer').removeClass('static-footer'); jqueryElementToAppendTo.html(''); $('.resources-pagination-wrapper').css('visibility','hidden'); jqueryElementToAppendTo.append(''+ '' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + '' ); }, appendListingTiles: function(messagesObject, jqueryElementToAppendTo ,pagenation ='') { var messages = ''; var pinpost = messagesObject.pinpost; var currentPage = messagesObject.currentPage; var totalPages = messagesObject.totalPages; var pagingList = $('#pages-list'); // Accepts either the whole resourcesData object, or just resourcesData.messages var messages = messagesObject.messages ? messagesObject.messages : messagesObject; console.log(messages); if(messages.length > 0){ $(".lia-panel-status-banner-note").remove();} else if($('.lia-panel-status-banner-note').length < 1){ $('.resources-listing').append(''+MessageListEmpty+''); } if(totalPages > 1){$('.resources-pagination-wrapper').css('display','flex'); }else{$('.resources-pagination-wrapper').css('display','none');} jqueryElementToAppendTo.html(''); messages.map(function(message) { var anonymousUser = 'yes'; var replyButton = 'Reply'; var coverImage = message.cover_image ? message.cover_image : 'https://community.hubspot.com/html/@5050A74A6AD7C57485FB58E6CC6531EF/assets/Thumbnail_2R.png'; var resourceBoard = message.resource_board; var lastUpdatedDate = message.last_updated; var postHref = message.post_href; var title = message.post_title.substring(0,40); var teaser = message.post_teaser.substring(0,60); var avatarImage = ""; var teaser_lenth = message.post_teaser.length; var title_lenth = message.post_title.length; var authorUsername = message.author_username; var authorRank = message.author_rank; var authorRank = authorRank.split(' ').join('-'); var authorRankIcon = message.rank_icon ? '': ""; var authorRankElement = ''+ authorRankIcon +''; var authorLink = message.author_link; var authorAvatar = message.author_avatar; var numComments = message.num_comments; var numLikes = message.num_likes; var li_type = message.li_type; var numViews = message.num_views; var listId = ''; if(teaser_lenth > 60){teaser_lenth = '...';}else{teaser_lenth = ''; } if(title_lenth > 40){title_lenth = '...';}else{title_lenth = ''; } if (pagenation == 0){var listId ="-pinning"; } var ReplayButton = ''; if(message.can_replay){ if(anonymousUser == 'yes'){ var ReplayButton = ''+replyButton+''; }else{ var ReplayButton = ''+replyButton+''; } } var listItemElement = $(''+ ''+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ resourceBoard +''+ ' '+ lastUpdatedDate +''+ ' '+ ' '+ title +title_lenth+''+ ' '+ teaser + teaser_lenth+ ' '+ ' '+ ' '+ ' '+ ' '+ ' ' + ' '+ authorUsername +''+ ' '+ authorRankElement + ' '+ ' '+ ' '+ ' '+ '' ).appendTo(jqueryElementToAppendTo); listItemElement.on('click', function() { // window.location.href = postHref; openBlog(event, postHref); }); }); function openBlog(event,postHref) { event.preventDefault(); if(event.metaKey && event.which === 1) { window.open(postHref); } else { if(event.ctrlKey && event.which === 1) window.open(postHref); else window.location.href = postHref; } } if (messages.length % 3 == 1) { // remainder 1 requires 2 shims jqueryElementToAppendTo.append('') } else if (messages.length % 3 == 2) { //remainder 2 requires 1 shim jqueryElementToAppendTo.append('') } $('.resources-pagination-wrapper').css('visibility','visible'); if(pagenation == 1){ window.hubspotCommunity.appendPagination(currentPage, totalPages, pagingList); } window.hubspotCommunity.setFooter(); }, setFooter: function() { var winHeight = $(window).height(); var header = $('.lia-quilt-row-header').height(); var mainContent = $('.lia-quilt-row-main').height(); var footer = $('.lia-quilt-row-footer'); var footerHeight = footer.height(); var heightToAdd = winHeight - header - mainContent - footerHeight; if (heightToAdd < 0) { footer.addClass('static-footer'); } else { footer.removeClass('static-footer'); } } } } buildGlobalObject(); var doSpinner = function() { var spinnerTarget = $("#resources-list"); window.hubspotCommunity.appendLoadingSpinner(spinnerTarget); } //********************** pagination query Start ******************* var checkNode = false; var appendNode = ''; $(".resources-list-item a").each(function(){ if($(this).text() == 'resources_fr') { checkNode = true; } }); if(checkNode == false){ nodeParam = "node_id=resources_fr"; } var checkLabels = false; var appendLabel = ''; $(".filter-by-label-item").each(function(){ if($(this).text() == '') { checkLabels = true; } }) if(checkLabels){var appendLabel = ""; } else{ labelParam = "&labels="; } /* var pageParam = ''; if(isNaN('1')) {pageParam = "&page=1"; appendPage = 1} */ var checkOrder = false; var appendOrder = ''; $(".order-by-option").each(function(){ if($(this).text() == "last_updated") { checkOrder = true; } }) if(checkOrder){var appendOrder = "last_updated"; } else{ orderParam = "&order_by=last_updated"; } if (history.pushState) { var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?' +nodeParam+labelParam+orderParam; window.history.pushState({path:newurl},'',newurl); } function replaceQueryString(url, param, value) { var re = new RegExp("([?|&])" + param + "=.*?(&|$)", "i"); if (url.match(re)) return url.replace(re, '$1' + param + "=" + value + '$2'); else return url + '&' + param + "=" + value; } // Global variables/Query starting state/defaults var queryParams = { posts_per_page: "30", node_id: "resources_fr", labels: appendLabel, order_by: appendOrder, page: "1" }; // Global Functions function buildResourcesQuery(postsPerPage, nodeId, orderBy, page, labels) { return "/plugins/custom/hubspot/hubspot/resources?posts_per_page="+ postsPerPage +"&node_id="+ nodeId + "&order_by="+ orderBy +"&labels="+ labels +"&page="+ page + "&catId=resources_fr"; }; function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); if (decodeURIComponent(pair[0]) == variable) { return decodeURIComponent(pair[1]); } } // return the starting or default value if not present return queryParams[variable] }; // Create window level function window.hubspotCommunity.appendPagination = function(page, pageCount, jQueryElement) { paging.addPageNumbers(page, pageCount, jQueryElement) } // Paging Functions var paging = { addPageNumbers: function(page, pageCount, jQueryElement) { var currentPageNum = Number(page); var totalPagesNum = Number(pageCount); var pathname = window.location.pathname; var originalQueryString = window.location.search; jQueryElement.html(''); paging.enableOrDisablePagingNav(currentPageNum, totalPagesNum); var shownumber = 5; if(totalPagesNum > 5 ){var shownumber = 5;} else { var shownumber = totalPagesNum;} var loopEnd =totalPagesNum - 3; var LoopStart = 1; var loopEnd = totalPagesNum -2; if (currentPageNum > 3 && totalPagesNum > 5 && currentPageNum <= loopEnd){ var LoopStart = currentPageNum - 2; var shownumber= currentPageNum +2; } else if(currentPageNum > loopEnd && totalPagesNum > 5){ var LoopStart = currentPageNum - 3; var shownumber= totalPagesNum; } if(currentPageNum == 1 || currentPageNum == 0){$('#resources-list-pinning').css('display','flex');} else {$('#resources-list-pinning').css('display','none');} for (let i = LoopStart; i <= shownumber; i++) { var currentPageClass = (i == page) ? 'current-page' : ''; var numberElement = $(''+ i +'').appendTo(jQueryElement); numberElement.on('click', function() { paging.pageNumberClickEvent(i) }); } }, enableOrDisablePagingNav: function(page, pageCount) { $('#prev-page, #next-page').removeClass('disabled'); $('#prev-page, #next-page').removeClass('hidden'); if (page == 1 || page == 0) { $('#prev-page').addClass('disabled'); if (pageCount == 1) { $('#next-page').addClass('disabled'); } } else if (page == pageCount) { $('#next-page').addClass('disabled'); } else { $('#prev-page').removeClass('disabled'); $('#next-page').removeClass('disabled'); } }, addPageToQueryString: function(queryParamString, updatedPageNumber) { var startingQueryParameters = queryParamString; var endingQueryParameters = ''; var pageRegex = /page=\d+/; if (startingQueryParameters.length == 0) { return '?page=' + updatedPageNumber; } else if (startingQueryParameters.indexOf('page=') != -1) { return startingQueryParameters.replace(pageRegex, 'page='+updatedPageNumber); } else if (startingQueryParameters.indexOf('page=') == -1) { return startingQueryParameters + '&page=' + updatedPageNumber; } }, rerenderListing: function(postsPerPage, nodeId, orderBy, page, labels,nodeTypeVar) { if($('#Category_all').hasClass('active')){var nodeType = 'category';}else{var nodeType = 'board';} var nodeTypeVar = '&node_type='+ nodeType; $.get(buildResourcesQuery(postsPerPage, nodeId, orderBy, page, labels)+nodeTypeVar) .done(function( resourcesData ) { var currentPage = resourcesData.currentPage; var totalPages = resourcesData.totalPages; var resourcesList = $('#resources-list'); var pagingList = $('#pages-list'); window.hubspotCommunity.appendListingTiles(resourcesData, resourcesList , 1); }).fail(function(err) { console.log(err); }) }, pageNumberClickEvent: function(pageNumber) { var originalQueryString = window.location.search; var updatedQueryString = paging.addPageToQueryString(originalQueryString, pageNumber); var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + updatedQueryString; var postsPerPage = queryParams.posts_per_page; var nodeId = queryParams.node_id; var orderBy; var page; var labels; if (history.pushState) { window.history.pushState({ path: newUrl }, '', newUrl); orderBy = getQueryVariable("order_by"); page = getQueryVariable("page"); labels = getQueryVariable("labels"); nodeId = getQueryVariable("node_id"); } paging.rerenderListing(postsPerPage, nodeId, orderBy, page, labels); }, addPageNavClickEvents: function() { $('#next-page').on('click', function() { var currentQueryString = window.location.search; var currentPage = getQueryVariable("page") var newPageNum = Number(currentPage) + 1; var postsPerPage = queryParams.posts_per_page; var nodeId = queryParams.node_id; var orderBy; var page; var labels; var updatedQueryString = paging.addPageToQueryString(currentQueryString, newPageNum); var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + updatedQueryString; if (history.pushState) { window.history.pushState({ path: newUrl }, '', newUrl); orderBy = getQueryVariable("order_by"); page = getQueryVariable("page"); labels = getQueryVariable("labels"); nodeId = getQueryVariable("node_id"); } paging.rerenderListing(postsPerPage, nodeId, orderBy, page, labels); }); $('#prev-page').on('click', function() { var currentQueryString = window.location.search; var currentPage = getQueryVariable("page") var newPageNum = Number(currentPage) - 1; var postsPerPage = queryParams.posts_per_page; var nodeId = queryParams.node_id; var orderBy; var page; var labels; var updatedQueryString = paging.addPageToQueryString(currentQueryString, newPageNum); var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + updatedQueryString; if (history.pushState) { window.history.pushState({ path: newUrl }, '', newUrl); orderBy = getQueryVariable("order_by"); page = getQueryVariable("page"); labels = getQueryVariable("labels"); nodeId = getQueryVariable("node_id"); } paging.rerenderListing(postsPerPage, nodeId, orderBy, page, labels); }); }, paginator: function(page, pageCount, jQueryElement) { paging.addPageNumbers(page, pageCount, jQueryElement); paging.enableOrDisablePagingNav(page, pageCount) paging.addPageNavClickEvents(Number(page)); } } // ******* onload data call pagination blog *********// $(document).ready(function() { var pagingList = $('#pages-list'); // Render pagination list on page load var checkLabel = false; var appendQuery = ''; $(".filter-by-label-item").each(function(){ if($(this).text() == '') { checkLabel = true; } }) if(checkLabel){ var appendQuery = ""; } var appendListingTiles = window.hubspotCommunity.appendListingTiles; var resourcesList = $('#resources-list'); var checkLabel = false; var appendQuery = ''; $(".filter-by-label-item").each(function(){ if($(this).text() == '') { checkLabel = true; } }) if(checkLabel){ var appendQuery = ""; } var checkOrder = false; var appendOrder = ''; $(".order-by-option").each(function(){ if($(this).text() == "last_updated") { checkOrder = true; } }) if(checkOrder){var appendOrder = "last_updated"; } let checkOnce = 0; $.get("/plugins/custom/hubspot/hubspot/resources?posts_per_page=30&node_id=resources_fr&page=1&catId=resources_fr&labels="+appendQuery+"&order_by="+appendOrder+nodeTypeVar) .done(function( resourcesData ) { console.log("resourcesData => ", resourcesData); appendListingTiles(resourcesData, resourcesList ,1); var currentPage = resourcesData.currentPage; var totalPages = resourcesData.totalPages; paging.paginator(currentPage, totalPages, pagingList); }).fail(function(err) { if(err.status === 200 && err.readyState === 4) { if(checkOnce === 0) { checkOnce++; $.get("/plugins/custom/hubspot/hubspot/resources?posts_per_page=30&node_id=resources_fr&page=1&catId=resources_fr&labels="+appendQuery+"&order_by="+appendOrder+nodeTypeVar) .done(function( finalResourcesData ) { console.log("finalResourcesData => ", finalResourcesData); }).fail(function(finalErr) { console.log("finalErr => ", finalErr); }); } } else { console.log(err); } }) $('.pages-list li, #prev-page,#next-page').live('click', function(e) { var position = $('.resources-listing-top-bar').offset(); position=position.top; $('html, body').animate({ scrollTop: position }, 700); }); }); })(LITHIUM.jQuery); ;(function ($) { if ($(window).width() <= 991) { $(".community-footer .col:nth-child(3)").on('click',function(){ if ($(this).hasClass('active')) { $(this).removeClass('active'); $(this).children("ul").hide(); $(this).children("h5").removeClass("addedClass"); } else { $(".community-footer .col").removeClass('active'); $('.community-footer .col ul').hide(); $(this).addClass('active'); $(this).children("ul").show(); $('.community-footer .col').children("h5").removeClass("addedClass"); $(this).children("h5").addClass("addedClass"); } if ( $(".community-footer .col:nth-child(4) ul").hasClass('custom-footer-res')) { $(".community-footer .col:nth-child(4) ul").removeClass('custom-footer-res'); } else { $(".community-footer .col:nth-child(4) ul").addClass('custom-footer-res'); } }) $('.community-footer .col:nth-child(1)').on("click", function () { if ($(this).hasClass('active')) { $(this).removeClass('active'); $(this).children("ul").hide(); $(this).children("h5").removeClass("addedClass"); } else { $(".community-footer .col").removeClass('active'); $('.community-footer .col ul').hide(); $(this).addClass('active'); $(this).children("ul").show(); $('.community-footer .col').children("h5").removeClass("addedClass"); $(this).children("h5").addClass("addedClass"); } if ( $(".community-footer .col:nth-child(4) ul").hasClass('custom-footer-res')) { $(".community-footer .col:nth-child(4) ul").removeClass('custom-footer-res'); } }) $('.community-footer .col:nth-child(2)').on("click", function () { if ($(this).hasClass('active')) { $(this).removeClass('active'); $(this).children("ul").hide(); $(this).children("h5").removeClass("addedClass"); } else { $(".community-footer .col").removeClass('active'); $('.community-footer .col ul').hide(); $(this).addClass('active'); $(this).children("ul").show(); $('.community-footer .col').children("h5").removeClass("addedClass"); $(this).children("h5").addClass("addedClass"); } if ( $(".community-footer .col:nth-child(4) ul").hasClass('custom-footer-res')) { $(".community-footer .col:nth-child(4) ul").removeClass('custom-footer-res'); } }) } })(LITHIUM.jQuery); LITHIUM.PartialRenderProxy({"limuirsComponentRenderedEvent":"LITHIUM:limuirsComponentRendered","relayEvent":"LITHIUM:partialRenderProxyRelay","listenerEvent":"LITHIUM:partialRenderProxy"}); LITHIUM.AjaxSupport({"ajaxOptionsParam":{"event":"LITHIUM:partialRenderProxyRelay","parameters":{"javascript.ignore_combine_and_minify":"true"}},"tokenId":"ajax","elementSelector":document,"action":"partialRenderProxyRelay","feedbackSelector":false,"url":"https://community.hubspot.com/t5/community/categorypage.liabase.basebody.partialrenderproxy:partialrenderproxyrelay?t:ac=category-id/resources_fr/q-p/cHJvZmlsZS5sYW5ndWFnZTplbg..","ajaxErrorEventName":"LITHIUM:ajaxError","token":"nhJb8yQ_VF_C-38Y5xQ_7CR2A-575JgmkGfJGw6fAjY."}); LITHIUM.Auth.API_URL = "/t5/util/authcheckpage"; LITHIUM.Auth.LOGIN_URL_TMPL = "https://app.hubspot.com/khoros/integration/jwt/authenticate?referer=https%3A%2F%2FREPLACE_TEXT"; LITHIUM.Auth.KEEP_ALIVE_URL = "/t5/status/blankpage?keepalive"; LITHIUM.Auth.KEEP_ALIVE_TIME = 300000; LITHIUM.Auth.CHECK_SESSION_TOKEN = '7vzVLLWHLB3sSwDDNCbtTFJUyjKlrvkEu1iVsMKk2vk.'; LITHIUM.AjaxSupport.useTickets = false; LITHIUM.Loader.runJsAttached(); // -->