File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/IPO_HUB/wp-content/plugins/td-cloud-library/assets/js/js_files_for_front.min.js
Back
"undefined"===typeof window.tdcPostSettings&&(window.tdcPostSettings={tdbTemplateType:"all"});if(window.tdbVue&&"undefined"!==typeof window.tdbVue.router){var eventHub=new Vue;Vue.component("image-links",{template:'\n <a :class="classes" :href="link">{{text}}</a>\n ',props:{classes:[],link:"",text:""}});new Vue({el:"#tdb-modal",router:window.tdbVue.router})} (function(){function a(a,c,e,f,g,d,h){var b=jQuery(".tdb-"+a+"-templates");b.length&&"undefined"===typeof b.data("tdb-templates")&&("undefined"!==typeof d&&d.call(),d={action:"tdb_get_"+a+"_templates",_nonce:window.tdb_globals.wpRestNonce},d[a+"_id"]=c,jQuery.ajax({type:"POST",url:td_ajax_url,data:d,success:function(d,k,n){b.html("");"undefined"!==typeof h&&h.call();d=jQuery.parseJSON(d);var l="";_.isArray(d)&&d.length?("undefined"!==typeof f&&!0===f&&(l+='<div class="tdb-template-el tdb-'+a+'-template-el"><div class="tdb-template-el-id tdb-'+ a+'-template-id"></div><div class="tdb-template-el-title" data-type="'+a+'" data-action="'+e+'" title="Set as Global Template" data-'+a+'-id="'+c+'" data-template-id="">Global Template</div></div>'),l+='<div class="tdb-templates-header">Cloud Templates</div>',_.each(d,function(b,d,h){d="";"true"===b.is_current.toString()&&(d=" tdb-current");d='<div class="tdb-template-el tdb-'+a+"-template-el"+d+'" data-template-id="'+b.template_id+'"><div class="tdb-template-el-id tdb-'+a+'-template-id">'+b.template_id+ '</div><div class="tdb-template-el-title" data-type="'+a+'" data-action="'+e+'" title="'+b.template_title+' - Set template for this post" data-'+a+'-id="'+c+'" data-template-id="'+b.template_id+'">'+b.template_title+'</div><div class="tdb-template-el-wrap"><div class="tdb-template-el-icon"><div class="tdb-template-el-options"><div title="Delete template" class="tdb-template-el-delete"></div><div title="Duplicate template" class="tdb-template-el-duplicate"></div><div title="Rename template" class="tdb-template-el-edit"></div></div></div></div>'; "undefined"!==typeof f&&!0===f&&(h="","undefined"!==typeof g&&""!==g&&(h='data-global-action="'+g+'"'),d+='<div class="tdb-template-el-global tdb-'+a+'-template-global" title="Set as Global Template" data-type="'+a+'" data-'+a+'-id="'+c+'" data-template-id="'+b.template_id+'" '+h+'><input type="checkbox" class="tdb-template-el-global-input tdb-'+a+'-template-global-input" '+(!0===b.is_global?"checked":"")+'><label></label><span class="tdb-template-el-global-checked tdb-'+a+'-template-global-checked">Global</span></div>'); l+=d+"</div>"}),b.append(l)):(b.append('<div class="tdb-templates-header">Cloud Templates</div>'),b.append('<div class="tdb-templates-desc">No cloud templates. Please import one or more templates from <b>Cloud Library</b>.</div>'));b.data("tdb-templates",!0)},error:function(a,b,c){}}))}jQuery(document).ready(function(){jQuery("#wp-admin-bar-tdb_template_builder_disabled a").click(function(a){a.preventDefault();alert("Please select tagDiv Builder Template from the theme panel or set a default template. The current page/post uses a template that is not editable.")}); jQuery("#wp-admin-bar-new-tdb_templates").hide()});jQuery("body").on("click","#wp-admin-bar-tdb_template_load",function(a){a.preventDefault();a=jQuery(this).attr("class");"undefined"!==typeof a&&(0===a.indexOf("singleid-")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"single",templateType:"Single",assign_to_post:a.replace("singleid-","")}}):0===a.indexOf("categoryid-")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"category",templateType:"Category",assign_to_category:a.replace("categoryid-", "")}}):0===a.indexOf("404")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"404",templateType:"404",assign_to_404:btoa(window.location.href)}}):0===a.indexOf("date")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"date",templateType:"Date",assign_to_archive:btoa(window.location.href)}}):0===a.indexOf("search")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"search",templateType:"Search",assign_to_search:btoa(window.location.href)}}):0===a.indexOf("attachment")? window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"attachment",templateType:"Attachment",assign_to_attachment:btoa(window.location.href)}}):0===a.indexOf("authorid")?window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"author",templateType:"Author",assign_to_author:a.replace("authorid-","")}}):0===a.indexOf("tagid")&&window.tdbVue.router.push({name:"loadRoute",params:{wp_type:"tag",templateType:"Tag",assign_to_tag:a.replace("tagid-","")}}))}).on("click","#wp-admin-bar-tdb_template_single > a, #wp-admin-bar-tdb_template_category > a, #wp-admin-bar-tdb_template_404 > a, #wp-admin-bar-tdb_template_date > a, #wp-admin-bar-tdb_template_search > a, #wp-admin-bar-tdb_template_attachment > a, #wp-admin-bar-tdb_template_author > a, #wp-admin-bar-tdb_template_tag > a", function(b){b.preventDefault();var c=jQuery(this),e=c.parent(),f=e.attr("class"),g="",d="",h="",k="";switch(e.attr("id")){case "wp-admin-bar-tdb_template_single":g="single";d="tdb_assign_single_template_to_post";h="tdb_assign_single_template_global";k=f.replace(g+"id-","");break;case "wp-admin-bar-tdb_template_category":g="category";d="tdb_assign_cat_template_to_cat";h="tdb_assign_cat_template_global";k=f.replace(g+"id-","");break;case "wp-admin-bar-tdb_template_404":g="404";d="tdb_assign_404_template_global"; h="";k=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_date":g="date";d="tdb_assign_date_template_global";h="";k=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_search":g="search";d="tdb_assign_search_template_global";h="";k=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_attachment":g="attachment";d="tdb_assign_attachment_template_global";h="";k=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_author":g="author";d="tdb_assign_author_template_to_author"; h="tdb_assign_author_template_global";k=f.replace(g+"id-","");break;case "wp-admin-bar-tdb_template_tag":g="tag",d="tdb_assign_tag_template_to_tag",h="tdb_assign_tag_template_global",k=f.replace(g+"id-","")}e=jQuery(".tdb-"+g+"-templates");e.length?b.currentTarget===this&&jQuery(b.target).parent().attr("id")==="wp-admin-bar-tdb_template_"+g&&(e.toggle(),c.toggleClass("tdb-templates-open"),c.toggleClass("tdb-templates-close")):(c.addClass("tdb-templates-loading"),e=jQuery('<div class="tdb-templates tdb-'+ g+'-templates" data-type="'+g+'"></div>'),e.insertAfter(c),e.show());a(g,k,d,""===h?!1:!0,h,void 0,function(){c.removeClass("tdb-templates-loading");c.addClass("tdb-templates-open")})}).on("click",".tdb-single-template-global label, .tdb-category-template-global label, .tdb-author-template-global label, .tdb-tag-template-global label",function(a){a.preventDefault();a=jQuery(this);var c=a.closest(".tdb-template-el-global"),b=c.data("type"),f=c.data("global-action");c=a.parent().data(b+"-id");var g= a.parent().data("template-id"),d=jQuery(".tdb-templates");a={action:f,template_id:g,_nonce:window.tdb_globals.wpRestNonce};switch(b){case "single":a.single_id=c;break;case "category":a.category_id=c;break;case "tag":a.tag_id=c;break;case "author":a.author_id=c}jQuery.ajax({type:"POST",url:td_ajax_url,data:a,success:function(a,c,e){a=jQuery.parseJSON(a);"undefined"!==typeof a.reload&&window.location.reload();"undefined"!==typeof a.global_template_id&&(d.find(".tdb-"+b+'-template-global > input[type="checkbox"]').removeAttr("checked"), d.find(".tdb-"+b+'-template-global[data-template-id="'+g+'"] > input[type="checkbox"]').attr("checked",!0))},error:function(a,c,b){}});return!1}).on("click",".tdb-template-el-title",function(a){a.preventDefault();if(a.target===a.currentTarget){var c=jQuery(this),b=c.data("action");a=c.data("type");var f=c.data(a+"-id");c=c.data("template-id");b={action:b,template_id:c,_nonce:window.tdb_globals.wpRestNonce};switch(a){case "single":b.single_id=f;break;case "category":b.category_id=f;break;case "author":b.author_id= f;break;case "tag":b.tag_id=f}jQuery.ajax({type:"POST",url:td_ajax_url,data:b,success:function(a,b,c){"undefined"!==typeof jQuery.parseJSON(a).reload&&window.location.reload()},error:function(a,b,c){}});return!1}}).on("change",".tdb-template-el-title-input",function(a){a.preventDefault();a=jQuery(this);var c=a.closest(".tdb-templates"),b=a.closest(".tdb-template-el"),f=b.find(".tdb-template-el-title:first");c.data("type");c=b.data("template-id");f.html();jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_change_template_name", template_id:c,template_title:a.val(),_nonce:window.tdb_globals.wpRestNonce},success:function(a,c,b){a=jQuery.parseJSON(a);"undefined"!==typeof a.template_id&&(f.html(a.template_title),f.removeData("title"))},error:function(a,c,b){}})}).on("click",".tdb-template-el-edit",function(a){a.preventDefault();var c=jQuery(this);a=c.closest(".tdb-templates");var b=c.closest(".tdb-template-el");c=b.find(".tdb-template-el-title:first");a.data("type");b.data("template-id");b=c.html();"undefined"===typeof c.data("title")&& (a.find(".tdb-template-el-title").each(function(a,c){a=jQuery(c);c=a.data("title");"undefined"!==typeof c&&(a.html(c),a.removeData("title"))}),c.data("title",c.html()),c.html('<input class="tdb-template-el-title-input" type="text" value="'+b+'">'),c.find("input").focus().select())}).on("click",".tdb-template-el-duplicate",function(b){b.preventDefault();b=jQuery(this);var c=b.closest(".tdb-templates"),e=b.closest(".tdb-template-el"),f=e.find(".tdb-template-el-title:first"),g=c.data("type");b=e.data("template-id"); var d=f.html(),h=f.data(g+"-id"),k=f.data("action"),l="";0<=["single","category","tag","author"].indexOf(g)&&(e=e.find(".tdb-template-el-global:first"),e.length&&(l=e.data("global-action")));tdbApi.run({wpNonce:window.tdb_globals.wpRestNonce,cloudEndPoint:"td-cloud-library/new_template",post:{postId:b,templateType:g,templateName:d,duplicateTemplate:!0},done:function(b){c.removeData("tdb-templates");a(g,0<=["single","category","tag","author"].indexOf(g)?h:"",k,""===l?!1:!0,l)},error:function(a){console.log("td-cloud-library/new_template ( duplicate template ) - ERROR", a)}});jQuery(".tdb-template-el-title-input").trigger("change")}).on("keyup",".tdb-template-el-title-input",function(a){27===a.keyCode&&jQuery(this).trigger("change")}).on("click",".tdb-template-el-delete",function(a){a=jQuery(this);a.closest(".tdb-templates");var c=a.closest(".tdb-template-el");a=c.data("template-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_delete_template",template_id:a,_nonce:window.tdb_globals.wpRestNonce},success:function(a,b,g){a=jQuery.parseJSON(a);"undefined"!== typeof a.reload&&window.location.reload();"undefined"!==typeof a.template_id&&c.remove()},error:function(a,c,b){}});jQuery(".tdb-template-el-title-input").trigger("change")}).on("click",function(a){a=jQuery(a.target);a.closest("#wp-admin-bar-tdb_template_single").length||a.closest("#wp-admin-bar-tdb_template_category").length||a.closest("#wp-admin-bar-tdb_template_404").length||a.closest("#wp-admin-bar-tdb_template_date").length||a.closest("#wp-admin-bar-tdb_template_search").length||a.closest("#wp-admin-bar-tdb_template_attachment").length|| a.closest("#wp-admin-bar-tdb_template_author").length||a.closest("#wp-admin-bar-tdb_template_tag").length||(a=jQuery(".tdb-templates"),a.length&&(a.hide(),a.prev("a").removeClass("tdb-templates-open").addClass("tdb-templates-close"),jQuery(".tdb-template-el-title-input").trigger("change")))})})();var tdbMenu={}; (function(){tdbMenu={items:[],item:function(){this.blockUid="";this._outsideClickArea=this._mainMenu=this._itemsWithSubmenu=null;this._outsideClickExcludedAreas="";this._openMenuClass="tdb-hover";this._openMenuBodyClass="tdb-open-menu";this._is_initialized=this.isMegaMenuParentPos=this.isMegaMenuFull=this.inComposer=!1},init:function(){tdbMenu.items=[]},_initialize_item:function(a){if(!0!==a._is_initialized){tdbMenu._setHover(a);var b=0<jQuery("."+a.blockUid).parents(".td-header-template-wrap").length; 0<a.jqueryObj.find(".tdb-menu .tdb-mega-menu .sub-menu").length&&(window.tdb_globals.isAjax?b||(a.isMegaMenuFull&&tdbMenu.megaMenuFull(a,a.inComposer),a.isMegaMenuParentPos&&tdbMenu.megaMenuParentPos(a,a.inComposer)):(a.isMegaMenuFull&&tdbMenu.megaMenuFull(a,a.inComposer),a.isMegaMenuParentPos&&tdbMenu.megaMenuParentPos(a,a.inComposer)));a._is_initialized=!0}},addItem:function(a){if("undefined"===typeof a.blockUid)throw"item.blockUid is not defined";tdbMenu.items.push(a);tdbMenu._initialize_item(a)}, deleteItem:function(a){for(var b=0;b<tdbMenu.items.length;b++)if(tdbMenu.items[b].blockUid===a)return tdbMenu.items.splice(b,1),!0;return!1},megaMenuFull:function(a,b){function c(){h=e.find(".tdb-menu .tdb-mega-menu .sub-menu");h.each(function(){d=-f.left+"px";jQuery(this).attr("style","left:"+d+"; width: "+jQuery("body").outerWidth()+"px !important")});k||(e.find(".tdb-mega-menu-inactive").removeClass("tdb-mega-menu-inactive"),k=!0)}var e=a.jqueryObj,f,g,d,h,k=!1;jQuery(window).resize(function(){setTimeout(function(){f= e.offset();g=f.left;c();b&&setInterval(function(){f=e.offset();f.left!==g&&(c(),g=f.left)},1E3)},1500)});jQuery(window).resize()},megaMenuParentPos:function(a,b){function c(){d=e.find(".tdb-menu .tdb-mega-menu ul");d.show();d.each(function(){jQuery(this).css("left","");h=jQuery(this).offset();k=h.left;0>k?jQuery(this).offset({left:0}):(l=jQuery(window).width()-(k+jQuery(this).outerWidth()),0>l&&jQuery(this).offset({left:jQuery(window).width()-jQuery(this).outerWidth()}))});m||(e.find(".tdb-mega-menu-inactive").removeClass("tdb-mega-menu-inactive"), m=!0);d.hide()}var e=a.jqueryObj,f,g,d,h,k,l,m=!1;setTimeout(function(){jQuery(window).resize(function(){f=e.offset();g=f.left;c();b&&setInterval(function(){f=e.offset();f.left!==g&&(c(),g=f.left)},1E3)});jQuery(window).resize()},60)},_getSubmenuPosition:function(a){var b=jQuery(window).width();a=a.children(".sub-menu").first();if(0<a.length){var c=a.offset().left+a.width();c>b&&(a.parent().parent().hasClass("tdb-menu")?a.css("left","-"+(c-b)+"px"):a.addClass("reversed").css("left","-"+(a.width()+ 0)+"px"))}},_getMouseAngleDirection:function(a,b,c,e){return Math.atan2(c-a,e-b)/Math.PI*180},_setHover:function(a){var b=a.jqueryObj.find(".tdb-menu");b.supersubs({minWidth:10,maxWidth:20,extraWidth:1,applyMin:!0});var c=b.find(".menu-item-has-children > a, .tdb-mega-menu > a");c.parent().find(".sub-menu").first().css("display","none");if(tdDetect.isTouchDevice)jQuery(document).on("touchstart","body",function(b){var d=c.parent(),e=jQuery("body");e.hasClass(a._openMenuBodyClass)&&!d.is(b.target)&& 0===d.has(b.target).length&&(d.removeClass(a._openMenuClass),d.children(".sub-menu").hide(),e.removeClass(a._openMenuBodyClass))}),c.on("touchstart",function(b){b.preventDefault();b.stopPropagation();var d=jQuery(this);b=d.parent();var e=jQuery("body");b.hasClass(a._openMenuClass)?null!==d.attr("href")&&"#"!==d.attr("href")?window.location.href=d.attr("href"):((b.parent().hasClass("tdb-menu")||b.parent().hasClass("top-header-menu"))&&e.removeClass(a._openMenuBodyClass),b.removeClass(a._openMenuClass), b.find(".sub-menu").hide(),b.find("li").removeClass(a._openMenuClass)):(b.parent().hasClass("tdb-menu")||b.parent().hasClass("top-header-menu")?(c.parent().removeClass(a._openMenuClass),c.parent().children(".sub-menu").hide()):(d=b.siblings(),d.removeClass(a._openMenuClass),d.find(".sub-menu").hide(),d.find("li").removeClass(a._openMenuClass)),b.addClass(a._openMenuClass),b.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(b),e.addClass(a._openMenuBodyClass))});else{var e={},f,g=!0;b.on("mouseleave", function(){c.parent().removeClass(a._openMenuClass);c.parent().children(".sub-menu").hide();e={}});b.find(".menu-item").hover(function(){var b=jQuery(this),h="",k,l;if(b.hasClass("menu-item-has-children")||b.hasClass("tdb-mega-menu"))if(b.parent().hasClass("tdb-menu"))if(jQuery.isEmptyObject(e))b.addClass(a._openMenuClass),b.children(".sub-menu").show(),e=b;else{if(b[0]!==e[0]){var m=l=k=0;var n=null;!0===g&&(g=!1,f=setTimeout(function(){c.parent().removeClass(a._openMenuClass);c.parent().children(".sub-menu").hide(); b.addClass(a._openMenuClass);b.children(".sub-menu").show();e=b},400));b.on("mousemove",function(d){5<=k?(k=0,n=tdbMenu._getMouseAngleDirection(l,m,d.pageX,d.pageY),l=d.pageX,m=d.pageY):(k++,0===l&&0===m&&(l=d.pageX,m=d.pageY));null!==n&&(85<n||-85>n)&&(c.parent().removeClass(a._openMenuClass),c.parent().children(".sub-menu").hide(),b.addClass(a._openMenuClass),b.children(".sub-menu").show(),b.off("mousemove"),clearTimeout(f),g=!0,e=b)})}}else h=b.siblings(),h.removeClass(a._openMenuClass),h.find(".sub-menu").hide(), h.find("li").removeClass(a._openMenuClass),b.addClass(a._openMenuClass),b.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(b);else b.parent().hasClass("tdb-menu")?jQuery.isEmptyObject(e)||(m=l=k=0,n=null,!0===g&&(g=!1,f=setTimeout(function(){c.parent().removeClass(a._openMenuClass);c.parent().children(".sub-menu").hide();e={}},400)),b.on("mousemove",function(d){5<=k?(k=0,n=tdbMenu._getMouseAngleDirection(l,m,d.pageX,d.pageY),l=d.pageX,m=d.pageY):(k++,0===l&&0===m&&(l=d.pageX,m=d.pageY));null!== n&&(85<n||-85>n)&&(c.parent().removeClass(a._openMenuClass),c.parent().children(".sub-menu").hide(),b.off("mousemove"),clearTimeout(f),g=!0,e={})})):(e=b.parent(),h=b.siblings(),h.removeClass(a._openMenuClass),h.find(".sub-menu").hide(),h.find("li").removeClass(a._openMenuClass))},function(){var a=jQuery(this);!1===g&&(clearTimeout(f),g=!0);a.off("mousemove")})}},unsetHover:function(a){null!==a._itemsWithSubmenu&&a._itemsWithSubmenu.off();null!==a._outsideClickArea&&a._outsideClickArea.off()}}})(); var tdbMenuItemPullDown={}; (function(){tdbMenuItemPullDown={init:function(){setTimeout(function(){jQuery(".tdb-menu-items-pulldown").each(function(a,b){a=jQuery(b);var c=a.parent().attr("id"),e=jQuery("."+c);b="";"none"!==e.css("max-width")&&(b=e.css("max-width"));if(e.hasClass("tdb-menu-items-in-more")){var f=a.find(".tdb-menu:first"),g=f.parents(".tdb-menu-items-pulldown:first"),d=[],h=new tdPullDown.item;if(void 0!==e.css("display")&&"inline-block"===e.css("display")){var k=e.closest(".vc_column_container");g=k;e="";e=0!== k.find(".tdc-elements").length?".tdc-elements":".wpb_wrapper";k.find(e+" > .td_block_wrap").each(function(){var a=.9*k.outerWidth(!0),b=jQuery(this).outerWidth(!0);if(jQuery(this).data("td-block-uid")!==c)if(b<a)d.push(jQuery(this));else return!1})}h.blockUid=c;h.horizontal_jquery_obj=f;h.vertical_jquery_obj=a.find(".tdb-menu-items-dropdown:first");h.horizontal_element_css_class="tdb-menu-item-button";h.horizontal_no_items_css_class="tdb-menu-items-empty";h.container_jquery_obj=g;h.horizontal_max_width= b;h.excluded_jquery_elements=d;tdPullDown.add_item(h)}f.parents(".tdb-menu-items-pulldown:first").hasClass("tdb-menu-items-pulldown-inactive")&&f.parents(".tdb-menu-items-pulldown:first").removeClass("tdb-menu-items-pulldown-inactive")})},50)}}})();jQuery().ready(function(){tdbMenu.init()});jQuery(window).load(function(){tdbMenuItemPullDown.init()});var tdbSearch={}; (function(){tdbSearch={items:[],init:function(){tdbSearch.items=[]},item:function(){this.jqueryObj=this.blockAtts=this.blockUid=void 0;this._is_search_open=!1;this._last_request_results_count=this._current_selection_index=0;this._first_down_up=!0;this._resultsLimit=void 0;this._openSearchFormClass="";this._is_initialized=this.isSearchFormFull=this.inComposer=!1},_initialize_item:function(a){if(!0!==a._is_initialized){jQuery(document).on("click",function(b){jQuery("."+a.blockUid+" .tdb-head-search-form-input").get(0)!== b.target&&!0===a._is_search_open&&tdbSearch.hide_search_box(a)});a.jqueryObj.find(".tdb-head-search-btn").on("click",function(b){b.preventDefault();b.stopPropagation();!0===a._is_search_open?tdbSearch.hide_search_box(a):tdbSearch.show_search_box(a)});a.jqueryObj.find(".tdb-head-search-form-input").keydown(function(b){if(b.which&&39===b.which||b.keyCode&&39===b.keyCode||b.which&&37===b.which||b.keyCode&&37===b.keyCode)tdbSearch.set_input_focus(a);else{if(b.which&&13===b.which||b.keyCode&&13===b.keyCode)return b= a.jqueryObj.find(".tdb-aj-cur-element"),0<b.length?window.location=b.find(".entry-title a").attr("href"):jQuery(this).parent().parent().submit(),!1;if(b.which&&40===b.which||b.keyCode&&40===b.keyCode)return tdbSearch.move_prompt_down(a),!1;if(b.which&&38===b.which||b.keyCode&&38===b.keyCode)return tdbSearch.move_prompt_up(a),!1;(b.which&&8===b.which||b.keyCode&&8===b.keyCode)&&1===jQuery(this).val().length&&a.jqueryObj.find(".tdb-aj-search").empty();tdbSearch.set_input_focus(a);setTimeout(function(){tdbSearch.do_ajax_call(a)}, 100);return!0}});var b=0<jQuery("."+a.blockUid).parents(".td-header-template-wrap").length;window.tdb_globals.isAjax?b||(a.isSearchFormFull?tdbSearch.searchFormWidth(a,!0,a.inComposer):tdbSearch.searchFormWidth(a,!1,a.inComposer)):a.isSearchFormFull?tdbSearch.searchFormWidth(a,!0,a.inComposer):tdbSearch.searchFormWidth(a,!1,a.inComposer);a._is_initialized=!0}},addItem:function(a){if("undefined"===typeof a.blockUid)throw"item.blockUid is not defined";tdbSearch.items.push(a);tdbSearch._initialize_item(a)}, deleteItem:function(a){for(var b=0;b<tdbSearch.items.length;b++)if(tdbSearch.items[b].blockUid===a)return tdbSearch.items.splice(b,1),!0;return!1},searchFormWidth:function(a,b,c){function e(){h=-g.left+"px";k.attr("style",k.attr("style")+";left:"+h)}var f=a.jqueryObj,g,d,h,k=f.find(".tdb-drop-down-search");jQuery(window).resize(function(){k.attr("style","width: "+jQuery("body").outerWidth()+"px !important");b&&setTimeout(function(){g=f.offset();d=g.left;e();c&&setInterval(function(){g=f.offset(); g.left!==d&&(e(),d=g.left)},1E3)},500)});jQuery(window).resize()},show_search_box:function(a){a.jqueryObj.find(".tdb-drop-down-search").addClass(a._openSearchFormClass);!0!==tdDetect.isIos&&setTimeout(function(){document.querySelector("."+a.blockUid+" .tdb-head-search-form-input").focus()},200);a._is_search_open=!0},hide_search_box:function(a){a.jqueryObj.find(".tdb-drop-down-search").removeClass(a._openSearchFormClass);a._is_search_open=!1},move_prompt_up:function(a){!0===a._first_down_up?(a._first_down_up= !1,0===a._current_selection_index?a._current_selection_index=a._last_request_results_count-1:a._current_selection_index--):0===a._current_selection_index?a._current_selection_index=a._last_request_results_count:a._current_selection_index--;tdbSearch._repaintCurrentElement(a)},move_prompt_down:function(a){!0===a._first_down_up?a._first_down_up=!1:a._current_selection_index===a._last_request_results_count?a._current_selection_index=0:a._current_selection_index++;tdbSearch._repaintCurrentElement(a)}, set_input_focus:function(a){a._current_selection_index=0;a._first_down_up=!0;a.jqueryObj.find(".tdb-search-form").fadeTo(100,1);a.jqueryObj.find(".td_module_wrap").removeClass("tdb-aj-cur-element")},remove_input_focus:function(a){0!==a._last_request_results_count&&a.jqueryObj.find(".tdb-head-search-form-input").addClass("tdb-head-search-nofocus")},_repaintCurrentElement:function(a){a.jqueryObj.find(".td_module_wrap").removeClass("tdb-aj-cur-element");a._current_selection_index>a._last_request_results_count- 1?(a.jqueryObj.find(".tdb-search-form").fadeTo(100,1),a.jqueryObj.find(".tdb-head-search-form-input").removeClass("tdb-head-search-nofocus")):(tdbSearch.remove_input_focus(a),a.jqueryObj.find(".td_module_wrap").eq(a._current_selection_index).addClass("tdb-aj-cur-element"))},do_ajax_call:function(a){var b=a.jqueryObj.find(".tdb-head-search-form-input").val();""===b?tdbSearch.set_input_focus(a):tdLocalCache.exist("tdb-"+b)?tdbSearch.process_ajax_response(tdLocalCache.get("tdb-"+b),a):jQuery.ajax({type:"POST", url:td_ajax_url,data:{action:"td_ajax_search",module:"tdb_module_search",atts:a.blockAtts,td_string:b,limit:a._resultsLimit},success:function(c,e,f){tdLocalCache.set("tdb-"+b,c);tdbSearch.process_ajax_response(c,a)},error:function(a,b,f){window.console.log(f)}})},process_ajax_response:function(a,b){var c=b.jqueryObj.find(".tdb-head-search-form-input").val(),e=b.jqueryObj.find(".tdb-aj-search");""===c?e.empty():(a=jQuery.parseJSON(a),a.td_search_query===c&&(b._current_selection_index=0,b._last_request_results_count= a.td_total_in_list,b._first_down_up=!0,e.html(a.td_data),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&(window.tdAnimationStack.check_for_new_items(".tdb-aj-search .td-animation-stack",window.tdAnimationStack.SORTED_METHOD.sort_left_to_right,!0,!1),window.tdAnimationStack.compute_items(!1))))},hideAllItems:function(){tdbSearch.items.forEach(function(a){tdbSearch.hide_search_box(a)})}}})();jQuery().ready(function(){tdbSearch.init()});
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings