File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/components/aspro/theme.next/templates/.default/script.min.js
Back
var timerHide=!1;funcDefined("showToggles")||(showToggles=function(){new DG.OnOffSwitchAuto({cls:".block-item.active .custom-switch",textOn:"",height:33,heightTrack:16,textOff:"",trackColorOff:"f5f5f5",listener:function(e,t){var s=$("input[name="+e+"]").closest(".values").length;if(t?$("input[name="+e+"]").val("Y"):$("input[name="+e+"]").val("N"),s){var i,o=$('<div class="btn-ajax-block animation-opacity"></div>'),a=$("input[name="+e+"]").closest(".option-wrapper"),c=BX.pos(a[0],!0);o.html($(".values > .apply-block").html()),a.toggleClass("disabled"),i=c.top+$(".style-switcher .header").actual("outerHeight"),o.css("top",i),$(".btn-ajax-block").length&&$(".btn-ajax-block").remove(),o.appendTo($(".style-switcher")),o.addClass("opacity1")}setTimeout(function(){s||$("form[name=style-switcher]").submit()},200)}})}),$(document).ready(function(){$(".style-switcher .presets").mCustomScrollbar({mouseWheel:{scrollAmount:150,preventDefault:!0},callbacks:{onScroll:function(){var e=$(".style-switcher .presets .mCSB_container").css("top");$.cookie("STYLE_SWITCHER_SCROLL_PRESET_POSITION",e,{path:arNextOptions.SITE_DIR})}},setTop:void 0!==$.cookie("STYLE_SWITCHER_SCROLL_PRESET_POSITION")?$.cookie("STYLE_SWITCHER_SCROLL_PRESET_POSITION"):0}),$(".style-switcher .left-block").mCustomScrollbar({mouseWheel:{scrollAmount:150,preventDefault:!0},callbacks:{onScroll:function(){var e=$(".style-switcher .left-block .mCSB_container").css("top");$.cookie("STYLE_SWITCHER_SCROLL_LEFT_POSITION",e,{path:arNextOptions.SITE_DIR})}},setTop:void 0!==$.cookie("STYLE_SWITCHER_SCROLL_LEFT_POSITION")?$.cookie("STYLE_SWITCHER_SCROLL_LEFT_POSITION"):0}),$(".style-switcher .right-block").mCustomScrollbar({mouseWheel:{scrollAmount:150,preventDefault:!0},callbacks:{onScroll:function(){var e=$(".style-switcher .right-block .mCSB_container").css("top");$.cookie("STYLE_SWITCHER_SCROLL_RIGHT_POSITION",e,{path:arNextOptions.SITE_DIR})}},setTop:void 0!==$.cookie("STYLE_SWITCHER_SCROLL_RIGHT_POSITION")?$.cookie("STYLE_SWITCHER_SCROLL_RIGHT_POSITION"):0}),$(".style-switcher .item input[type=checkbox]").on("change",function(){var e=$(this);e.is(":checked")?e.val("Y"):e.val("N"),$("form[name=style-switcher]").submit()}),$(".style-switcher .can_save .save_btn").on("click",function(){var t=$(this);timerHide&&(clearTimeout(timerHide),timerHide=!1),$.ajax({type:"POST",url:arNextOptions.SITE_DIR+"ajax/options_save.php",data:{SAVE_OPTIONS:"Y"},dataType:"json",success:function(e){"STATUS"in e&&($(".save_config_status").length||$('<div class="save_config_status"><span></span></div>').appendTo(t.parent()),"OK"===e.STATUS?$(".save_config_status").addClass("success"):$(".save_config_status").addClass("error"),$(".save_config_status span").text(BX.message(e.MESSAGE)),$(".save_config_status").slideDown(200),timerHide=setTimeout(function(){$(".save_config_status").slideUp(200,function(){$(this).remove()})},1e3))}})}),showToggles(),"presets"===$.cookie("styleSwitcherType")&&$(".style-switcher .presets").addClass("active"),"open"===$.cookie("styleSwitcher")&&($(".style-switcher").addClass("active"),"presets"===$.cookie("styleSwitcherType")?$(".style-switcher .switch_presets").addClass("active"):$(".style-switcher .switch").addClass("active")),$(".base_color_custom input[type=hidden]").length&&$(".base_color_custom input[type=hidden]").each(function(){var e=$(this),s=$(this).closest(".base_color_custom");e.spectrum({preferredFormat:"hex",showButtons:!0,showInput:!0,showPalette:!1,appendTo:s,chooseText:BX.message("CUSTOM_COLOR_CHOOSE"),cancelText:BX.message("CUSTOM_COLOR_CANCEL"),containerClassName:"custom_picker_container",replacerClassName:"custom_picker_replacer",clickoutFiresChange:!1,move:function(e){var t=e.toHexString();s.find("span span").attr("style","background:"+t)},hide:function(e){var t=e.toHexString();s.find("span span").attr("style","background:"+t)},change:function(e){s.addClass("current").siblings().removeClass("current"),$("form[name=style-switcher] input[name="+s.find(".click_block").data("option-id")+"]").val(s.find(".click_block").data("option-value")),$("form[name=style-switcher]").submit()}})}),$(".base_color_custom").click(function(e){return e.preventDefault(),$("input[name="+$(this).data("name")+"]").spectrum("toggle"),!1}),$(".base_color.current").length&&$(".base_color.current").each(function(){var e=$(this).closest(".options").find(".base_color_custom"),t=$(this).data("color");null!=t&&t.length&&($("input[name="+e.data("name")+"]").spectrum("set",t),e.find("span span").attr("style","background:"+t))}),$(".style-switcher .switch,.style-switcher .switch_presets").click(function(e){e.preventDefault();var t=$(this).closest(".style-switcher"),s=t.find(".presets"),i=(t.find(".parametrs"),$(this).hasClass("switch_presets"));if(t.hasClass("active")){var o=$.cookie("styleSwitcherType");t.find(".switch").removeClass("active"),t.find(".switch_presets").removeClass("active"),i&&"presets"===o||!i&&"parametrs"===o?(setTimeout(function(){HideHintBlock(!0)},300),$.removeCookie("styleSwitcherType",{path:"/"}),$.removeCookie("styleSwitcher",{path:"/"}),t.addClass("closes"),setTimeout(function(){t.removeClass("active")},500)):(HideHintBlock(!1),$.cookie("styleSwitcherType",i?"presets":"parametrs",{path:"/"}),t.find(".header .title").hide(),i?(t.find(".header .title.title-presets").show(),t.find(".switch_presets").addClass("active"),s.addClass("active")):(t.find(".header .title.title-parametrs").show(),t.find(".switch").addClass("active"),s.removeClass("active")))}else HideHintBlock(!0),$(this).addClass("active"),$.cookie("styleSwitcherType",i?"presets":"parametrs",{path:"/"}),t.find(".header .title").hide(),i?(t.find(".header .title.title-presets").show(),s.addClass("active")):(t.find(".header .title.title-parametrs").show(),s.removeClass("active")),ShowOverlay(),t.removeClass("closes").addClass("active"),$.cookie("styleSwitcher","open",{path:"/"})}),HideHintBlock=function(e){void 0!==e&&!e||HideOverlay(),$.cookie("clickedSwitcher","Y",{path:"/"}),$(".hint-theme").length&&$(".hint-theme").fadeIn(300,function(){$(".hint-theme").remove()})},$(document).on("click",".close-overlay",function(){HideHintBlock()}),$(document).on("click",".jqmOverlay",function(){var e=$(".style-switcher");e.length&&e.hasClass("active")&&($(".hint-theme").length||setTimeout(function(){HideOverlay()},300),e.each(function(){var e=$(this);e.addClass("closes"),setTimeout(function(){e.removeClass("active")},500),$(".form_demo-switcher").animate({left:"-"+$(".form_demo-switcher").outerWidth()+"px"},100).removeClass("active abs")}),$(".style-switcher .switch,.style-switcher .switch_presets").removeClass("active"),$.removeCookie("styleSwitcherType",{path:"/"}),$.removeCookie("styleSwitcher",{path:"/"}))}),$(".style-switcher .section-block").on("click",function(){$(this).siblings().removeClass("active"),$(this).addClass("active"),$(".style-switcher .right-block .block-item").removeClass("active"),$(".style-switcher .right-block .block-item:eq("+$(this).index()+")").addClass("active"),$.cookie("styleSwitcherTabIndex",$(this).index(),{path:"/"}),$(this).hasClass("toggle_initied")||showToggles(),$(this).addClass("toggle_initied")}),$(".style-switcher .reset").click(function(e){$("form[name=style-switcher]").append('<input type="hidden" name="THEME" value="default" />'),$("form[name=style-switcher]").submit()}),$(document).on("click",".style-switcher .apply",function(){$("form[name=style-switcher]").submit()}),$(".style-switcher .sup-params.options .block-title").click(function(){$(this).next().slideToggle()}),$(document).on("click",".style-switcher .presets .preset-block",function(){var e=$(this);if(!e.hasClass("current")&&!e.hasClass("editing")){var t=e.closest(".item").index();if("object"==typeof arNextOptions.PRESETS&&"object"==typeof arNextOptions.PRESETS[t]){var s={backurl:arNextOptions.SITE_DIR},i=[],o=$("form[name=style-switcher]").serializeArray();for(j in o)s[o[j].name]=o[j].value;if(arNextOptions.PRESETS[t].OPTIONS&&"object"==typeof arNextOptions.PRESETS[t].OPTIONS)for(j in arNextOptions.PRESETS[t].OPTIONS){var a=arNextOptions.PRESETS[t].OPTIONS[j];if("object"!=typeof a)s[j]=a;else if(void 0!==a.VALUE){if(s[j]=a.VALUE,"object"==typeof a.SUB_PARAMS)for(z in a.SUB_PARAMS){var c=a.SUB_PARAMS[z];"object"!=typeof c?s[a.VALUE+"_"+z]=c:void 0!==c.VALUE&&(s[a.VALUE+"_"+z]=c.VALUE,void 0!==c.TEMPLATE&&(s[a.VALUE+"_"+z+"_TEMPLATE"]=c.TEMPLATE))}"object"==typeof a.ORDER?i.push({NAME:"SORT_ORDER_"+j+"_"+a.VALUE,VALUE:a.ORDER.join(",")}):"string"==typeof a.ORDER&&i.push({NAME:"SORT_ORDER_"+j+"_"+a.VALUE,VALUE:a.ORDER})}}!function e(){if(i.length){var t=i.pop();$.ajax({url:arNextOptions.SITE_DIR+"ajax/options_save_mainpage.php",type:"POST",data:t,success:function(){e()}})}else $.ajax({type:"POST",data:s,success:function(){$(".style-switcher .switch_presets").trigger("click"),location.href=arNextOptions.SITE_DIR}})}()}}}),$(".style-switcher .options > .link-item,.style-switcher .options > div:not(.base_color_custom) span.link-item,.style-switcher .options > div:not(.base_color_custom) .click_block").click(function(e){var t=$(this);if(!t.hasClass("current"))if(t.addClass("current").siblings().removeClass("current"),$("form[name=style-switcher] input[name="+t.data("option-id")+"]").val(t.data("option-value")),void 0!==$(this).data("option-type")&&$.cookie("scroll_block",$(this).data("option-type")),void 0!==$(this).data("option-url")&&$("form[name=style-switcher]").prepend('<input type="hidden" name="backurl" value='+$(this).data("option-url")+" />"),t.closest(".options").hasClass("refresh-block")){if(!t.closest(".options").hasClass("sup-params"))t.index();t.closest(".item").find(".sup-params.options").removeClass("active"),t.closest(".item").find(".sup-params.options.s_"+t.data("option-value")).addClass("active"),$("form[name=style-switcher]").submit()}else $("form[name=style-switcher]").submit()}),$(".tooltip-link").on("shown.bs.tooltip",function(e){var t=$(this).next(),s=($(window).height(),$(this).closest("form").scrollTop(),BX.pos($(this)[0],!0)),i=BX.pos(t[0],!0),o=BX.pos($(this).closest(".item")[0],!0);!$(this).closest(".item").next().length&&i.bottom>o.bottom&&(t.removeClass("bottom").addClass("top"),t.css({top:s.top-t.actual("outerHeight")}))})});
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings