┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
webm008.cluster103.gra.hosting.ovh.net
LOCATION:
/home/paxmediccp/www/old wp/old/wp-content/plugins/custom-sidebars/js
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: cs.min.js
/*! Custom Sidebars Free - v2.1.02 * http://premium.wpmudev.org/project/the-pop-over-plugin/ * Copyright (c) 2015; * Licensed GPLv2+ */ function trim(e){e=e.replace(/^\s\s*/,"");for(var i=e.length-1;i>=0;i--)if(/\S/.test(e.charAt(i))){e=e.substring(0,i+1);break}return e}function CsSidebar(e,i){var t;this.id=e.split("%").join("\\%"),this.type=i,this.sb=jQuery("#"+this.id),this.widgets="",this.name=trim(this.sb.find(".sidebar-name h3").text()),this.description=trim(this.sb.find(".sidebar-description").text()),t="custom"===i?window.csSidebars.extras.find(".cs-custom-sidebar").clone():window.csSidebars.extras.find(".cs-theme-sidebar").clone(),this.sb.parent().append(t),t.find("label").each(function(){var i=jQuery(this);window.csSidebars.addIdToLabel(i,e)})}jQuery(function(){var e=jQuery(document),i=jQuery("#widgets-right"),t=function t(e,i){var t=jQuery(i).closest(".widget"),s=t.find(".csb-pro-layer"),a=t.find(".widget-control-actions .widget-control-save"),r=t.find(".widget-control-actions .spinner");t.data("_csb_free")!==!0&&(r.insertBefore(a).css({"float":"left"}),s.insertBefore(a),t.data("_csb_free",!0))};i.find(".widget").each(t),e.on("widget-added",t)}),CsSidebar.prototype.getID=function(){return this.id.split("\\").join("")},window.csSidebars=null,function(){window.csSidebars={sidebars:[],sidebar_prefix:"cs-",edit_form:null,delete_form:null,export_form:null,location_form:null,right:null,extras:null,action_handlers:{},init:function(){"undefined"!=typeof csSidebarsData&&csSidebars.initControls().initScrollbar().initTopTools().initSidebars().initToolbars().initColumns()},initControls:function(){return csSidebars.right=jQuery("#widgets-right"),csSidebars.extras=jQuery("#cs-widgets-extra"),null===csSidebars.edit_form&&(csSidebars.edit_form=csSidebars.extras.find(".cs-editor").clone(),csSidebars.extras.find(".cs-editor").remove()),null===csSidebars.delete_form&&(csSidebars.delete_form=csSidebars.extras.find(".cs-delete").clone(),csSidebars.extras.find(".cs-delete").remove()),null===csSidebars.export_form&&(csSidebars.export_form=csSidebars.extras.find(".cs-export").clone(),csSidebars.extras.find(".cs-export").remove()),null===csSidebars.location_form&&(csSidebars.location_form=csSidebars.extras.find(".cs-location").clone(),csSidebars.extras.find(".cs-location").remove()),jQuery("#cs-title-options").detach().prependTo(csSidebars.right),csSidebars},initScrollbar:function(){var e=jQuery(".widget-liquid-right"),i=jQuery(window),t=null;csSidebars.right.addClass("overview").wrap('<div class="viewport" />'),e.height(i.height()).prepend('<div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>').tinyscrollbar(),t=jQuery(".viewport").height(i.height()-32);var s=function s(){e.data("plugin_tinyscrollbar").update("relative")};return i.resize(function(){e.height(i.height()),t.height(i.height()-32),s()}),e.click(function(){window.setTimeout(s,400)}),i.on("cs-resize",s),e.hover(function(){e.find(".scrollbar").fadeIn()},function(){e.find(".scrollbar").fadeOut()}),window.setTimeout(s,1e3),csSidebars},initColumns:function(){var e=csSidebars.right.find(".sidebars-column-1"),i=csSidebars.right.find(".sidebars-column-2"),t=jQuery('<div class="cs-title"><h3></h3></div>'),s=csSidebars.right.find(".widgets-holder-wrap");i.length||(i=jQuery('<div class="sidebars-column-2"></div>'),i.appendTo(csSidebars.right)),t.find("h3").append('<span class="cs-title-val"></span>'),t.clone().prependTo(e).find(".cs-title-val").text(csSidebarsData.custom_sidebars),t.clone().prependTo(i).find(".cs-title-val").text(csSidebarsData.theme_sidebars),e=jQuery('<div class="inner"></div>').appendTo(e),i=jQuery('<div class="inner"></div>').appendTo(i),s.each(function(){var t=jQuery(this),s=t.find(".widgets-sortables");csSidebars.isCustomSidebar(s)?t.appendTo(e):t.appendTo(i)})},initSidebars:function(){return csSidebars.right.find(".widgets-sortables").each(function(){var e,i,t=!1,s=jQuery(this),a=s.attr("id");if(s.data("cs-init")!==!0)if(s.data("cs-init",!0),csSidebars.isCustomSidebar(this))i=csSidebars.add(a,"custom");else{i=csSidebars.add(a,"theme");for(e in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(e)&&csSidebarsData.replaceable[e]===a){t=!0;break}csSidebars.setReplaceable(i,t,!1)}}),csSidebars},initTopTools:function(){var e=jQuery(".btn-create-sidebar"),i=jQuery(".btn-export"),t={};return e.click(function(){t.id="",t.title=csSidebarsData.title_new,t.button=csSidebarsData.btn_new,t.description="",t.name="",csSidebars.showEditor(t)}),i.click(csSidebars.showExport),csSidebars},initToolbars:function(){var e=function(e){var i=jQuery(e.target).closest(".cs-tool"),t=i.data("action"),s=csSidebars.getIdFromEditbar(i),a=csSidebars.find(s);return!csSidebars.handleAction(t,a)};return csSidebars.registerAction("edit",csSidebars.showEditor),csSidebars.registerAction("location",csSidebars.showLocations),csSidebars.registerAction("delete",csSidebars.showRemove),csSidebars.registerAction("replaceable",csSidebars.setReplaceable),csSidebars.right.on("click",".cs-tool",e),csSidebars},handleAction:function(e,i){return"function"==typeof csSidebars.action_handlers[e]?!!csSidebars.action_handlers[e](i):!1},registerAction:function(e,i){csSidebars.action_handlers[e]=i},showAjaxError:function(e){var i={};i.message=csSidebarsData.ajax_error,i.details=e,i.parent="#widgets-right",i.insert_after="#cs-title-options",i.id="editor",i.type="err",wpmUi.message(i)},showEditor:function(e){var i=null,t=null;e instanceof CsSidebar&&(e={id:e.getID(),title:csSidebarsData.title_edit.replace("[Sidebar]",e.name),button:csSidebarsData.btn_edit});var s=function s(){i.$().removeClass("csb-has-more"),i.size(null,215)},a=function a(){i.$().addClass("csb-has-more"),i.size(null,545)},r=function r(){jQuery(this).prop("checked")?a():s()},n=function n(e,t){return i.loading(!1),e?t?(void 0!==e.sidebar&&(e=e.sidebar),void 0!==e.id&&i.$().find("#csb-id").val(e.id),void 0!==e.name&&i.$().find("#csb-name").val(e.name),void 0!==e.description&&i.$().find("#csb-description").val(e.description),void 0!==e.before_title&&i.$().find("#csb-before-title").val(e.before_title),void 0!==e.after_title&&i.$().find("#csb-after-title").val(e.after_title),void 0!==e.before_widget&&i.$().find("#csb-before-widget").val(e.before_widget),void 0!==e.after_widget&&i.$().find("#csb-after-widget").val(e.after_widget),void 0!==e.button&&i.$().find(".btn-save").text(e.button),void 0):(i.close(),csSidebars.showAjaxError(e),!1):!1},d=function d(e,t){var s,a={};i.loading(!1).close(),a.message=e.message,a.parent="#widgets-right",a.insert_after="#cs-title-options",a.id="editor",t?"update"===e.action?(s=csSidebars.find(e.data.id),csSidebars.updateSidebar(s,e.data)):"insert"===e.action&&csSidebars.insertSidebar(e.data):a.type="err",wpmUi.message(a)},o=function o(){var e=i.$().find("form");return i.loading(!0),t.reset().data(e).ondone(d).load_json(),!1};return i=wpmUi.popup().modal(!0).title(e.title).onshow(s).content(csSidebars.edit_form),s(),n(e,!0,null),t=wpmUi.ajax(null,"cs-ajax"),e.id&&(i.loading(!0),t.reset().data({"do":"get",sb:e.id}).ondone(n).load_json()),i.show(),i.$().find("#csb-name").focus(),i.$().on("click","#csb-more",r),i.$().on("click",".btn-save",o),i.$().on("click",".btn-cancel",i.close),!0},updateSidebar:function(e,i){return e.sb.find(".sidebar-name h3").text(i.name),e.sb.find(".sidebar-description").html('<p class="description"></p>').find(".description").text(i.description),csSidebars},insertSidebar:function(e){var i=jQuery('<div class="widgets-holder-wrap"></div>'),t=jQuery('<div class="widgets-sortables ui-sortable"></div>'),s=jQuery('<div class="sidebar-name"><div class="sidebar-name-arrow"><br></div><h3></h3></div>'),a=jQuery('<div class="sidebar-description"></div>'),r=csSidebars.right.find(".sidebars-column-1 > .inner:first");return t.attr("id",e.id),s.find("h3").text(e.name),a.html('<p class="description"></p>').find(".description").text(e.description),s.appendTo(t),a.appendTo(t),t.appendTo(i),i.prependTo(r),jQuery("#widgets-right .sidebar-name").unbind("click"),jQuery("#widgets-left .sidebar-name").unbind("click"),jQuery(document.body).unbind("click.widgets-toggle"),jQuery(".widgets-chooser").off("click.widgets-chooser").off("keyup.widgets-chooser"),jQuery("#available-widgets .widget .widget-title").off("click.widgets-chooser"),jQuery(".widgets-chooser-sidebars").empty(),window.wpWidgets.init(),csSidebars.initSidebars(),csSidebars},showExport:function(){var e=null;return e=wpmUi.popup().modal(!0).size(740,480).title(csSidebarsData.title_export).content(csSidebars.export_form).show(),!0},showRemove:function(e){var i=null,t=null,s=e.getID(),a=e.name,r=function r(e){e.find(".name").text(a)},n=function n(){i.loading(!1).close()},d=function d(e,t){var a={};i.loading(!1).close(),a.message=e.message,a.parent="#widgets-right",a.insert_after="#cs-title-options",a.id="editor",t?(csSidebars.right.find("#"+s).closest(".widgets-holder-wrap").remove(),csSidebars.remove(s)):a.type="err",wpmUi.message(a)},o=function o(){i.loading(!0),t.reset().data({"do":"delete",sb:s}).ondone(d).load_json()};return i=wpmUi.popup().modal(!0).size(null,160).title(csSidebarsData.title_delete).content(csSidebars.delete_form).onshow(r).show(),t=wpmUi.ajax(null,"cs-ajax"),i.$().on("click",".btn-cancel",n),i.$().on("click",".btn-delete",o),!0},showLocations:function(e){var i=null,t=null,s=null,a=e.getID(),r=function r(e,t){var s,a,r;if(i.loading(!1),!t)return i.close(),csSidebars.showAjaxError(e),void 0;i.$().find(".sb-name").text(e.sidebar.name);var n=e.sidebar.id,d=i.$().find(".cs-replaceable");d.hide(),e.replaceable=wpmUi.obj(e.replaceable);for(var o in e.replaceable)e.replaceable.hasOwnProperty(o)&&d.filter("."+e.replaceable[o]).show();var c=function c(e,i,t){var s=jQuery("<option></option>");s.attr("value",t).text(e.name),i.append(s)},l=function l(e,i,t,s){var a=s.closest(".cs-replaceable").filter("."+i),r=a.find('option[value="'+t+'"]'),d=a.find("optgroup.used"),o=a.find(".detail-toggle");e===n?(r.prop("selected",!0),!0!==o.prop("checked")&&(o.prop("checked",!0),a.addClass("open"),wpmUi.upgrade_multiselect(a))):(d.length||(d=jQuery('<optgroup class="used">').attr("label",a.data("lbl-used")).appendTo(a.find(".details select"))),r.detach().appendTo(d))},b=i.$().find(".cs-datalist.cs-cat"),f=i.$().find(".cs-datalist.cs-arc-cat"),p=e.categories;f.empty(),b.empty();for(var u in p)c(p[u],f,u),c(p[u],b,u);for(var h in p){if(p[h].single)for(s in p[h].single)l(p[h].single[s],s,h,b);if(p[h].archive)for(s in p[h].archive)l(p[h].archive[s],s,h,f)}var g=i.$().find(".cs-datalist.cs-pt"),v=e.posttypes;g.empty();for(var m in v)a=jQuery("<option></option>"),r=v[m].name,a.attr("value",m).text(r),g.append(a);for(var w in v)if(v[w].single)for(s in v[w].single)l(v[w].single[s],s,w,g);var S=i.$().find(".cs-datalist.cs-arc"),j=e.archives;S.empty();for(var y in j)a=jQuery("<option></option>"),r=j[y].name,a.attr("value",y).text(r),S.append(a);for(var _ in j)if(j[_].archive)for(s in j[_].archive)l(j[_].archive[s],s,_,S)},n=function n(){var e=jQuery(this),i=e.closest(".cs-replaceable"),t=i.find("select");e.prop("checked")?(i.addClass("open"),wpmUi.upgrade_multiselect(i),t.trigger("change.select2")):(i.removeClass("open"),t.val([]))},d=function d(e,t){var s={};i.loading(!1).close(),s.message=e.message,s.parent="#widgets-right",s.insert_after="#cs-title-options",s.id="editor",t||(s.type="err"),wpmUi.message(s)},o=function o(){i.loading(!0),t.reset().data(s).ondone(d).load_json()};return i=wpmUi.popup().modal(!0).size(null,560).title(csSidebarsData.title_location).content(csSidebars.location_form).show(),i.loading(!0),s=i.$().find(".frm-location"),s.find(".sb-id").val(a),t=wpmUi.ajax(null,"cs-ajax"),t.reset().data({"do":"get-location",sb:a}).ondone(r).load_json(),i.$().on("click",".detail-toggle",n),i.$().on("click",".btn-save",o),i.$().on("click",".btn-cancel",i.close),!0},setReplaceable:function(e,i,t){var s,a=csSidebars.right.find(".sidebars-column-2 .widgets-holder-wrap"),r=jQuery(e.sb).closest(".widgets-holder-wrap"),n=r.find(".cs-toolbar .chk-replaceable"),d=r.find(".replace-marker");r.find(".cs-toolbar .btn-replaceable");var o=function o(e){e instanceof Object&&"object"==typeof e.replaceable&&(csSidebarsData.replaceable=wpmUi.obj(e.replaceable),a.find(".widgets-sortables").each(function(){var e=!1,i=jQuery(this),t=i.attr("id"),s=csSidebars.find(t);for(var a in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(a)&&csSidebarsData.replaceable[a]===t){e=!0;break}csSidebars.setReplaceable(s,e,!1)})),a.find(".cs-toolbar .chk-replaceable").prop("disabled",!1),a.find(".cs-toolbar .btn-replaceable").removeClass("wpmui-loading")};return void 0===i&&(i=n.prop("checked")),void 0===t&&(t=!0),n.data("active")===i?!1:(n.data("active",i),n.prop("checked",i),i?(d.length||jQuery("<div></div>").appendTo(r).attr("data-label",csSidebarsData.lbl_replaceable).addClass("replace-marker"),r.addClass("replaceable")):(d.remove(),r.removeClass("replaceable")),t&&(a.find(".cs-toolbar .chk-replaceable").prop("disabled",!0),a.find(".cs-toolbar .btn-replaceable").addClass("wpmui-loading"),s=wpmUi.ajax(null,"cs-ajax"),s.reset().data({"do":"replaceable",state:i,sb:e.getID()}).ondone(o).load_json()),!1)},find:function(e){return csSidebars.sidebars[e]},add:function(e,i){return csSidebars.sidebars[e]=new CsSidebar(e,i),csSidebars.sidebars[e]},remove:function(e){delete csSidebars.sidebars[e]},isCustomSidebar:function(e){var i=jQuery(e).attr("id"),t=i.substr(0,csSidebars.sidebar_prefix.length);return t===csSidebars.sidebar_prefix},addIdToLabel:function(e,i){if(!0!==e.data("label-done")){var t=e.attr("for");e.attr("for",t+i),e.find(".has-label").attr("id",t+i),e.data("label-done",!0)}},getIdFromEditbar:function(e){var i=e.closest(".widgets-holder-wrap"),t=i.find(".widgets-sortables:first"),s=t.attr("id");return s}},jQuery(function(e){e("#csfooter").hide(),e("#widgets-right").length>0&&csSidebars.init(),e(".defaultsContainer").hide(),e("#widgets-right .widgets-sortables").on("sort",function(i,t){e("#widgets-right").top,t.position.top=-e("#widgets-right").css("top")})})}(jQuery),jQuery.fn.sortElements=function(){var e=[].sort;return function(i,t){t=t||function(){return this};var s=this.map(function(){var e=t.call(this),i=e.parentNode,s=i.insertBefore(document.createTextNode(""),e.nextSibling);return function(){if(i===this)throw Error("You can't sort elements if any one is a descendant of another.");i.insertBefore(this,s),i.removeChild(s)}});return e.call(this,i).each(function(e){s[e].call(t.call(this))})}}();
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 cs.js
JS
35.5 KB
2016-06-05 21:16
EDIT
📄 cs.min.js
JS
14.2 KB
2016-06-05 21:16
EDIT