Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
!function(n){n(document).on("change",".jp-contact-info-showmap",function(){var o=n(this),c=o.is(":checked");o.closest(".widget").find(".jp-contact-info-apikey").toggle(c)})}(window.jQuery);

View File

@@ -0,0 +1,3 @@
/* Do not modify this file directly. It is compiled from other files. */
/* global wp, gapi, FB, twttr, PaypalExpressCheckout */
wp.customizerHasPartialWidgetRefresh=function(){return"object"==typeof wp&&"function"==typeof wp.customize&&"object"==typeof wp.customize.selectiveRefresh&&"object"==typeof wp.customize.widgetsPreview&&"function"==typeof wp.customize.widgetsPreview.WidgetPartial},wp.isJetpackWidgetPlaced=function(e,t){return e.partial.widgetId&&0===e.partial.widgetId.indexOf(t)},function(e){e(document).ready(function(){wp&&wp.customize&&wp.customizerHasPartialWidgetRefresh()&&(wp.customize.selectiveRefresh.bind("partial-content-rendered",function(t){if(t.container)if(wp.isJetpackWidgetPlaced(t,"googleplus-badge")&&"object"==typeof gapi&&gapi.person&&"function"==typeof gapi.person.go)gapi.person.go(t.container[0]);else if(wp.isJetpackWidgetPlaced(t,"facebook-likebox")&&"object"==typeof FB&&"object"==typeof FB.XFBML&&"function"==typeof FB.XFBML.parse)FB.XFBML.parse(t.container[0],function(){var i=e(t.container[0]).find(".fb_iframe_widget"),a=i.data("width"),o=i.data("height");i.find("span").css({width:a,height:o}),setTimeout(function(){i.find("iframe").css({width:a,height:o,position:"relative"})},1)});else if(wp.isJetpackWidgetPlaced(t,"twitter_timeline")&&"object"==typeof twttr&&"object"==typeof twttr.widgets&&"function"==typeof twttr.widgets.load)twttr.widgets.load(t.container[0]);else if(wp.isJetpackWidgetPlaced(t,"eu_cookie_law_widget"))e("#eu-cookie-law").hasClass("top")?e(".widget_eu_cookie_law_widget").addClass("top"):e(".widget_eu_cookie_law_widget").removeClass("top"),t.container.fadeIn();else if(wp.isJetpackWidgetPlaced(t,"jetpack_simple_payments_widget"))try{var i=e(".jetpack-simple-payments-button",t.container).attr("id").replace("_button","");PaypalExpressCheckout.renderButton(null,null,i,null)}catch(e){}}),wp.customize.selectiveRefresh.bind("partial-content-moved",function(e){e.container&&(wp.isJetpackWidgetPlaced(e,"twitter_timeline")&&e.container.find("iframe.twitter-timeline:not([src]):first").length?e.partial.refresh():wp.isJetpackWidgetPlaced(e,"jetpack_simple_payments_widget")&&e.partial.refresh())}))})}(jQuery);

View File

