CMD:
PHP:
mini manager
Path:
/
var
/
www
/
forum.shootsilhouette.com
/
public_html
/
js
/
Upload:
Edit: admin-sbpanel-style.js
/* =======================================================================*\ || ###################################################################### || || # vBulletin 5.6.9 || # ------------------------------------------------------------------ # || || # Copyright 2000-2022 MH Sub I, LLC dba vBulletin. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ vBulletin.precache("cancel changed_extra_css_warning confirm_action css_reverted css_saved error_loading_css error_setting_theme loading_themes no_preview_available revert revert_extra_css_warning save_and_continue style_changed success there_are_no_themes_installed".split(" "),["styleid"]);vBulletin.ensureObj("sitebuilder"); $.extend(vBulletin.sitebuilder,function(c){function E(a){var b=this;vBulletin.assertUserHasAdminPermission("canusesitebuilder",b,function(){u.call(b)});return!1}function u(a,b){var d=c(this);c(document.body);var e=!d.hasClass("selected"),m=!0;"undefined"!=typeof a&&(e=!!a);"undefined"!=typeof b&&(m=!!b);e?(c(document.body).addClass("js-edit-mode-style"),F(),c(".js-style-panel").css("display","none").removeClass("h-hide").slideDown("400",v)):(G(!e,d),c(".js-style-panel").slideUp("fast",function(){c(document.body).removeClass("js-edit-mode-style"); var a=new URL(location.href);a.searchParams.delete("adminAction");m?location.replace(a.href):history.replaceState({},"",a.href)}))}function p(a){u(!1,a);return!1}function G(a,b){c(document).trigger("vb-toggle-sitebuilder-menu",{enableButtons:a,currentButton:b})}function w(a,b,d){var e=c(".js-theme-selector__list:visible .js-theme-selector__theme-radio:checked").val();vBulletin.AJAX({call:"/ajax/api/style/setDefaultStyle",data:{styleid:e},error_phrase:"error_setting_theme",success:function(){vBulletin.storagetools.setCookie("userstyleid", e,!0);("undefined"==typeof b||b)&&p(!0);"undefined"!=typeof d&&d&&vBulletin.flashMessage(vBulletin.phrase.get("style_changed"))}});return!1}function H(a){x(f.getValue(),null,k,h)}function I(a){openConfirmDialog({title:vBulletin.phrase.get("revert"),message:vBulletin.phrase.get("revert_extra_css_warning"),iconType:"warning",onClickYes:function(a){vBulletin.AJAX({call:"/ajax/api/template/revertCssTemplateSbEditor",data:{styleid:k,templateName:h},success:function(){vBulletin.alert("success","css_reverted", "",q)},error_phrase:"error_saving_css"})}});return!1}function J(a){f.setValue(g)}function y(a,b,d){!b&&a&&a.target&&(b=c(a.target).closest(".js-theme-selector__theme").data("preview-url"));d||(d=c(a.target).closest(".js-theme-selector__list"));a=d.closest(".js-panel").find(".js-theme-selector__theme-preview");d=a.find("> img, > p");1==a.length&&(b=b?c("<img />").prop("src",b):c("<p />").addClass("b-theme-selector__theme-preview-message").text(vBulletin.phrase.get("no_preview_available")),d.is("p")&& b.is("p")?d.fadeTo(200,"0.5",function(){c(this).fadeTo(400,1)}):(d.css("zIndex","2"),b.css("zIndex","1").hide(),a.append(b),d.fadeOut({duration:300,queue:!1,complete:function(){c(this).remove()}}),b.fadeIn({duration:600,queue:!1})))}function K(a,b,d){d="js-theme-selector__theme b-theme-selector__theme h-margin-right-xl";var e=c('<input type="radio" name="styleid" value="'+this.styleid+'" />').addClass("js-theme-selector__theme-radio b-theme-selector__theme-radio h-margin-none h-margin-right-s"),m= c("<label />").prop("title",this.title),f=c("<div />").addClass("h-margin-s h-margin-bottom-none b-theme-selector__theme-title").text(30<this.title.length?this.title.substr(0,20)+" ...":this.title),g=c("<img />").addClass("h-margin-s h-margin-bottom-m").prop("src",this.iconurl),h=c("<div />").addClass("b-theme-selector__theme-thumbnail"),l=this.iconurl;(new Image).src=l;l=this.previewurl;(new Image).src=l;b==this.styleid&&(e.prop("checked",!0),y({},this.previewurl,a),d+=" b-theme-selector__theme--selected js-theme-selector__theme--selected js-vbscroller-selected-item"); h.append(g);f.prepend(e);m.append(h).append(f);c("<div />").addClass(d).data("preview-url",this.previewurl||"").append(m).appendTo(a);r.call(g.get(0),2)}function r(a){var b=c(this);b.css({maxWidth:"none",maxHeight:"none"});var d=b.outerWidth()||0,e=b.outerHeight()||0,f=d>e?"height":"width",g=!1;if(0<d&&0<e){var h=!1;if("width"==f&&100<d){var k=100/d;h=!0}else"height"==f&&100<e&&(k=100/e,h=!0);h&&(b.removeClass("h-margin-s h-margin-bottom-m").css({maxWidth:d*k,maxHeight:e*k}),d=b.parent(),e=c("<div />").addClass("b-theme-selector__image-resize-wrapper h-margin-s h-margin-bottom-m").css({width:100, height:100,overflow:"hidden"}),e.append(b),d.append(e),g=!0)}if(!g)if(b.css({maxWidth:"100px",maxHeight:"100px"}),0<a){var l=this;window.setTimeout(function(){r.call(l,--a)},100)}else l=this,b.off("load").on("load",function(){r.call(l,--a)})}function L(a,b){var d=0,e=vBulletin.options.get("styleid");b.html("");a&&a.themes&&c.each(a.themes,function(){K.apply(this,[b,e,d]);++d});d?M(b):c("<div />").addClass("b-theme-selector__message").text(vBulletin.phrase.get("there_are_no_themes_installed")).appendTo(b)} function M(a){vBulletin.vBScroller&&vBulletin.vBScroller.initializeScroller&&(a=a.closest(".js-vbscroller-wrapper"),vBulletin.vBScroller.initializeScroller(a))}function z(a){function b(b){var d=a,e=c(this).closest(".js-theme-selector__theme"),f=e.find(".js-theme-selector__theme-radio");e.is(".js-theme-selector__theme--selected")||(f.prop("checked",!0),e=c(this),e.closest(".js-theme-selector__list").find(".js-theme-selector__theme").removeClass("b-theme-selector__theme--selected js-theme-selector__theme--selected js-vbscroller-selected-item"), e.closest(".js-theme-selector__theme").addClass("b-theme-selector__theme--selected js-theme-selector__theme--selected js-vbscroller-selected-item"),y.call(this,b),d.liveUpdate&&w.call(this,b,!1,!0))}a=c.extend({},{liveUpdate:!1,container:document},a);var d=c(".js-theme-selector__list",a.containerSelector);d.off("change",".js-theme-selector__theme-radio").on("change",".js-theme-selector__theme-radio",b);d.off("click",".js-theme-selector__theme label img").on("click",".js-theme-selector__theme label img", b);vBulletin.AJAX({call:"/ajax/api/style/getThemeInfo",success:function(a){L.apply(this,[a,d])},error:function(){var a=c("<div />").addClass("b-theme-selector__message").text(vBulletin.phrase.get("error_fetching_themes"));d.html(a)}})}function N(a){a=c(a.target);if(a.is(".js_stylepanel_selectStyle")&&isNaN(parseFloat(a.val()))||a.is(".js_stylepanel_selectTemplate")&&""==a.val())return!1;currentText=f.getValue();g!=f.getValue()?O():q()}function n(a){"string"==typeof a&&(a=parseInt(a,10));t=!!a;c(".js-textonly").prop("checked", t)}function A(){var a=new Date,b=c(".js_stylepanel_selectStyle").val(),d=c(".js-sb-sprite-icon-preview-img"),e=d.attr("src");e=e.replace(/styleid=\d+/,"styleid="+b);e=e.replace(/ts=\d+/,"ts="+a.getTime());d.attr("src",e)}function B(a){var b=c(".js-sb-sprite-icon-preview");b.data("preview-initialized")||(c(".js-sb-sprite-icon-preview-bg-btn").css("background-color",function(){return c(this).data("bgcolor")}).on("click",function(){var a=c(this);c(".js-sb-sprite-icon-preview-img-wrapper").css("background-color", a.data("bgcolor"));c(".js-sb-sprite-icon-preview-bg-btn").removeClass("sb-sprite-icon-preview-bg-btn--selected");a.addClass("sb-sprite-icon-preview-bg-btn--selected");return!1}).eq(1).trigger("click"),b.data("preview-initialized","1"));a&&"css_sprite_icons_general.css"==a?(b.removeClass("h-hide"),A()):b.addClass("h-hide")}function q(){var a=c(".js_stylepanel_selectStyle"),b=c(".js_stylepanel_selectTemplate");if(!C){var d=vBulletin.storagetools.getCookie("userstyleid");d&&a.val(d);a.selectBox();b.selectBox(); C=!0}vBulletin.AJAX({call:"/ajax/api/template/getCssTemplateSbEditor",data:{styleid:a.val(),templateName:b.val()},success:function(c){"undefined"==typeof c.template||"undefined"==typeof c.template.template_un?(g="",n(0)):(g=c.template.template_un,n(c.template.textonly));f.setValue(g);g=f.getValue();k=a.val();h=b.val();B(h)},api_error:function(){g="";f.setValue("");k=a.val();h=b.val();n(0);B("")},error_phrase:"error_loading_css"})}function O(){openConfirmDialog({title:vBulletin.phrase.get("confirm_action"), message:vBulletin.phrase.get("changed_extra_css_warning"),iconType:"warning",buttonLabel:{yesLabel:vBulletin.phrase.get("save_and_continue"),noLabel:vBulletin.phrase.get("cancel")},onClickYes:function(a){x(f.getValue(),q,k,h)},onClickNo:function(a){c(".js_stylepanel_selectStyle").selectBox("value",k);c(".js_stylepanel_selectTemplate").selectBox("value",h);n(t)}})}function x(a,b,d,e){var f=c(".js-textonly").prop("checked")?1:0;vBulletin.AJAX({call:"/ajax/api/template/saveCssTemplateSbEditor",data:{text:a, styleid:d,templateName:e,textonly:f},success:function(){g=a;A();vBulletin.alert("success","css_saved","",b)},error_phrase:"error_saving_css"})}function v(){function a(){if("undefined"==typeof f){var e=c(".sb-style-panel_cssextraedit").get(0);f=CodeMirror.fromTextArea(e,{mode:"css",lineNumbers:!0});(e=c(e).attr("dir"))&&c(f.display.wrapper).attr("dir",e);g="";b.find(".js_stylepanel_selectStyle").change();b.trigger("vb-instrument");d.off("click",a)}}var b=c(".js-style-panel .js-admin-stylepanel-csseditor"), d=c(".sb-style-panel .tab-item a");d.off("click",a).on("click",a);b.is(":visible")&&a()}function F(){if(!D){c(".js-style-panel .tabs").tabs();var a=c(document);var b=".js-style-panel #admin-stylepanel-themes .js-button--save";a.off("click",b).on("click",b,w);b=".js-style-panel #admin-stylepanel-themes .js-button--cancel";a.off("click",b).on("click",b,p.bind(null,!1));b=".js-style-panel #admin-stylepanel-csseditor .js-button--revert";a.off("click",b).on("click",b,I);b=".js-style-panel #admin-stylepanel-csseditor .js-button--cancel"; a.off("click",b).on("click",b,J);b=".js-style-panel #admin-stylepanel-csseditor .js-button--close";a.off("click",b).on("click",b,p.bind(null,!0));b=".js-style-panel #admin-stylepanel-csseditor .js-button--save";a.off("click",b).on("click",b,H);b=".js-style-panel #admin-stylepanel-csseditor .js_stylepanel_selectStyle, .js-style-panel #admin-stylepanel-csseditor .js_stylepanel_selectTemplate";a.off("change",b).on("change",b,N);1==c(".js-style-panel .js-theme-selector__container").length&&z({liveUpdate:!1, containerSelector:".js-style-panel"});1==c(".js-style-panel .js-admin-stylepanel-csseditor").length&&v();D=!0}}var D=!1,f,g="",k=0,h="",t=0,C=!1;c(function(){c(document).on("vb-sitebuilder-panel--style",E)});return{initThemesInQuickConfig:function(){z({liveUpdate:!0,containerSelector:".js-config-site-panel"})}}}(jQuery));
[ Kembali ]
© 2026 mini manager