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_159fced917c4f4', 'disableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'c6-Q9bs6X9xqVEq0xfOEqyKA6W3N7JaZ4vrCrsFmwPw.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fced7ffa17f_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fceda7cf615', 'disableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'Pq3NdktaQ12G8sF-fqH2WCa-8RgRvSyX-Qw5Diakz8k.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fced7ffa17f_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedaa36e90', 'disableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'Yq6EUIVfsCREuxbbz1nAYT78S5PberRDMSl_MTbQ7uo.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_159fced7ffa17f","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fced7ffa17f","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_159fced7ffa17f_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"DpFloZj7kiFv0O5YUx4JwypHO9Ww-Wi3HXIRDRApFic."}); 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_159fcedaf79f84', 'disableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'bib0LWeAo_hEXW-8izvbF9kTy9vqehksPMfHeZjFZwI.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_159fced7ffa17f_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedb155614', 'disableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'XHivstdAPmcfQqbGYa0fhQUYW5OZ6u1XO1UcK9y41UE.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_159fced7ffa17f","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.Link({"linkSelector":"a.lia-link-ticket-post-action"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_159fced7ffa17f', 'enableAutoComplete', '#ajaxfeedback_159fced7ffa17f_0', 'LITHIUM:ajaxError', {}, 'AP9bWkulsuyAUFiGMaZl3Z_PbsCuLvV-nPDg0IiFWIY.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_159fced7ffa17f","tooltipContentSelector":"#link_159fced7ffa17f_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_159fced7ffa17f_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_159fced7ffa17f","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_159fced7ffa17f","asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_159fced7ffa17f_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_159fcedca00ea7","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcedca00ea7_0","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcedca00ea7_1","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcedca00ea7_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_159fcedddaa98e', 'disableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'dYT2gGYqHOUt-VWUmUlllP7n5kUDtrFx69-fnCUrOTc.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fcedca00ea7_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedeefa22c', 'disableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'ZmR_LUONEVZoZgWZ4YrrlT0X62zGDxfltaObqe8jvAU.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fcedca00ea7_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedf0966a0', 'disableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'vD8uDnpWxZ__mnb12zHer7gyRQxr-Ui3YBeYujfsigQ.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_159fcedca00ea7","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedca00ea7","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_159fcedca00ea7_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"slqlDMe7vzRg-ALLBVUHn6B74j24StmCxAoUZormfkU."}); 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_159fcedf2ef5d8', 'disableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'AzDcgKckxLr20qScd2_f2Yifr78zK0qajrRZLp_IAjQ.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_159fcedca00ea7_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcedf539002', 'disableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'OaK9p3MUwsiuG-WHR2UuFNuKTrNEpSDmJwowfXrEU3w.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_159fcedca00ea7","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_159fcedca00ea7', 'enableAutoComplete', '#ajaxfeedback_159fcedca00ea7_0', 'LITHIUM:ajaxError', {}, 'Ps4S9CwihC0mUDjTV69Ifn1AU7erao95UJlQJxf_LmU.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_159fcedca00ea7","tooltipContentSelector":"#link_159fcedca00ea7_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_159fcedca00ea7_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_159fcedca00ea7","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_159fcedca00ea7","nodesModel":{"user|user":{"title":"Users","inputSelector":".lia-search-input-user"},"resources|category":{"title":"Search Category: Resources","inputSelector":".lia-search-input-message"},"mjmao93648|community":{"title":"Search Community: Resources","inputSelector":".lia-search-input-message"}},"asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_159fcedca00ea7_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' }else if('category'==='category') { var PostURl = '/t5/forums/postpage/category-id/resources'} 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_159fcee3fd8c55","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcee3fd8c55_0","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcee3fd8c55_1","feedbackSelector":".InfoMessage"}); LITHIUM.InformationBox({"updateFeedbackEvent":"LITHIUM:updateAjaxFeedback","componentSelector":"#informationbox_159fcee3fd8c55_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_159fcee4339f65', 'disableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'mOU5_kRJtrSoGYQUpy5oy8a7Wq_bR_s8mSg00e3JUJw.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fcee3fd8c55_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.messagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcee4dfd64f', 'disableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'LvvYZd-J1E02RyquIHWa65lz7_rKOGYvIMTV9u714Ys.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":3},"inputSelector":"#messageSearchField_159fcee3fd8c55_1","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.tkbmessagesearchfield.messagesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcee52e0ec1', 'disableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'GaJjmWdcpFtzHQEtobeAjzQffs8GMzHL8THNQ19tjxU.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#userSearchField_159fcee3fd8c55","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield.usersearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcee3fd8c55","action":"userExistsQuery","feedbackSelector":"#ajaxfeedback_159fcee3fd8c55_0","url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.usersearchfield:userexistsquery?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","ajaxErrorEventName":"LITHIUM:ajaxError","token":"VcPbxCahkLSl_ojqMh5pdrcbFafMvpMJ-8FW2QLe8BY."}); 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_159fcee5723231', 'disableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'ZDaKZw4X1KUAFNc7VSSFEKyTkSP3WJJ89KicO5U9A5s.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#noteSearchField_159fcee3fd8c55_0","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.notesearchfield.notesearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&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_159fcee5b95fe4', 'disableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'b9y08XEZyQfqjsWEaVoXrJUC-jJKyQ1MJvrpSsqAduM.', 'ajax');","content":"Turn off suggestions<\/a>"}],"prefixTriggerTextLength":0},"inputSelector":"#productSearchField_159fcee3fd8c55","redirectToItemLink":false,"url":"https://community.hubspot.com/t5/community/categorypage.searchformv32.productsearchfield.productsearchfield:autocomplete?t:ac=category-id/resources/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk&t:cp=search/contributions/page","resizeImageEvent":"LITHIUM:renderImages"}); LITHIUM.AjaxSupport.fromLink('#enableAutoComplete_159fcee3fd8c55', 'enableAutoComplete', '#ajaxfeedback_159fcee3fd8c55_0', 'LITHIUM:ajaxError', {}, 'P-A-VAARyvMCz1F2hpzsdQgNRZo8UWDzJUJpvrdEDVk.', 'ajax'); LITHIUM.Tooltip({"bodySelector":"body#lia-body","delay":30,"enableOnClickForTrigger":false,"predelay":10,"triggerSelector":"#link_159fcee3fd8c55","tooltipContentSelector":"#link_159fcee3fd8c55_0-tooltip-element .content","position":["bottom","left"],"tooltipElementSelector":"#link_159fcee3fd8c55_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_159fcee3fd8c55","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_159fcee3fd8c55","nodesModel":{"user|user":{"title":"Users","inputSelector":".lia-search-input-user"},"resources|category":{"title":"Search Category: Resources","inputSelector":".lia-search-input-message"},"mjmao93648|community":{"title":"Search Community: Resources","inputSelector":".lia-search-input-message"}},"asSearchActionIdHeaderKey":"X-LI-AS-Search-Action-Id","inputSelector":"#messageSearchField_159fcee3fd8c55_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 { // Check to see if user has create post options var nodeId = thisNode; var nodeType = 'board'; getBlogAuthorStatus(thisNode); } if(this.id =='Category_all'){var nodeType = 'category'; console.log('this dynamic')} else{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/@512AE9DC8B5D1019D1C8150AFBBC3807/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() == 'webinars') { checkNode = true; } }); if(checkNode == false){ nodeParam = "node_id=webinars"; } 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: "webinars", 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"; }; 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=webinars&page=1&catId=resources&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=webinars&page=1&catId=resources&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/q-p/bm9kZV9pZDp3ZWJpbmFyczo6b3JkZXJfYnk6bGFzdF91cGRhdGVk","ajaxErrorEventName":"LITHIUM:ajaxError","token":"8cqMQ5J1w5ucEz4keSz5fk8_AA4iw_PYvt0IlNoWcEM."}); 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 = 'xzcqzefLK2vr8W7JCi7Bne0GtvLnWP9Zzt23qpt_h9Q.'; LITHIUM.AjaxSupport.useTickets = false; LITHIUM.Loader.runJsAttached(); // -->