2 lines
8.6 KiB
JavaScript
2 lines
8.6 KiB
JavaScript
|
/*! This file is auto-generated */
|
||
|
window.wp=window.wp||{},window.communityEventsData=window.communityEventsData||{},jQuery(function(s){var t,n=s("#welcome-panel"),e=s("#wp_welcome_panel-hide");t=function(e){s.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:s("#welcomepanelnonce").val()})},n.hasClass("hidden")&&e.prop("checked")&&n.removeClass("hidden"),s(".welcome-panel-close, .welcome-panel-dismiss a",n).on("click",function(e){e.preventDefault(),n.addClass("hidden"),t(0),s("#wp_welcome_panel-hide").prop("checked",!1)}),e.on("click",function(){n.toggleClass("hidden",!this.checked),t(this.checked?1:0)}),window.ajaxWidgets=["dashboard_primary"],window.ajaxPopulateWidgets=function(e){function t(e,t){var n,o=s("#"+t+" div.inside:visible").find(".widget-loading");o.length&&(n=o.parent(),setTimeout(function(){n.load(ajaxurl+"?action=dashboard-widgets&widget="+t+"&pagenow="+pagenow,"",function(){n.hide().slideDown("normal",function(){s(this).css("display","")})})},500*e))}e?(e=e.toString(),-1!==s.inArray(e,ajaxWidgets)&&t(0,e)):s.each(ajaxWidgets,t)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),window.quickPressLoad=function(){var t,n,o,i,a,e=s("#quickpost-action");s('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),t=s("#quick-press").on("submit",function(e){e.preventDefault(),s("#dashboard_quick_press #publishing-action .spinner").show(),s('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),s.post(t.attr("action"),t.serializeArray(),function(e){var t;s("#dashboard_quick_press .inside").html(e),s("#quick-press").removeClass("initial-form"),quickPressLoad(),(t=s(".drafts ul li").first()).css("background","#fffbe5"),setTimeout(function(){t.css("background","none")},1e3),s("#title").trigger("focus")})}),s("#publish").on("click",function(){e.val("post-quickpress-publish")}),s("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),document.documentMode&&document.documentMode<9||(s("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>'),n=s(".quick-draft-textarea-clone"),o=s("#content"),i=o.height(),a=s(window).height()-100,n.css({"font-family":o.css("font-family"),"font-size":o.css("font-size"),"line-height":o.css("line-height"),"padding-bottom":o.css("paddingBottom"),"padding-left":o.css("paddingLeft"),"padding-right":o.css("paddingRight"),"padding-top":o.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),o.on("focus input propertychange",function(){var e=s(this),t=e.val()+" ",t=n.css("width",e.css("width")).text(t).outerHeight()+2;o.css("overflow-y","auto"),t===i||a<=t&&a<=i||(i=a<t?a:t,o.css("overflow","hidden"),e.css("height",i+"px"))}))},window.quickPressLoad(),s(".meta-box-sortables").sortable("option","containment","#wpwrap")}),jQuery(function(c){"use strict";var r=window.communityEventsData,s=wp.date.dateI18n,m=wp.date.format,d=wp.i18n.sprintf,l=wp.i18n.__,u=wp.i18n._x,p=window.wp.communityEvents={initialized:!1,model:null,init:function(){var e;p.initialized||(e=c("#community-events"),c(".community-events-errors").attr("aria-hidden","true").removeClass("hide-if-js"),e.on("click",".community-events-toggle-location, .community-events-cancel",p.toggleLocationForm),e.on("submit",".community-events-form",function(e){var t=c("#community-events-location").val().trim();e.preventDefault(),t&&p.getEvents({location:t})}),r&&r.cache&&r.cache.location&&r.cache.events?p.renderEventsTemplate(r.cache,"app"):p.getEvents(),p.initialized=!0)},toggleLocationForm:function(e){var t=c(".community-events-toggle-location"),n=c(".community-events-cancel"),o=c(".community-events-form"),i=c();"object"==typeof e&&(i=c(e.target),e="true"==t.attr("aria-expanded")?"hide":"show"),"hide"===e?(t.attr("aria-expanded","false"),n.attr("aria-expanded","false"),o.attr("aria-hidden","true"),i.hasClass("community-events-cancel")&&t.trigger("focus")):(t.attr("aria-expanded","true"),n.attr("aria-expanded","true"),o.attr("aria-hidden",
|