From cab6362f2be4553155dc8b049e62f11c5ba611a7 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 3 Mar 2014 02:34:14 +0000 Subject: [PATCH] Editor: throttle scrolling of the main window when the editor is active and is being scrolled with the mouse wheel or a trackpad, see #27013 Built from https://develop.svn.wordpress.org/trunk@27368 git-svn-id: http://core.svn.wordpress.org/trunk@27218 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/post.js | 32 +++++++++++++++- wp-admin/js/post.min.js | 2 +- .../js/tinymce/plugins/wordpress/plugin.js | 35 ++++++++++++++++-- .../tinymce/plugins/wordpress/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 120093 -> 120178 bytes wp-includes/version.php | 4 +- 6 files changed, 65 insertions(+), 10 deletions(-) diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 2786cb6239..c847cd4134 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -370,7 +370,8 @@ $(document).on( 'heartbeat-send.refresh-lock', function( e, data ) { }(jQuery)); jQuery(document).ready( function($) { - var stamp, visibility, $submitButtons, updateVisibility, updateText, $content, + var stamp, visibility, $submitButtons, updateVisibility, updateText, $content, topx, reset, + deltax = 0, sticky = '', last = 0, co = $('#content'), @@ -1067,12 +1068,18 @@ jQuery(document).ready( function($) { if ( ! ( 'ontouchstart' in window ) ) { // When scrolling with mouse wheel or trackpad inside the Text editor, don't scroll the whole window $content = $('#content').on( 'onwheel' in $document[0] ? 'wheel.text-editor-scroll' : 'mousewheel.text-editor-scroll', function( event ) { - var delta, origEvent = event.originalEvent; + var delta, top, + origEvent = event.originalEvent; if ( wp.editor && wp.editor.fullscreen.settings.visible ) { return; } + // Don't modify scrolling when the Text editor is not active. + if ( document.activeElement && document.activeElement.id !== 'content' ) { + return; + } + if ( typeof origEvent.deltaY !== 'undefined' ) { delta = origEvent.deltaY; @@ -1084,6 +1091,27 @@ jQuery(document).ready( function($) { } $content.scrollTop( $content.scrollTop() + delta ); + + top = $content.scrollTop(); + + if ( topx === top ) { + deltax += delta; + + window.clearTimeout( reset ); + reset = window.setTimeout( function() { + deltax = 0; + }, 1000 ); + } else { + deltax = 0; + } + + topx = top; + + // Sensitivity: scroll the parent window when over-scrolling by more than 800px + if ( deltax > 1000 || deltax < -1000 ) { + return; + } + event.preventDefault(); }); } diff --git a/wp-admin/js/post.min.js b/wp-admin/js/post.min.js index 8814e62957..e04ca63ea7 100644 --- a/wp-admin/js/post.min.js +++ b/wp-admin/js/post.min.js @@ -1 +1 @@ -function array_unique_noempty(a){var b=[];return jQuery.each(a,function(a,c){c=jQuery.trim(c),c&&-1==jQuery.inArray(c,b)&&b.push(c)}),b}var tagBox,commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,makeSlugeditClickable,editPermalink;makeSlugeditClickable=editPermalink=function(){},window.wp=window.wp||{},function(a){tagBox={clean:function(a){var b=postL10n.comma;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=postL10n.comma,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(postL10n.comma),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("").text(c),d||(h=a('X'),h.click(function(){tagBox.parseTags(this)}),e.prepend(" ").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=postL10n.comma;return c=c||!1,g=c?a(c).text():i.val(),e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){(0===d||"success"!=e)&&(d=wpAjax.broken),d=a('

'+d+"

"),a("a",d).click(function(){return tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this),!1}),a("#"+b).after(d)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()}),a("input.newtag",c).blur(function(){""===this.value&&a(this).parent().siblings(".taghint").css("visibility","")}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(b){return 13==b.which?(tagBox.flushTags(a(this).closest(".tagsdiv")),!1):void 0}).keypress(function(a){return 13==a.which?(a.preventDefault(),!1):void 0}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:postL10n.comma+" "})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a("a.tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}},commentsBox={st:0,get:function(b,c){var d,e=this.st;return c||(c=20),this.st+=c,this.total=b,a("#commentsdiv .spinner").show(),d={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:e,number:c},a.post(ajaxurl,d,function(b){return b=wpAjax.parseAjaxResponse(b),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").hide(),"object"==typeof b&&b.responses[0]?(a("#the-comment-list").append(b.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm))):1==b?void a("#show-comments").html(postL10n.endcomm):void a("#the-comment-list").append(''+wpAjax.broken+"")}),!1}},WPSetThumbnailHTML=function(b){a(".inside","#postimagediv").html(b)},WPSetThumbnailID=function(b){var c=a('input[value="_thumbnail_id"]',"#list-table");c.size()>0&&a("#meta\\["+c.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(b)},WPRemoveThumbnail=function(b){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(a){"0"==a?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(a)})},a(document).on("heartbeat-send.refresh-lock",function(b,c){var d=a("#active_post_lock").val(),e=a("#post_ID").val(),f={};e&&a("#post-lock-dialog").length&&(f.post_id=e,d&&(f.lock=d),c["wp-refresh-post-lock"]=f)}).on("heartbeat-tick.refresh-lock",function(b,c){var d,e,f;c["wp-refresh-post-lock"]&&(d=c["wp-refresh-post-lock"],d.lock_error?(e=a("#post-lock-dialog"),e.length&&!e.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),e.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),e.addClass("saving"),wp.autosave.server.triggerSave()),d.lock_error.avatar_src&&(f=a('').attr("src",d.lock_error.avatar_src.replace(/&/g,"&")),e.find("div.post-locked-avatar").empty().append(f)),e.show().find(".currently-editing").text(d.lock_error.text),e.find(".wp-tab-first").focus())):d.new_lock&&a("#active_post_lock").val(d.new_lock))}).on("after-autosave.update-post-slug",function(){a("#edit-slug-box > *").length||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(b){"-1"!=b&&a("#edit-slug-box").html(b)})})}(jQuery),function(a){function b(){c=!1,window.clearTimeout(d),d=window.setTimeout(function(){c=!0},3e5)}var c,d;a(document).on("heartbeat-send.wp-refresh-nonces",function(b,d){var e,f;c&&(f=a("#post_ID").val())&&(e=a("#_wpnonce").val())&&(d["wp-refresh-post-nonces"]={post_id:f,post_nonce:e})}).on("heartbeat-tick.wp-refresh-nonces",function(c,d){var e=d["wp-refresh-post-nonces"];e&&(b(),e.replace&&a.each(e.replace,function(b,c){a("#"+b).val(c)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){b()})}(jQuery),jQuery(document).ready(function(a){function b(){var b,c,d=0,e=a("#editable-post-name"),f=e.html(),g=a("#post_name"),h=g.val(),i=a("#edit-slug-buttons"),j=i.html(),k=a("#editable-post-name-full").html();for(a("#view-post-btn").hide(),i.html(''+postL10n.ok+' '+postL10n.cancel+""),i.children(".save").click(function(){var b=e.children("input").val();return b==a("#editable-post-name-full").text()?a("#edit-slug-buttons .cancel").click():(a.post(ajaxurl,{action:"sample-permalink",post_id:n,new_slug:b,new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(c){var d=a("#edit-slug-box");d.html(c),d.hasClass("hidden")&&d.fadeIn("fast",function(){d.removeClass("hidden")}),i.html(j),g.val(b),a("#view-post-btn").show()}),!1)}),a("#edit-slug-buttons .cancel").click(function(){return a("#view-post-btn").show(),e.html(f),i.html(j),g.val(h),!1}),b=0;bk.length/4?"":k,e.html('').children("input").keypress(function(a){var b=a.keyCode||0;return 13==b?(i.children(".save").click(),!1):27==b?(i.children(".cancel").click(),!1):void 0}).keyup(function(){g.val(this.value)}).focus()}var c,d,e,f,g,h,i="",j=0,k=a("#content"),l=a(document),m=a("#edit-slug-box"),n=a("#post_ID").val()||0,o=a("#submitpost"),p=!0,q=a("#post-visibility-select"),r=a("#timestampdiv"),s=a("#post-status-select");postboxes.add_postbox_toggles(pagenow),window.name="",a("#post-lock-dialog .notification-dialog").on("keydown",function(b){if(9==b.which){var c=a(b.target);c.hasClass("wp-tab-first")&&b.shiftKey?(a(this).find(".wp-tab-last").focus(),b.preventDefault()):c.hasClass("wp-tab-last")&&!b.shiftKey&&(a(this).find(".wp-tab-first").focus(),b.preventDefault())}}).filter(":visible").find(".wp-tab-first").focus(),wp.heartbeat&&a("#post-lock-dialog").length&&wp.heartbeat.interval(15),e=o.find(":button, :submit, a.submitdelete, #post-preview").on("click.edit-post",function(b){var c=a(this);return c.hasClass("disabled")?void b.preventDefault():void(c.hasClass("submitdelete")||c.is("#post-preview")||a("form#post").off("submit.edit-post").on("submit.edit-post",function(b){b.isDefaultPrevented()||(wp.autosave&&wp.autosave.server.suspend(),p=!1,a(window).off("beforeunload.edit-post"),e.addClass("disabled"),"publish"===c.attr("id")?o.find("#major-publishing-actions .spinner").show():o.find("#minor-publishing .spinner").show())}))}),a("#post-preview").on("click.post-preview",function(b){var c=a(this),d=a("form#post"),e=a("input#wp-preview"),f=c.attr("target")||"wp-preview",g=navigator.userAgent.toLowerCase();b.preventDefault(),c.hasClass("disabled")||(wp.autosave&&wp.autosave.server.tempBlockSave(),e.val("dopreview"),d.attr("target",f).submit().attr("target",""),-1!==g.indexOf("safari")&&-1===g.indexOf("chrome")&&d.attr("action",function(a,b){return b+"?t="+(new Date).getTime()}),e.val(""))}),a("#title").on("keydown.editor-focus",function(b){var c;9!==b.keyCode||b.ctrlKey||b.altKey||b.shiftKey||(c="undefined"!=typeof tinymce&&tinymce.get("content"),c&&!c.isHidden()?c.focus():a("#content").focus(),b.preventDefault())}),a("#auto_draft").val()&&a("#title").blur(function(){this.value&&"1"===a("#auto_draft").val()&&wp.autosave&&wp.autosave.server.triggerSave()}),l.on("autosave-disable-buttons.edit-post",function(){e.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||e.removeClass("disabled")}).on("before-autosave.edit-post",function(){a(".autosave-message").text(postL10n.savingText)}).on("after-autosave.edit-post",function(b,c){a(".autosave-message").text(c.message)}),a(window).on("beforeunload.edit-post",function(){var a="undefined"!=typeof tinymce&&tinymce.get("content");return a&&!a.isHidden()&&a.isDirty()||wp.autosave&&wp.autosave.server.postChanged()?postL10n.saveAlert:void 0}).on("unload.edit-post",function(b){p&&(b.target&&"#document"!=b.target.nodeName||a.ajax({type:"POST",url:ajaxurl,async:!1,data:{action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:a("#post_ID").val(),active_post_lock:a("#active_post_lock").val()}}))}),a("#tagsdiv-post_tag").length?tagBox.init():a("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){return 0===this.id.indexOf("tagsdiv-")?(tagBox.init(),!1):void 0}),a(".categorydiv").each(function(){var b,c,d,e,f,g=a(this).attr("id");d=g.split("-"),d.shift(),e=d.join("-"),f=e+"_tab","category"==e&&(f="cats"),a("a","#"+e+"-tabs").click(function(){var b=a(this).attr("href");return a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a("#"+e+"-tabs").siblings(".tabs-panel").hide(),a(b).show(),"#"+e+"-all"==b?deleteUserSetting(f):setUserSetting(f,"pop"),!1}),getUserSetting(f)&&a('a[href="#'+e+'-pop"]',"#"+e+"-tabs").click(),a("#new"+e).one("focus",function(){a(this).val("").removeClass("form-input-tip")}),a("#new"+e).keypress(function(b){13===b.keyCode&&(b.preventDefault(),a("#"+e+"-add-submit").click())}),a("#"+e+"-add-submit").click(function(){a("#new"+e).focus()}),b=function(b){return a("#new"+e).val()?(b.data+="&"+a(":checked","#"+e+"checklist").serialize(),a("#"+e+"-add-submit").prop("disabled",!0),b):!1},c=function(b,c){var d,f=a("#new"+e+"_parent");a("#"+e+"-add-submit").prop("disabled",!1),"undefined"!=c.parsed.responses[0]&&(d=c.parsed.responses[0].supplemental.newcat_parent)&&(f.before(d),f.remove())},a("#"+e+"checklist").wpList({alt:"",response:e+"-ajax-response",addBefore:b,addAfter:c}),a("#"+e+"-add-toggle").click(function(){return a("#"+e+"-adder").toggleClass("wp-hidden-children"),a('a[href="#'+e+'-all"]',"#"+e+"-tabs").click(),a("#new"+e).focus(),!1}),a("#"+e+"checklist, #"+e+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var b=a(this),c=b.is(":checked"),d=b.val();d&&b.parents("#taxonomy-"+e).length&&a("#in-"+e+"-"+d+", #in-popular-"+e+"-"+d).prop("checked",c)})}),a("#postcustom").length&&a("#the-list").wpList({addAfter:function(){a("table#list-table").show()},addBefore:function(b){return b.data+="&post_id="+a("#post_ID").val(),b}}),a("#submitdiv").length&&(c=a("#timestamp").html(),d=a("#post-visibility-display").html(),f=function(){"public"!=q.find("input:radio:checked").val()?(a("#sticky").prop("checked",!1),a("#sticky-span").hide()):a("#sticky-span").show(),"password"!=q.find("input:radio:checked").val()?a("#password-span").hide():a("#password-span").show()},g=function(){if(!r.length)return!0;var b,d,e,f,g=a("#post_status"),h=a('option[value="publish"]',g),i=a("#aa").val(),j=a("#mm").val(),k=a("#jj").val(),l=a("#hh").val(),m=a("#mn").val();return b=new Date(i,j-1,k,l,m),d=new Date(a("#hidden_aa").val(),a("#hidden_mm").val()-1,a("#hidden_jj").val(),a("#hidden_hh").val(),a("#hidden_mn").val()),e=new Date(a("#cur_aa").val(),a("#cur_mm").val()-1,a("#cur_jj").val(),a("#cur_hh").val(),a("#cur_mn").val()),b.getFullYear()!=i||1+b.getMonth()!=j||b.getDate()!=k||b.getMinutes()!=m?(r.find(".timestamp-wrap").addClass("form-invalid"),!1):(r.find(".timestamp-wrap").removeClass("form-invalid"),b>e&&"future"!=a("#original_post_status").val()?(f=postL10n.publishOnFuture,a("#publish").val(postL10n.schedule)):e>=b&&"publish"!=a("#original_post_status").val()?(f=postL10n.publishOn,a("#publish").val(postL10n.publish)):(f=postL10n.publishOnPast,a("#publish").val(postL10n.update)),a("#timestamp").html(d.toUTCString()==b.toUTCString()?c:f+" "+postL10n.dateFormat.replace("%1$s",a('option[value="'+a("#mm").val()+'"]',"#mm").text()).replace("%2$s",k).replace("%3$s",i).replace("%4$s",l).replace("%5$s",m)+" "),"private"==q.find("input:radio:checked").val()?(a("#publish").val(postL10n.update),0===h.length?g.append('"):h.html(postL10n.privatelyPublished),a('option[value="publish"]',g).prop("selected",!0),a("#misc-publishing-actions .edit-post-status").hide()):("future"==a("#original_post_status").val()||"draft"==a("#original_post_status").val()?h.length&&(h.remove(),g.val(a("#hidden_post_status").val())):h.html(postL10n.published),g.is(":hidden")&&a("#misc-publishing-actions .edit-post-status").show()),a("#post-status-display").html(a("option:selected",g).text()),"private"==a("option:selected",g).val()||"publish"==a("option:selected",g).val()?a("#save-post").hide():(a("#save-post").show(),a("#save-post").show().val("pending"==a("option:selected",g).val()?postL10n.savePending:postL10n.saveDraft)),!0)},a("#visibility .edit-visibility").click(function(){return q.is(":hidden")&&(f(),q.slideDown("fast").find('input[type="radio"]').first().focus(),a(this).hide()),!1}),q.find(".cancel-post-visibility").click(function(b){q.slideUp("fast"),a("#visibility-radio-"+a("#hidden-post-visibility").val()).prop("checked",!0),a("#post_password").val(a("#hidden-post-password").val()),a("#sticky").prop("checked",a("#hidden-post-sticky").prop("checked")),a("#post-visibility-display").html(d),a("#visibility .edit-visibility").show().focus(),g(),b.preventDefault()}),q.find(".save-post-visibility").click(function(b){q.slideUp("fast"),a("#visibility .edit-visibility").show(),g(),"public"!=q.find("input:radio:checked").val()&&a("#sticky").prop("checked",!1),i=a("#sticky").prop("checked")?"Sticky":"",a("#post-visibility-display").html(postL10n[q.find("input:radio:checked").val()+i]),b.preventDefault()}),q.find("input:radio").change(function(){f()}),r.siblings("a.edit-timestamp").click(function(b){r.is(":hidden")&&(r.slideDown("fast"),a("#mm").focus(),a(this).hide()),b.preventDefault()}),r.find(".cancel-timestamp").click(function(b){r.slideUp("fast").siblings("a.edit-timestamp").show().focus(),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),g(),b.preventDefault()}),r.find(".save-timestamp").click(function(a){g()&&(r.slideUp("fast"),r.siblings("a.edit-timestamp").show()),a.preventDefault()}),a("#post").on("submit",function(b){g()||(b.preventDefault(),r.show(),wp.autosave&&wp.autosave.enableButtons(),a("#publishing-action .spinner").hide())}),s.siblings("a.edit-post-status").click(function(b){s.is(":hidden")&&(s.slideDown("fast").find("select").focus(),a(this).hide()),b.preventDefault()}),s.find(".save-post-status").click(function(a){s.slideUp("fast").siblings("a.edit-post-status").show(),g(),a.preventDefault()}),s.find(".cancel-post-status").click(function(b){a("#post-status-select").slideUp("fast").siblings("a.edit-post-status").show().focus(),a("#post_status").val(a("#hidden_post_status").val()),g(),b.preventDefault()})),m.length&&m.on("click",function(c){var d=a(c.target);(d.is("#editable-post-name")||d.hasClass("edit-slug"))&&b()}),"undefined"!=typeof wpWordCount&&(l.triggerHandler("wpcountwords",[k.val()]),k.keyup(function(a){var b=a.keyCode||a.charCode;return b==j?!0:((13==b||8==j||46==j)&&l.triggerHandler("wpcountwords",[k.val()]),j=b,!0)})),wptitlehint=function(b){b=b||"title";var c=a("#"+b),d=a("#"+b+"-prompt-text");""===c.val()&&d.removeClass("screen-reader-text"),d.click(function(){a(this).addClass("screen-reader-text"),c.focus()}),c.blur(function(){""===this.value&&d.removeClass("screen-reader-text")}).focus(function(){d.addClass("screen-reader-text")}).keydown(function(b){d.addClass("screen-reader-text"),a(this).unbind(b)})},wptitlehint(),function(){function b(a){f?d.theme.resizeTo(null,e+a.pageY):g.height(Math.max(50,e+a.pageY)),a.preventDefault()}function c(){var b,c;f?(d.focus(),c=a("#wp-content-editor-container .mce-toolbar-grp").height(),b=parseInt(a("#content_ifr").css("height"),10)+c-28):(g.focus(),b=parseInt(g.css("height"),10)),l.off("mousemove.wp-editor-resize mouseup.wp-editor-resize"),b&&b>50&&5e3>b&&setUserSetting("ed_size",b)}var d,e,f,g=a("textarea#content"),h=a("#post-status-info");!g.length||"ontouchstart"in window||(g.css("resize","none"),h.on("mousedown.wp-editor-resize",function(h){"undefined"!=typeof tinymce&&(d=tinymce.get("content")),d&&!d.isHidden()?(f=!0,e=a("#content_ifr").height()-h.pageY):(f=!1,e=g.height()-h.pageY,g.blur()),l.on("mousemove.wp-editor-resize",b).on("mouseup.wp-editor-resize",c),h.preventDefault()}))}(),"undefined"!=typeof tinymce&&a("#post-formats-select input.post-format").on("change.set-editor-class",function(){var b,c,d=this.id;d&&a(this).prop("checked")&&(b=tinymce.get("content"),b&&(c=b.getBody(),c.className=c.className.replace(/\bpost-format-[^ ]+/,""),b.dom.addClass(c,"post-format-0"==d?"post-format-standard":d)))}),"ontouchstart"in window||(h=a("#content").on("onwheel"in l[0]?"wheel.text-editor-scroll":"mousewheel.text-editor-scroll",function(a){var b,c=a.originalEvent;wp.editor&&wp.editor.fullscreen.settings.visible||("undefined"!=typeof c.deltaY?(b=c.deltaY,"undefined"!=typeof c.deltaMode&&c.deltaMode===c.DOM_DELTA_LINE&&(b*=20)):b=-c.wheelDelta,h.scrollTop(h.scrollTop()+b),a.preventDefault())}))}); \ No newline at end of file +function array_unique_noempty(a){var b=[];return jQuery.each(a,function(a,c){c=jQuery.trim(c),c&&-1==jQuery.inArray(c,b)&&b.push(c)}),b}var tagBox,commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,makeSlugeditClickable,editPermalink;makeSlugeditClickable=editPermalink=function(){},window.wp=window.wp||{},function(a){tagBox={clean:function(a){var b=postL10n.comma;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=postL10n.comma,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(postL10n.comma),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("").text(c),d||(h=a('X'),h.click(function(){tagBox.parseTags(this)}),e.prepend(" ").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=postL10n.comma;return c=c||!1,g=c?a(c).text():i.val(),e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){(0===d||"success"!=e)&&(d=wpAjax.broken),d=a('

'+d+"

"),a("a",d).click(function(){return tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this),!1}),a("#"+b).after(d)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()}),a("input.newtag",c).blur(function(){""===this.value&&a(this).parent().siblings(".taghint").css("visibility","")}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(b){return 13==b.which?(tagBox.flushTags(a(this).closest(".tagsdiv")),!1):void 0}).keypress(function(a){return 13==a.which?(a.preventDefault(),!1):void 0}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:postL10n.comma+" "})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a("a.tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}},commentsBox={st:0,get:function(b,c){var d,e=this.st;return c||(c=20),this.st+=c,this.total=b,a("#commentsdiv .spinner").show(),d={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:e,number:c},a.post(ajaxurl,d,function(b){return b=wpAjax.parseAjaxResponse(b),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").hide(),"object"==typeof b&&b.responses[0]?(a("#the-comment-list").append(b.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm))):1==b?void a("#show-comments").html(postL10n.endcomm):void a("#the-comment-list").append(''+wpAjax.broken+"")}),!1}},WPSetThumbnailHTML=function(b){a(".inside","#postimagediv").html(b)},WPSetThumbnailID=function(b){var c=a('input[value="_thumbnail_id"]',"#list-table");c.size()>0&&a("#meta\\["+c.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(b)},WPRemoveThumbnail=function(b){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(a){"0"==a?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(a)})},a(document).on("heartbeat-send.refresh-lock",function(b,c){var d=a("#active_post_lock").val(),e=a("#post_ID").val(),f={};e&&a("#post-lock-dialog").length&&(f.post_id=e,d&&(f.lock=d),c["wp-refresh-post-lock"]=f)}).on("heartbeat-tick.refresh-lock",function(b,c){var d,e,f;c["wp-refresh-post-lock"]&&(d=c["wp-refresh-post-lock"],d.lock_error?(e=a("#post-lock-dialog"),e.length&&!e.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),e.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),e.addClass("saving"),wp.autosave.server.triggerSave()),d.lock_error.avatar_src&&(f=a('').attr("src",d.lock_error.avatar_src.replace(/&/g,"&")),e.find("div.post-locked-avatar").empty().append(f)),e.show().find(".currently-editing").text(d.lock_error.text),e.find(".wp-tab-first").focus())):d.new_lock&&a("#active_post_lock").val(d.new_lock))}).on("after-autosave.update-post-slug",function(){a("#edit-slug-box > *").length||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(b){"-1"!=b&&a("#edit-slug-box").html(b)})})}(jQuery),function(a){function b(){c=!1,window.clearTimeout(d),d=window.setTimeout(function(){c=!0},3e5)}var c,d;a(document).on("heartbeat-send.wp-refresh-nonces",function(b,d){var e,f;c&&(f=a("#post_ID").val())&&(e=a("#_wpnonce").val())&&(d["wp-refresh-post-nonces"]={post_id:f,post_nonce:e})}).on("heartbeat-tick.wp-refresh-nonces",function(c,d){var e=d["wp-refresh-post-nonces"];e&&(b(),e.replace&&a.each(e.replace,function(b,c){a("#"+b).val(c)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){b()})}(jQuery),jQuery(document).ready(function(a){function b(){var b,c,d=0,e=a("#editable-post-name"),f=e.html(),g=a("#post_name"),h=g.val(),i=a("#edit-slug-buttons"),j=i.html(),k=a("#editable-post-name-full").html();for(a("#view-post-btn").hide(),i.html(''+postL10n.ok+' '+postL10n.cancel+""),i.children(".save").click(function(){var b=e.children("input").val();return b==a("#editable-post-name-full").text()?a("#edit-slug-buttons .cancel").click():(a.post(ajaxurl,{action:"sample-permalink",post_id:q,new_slug:b,new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(c){var d=a("#edit-slug-box");d.html(c),d.hasClass("hidden")&&d.fadeIn("fast",function(){d.removeClass("hidden")}),i.html(j),g.val(b),a("#view-post-btn").show()}),!1)}),a("#edit-slug-buttons .cancel").click(function(){return a("#view-post-btn").show(),e.html(f),i.html(j),g.val(h),!1}),b=0;bk.length/4?"":k,e.html('').children("input").keypress(function(a){var b=a.keyCode||0;return 13==b?(i.children(".save").click(),!1):27==b?(i.children(".cancel").click(),!1):void 0}).keyup(function(){g.val(this.value)}).focus()}var c,d,e,f,g,h,i,j,k=0,l="",m=0,n=a("#content"),o=a(document),p=a("#edit-slug-box"),q=a("#post_ID").val()||0,r=a("#submitpost"),s=!0,t=a("#post-visibility-select"),u=a("#timestampdiv"),v=a("#post-status-select");postboxes.add_postbox_toggles(pagenow),window.name="",a("#post-lock-dialog .notification-dialog").on("keydown",function(b){if(9==b.which){var c=a(b.target);c.hasClass("wp-tab-first")&&b.shiftKey?(a(this).find(".wp-tab-last").focus(),b.preventDefault()):c.hasClass("wp-tab-last")&&!b.shiftKey&&(a(this).find(".wp-tab-first").focus(),b.preventDefault())}}).filter(":visible").find(".wp-tab-first").focus(),wp.heartbeat&&a("#post-lock-dialog").length&&wp.heartbeat.interval(15),e=r.find(":button, :submit, a.submitdelete, #post-preview").on("click.edit-post",function(b){var c=a(this);return c.hasClass("disabled")?void b.preventDefault():void(c.hasClass("submitdelete")||c.is("#post-preview")||a("form#post").off("submit.edit-post").on("submit.edit-post",function(b){b.isDefaultPrevented()||(wp.autosave&&wp.autosave.server.suspend(),s=!1,a(window).off("beforeunload.edit-post"),e.addClass("disabled"),"publish"===c.attr("id")?r.find("#major-publishing-actions .spinner").show():r.find("#minor-publishing .spinner").show())}))}),a("#post-preview").on("click.post-preview",function(b){var c=a(this),d=a("form#post"),e=a("input#wp-preview"),f=c.attr("target")||"wp-preview",g=navigator.userAgent.toLowerCase();b.preventDefault(),c.hasClass("disabled")||(wp.autosave&&wp.autosave.server.tempBlockSave(),e.val("dopreview"),d.attr("target",f).submit().attr("target",""),-1!==g.indexOf("safari")&&-1===g.indexOf("chrome")&&d.attr("action",function(a,b){return b+"?t="+(new Date).getTime()}),e.val(""))}),a("#title").on("keydown.editor-focus",function(b){var c;9!==b.keyCode||b.ctrlKey||b.altKey||b.shiftKey||(c="undefined"!=typeof tinymce&&tinymce.get("content"),c&&!c.isHidden()?c.focus():a("#content").focus(),b.preventDefault())}),a("#auto_draft").val()&&a("#title").blur(function(){this.value&&"1"===a("#auto_draft").val()&&wp.autosave&&wp.autosave.server.triggerSave()}),o.on("autosave-disable-buttons.edit-post",function(){e.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||e.removeClass("disabled")}).on("before-autosave.edit-post",function(){a(".autosave-message").text(postL10n.savingText)}).on("after-autosave.edit-post",function(b,c){a(".autosave-message").text(c.message)}),a(window).on("beforeunload.edit-post",function(){var a="undefined"!=typeof tinymce&&tinymce.get("content");return a&&!a.isHidden()&&a.isDirty()||wp.autosave&&wp.autosave.server.postChanged()?postL10n.saveAlert:void 0}).on("unload.edit-post",function(b){s&&(b.target&&"#document"!=b.target.nodeName||a.ajax({type:"POST",url:ajaxurl,async:!1,data:{action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:a("#post_ID").val(),active_post_lock:a("#active_post_lock").val()}}))}),a("#tagsdiv-post_tag").length?tagBox.init():a("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){return 0===this.id.indexOf("tagsdiv-")?(tagBox.init(),!1):void 0}),a(".categorydiv").each(function(){var b,c,d,e,f,g=a(this).attr("id");d=g.split("-"),d.shift(),e=d.join("-"),f=e+"_tab","category"==e&&(f="cats"),a("a","#"+e+"-tabs").click(function(){var b=a(this).attr("href");return a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a("#"+e+"-tabs").siblings(".tabs-panel").hide(),a(b).show(),"#"+e+"-all"==b?deleteUserSetting(f):setUserSetting(f,"pop"),!1}),getUserSetting(f)&&a('a[href="#'+e+'-pop"]',"#"+e+"-tabs").click(),a("#new"+e).one("focus",function(){a(this).val("").removeClass("form-input-tip")}),a("#new"+e).keypress(function(b){13===b.keyCode&&(b.preventDefault(),a("#"+e+"-add-submit").click())}),a("#"+e+"-add-submit").click(function(){a("#new"+e).focus()}),b=function(b){return a("#new"+e).val()?(b.data+="&"+a(":checked","#"+e+"checklist").serialize(),a("#"+e+"-add-submit").prop("disabled",!0),b):!1},c=function(b,c){var d,f=a("#new"+e+"_parent");a("#"+e+"-add-submit").prop("disabled",!1),"undefined"!=c.parsed.responses[0]&&(d=c.parsed.responses[0].supplemental.newcat_parent)&&(f.before(d),f.remove())},a("#"+e+"checklist").wpList({alt:"",response:e+"-ajax-response",addBefore:b,addAfter:c}),a("#"+e+"-add-toggle").click(function(){return a("#"+e+"-adder").toggleClass("wp-hidden-children"),a('a[href="#'+e+'-all"]',"#"+e+"-tabs").click(),a("#new"+e).focus(),!1}),a("#"+e+"checklist, #"+e+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var b=a(this),c=b.is(":checked"),d=b.val();d&&b.parents("#taxonomy-"+e).length&&a("#in-"+e+"-"+d+", #in-popular-"+e+"-"+d).prop("checked",c)})}),a("#postcustom").length&&a("#the-list").wpList({addAfter:function(){a("table#list-table").show()},addBefore:function(b){return b.data+="&post_id="+a("#post_ID").val(),b}}),a("#submitdiv").length&&(c=a("#timestamp").html(),d=a("#post-visibility-display").html(),f=function(){"public"!=t.find("input:radio:checked").val()?(a("#sticky").prop("checked",!1),a("#sticky-span").hide()):a("#sticky-span").show(),"password"!=t.find("input:radio:checked").val()?a("#password-span").hide():a("#password-span").show()},g=function(){if(!u.length)return!0;var b,d,e,f,g=a("#post_status"),h=a('option[value="publish"]',g),i=a("#aa").val(),j=a("#mm").val(),k=a("#jj").val(),l=a("#hh").val(),m=a("#mn").val();return b=new Date(i,j-1,k,l,m),d=new Date(a("#hidden_aa").val(),a("#hidden_mm").val()-1,a("#hidden_jj").val(),a("#hidden_hh").val(),a("#hidden_mn").val()),e=new Date(a("#cur_aa").val(),a("#cur_mm").val()-1,a("#cur_jj").val(),a("#cur_hh").val(),a("#cur_mn").val()),b.getFullYear()!=i||1+b.getMonth()!=j||b.getDate()!=k||b.getMinutes()!=m?(u.find(".timestamp-wrap").addClass("form-invalid"),!1):(u.find(".timestamp-wrap").removeClass("form-invalid"),b>e&&"future"!=a("#original_post_status").val()?(f=postL10n.publishOnFuture,a("#publish").val(postL10n.schedule)):e>=b&&"publish"!=a("#original_post_status").val()?(f=postL10n.publishOn,a("#publish").val(postL10n.publish)):(f=postL10n.publishOnPast,a("#publish").val(postL10n.update)),a("#timestamp").html(d.toUTCString()==b.toUTCString()?c:f+" "+postL10n.dateFormat.replace("%1$s",a('option[value="'+a("#mm").val()+'"]',"#mm").text()).replace("%2$s",k).replace("%3$s",i).replace("%4$s",l).replace("%5$s",m)+" "),"private"==t.find("input:radio:checked").val()?(a("#publish").val(postL10n.update),0===h.length?g.append('"):h.html(postL10n.privatelyPublished),a('option[value="publish"]',g).prop("selected",!0),a("#misc-publishing-actions .edit-post-status").hide()):("future"==a("#original_post_status").val()||"draft"==a("#original_post_status").val()?h.length&&(h.remove(),g.val(a("#hidden_post_status").val())):h.html(postL10n.published),g.is(":hidden")&&a("#misc-publishing-actions .edit-post-status").show()),a("#post-status-display").html(a("option:selected",g).text()),"private"==a("option:selected",g).val()||"publish"==a("option:selected",g).val()?a("#save-post").hide():(a("#save-post").show(),a("#save-post").show().val("pending"==a("option:selected",g).val()?postL10n.savePending:postL10n.saveDraft)),!0)},a("#visibility .edit-visibility").click(function(){return t.is(":hidden")&&(f(),t.slideDown("fast").find('input[type="radio"]').first().focus(),a(this).hide()),!1}),t.find(".cancel-post-visibility").click(function(b){t.slideUp("fast"),a("#visibility-radio-"+a("#hidden-post-visibility").val()).prop("checked",!0),a("#post_password").val(a("#hidden-post-password").val()),a("#sticky").prop("checked",a("#hidden-post-sticky").prop("checked")),a("#post-visibility-display").html(d),a("#visibility .edit-visibility").show().focus(),g(),b.preventDefault()}),t.find(".save-post-visibility").click(function(b){t.slideUp("fast"),a("#visibility .edit-visibility").show(),g(),"public"!=t.find("input:radio:checked").val()&&a("#sticky").prop("checked",!1),l=a("#sticky").prop("checked")?"Sticky":"",a("#post-visibility-display").html(postL10n[t.find("input:radio:checked").val()+l]),b.preventDefault()}),t.find("input:radio").change(function(){f()}),u.siblings("a.edit-timestamp").click(function(b){u.is(":hidden")&&(u.slideDown("fast"),a("#mm").focus(),a(this).hide()),b.preventDefault()}),u.find(".cancel-timestamp").click(function(b){u.slideUp("fast").siblings("a.edit-timestamp").show().focus(),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),g(),b.preventDefault()}),u.find(".save-timestamp").click(function(a){g()&&(u.slideUp("fast"),u.siblings("a.edit-timestamp").show()),a.preventDefault()}),a("#post").on("submit",function(b){g()||(b.preventDefault(),u.show(),wp.autosave&&wp.autosave.enableButtons(),a("#publishing-action .spinner").hide())}),v.siblings("a.edit-post-status").click(function(b){v.is(":hidden")&&(v.slideDown("fast").find("select").focus(),a(this).hide()),b.preventDefault()}),v.find(".save-post-status").click(function(a){v.slideUp("fast").siblings("a.edit-post-status").show(),g(),a.preventDefault()}),v.find(".cancel-post-status").click(function(b){a("#post-status-select").slideUp("fast").siblings("a.edit-post-status").show().focus(),a("#post_status").val(a("#hidden_post_status").val()),g(),b.preventDefault()})),p.length&&p.on("click",function(c){var d=a(c.target);(d.is("#editable-post-name")||d.hasClass("edit-slug"))&&b()}),"undefined"!=typeof wpWordCount&&(o.triggerHandler("wpcountwords",[n.val()]),n.keyup(function(a){var b=a.keyCode||a.charCode;return b==m?!0:((13==b||8==m||46==m)&&o.triggerHandler("wpcountwords",[n.val()]),m=b,!0)})),wptitlehint=function(b){b=b||"title";var c=a("#"+b),d=a("#"+b+"-prompt-text");""===c.val()&&d.removeClass("screen-reader-text"),d.click(function(){a(this).addClass("screen-reader-text"),c.focus()}),c.blur(function(){""===this.value&&d.removeClass("screen-reader-text")}).focus(function(){d.addClass("screen-reader-text")}).keydown(function(b){d.addClass("screen-reader-text"),a(this).unbind(b)})},wptitlehint(),function(){function b(a){f?d.theme.resizeTo(null,e+a.pageY):g.height(Math.max(50,e+a.pageY)),a.preventDefault()}function c(){var b,c;f?(d.focus(),c=a("#wp-content-editor-container .mce-toolbar-grp").height(),b=parseInt(a("#content_ifr").css("height"),10)+c-28):(g.focus(),b=parseInt(g.css("height"),10)),o.off("mousemove.wp-editor-resize mouseup.wp-editor-resize"),b&&b>50&&5e3>b&&setUserSetting("ed_size",b)}var d,e,f,g=a("textarea#content"),h=a("#post-status-info");!g.length||"ontouchstart"in window||(g.css("resize","none"),h.on("mousedown.wp-editor-resize",function(h){"undefined"!=typeof tinymce&&(d=tinymce.get("content")),d&&!d.isHidden()?(f=!0,e=a("#content_ifr").height()-h.pageY):(f=!1,e=g.height()-h.pageY,g.blur()),o.on("mousemove.wp-editor-resize",b).on("mouseup.wp-editor-resize",c),h.preventDefault()}))}(),"undefined"!=typeof tinymce&&a("#post-formats-select input.post-format").on("change.set-editor-class",function(){var b,c,d=this.id;d&&a(this).prop("checked")&&(b=tinymce.get("content"),b&&(c=b.getBody(),c.className=c.className.replace(/\bpost-format-[^ ]+/,""),b.dom.addClass(c,"post-format-0"==d?"post-format-standard":d)))}),"ontouchstart"in window||(h=a("#content").on("onwheel"in o[0]?"wheel.text-editor-scroll":"mousewheel.text-editor-scroll",function(a){var b,c,d=a.originalEvent;wp.editor&&wp.editor.fullscreen.settings.visible||document.activeElement&&"content"!==document.activeElement.id||("undefined"!=typeof d.deltaY?(b=d.deltaY,"undefined"!=typeof d.deltaMode&&d.deltaMode===d.DOM_DELTA_LINE&&(b*=20)):b=-d.wheelDelta,h.scrollTop(h.scrollTop()+b),c=h.scrollTop(),i===c?(k+=b,window.clearTimeout(j),j=window.setTimeout(function(){k=0},1e3)):k=0,i=c,k>1e3||-1e3>k||a.preventDefault())}))}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/wp-includes/js/tinymce/plugins/wordpress/plugin.js index 707656c4c4..359a46964e 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/plugin.js +++ b/wp-includes/js/tinymce/plugins/wordpress/plugin.js @@ -276,7 +276,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { }); editor.on( 'init', function() { - var env = tinymce.Env, + var env = tinymce.Env, topx, reset, + deltax = 0, bodyClass = ['mceContentBody'], // back-compat for themes that use this in editor-style.css... doc = editor.getDoc(); @@ -318,11 +319,16 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { if ( ! ( 'ontouchstart' in window ) ) { // When scrolling with mouse wheel or trackpad inside the editor, don't scroll the parent window editor.dom.bind( doc, 'onwheel' in doc ? 'wheel' : 'mousewheel', function( event ) { - var delta, docElement = doc.documentElement; + var delta, top, + docElement = doc.documentElement; if ( editor.settings.wp_fullscreen ) { return; } + // Don't modify scrolling when the editor is not active. + if ( typeof doc.hasFocus === 'function' && ! doc.hasFocus() ) { + return; + } if ( typeof event.deltaY !== 'undefined' ) { delta = event.deltaY; @@ -334,13 +340,34 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { delta = -event.wheelDelta; } - event.preventDefault(); - if ( env.webkit ) { doc.body.scrollTop += delta; } else { docElement.scrollTop += delta; } + + top = docElement.scrollTop || doc.body.scrollTop; + + if ( topx === top ) { + deltax += delta; + + window.clearTimeout( reset ); + // Sensitivity: delay before resetting the count of over-scroll pixels + reset = window.setTimeout( function() { + deltax = 0; + }, 1000 ); + } else { + deltax = 0; + } + + topx = top; + + // Sensitivity: scroll the parent window when over-scrolling by more than 1000px + if ( deltax > 1000 || deltax < -1000 ) { + return; + } + + event.preventDefault(); }); } }); diff --git a/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js b/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js index 72ada31ed8..8ccaa448d9 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wordpress",function(a){function b(b){var c,d,e,f=0;d="hide"===b,a.theme.panel&&(e=a.theme.panel.find(".toolbar:not(.menubar)")),!e||e.length<2||"hide"===b&&!e[1].visible()||(!b&&e[1].visible()&&(b="hide"),tinymce.each(e,function(a,c){c>0&&("hide"===b?(a.hide(),f+=30):(a.show(),f-=30))}),f&&!d&&(c=a.getContentAreaContainer().firstChild,j.setStyle(c,"height",c.clientHeight+f),"hide"===b?(setUserSetting("hidetb","1"),g&&g.active(!1)):(setUserSetting("hidetb","0"),g&&g.active(!0))))}function c(a){return a.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(a,b){return''+b+''})}function d(a){return a.replace(/]+>/g,function(a){if(-1!==a.indexOf('class="wp-oembed')){var b=a.match(/alt="([^\"]+)"/);b[1]&&(a="[embed]"+b[1]+"[/embed]")}return a})}function e(b,c){var d,e,f,g,h;f=a.dom.getViewPort(a.getWin()),d=j.getPos(a.getContentAreaContainer()),e=a.dom.getPos(b),g=Math.max(e.x-f.x,0)+d.x,h=Math.max(e.y-f.y,0)+d.y,j.setStyles(c,{top:h+5+"px",left:g+5+"px",display:"block"})}function f(){j.hide(j.select("#wp_editbtns, #wp_gallerybtns"))}var g,h,i,j=tinymce.DOM,k=0;return a.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){g=this}}),a.on("PostRender",function(){"1"===getUserSetting("hidetb","1")&&b("hide")}),a.addCommand("WP_Adv",function(){b()}),a.on("focus",function(){window.wpActiveEditor=a.id}),a.on("BeforeSetContent",function(a){a.content&&(-1!==a.content.indexOf("/g,function(a,b){return''})),-1!==a.content.indexOf("")&&(a.content=a.content.replace(//g,'')))}),a.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/]+>/g,function(a){var b,c="";return-1!==a.indexOf("wp-more-tag")&&(-1!==a.indexOf("mce-wp-more")?((b=a.match(/data-wp-more="([^"]+)"/))&&(c=b[1]),a=""):-1!==a.indexOf("mce-wp-nextpage")&&(a="")),a}))}),a.on("ResolveName",function(b){var c=a.dom,d=b.target;"IMG"===d.nodeName&&c.hasClass(d,"wp-more-tag")&&(c.hasClass(d,"mce-wp-more")?b.name="more":c.hasClass(d,"mce-wp-nextpage")&&(b.name="nextpage"))}),a.on("PreProcess",function(b){var c;b.save&&(c=a.dom.select("img.wp-more-tag",b.node),c.length&&tinymce.each(c,function(b){var c,d=b.parentNode;"P"===d.nodeName&&d.childNodes.length>1&&(c=a.dom.create("p"),d.parentNode.insertBefore(c,d),c.appendChild(b))}))}),a.addCommand("WP_More",function(b){var c,d,e,f,g,h="wp-more-tag",i=tinymce.Env.ie?"":'
',j=a.dom,k=a.selection.getNode();return b=b||"more",h+=" mce-wp-"+b,e="more"===b?"More...":"Next Page",d='',"BODY"===k.nodeName?void a.insertContent("

"+d+"

"):(c=j.getParent(k,function(a){return a.parentNode&&"BODY"===a.parentNode.nodeName?!0:!1},a.getBody()),void(c&&(f=j.create("p",null,d),j.insertAfter(f,c),(g=f.nextSibling)||(g=j.create("p",null,i),j.insertAfter(g,f)),a.nodeChanged(),a.selection.setCursorLocation(g,0))))}),a.addCommand("WP_Page",function(){a.execCommand("WP_More","nextpage")}),a.addCommand("WP_Help",function(){a.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})}),a.addCommand("WP_Medialib",function(){"undefined"!=typeof wp&&wp.media&&wp.media.editor&&wp.media.editor.open(a.id)}),a.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){a.execCommand("WP_More","more")}}),a.addButton("wp_page",{tooltip:"Page break",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.addButton("wp_help",{tooltip:"Help",cmd:"WP_Help"}),"undefined"!=typeof wp&&wp.media&&wp.media.editor&&a.addMenuItem("add_media",{text:"Add Media",context:"insert",cmd:"WP_Medialib"}),a.addMenuItem("wp_more",{text:"Insert Read More tag",context:"insert",onclick:function(){a.execCommand("WP_More","more")}}),a.addMenuItem("wp_page",{text:"Page break",context:"insert",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.on("BeforeExecCommand",function(b){!tinymce.Env.webkit||"InsertUnorderedList"!==b.command&&"InsertOrderedList"!==b.command||(i||(i=a.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),a.getDoc().head.appendChild(i))}),a.on("ExecCommand",function(b){tinymce.Env.webkit&&i&&("InsertUnorderedList"===b.command||"InsertOrderedList"===b.command)&&a.dom.remove(i)}),a.on("init",function(){var b=tinymce.Env,c=["mceContentBody"],d=a.getDoc();"rtl"===a.getParam("directionality")&&c.push("rtl"),b.ie&&(9===parseInt(b.ie,10)?c.push("ie9"):8===parseInt(b.ie,10)?c.push("ie8"):b.ie<8&&c.push("ie7")),c.push("wp-editor"),tinymce.each(c,function(b){b&&a.dom.addClass(d.body,b)}),a.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/