@@ -0,0 +1,3 @@
/* Do not modify this file directly. It is compiled from other files. */
/* eslint no-var: 0 */
!function(i){var e=i(document);e.on("ready",function(){var o=function(e,o){var c=i(o||this).closest(".eu-cookie-law-widget-policy-url");c.find('input[type="radio"][value="default"]').is(":checked")?(c.find(".notice.default-policy").css("display","block"),c.find(".notice.custom-policy").hide()):(c.find(".notice.default-policy").hide(),c.find(".notice.custom-policy").css("display","block"))};e.on("click",'.eu-cookie-law-widget-policy-url input[type="radio"]',o),e.on("widget-updated widget-added",function(e,c){var d=i(c).attr("id");-1!==d.indexOf("eu_cookie_law_widget")&&o(0,i("#"+d+" .eu-cookie-law-widget-policy-url"))}),i(".eu-cookie-law-widget-policy-url").each(o)})}(jQuery);

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
!function(e){var o,a,t=document.cookie.replace(/(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/,"$1"),i=e("#eu-cookie-law");if(i.hasClass("top")&&e(".widget_eu_cookie_law_widget").addClass("top"),i.hasClass("ads-active")){var s=document.cookie.replace(/(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/,"$1");""!==t&&""!==s&&i.remove()}else""!==t&&i.remove();e(".widget_eu_cookie_law_widget").appendTo("body").fadeIn(),i.find("form").on("submit",d),i.hasClass("hide-on-scroll")?(o=e(window).scrollTop(),a=function(){Math.abs(e(window).scrollTop()-o)>50&&d()},e(window).on("scroll",a)):i.hasClass("hide-on-time")&&setTimeout(d,1e3*i.data("hide-timeout"));var n=!1;function d(o){if(!n){n=!0,o&&o.preventDefault&&o.preventDefault(),i.hasClass("hide-on-scroll")&&e(window).off("scroll",a);var t=new Date;t.setTime(t.getTime()+24*i.data("consent-expiration")*60*60*1e3),document.cookie="eucookielaw="+t.getTime()+";path=/;expires="+t.toGMTString(),i.hasClass("ads-active")&&i.hasClass("hide-on-button")&&(document.cookie="personalized-ads-consent="+t.getTime()+";path=/;expires="+t.toGMTString()),i.fadeOut(400,function(){i.remove();var e=document.querySelector(".widget.widget_eu_cookie_law_widget");e.parentNode.removeChild(e)})}}}(jQuery);

View File

@@ -0,0 +1,4 @@
/* Do not modify this file directly. It is compiled from other files. */
/* jshint onevar: false, multistr: true */
/* global _wpMediaViewsL10n, _wpGalleryWidgetAdminSettings */
!function(e){var t,i;e(function(){e(document.body).on("click",".gallery-widget-choose-images",function(l){l.preventDefault();var n=e(this).closest("form, .form");t=n.find(".gallery-widget-ids"),i=n.find(".gallery-widget-thumbs");var r=function(e){if(!e)return null;var t=wp.shortcode.next("gallery",'[gallery ids="'+e+'"]');return t=t.shortcode,wp.media.gallery.attachments(t)}(t.val()),a=null,o=!1;r&&(a=function(e){var t=new wp.media.model.Selection(e.models,{props:e.props.toJSON(),multiple:!0});return t.gallery=e.gallery,t.more().done(function(){t.props.set({query:!1}),t.unmirror(),t.props.unset("orderby")}),t}(r),o=!0),function(e){var l=new wp.media.view.MediaFrame.GalleryWidget(e);return l.on("update",function(e){var n=l.state();if(e=e||n.get("selection")){var r=e.map(function(e){return e.get("id")}).join(",");t.val(r).trigger("change"),function(e,t){t.empty();var i=_wpGalleryWidgetAdminSettings.thumbSize;e.each(function(e){var l=e.get("url")+"?w="+i+"&h="+i+"&crop=true",n=jQuery("<img>",{src:l,alt:e.get("title"),title:e.get("title"),width:i,height:i,class:"thumb"});t.append(n)})}(e,i)}},this),l.setState(l.options.state),l}({state:"gallery-edit",title:wp.media.view.l10n.addMedia,multiple:!0,editing:o,selection:a}).open()}),e(".widget-inside").on("change",".gallery-widget-style",r),r()});var l,n=wp.media;function r(){e(".widget-inside .gallery-widget-style").each(function(){var t=e(this).val(),i=e(this).parents("form");switch(t){case"slideshow":i.find(".gallery-widget-link-wrapper").hide(),i.find(".gallery-widget-columns-wrapper").hide();break;default:i.find(".gallery-widget-link-wrapper").show(),i.find(".gallery-widget-columns-wrapper").show()}})}l=n.view.l10n="undefined"==typeof _wpMediaViewsL10n?{}:_wpMediaViewsL10n,n.view.MediaFrame.GalleryWidget=n.view.MediaFrame.Post.extend({createStates:function(){var e=this.options;"CollectionEdit"in n.controller?this.states.add([new n.controller.CollectionEdit({type:"image",collectionType:"gallery",title:l.editGalleryTitle,SettingsView:n.view.Settings.Gallery,library:e.selection,editing:e.editing,menu:"gallery"}),new n.controller.CollectionAdd({type:"image",collectionType:"gallery",title:l.addToGalleryTitle})]):("WidgetGalleryEdit"in n.controller||(n.controller.WidgetGalleryEdit=n.controller.GalleryEdit.extend({gallerySettings:function(){}})),this.states.add([new n.controller.WidgetGalleryEdit({library:e.selection,editing:e.editing,menu:"gallery"}),new n.controller.GalleryAdd({})]))}})}(jQuery);

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
jQuery("body").on("click",".widget-gallery .no-carousel .tiled-gallery-item a",function(e){return e.stopPropagation(),!0});

View File

@@ -0,0 +1,5 @@
/* Do not modify this file directly. It is compiled from other files. */
/*global google:true*/
/*global _wp_google_translate_widget:true*/
/*exported googleTranslateElementInit*/
function googleTranslateElementInit(){var e,a="en",t=/[?&#]lang=([a-zA-Z\-_]+)/;"object"==typeof _wp_google_translate_widget&&"string"==typeof _wp_google_translate_widget.lang&&(a=_wp_google_translate_widget.lang),(e=window.location.href.match(t))&&(window.location.href=window.location.href.replace(t,"").replace(/#googtrans\([a-zA-Z\-_|]+\)/,"")+"#googtrans("+a+"|"+e[1]+")"),new google.translate.TranslateElement({pageLanguage:a,layout:_wp_google_translate_widget.layout,autoDisplay:!1},"google_translate_element")}

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
!function(e){var n=e("#customize-controls");function t(){n.find(".milestone-type").trigger("change")}n.length||(n=e("#wpbody")),n.on("change",".milestone-type",function(){var n=e(this).parent().find(".milestone-message-wrapper");"since"===e(this).find('input[type="radio"]:checked').val()?n.hide():n.show()}),e(document).on("widget-added widget-updated",function(){t()}),t()}(jQuery);

View File

@@ -0,0 +1,3 @@
/* Do not modify this file directly. It is compiled from other files. */
/* global MilestoneConfig */
var Milestone=function(e){var n=function(n){var i=e("#"+n.id),t=n.id,o=1e3*n.refresh;this.timer=function(){var n=this;e.ajax({url:MilestoneConfig.api_root+"jetpack/v4/widgets/"+t,success:function(e){i.find(".milestone-countdown").replaceWith(e.message),(o=1e3*e.refresh)&&setTimeout(function(){n.timer()},o)}})},o>0&&this.timer()};return function(e){return new n(e)}}(jQuery);!function(){var e,n={};if("undefined"!=typeof MilestoneConfig)for(e=0;e<MilestoneConfig.instances.length;e++)n[e]=new Milestone(MilestoneConfig.instances[e])}();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
jQuery(document).ready(function(){var e=jQuery(".jetpack-search-filters-widget__filter-list");e.on("click","a",function(){var e=jQuery(this).siblings('input[type="checkbox"]');e.prop("checked",!e.prop("checked"))}),e.find('input[type="checkbox"]').prop("disabled",!1).css("cursor","inherit").on("click",function(){var e=jQuery(this).siblings("a");e.length&&(window.location.href=e.prop("href"))})});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
!function(t){var i=null;function e(i){i.find(".jetpack-social-icons-widget-list").sortable({items:"> .jetpack-social-icons-widget-item",handle:".handle",cursor:"move",placeholder:"jetpack-social-icons-widget-item ui-state-placeholder",containment:i,forcePlaceholderSize:!0,update:function(){n(t(this).parents(".form").find(".widget-control-save"))}})}function n(i){t(document.body).hasClass("wp-customizer")&&i.length&&i.trigger("click").hide()}t(document).ready(function(){t(document).on("click",".jetpack-social-icons-widget.add-button button",function(i){var e,n,o,c,a;i.preventDefault(),e=t(t.trim(t("#tmpl-jetpack-widget-social-icons-template").html())),c=(o=(n=t(this).parents(".widget-content")).find(".jetpack-social-icons-widget-list")).data("url-icon-id"),a=o.data("url-icon-name"),e.find(".jetpack-widget-social-icons-url input").attr("id",c).attr("name",a+"[]"),o.append(e),n.find(".jetpack-social-icons-widget-item:last").find("input:first").trigger("focus")}),t(document).on("click",".jetpack-widget-social-icons-remove-item-button",function(i){i.preventDefault();var e=t(this).parents(".form").find(".widget-control-save");t(this).parents(".jetpack-social-icons-widget-item").remove(),n(e)}),t(document).on("click",'div.widget[id*="jetpack_widget_social_icons"] .widget-title, div.widget[id*="jetpack_widget_social_icons"] .widget-action',function(){t(this).parents("#available-widgets").length||e(t(this).parents('.widget[id*="jetpack_widget_social_icons"]'))}),t(document).on("widget-added",function(t,i){i.is('[id*="jetpack_widget_social_icons"]')&&(t.preventDefault(),e(i))}),t(document).on("widget-updated",function(t,i){i.is('[id*="jetpack_widget_social_icons"]')&&(t.preventDefault(),e(i))}),t(document).on("focusout",'input[name*="jetpack_widget_social_icons"]',function(){n(t(this).parents(".form").find(".widget-control-save"))}),t(document).on("keydown",'input[name*="jetpack_widget_social_icons"]',function(i){13===i.keyCode&&n(t(this).parents(".form").find(".widget-control-save"))}),t(document).on("keyup",'input[name*="jetpack_widget_social_icons"]',function(){clearTimeout(i),i=setTimeout(function(){n(t(this).parents(".form").find(".widget-control-save"))},1e3)}),t(document).on("change",'select[name*="jetpack_widget_social_icons"]',function(){n(t(this).parents(".form").find(".widget-control-save"))})})}(jQuery);

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
jQuery(function(t){function e(e){var i=t(e).val();t(e).closest(".jetpack-twitter-timeline-widget-type-container").next(".jetpack-twitter-timeline-widget-id-container").find("label").css("display",function(){var e=t(this).data("widget-type");return i===e?"":"none"})}var i=t("#customize-controls");i.length||(i=t("#wpbody")),i.on("change",".jetpack-twitter-timeline-widget-type",function(){e(this)}),i.find(".jetpack-twitter-timeline-widget-type").each(function(){e(this)})});