\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>"),a.content=a.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,""))}),"undefined"!=typeof window.jQuery&&window.jQuery(document).triggerHandler("tinymce-editor-init",[a]),"ontouchstart"in window||a.dom.bind(d,"onwheel"in d?"wheel":"mousewheel",function(c){var e,f=d.documentElement;a.settings.wp_fullscreen||("undefined"!=typeof c.deltaY?(e=c.deltaY,"undefined"!=typeof c.deltaMode&&c.deltaMode===c.DOM_DELTA_LINE&&(e*=20)):e=-c.wheelDelta,c.preventDefault(),b.webkit?d.body.scrollTop+=e:f.scrollTop+=e)})}),"undefined"!=typeof window.jQuery&&a.on("keyup",function(b){var c=b.keyCode||b.charCode;c!==k&&((13===c||8===k||46===k)&&window.jQuery(document).triggerHandler("wpcountwords",[a.getContent({format:"raw"})]),k=c)}),a.on("SaveContent",function(b){return a.isHidden()?void(b.content=b.element.value):(b.content=b.content.replace(/

(
|\u00a0|\uFEFF)?<\/p>/g,"

 

"),void(a.getParam("wpautop",!0)&&"undefined"!=typeof switchEditors&&(b.content=switchEditors.pre_wpautop(b.content))))}),a.on("preInit",function(){a.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b")}),h="alt+shift",a.addShortcut(h+"+c","","JustifyCenter"),a.addShortcut(h+"+r","","JustifyRight"),a.addShortcut(h+"+l","","JustifyLeft"),a.addShortcut(h+"+j","","JustifyFull"),a.addShortcut(h+"+q","","mceBlockQuote"),a.addShortcut(h+"+u","","InsertUnorderedList"),a.addShortcut(h+"+o","","InsertOrderedList"),a.addShortcut(h+"+n","","mceSpellCheck"),a.addShortcut(h+"+a","","WP_Link"),a.addShortcut(h+"+s","","unlink"),a.addShortcut(h+"+m","","WP_Medialib"),a.addShortcut(h+"+z","","WP_Adv"),a.addShortcut(h+"+t","","WP_More"),a.addShortcut(h+"+d","","Strikethrough"),a.addShortcut(h+"+h","","WP_Help"),a.addShortcut(h+"+p","","WP_Page"),a.addShortcut("ctrl+s","",function(){"undefined"!=typeof wp&&wp.autosave&&wp.autosave.server.triggerSave()}),a.on("init",function(){a.dom.bind(a.getWin(),"scroll",function(){f()}),a.dom.bind(a.getBody(),"dragstart",function(){f()})}),a.on("BeforeExecCommand",function(){f()}),a.on("SaveContent",function(){f()}),a.on("MouseDown",function(a){"IMG"!==a.target.nodeName&&f()}),a.on("keydown",function(a){(a.which===tinymce.util.VK.DELETE||a.which===tinymce.util.VK.BACKSPACE)&&f()}),{_showButtons:e,_hideButtons:f,_setEmbed:c,_getEmbed:d}}); \ No newline at end of file +tinymce.PluginManager.add("wordpress",function(a){function b(b){var c,d,e,f=0;d="hide"===b,a.theme.panel&&(e=a.theme.panel.find(".toolbar:not(.menubar)")),!e||e.length<2||"hide"===b&&!e[1].visible()||(!b&&e[1].visible()&&(b="hide"),tinymce.each(e,function(a,c){c>0&&("hide"===b?(a.hide(),f+=30):(a.show(),f-=30))}),f&&!d&&(c=a.getContentAreaContainer().firstChild,j.setStyle(c,"height",c.clientHeight+f),"hide"===b?(setUserSetting("hidetb","1"),g&&g.active(!1)):(setUserSetting("hidetb","0"),g&&g.active(!0))))}function c(a){return a.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(a,b){return''+b+''})}function d(a){return a.replace(/]+>/g,function(a){if(-1!==a.indexOf('class="wp-oembed')){var b=a.match(/alt="([^\"]+)"/);b[1]&&(a="[embed]"+b[1]+"[/embed]")}return a})}function e(b,c){var d,e,f,g,h;f=a.dom.getViewPort(a.getWin()),d=j.getPos(a.getContentAreaContainer()),e=a.dom.getPos(b),g=Math.max(e.x-f.x,0)+d.x,h=Math.max(e.y-f.y,0)+d.y,j.setStyles(c,{top:h+5+"px",left:g+5+"px",display:"block"})}function f(){j.hide(j.select("#wp_editbtns, #wp_gallerybtns"))}var g,h,i,j=tinymce.DOM,k=0;return a.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){g=this}}),a.on("PostRender",function(){"1"===getUserSetting("hidetb","1")&&b("hide")}),a.addCommand("WP_Adv",function(){b()}),a.on("focus",function(){window.wpActiveEditor=a.id}),a.on("BeforeSetContent",function(a){a.content&&(-1!==a.content.indexOf("/g,function(a,b){return''})),-1!==a.content.indexOf("")&&(a.content=a.content.replace(//g,'')))}),a.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/]+>/g,function(a){var b,c="";return-1!==a.indexOf("wp-more-tag")&&(-1!==a.indexOf("mce-wp-more")?((b=a.match(/data-wp-more="([^"]+)"/))&&(c=b[1]),a=""):-1!==a.indexOf("mce-wp-nextpage")&&(a="")),a}))}),a.on("ResolveName",function(b){var c=a.dom,d=b.target;"IMG"===d.nodeName&&c.hasClass(d,"wp-more-tag")&&(c.hasClass(d,"mce-wp-more")?b.name="more":c.hasClass(d,"mce-wp-nextpage")&&(b.name="nextpage"))}),a.on("PreProcess",function(b){var c;b.save&&(c=a.dom.select("img.wp-more-tag",b.node),c.length&&tinymce.each(c,function(b){var c,d=b.parentNode;"P"===d.nodeName&&d.childNodes.length>1&&(c=a.dom.create("p"),d.parentNode.insertBefore(c,d),c.appendChild(b))}))}),a.addCommand("WP_More",function(b){var c,d,e,f,g,h="wp-more-tag",i=tinymce.Env.ie?"":'
',j=a.dom,k=a.selection.getNode();return b=b||"more",h+=" mce-wp-"+b,e="more"===b?"More...":"Next Page",d='',"BODY"===k.nodeName?void a.insertContent("

"+d+"

"):(c=j.getParent(k,function(a){return a.parentNode&&"BODY"===a.parentNode.nodeName?!0:!1},a.getBody()),void(c&&(f=j.create("p",null,d),j.insertAfter(f,c),(g=f.nextSibling)||(g=j.create("p",null,i),j.insertAfter(g,f)),a.nodeChanged(),a.selection.setCursorLocation(g,0))))}),a.addCommand("WP_Page",function(){a.execCommand("WP_More","nextpage")}),a.addCommand("WP_Help",function(){a.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})}),a.addCommand("WP_Medialib",function(){"undefined"!=typeof wp&&wp.media&&wp.media.editor&&wp.media.editor.open(a.id)}),a.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){a.execCommand("WP_More","more")}}),a.addButton("wp_page",{tooltip:"Page break",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.addButton("wp_help",{tooltip:"Help",cmd:"WP_Help"}),"undefined"!=typeof wp&&wp.media&&wp.media.editor&&a.addMenuItem("add_media",{text:"Add Media",context:"insert",cmd:"WP_Medialib"}),a.addMenuItem("wp_more",{text:"Insert Read More tag",context:"insert",onclick:function(){a.execCommand("WP_More","more")}}),a.addMenuItem("wp_page",{text:"Page break",context:"insert",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.on("BeforeExecCommand",function(b){!tinymce.Env.webkit||"InsertUnorderedList"!==b.command&&"InsertOrderedList"!==b.command||(i||(i=a.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),a.getDoc().head.appendChild(i))}),a.on("ExecCommand",function(b){tinymce.Env.webkit&&i&&("InsertUnorderedList"===b.command||"InsertOrderedList"===b.command)&&a.dom.remove(i)}),a.on("init",function(){var b,c,d=tinymce.Env,e=0,f=["mceContentBody"],g=a.getDoc();"rtl"===a.getParam("directionality")&&f.push("rtl"),d.ie&&(9===parseInt(d.ie,10)?f.push("ie9"):8===parseInt(d.ie,10)?f.push("ie8"):d.ie<8&&f.push("ie7")),f.push("wp-editor"),tinymce.each(f,function(b){b&&a.dom.addClass(g.body,b)}),a.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/

\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>"),a.content=a.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,""))}),"undefined"!=typeof window.jQuery&&window.jQuery(document).triggerHandler("tinymce-editor-init",[a]),"ontouchstart"in window||a.dom.bind(g,"onwheel"in g?"wheel":"mousewheel",function(f){var h,i,j=g.documentElement;a.settings.wp_fullscreen||("function"!=typeof g.hasFocus||g.hasFocus())&&("undefined"!=typeof f.deltaY?(h=f.deltaY,"undefined"!=typeof f.deltaMode&&f.deltaMode===f.DOM_DELTA_LINE&&(h*=20)):h=-f.wheelDelta,d.webkit?g.body.scrollTop+=h:j.scrollTop+=h,i=j.scrollTop||g.body.scrollTop,b===i?(e+=h,window.clearTimeout(c),c=window.setTimeout(function(){e=0},1e3)):e=0,b=i,e>1e3||-1e3>e||f.preventDefault())})}),"undefined"!=typeof window.jQuery&&a.on("keyup",function(b){var c=b.keyCode||b.charCode;c!==k&&((13===c||8===k||46===k)&&window.jQuery(document).triggerHandler("wpcountwords",[a.getContent({format:"raw"})]),k=c)}),a.on("SaveContent",function(b){return a.isHidden()?void(b.content=b.element.value):(b.content=b.content.replace(/

(
|\u00a0|\uFEFF)?<\/p>/g,"

 

"),void(a.getParam("wpautop",!0)&&"undefined"!=typeof switchEditors&&(b.content=switchEditors.pre_wpautop(b.content))))}),a.on("preInit",function(){a.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b")}),h="alt+shift",a.addShortcut(h+"+c","","JustifyCenter"),a.addShortcut(h+"+r","","JustifyRight"),a.addShortcut(h+"+l","","JustifyLeft"),a.addShortcut(h+"+j","","JustifyFull"),a.addShortcut(h+"+q","","mceBlockQuote"),a.addShortcut(h+"+u","","InsertUnorderedList"),a.addShortcut(h+"+o","","InsertOrderedList"),a.addShortcut(h+"+n","","mceSpellCheck"),a.addShortcut(h+"+a","","WP_Link"),a.addShortcut(h+"+s","","unlink"),a.addShortcut(h+"+m","","WP_Medialib"),a.addShortcut(h+"+z","","WP_Adv"),a.addShortcut(h+"+t","","WP_More"),a.addShortcut(h+"+d","","Strikethrough"),a.addShortcut(h+"+h","","WP_Help"),a.addShortcut(h+"+p","","WP_Page"),a.addShortcut("ctrl+s","",function(){"undefined"!=typeof wp&&wp.autosave&&wp.autosave.server.triggerSave()}),a.on("init",function(){a.dom.bind(a.getWin(),"scroll",function(){f()}),a.dom.bind(a.getBody(),"dragstart",function(){f()})}),a.on("BeforeExecCommand",function(){f()}),a.on("SaveContent",function(){f()}),a.on("MouseDown",function(a){"IMG"!==a.target.nodeName&&f()}),a.on("keydown",function(a){(a.which===tinymce.util.VK.DELETE||a.which===tinymce.util.VK.BACKSPACE)&&f()}),{_showButtons:e,_hideButtons:f,_setEmbed:c,_getEmbed:d}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index f799ca52a0b43afc69b4a5739395b5042661fc2f..378b3a52d13f5922de6c7f934b71ebc8ba73c474 100644 GIT binary patch delta 6201 zcmV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