From 1f4b40b9c3a77e7ca5cbabde1a51d08638365a71 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 27 Feb 2016 00:52:26 +0000 Subject: [PATCH] TinyMCE, inline link: - Fix applying the changes when pressing the Enter key in Firefox. No longer inserts new paragraph in the editor. - Fix empty check when getting text from the dialog. - Always focus the URL field when opening the dialog. - Add back the keydown events in the modal. See #33301. Built from https://develop.svn.wordpress.org/trunk@36743 git-svn-id: http://core.svn.wordpress.org/trunk@36710 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../js/tinymce/plugins/wplink/plugin.js | 30 +++++++++++++----- .../js/tinymce/plugins/wplink/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 165717 -> 165761 bytes wp-includes/js/wplink.js | 28 ++++++++++++++-- wp-includes/js/wplink.min.js | 2 +- wp-includes/version.php | 2 +- 6 files changed, 51 insertions(+), 13 deletions(-) diff --git a/wp-includes/js/tinymce/plugins/wplink/plugin.js b/wp-includes/js/tinymce/plugins/wplink/plugin.js index 14f46c94a1..9a91dc3b71 100644 --- a/wp-includes/js/tinymce/plugins/wplink/plugin.js +++ b/wp-includes/js/tinymce/plugins/wplink/plugin.js @@ -68,7 +68,13 @@ return tinymce.trim( this.getEl().firstChild.value ); }, getLinkText: function() { - return tinymce.trim( this.getEl().firstChild.nextSibling.value ); + var text = this.getEl().firstChild.nextSibling.value; + + if ( ! tinymce.trim( text ) ) { + return ''; + } + + return text.replace( /[\r\n\t ]+/g, ' ' ); }, reset: function() { var urlInput = this.getEl().firstChild; @@ -144,12 +150,15 @@ ], true ); editToolbar.on( 'show', function() { - var inputNode = editToolbar.find( 'toolbar' )[0]; - - if ( inputNode && ! tinymce.$( document.body ).hasClass( 'modal-open' ) ) { + if ( ! tinymce.$( document.body ).hasClass( 'modal-open' ) ) { window.setTimeout( function() { - inputNode.focus( true ); - }); + var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0]; + + if ( element ) { + element.focus(); + element.select(); + } + } ); } } ); @@ -172,6 +181,8 @@ return; } + editToolbar.tempHide = false; + if ( link ) { editor.dom.setAttribs( link, { 'data-wplink-edit': true } ); } else { @@ -181,6 +192,8 @@ if ( tinymce.Env.ie ) { editor.windowManager.wplinkBookmark = editor.selection.getBookmark(); } + + editor.nodeChanged(); } } ); @@ -227,12 +240,12 @@ inputInstance.reset(); removePlaceholders(); editor.focus(); - + if ( tinymce.isIE ) { editor.selection.moveToBookmark( editor.windowManager.wplinkBookmark ); editor.windowManager.wplinkBookmark = null; } - + editToolbar.tempHide = false; } } ); @@ -384,6 +397,7 @@ tinymce.$( input ).on( 'keydown', function( event ) { if ( event.keyCode === 13 ) { editor.execCommand( 'wp_link_apply' ); + event.preventDefault(); } } ); } diff --git a/wp-includes/js/tinymce/plugins/wplink/plugin.min.js b/wp-includes/js/tinymce/plugins/wplink/plugin.min.js index 855c7f9e5a..e4253580fe 100644 --- a/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wplink/plugin.min.js @@ -1 +1 @@ -!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),-1!==(c=b.indexOf("?"))&&(b=b.slice(0,c)),-1!==(c=b.indexOf("#"))&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),""===b&&(b=this.url),b.length>40&&-1!==(c=b.indexOf("/"))&&-1!==(d=b.lastIndexOf("/"))&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.ui.WPLinkInput=a.ui.Control.extend({renderHtml:function(){return''},setURL:function(a){this.getEl().firstChild.value=a},getURL:function(){return a.trim(this.getEl().firstChild.value)},getLinkText:function(){return a.trim(this.getEl().firstChild.nextSibling.value)},reset:function(){var a=this.getEl().firstChild;a.value="",a.nextSibling.value=""}}),a.PluginManager.add("wplink",function(b){function c(){var a,c,d=b.selection.getNode(),e=b.dom.getParent(d,"a[href]");return e||(c=b.selection.getContent({format:"raw"}),c&&-1!==c.indexOf("")&&(a=c.match(/href="([^">]+)"/),a&&a[1]&&(e=b.$('a[href="'+a[1]+'"]',d)[0]),e&&(b.selection.select(e),b.nodeChanged()))),e}function d(){b.$("a").each(function(a,c){var d=b.$(c);"_wp_link_placeholder"===d.attr("href")?b.dom.remove(c,!0):d.attr("data-wplink-edit")&&d.attr("data-wplink-edit",null)})}function e(a,b){return b&&(a=a.replace(/ data-wplink-edit="true"/g,"")),a.replace(/]*?href="_wp_link_placeholder"[^>]*>([\s\S]+)<\/a>/g,"$1")}var f,g,h,i,j=window.jQuery;return b.on("preinit",function(){b.wp&&b.wp._createToolbar&&(f=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0),g=b.wp._createToolbar(["wp_link_input","wp_link_apply","wp_link_advanced"],!0),g.on("show",function(){var b=g.find("toolbar")[0];b&&!a.$(document.body).hasClass("modal-open")&&window.setTimeout(function(){b.focus(!0)})}),g.on("hide",function(){g.scrolling||b.execCommand("wp_link_cancel")}))}),b.addCommand("WP_Link",function(){var e=c();return a.Env.ie&&a.Env.ie<10?void("undefined"!=typeof window.wpLink&&window.wpLink.open(b.id)):void(e?b.dom.setAttribs(e,{"data-wplink-edit":!0}):(d(),b.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),a.Env.ie&&(b.windowManager.wplinkBookmark=b.selection.getBookmark())))}),b.addCommand("wp_link_apply",function(){if(!g.scrolling){var d,e,f=c();if(f){if(d=i.getURL(),e=i.getLinkText(),b.focus(),a.isIE&&(b.selection.moveToBookmark(b.windowManager.wplinkBookmark),b.windowManager.wplinkBookmark=null),!d)return void b.dom.remove(f,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(d)||(d="http://"+d),b.dom.setAttribs(f,{href:d,"data-wplink-edit":null}),a.trim(f.innerHTML)||b.$(f).text(e||d)}i.reset(),b.nodeChanged()}}),b.addCommand("wp_link_cancel",function(){g.tempHide||(i.reset(),d(),b.focus(),a.isIE&&(b.selection.moveToBookmark(b.windowManager.wplinkBookmark),b.windowManager.wplinkBookmark=null),g.tempHide=!1)}),b.addShortcut("access+a","","WP_Link"),b.addShortcut("meta+k","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.on("savecontent",function(a){a.content=e(a.content,!0)}),b.on("BeforeAddUndo",function(a){a.lastLevel&&a.lastLevel.content&&a.level.content&&a.lastLevel.content===e(a.level.content)&&a.preventDefault()}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){h=this}}),b.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var c,d,e,f=this.getEl(),h=f.firstChild;i=this,j&&j.ui&&j.ui.autocomplete&&(c=j(h),c.on("keydown",function(){c.removeAttr("aria-activedescendant")}).autocomplete({source:function(a,b){return e===a.term?void b(d):/^https?:/.test(a.term)||-1!==a.term.indexOf(".")?b():(j.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:a.term,_ajax_linking_nonce:j("#_ajax_linking_nonce").val()},function(a){d=a,b(a)},"json"),void(e=a.term))},focus:function(a,b){c.attr("aria-activedescendant","mce-wp-autocomplete-"+b.item.ID)},select:function(a,b){return c.val(b.item.permalink),j(f.firstChild.nextSibling).val(b.item.title),!1},open:function(){c.attr("aria-expanded","true"),g.blockHide=!0},close:function(){c.attr("aria-expanded","false"),g.blockHide=!1},minLength:2,position:{my:"left top+2"}}).autocomplete("instance")._renderItem=function(a,b){return j('
  • ').append(""+b.title+' '+b.info+"").appendTo(a)},c.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":c.autocomplete("widget").attr("id")}).on("focus",function(){c.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox")),a.$(h).on("keydown",function(a){13===a.keyCode&&b.execCommand("wp_link_apply")})}}),b.on("wptoolbar",function(c){var d,e,j,k=b.dom.getParent(c.element,"a");return a.$(document.body).hasClass("modal-open")?void(g.tempHide=!0):(g.tempHide=!1,void(k&&(d=b.$(k),e=d.attr("href"),j=d.attr("data-wplink-edit"),"_wp_link_placeholder"===e||j?(j&&!i.getURL()&&i.setURL(e),c.element=k,c.toolbar=g):e&&!d.find("img").length&&(h.setURL(e),c.element=k,c.toolbar=f))))}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"unlink"}),b.addButton("wp_link_advanced",{tooltip:"Advanced",icon:"dashicon dashicons-admin-generic",onclick:function(){if("undefined"!=typeof window.wpLink){var a=i.getURL()||null,c=i.getLinkText()||null;b.focus(),window.wpLink.open(b.id,a,c),g.tempHide=!0,i.reset()}}}),b.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){g.tempHide=!1,b.execCommand("wp_link_cancel")}}})}(window.tinymce); \ No newline at end of file +!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),-1!==(c=b.indexOf("?"))&&(b=b.slice(0,c)),-1!==(c=b.indexOf("#"))&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),""===b&&(b=this.url),b.length>40&&-1!==(c=b.indexOf("/"))&&-1!==(d=b.lastIndexOf("/"))&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.ui.WPLinkInput=a.ui.Control.extend({renderHtml:function(){return''},setURL:function(a){this.getEl().firstChild.value=a},getURL:function(){return a.trim(this.getEl().firstChild.value)},getLinkText:function(){var b=this.getEl().firstChild.nextSibling.value;return a.trim(b)?b.replace(/[\r\n\t ]+/g," "):""},reset:function(){var a=this.getEl().firstChild;a.value="",a.nextSibling.value=""}}),a.PluginManager.add("wplink",function(b){function c(){var a,c,d=b.selection.getNode(),e=b.dom.getParent(d,"a[href]");return e||(c=b.selection.getContent({format:"raw"}),c&&-1!==c.indexOf("")&&(a=c.match(/href="([^">]+)"/),a&&a[1]&&(e=b.$('a[href="'+a[1]+'"]',d)[0]),e&&(b.selection.select(e),b.nodeChanged()))),e}function d(){b.$("a").each(function(a,c){var d=b.$(c);"_wp_link_placeholder"===d.attr("href")?b.dom.remove(c,!0):d.attr("data-wplink-edit")&&d.attr("data-wplink-edit",null)})}function e(a,b){return b&&(a=a.replace(/ data-wplink-edit="true"/g,"")),a.replace(/]*?href="_wp_link_placeholder"[^>]*>([\s\S]+)<\/a>/g,"$1")}var f,g,h,i,j=window.jQuery;return b.on("preinit",function(){b.wp&&b.wp._createToolbar&&(f=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0),g=b.wp._createToolbar(["wp_link_input","wp_link_apply","wp_link_advanced"],!0),g.on("show",function(){a.$(document.body).hasClass("modal-open")||window.setTimeout(function(){var a=g.$el.find("input.ui-autocomplete-input")[0];a&&(a.focus(),a.select())})}),g.on("hide",function(){g.scrolling||b.execCommand("wp_link_cancel")}))}),b.addCommand("WP_Link",function(){var e=c();return a.Env.ie&&a.Env.ie<10?void("undefined"!=typeof window.wpLink&&window.wpLink.open(b.id)):(g.tempHide=!1,void(e?b.dom.setAttribs(e,{"data-wplink-edit":!0}):(d(),b.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),a.Env.ie&&(b.windowManager.wplinkBookmark=b.selection.getBookmark()),b.nodeChanged())))}),b.addCommand("wp_link_apply",function(){if(!g.scrolling){var d,e,f=c();if(f){if(d=i.getURL(),e=i.getLinkText(),b.focus(),a.isIE&&(b.selection.moveToBookmark(b.windowManager.wplinkBookmark),b.windowManager.wplinkBookmark=null),!d)return void b.dom.remove(f,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(d)||(d="http://"+d),b.dom.setAttribs(f,{href:d,"data-wplink-edit":null}),a.trim(f.innerHTML)||b.$(f).text(e||d)}i.reset(),b.nodeChanged()}}),b.addCommand("wp_link_cancel",function(){g.tempHide||(i.reset(),d(),b.focus(),a.isIE&&(b.selection.moveToBookmark(b.windowManager.wplinkBookmark),b.windowManager.wplinkBookmark=null),g.tempHide=!1)}),b.addShortcut("access+a","","WP_Link"),b.addShortcut("meta+k","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.on("savecontent",function(a){a.content=e(a.content,!0)}),b.on("BeforeAddUndo",function(a){a.lastLevel&&a.lastLevel.content&&a.level.content&&a.lastLevel.content===e(a.level.content)&&a.preventDefault()}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){h=this}}),b.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var c,d,e,f=this.getEl(),h=f.firstChild;i=this,j&&j.ui&&j.ui.autocomplete&&(c=j(h),c.on("keydown",function(){c.removeAttr("aria-activedescendant")}).autocomplete({source:function(a,b){return e===a.term?void b(d):/^https?:/.test(a.term)||-1!==a.term.indexOf(".")?b():(j.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:a.term,_ajax_linking_nonce:j("#_ajax_linking_nonce").val()},function(a){d=a,b(a)},"json"),void(e=a.term))},focus:function(a,b){c.attr("aria-activedescendant","mce-wp-autocomplete-"+b.item.ID)},select:function(a,b){return c.val(b.item.permalink),j(f.firstChild.nextSibling).val(b.item.title),!1},open:function(){c.attr("aria-expanded","true"),g.blockHide=!0},close:function(){c.attr("aria-expanded","false"),g.blockHide=!1},minLength:2,position:{my:"left top+2"}}).autocomplete("instance")._renderItem=function(a,b){return j('
  • ').append(""+b.title+' '+b.info+"").appendTo(a)},c.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":c.autocomplete("widget").attr("id")}).on("focus",function(){c.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox")),a.$(h).on("keydown",function(a){13===a.keyCode&&(b.execCommand("wp_link_apply"),a.preventDefault())})}}),b.on("wptoolbar",function(c){var d,e,j,k=b.dom.getParent(c.element,"a");return a.$(document.body).hasClass("modal-open")?void(g.tempHide=!0):(g.tempHide=!1,void(k&&(d=b.$(k),e=d.attr("href"),j=d.attr("data-wplink-edit"),"_wp_link_placeholder"===e||j?(j&&!i.getURL()&&i.setURL(e),c.element=k,c.toolbar=g):e&&!d.find("img").length&&(h.setURL(e),c.element=k,c.toolbar=f))))}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"unlink"}),b.addButton("wp_link_advanced",{tooltip:"Advanced",icon:"dashicon dashicons-admin-generic",onclick:function(){if("undefined"!=typeof window.wpLink){var a=i.getURL()||null,c=i.getLinkText()||null;b.focus(),window.wpLink.open(b.id,a,c),g.tempHide=!0,i.reset()}}}),b.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){g.tempHide=!1,b.execCommand("wp_link_cancel")}}})}(window.tinymce); \ 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 966bc574a5611343ae39bb3b96141af687f5e1d5..46cd1051ac6000dc5fd6b45f09f06b7cf1f88b1d 100644 GIT binary patch delta 7232 zcmV-G9KYk$jtYT~3V?(Gv;v1~f7D`UBSo=fTh3L*H*q=g&3h#&y4bjhi_9gCBJ$r~ zFEfK4U_i-Es$Nyf5x~Jr{)W~u%FxJyWJJ)L)`p>?n00Pxb=`y2lM9Vg**pGYWKy#q{X5XPh?cMCNe|D&aWe-jAj1oOrdVsW$_R0-%)T~F-9Ej$?Qg>qWY{KO3bRpBI)y7+G2wcDZJ z8y--sAilx~mxv4|gVvgH_i9qL2H|Q58^UTBGM#nIpqd+Dg_jXriqljM2TfT8?4qYE zQbjA_xmpg#&Hwy_lXyV;f7a>G=cgZnq|+DUm|D{~DNI?~3x@iDhpk!k%UdB?!+b|s zhBe+tEJJi?L6#0BWGN=8ZI%5;2M1lxYdu3#(dAT&rjEDzIt`?`lnytf1kWQEDC4pX#wjhAy3?=NR%4y6^~aL=I3tOKxV` z6N=kVZI0wl(rK5wCmnLc+QuBGL@dic-~O5{&nErXN+WT2ITGUB#-cwyR5VpZALjim z(=ZBr;Zn0C4Wn7ne{QJXSW%^xD*SOvg+)iG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aAloi41m1dYPsHh2IIIzj1}TBt}W-0k{8PRv zKJGjynv}wcp>BR^gxz(}(pK-A_Fn`Lw{Bp^b`1~;f8n|e2`CfKlWL)jQq&KKrxoK% z@9YdiJA1+ioRUOH;72B0C#6)*tE@g9zX_7IK0ICOm9kqiW_D!aam=i|QcJg{{-c5r9}6TP*_mzC)ul2U zit9hE0S7yf+|(k*q<%Bj5Mjzn1h$(H5sf+M%HHmPIx8`)}dS zay?TD*&ha_`Zi8eFe6exO@+Tdx ze|KlXH^2P$GuFW5*NN?GDmi3hQ|zcxmkwDixqisStt`dFU!prO>9_t;+i9TByLyKs zuS{dBBR4u*B6Zd=CMre|ovn6_aS_hDFtBk^#QGIHoBbIl>)juYv>SLIZbt!|S@MpnQzm?BEzL!r(BCED}tlT;* z%B{zUtep}|^%WM#=q({~hyFwF8QnUlOx%O@Drny#0M#f&h7|T3w_6-{yzXHjM^pHB zyRc$Dj%-H~-_i6&t9(r#xVKZre+uDR0WA30f)~JFxGnYn3djnjwVSfLFq>=^Xr^M> z@SyIS+qDuhXM4$pB0dF2Swf2U^6jcfBqsjwDDCe zO6T|5MVY%Ph}BI(BdLK3I}(Jki3i$dv9~uuPnAmHT_-=JDrsFOEa`ew73UNrCeK;P z%n#baCyc_wm3DtW6rzyfbx}w8)IFrl!z~>n7iX!dm5NufWf3I(i#EMjH>x<4L+wdFY$a)l@xr!I6Kz&7{sK4q~_A9v} zX?{2Y1b23EA)%PXG+}+vBEuE2dh2<%tGIEPhy$Q0_3MyM$Ci}m@^aPl3SI2AJ);%$G~P').append(''+c.title+' '+c.info+"").appendTo(b)},d.attr({"aria-owns":d.autocomplete("widget").attr("id")}).on("focus",function(){d.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox")},correctURL:function(){var b=a.trim(e.url.val());b&&d!==b&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(b)&&(e.url.val("http://"+b),d=b)},open:function(b,d,f){var g,h=a(document.body);h.addClass("modal-open"),wpLink.range=null,b&&(window.wpActiveEditor=b),window.wpActiveEditor&&(this.textarea=a("#"+window.wpActiveEditor).get(0),"undefined"!=typeof tinymce&&(h.append(e.backdrop,e.wrap),g=tinymce.get(wpActiveEditor),c=g&&!g.isHidden()?g:null,c&&tinymce.isIE&&!c.windowManager.wplinkBookmark&&(c.windowManager.wplinkBookmark=c.selection.getBookmark())),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),e.wrap.show(),e.backdrop.show(),wpLink.refresh(d,f),a(document).trigger("wplink-open",e.wrap))},isMCE:function(){return c&&!c.isHidden()},refresh:function(a,b){var c="";wpLink.isMCE()?wpLink.mceRefresh(a,b):(e.wrap.hasClass("has-text-field")||e.wrap.addClass("has-text-field"),document.selection?c=document.selection.createRange().text||b||"":"undefined"!=typeof this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||b||""),e.text.val(b),wpLink.setDefaultValues()),f?e.url.focus().blur():window.setTimeout(function(){e.url.focus()[0].select()},100),d=e.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(a){var b,d,e,f=c.selection.getContent();if(/]+>[^<]+<\/a>$/.test(f)||-1===f.indexOf("href=")))return!1;if(a){if(d=a.childNodes,0===d.length)return!1;for(e=d.length-1;e>=0;e--)if(b=d[e],3!=b.nodeType&&!tinymce.dom.BookmarkManager.isBookmarkNode(b))return!1}return!0},mceRefresh:function(a,d){var f,g=b(),h=this.hasSelectedText(g);g?(f=g.innerText||g.textContent,tinymce.trim(f)||(f=d||""),a=a||c.dom.getAttrib(g,"href"),"_wp_link_placeholder"===a&&(a=""),e.url.val(a),e.openInNewTab.prop("checked","_blank"===c.dom.getAttrib(g,"target")),e.submit.val(wpLinkL10n.update)):(d=c.selection.getContent({format:"text"})||d,this.setDefaultValues()),h?(e.text.val(f||""),e.wrap.addClass("has-text-field")):(e.text.val(""),e.wrap.removeClass("has-text-field"))},close:function(){a(document.body).removeClass("modal-open"),wpLink.isMCE()?(c.plugins.wplink&&c.plugins.wplink.close(),c.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select())),e.backdrop.hide(),e.wrap.hide(),d=!1,a(document).trigger("wplink-close",e.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:a.trim(e.url.val()),target:e.openInNewTab.prop("checked")?"_blank":""}},buildHtml:function(a){var b='"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var a,b,c,d,f,g,h,i=wpLink.textarea;i&&(a=wpLink.getAttrs(),b=e.text.val(),a.href&&(c=wpLink.buildHtml(a),document.selection&&wpLink.range?(i.focus(),wpLink.range.text=c+(b||wpLink.range.text)+"",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):"undefined"!=typeof i.selectionStart&&(d=i.selectionStart,f=i.selectionEnd,h=b||i.value.substring(d,f),c=c+h+"",g=d+c.length,d!==f||h||(g-=4),i.value=i.value.substring(0,d)+c+i.value.substring(f,i.value.length),i.selectionStart=i.selectionEnd=g),wpLink.close(),i.focus()))},mceUpdate:function(){var a,d,f=wpLink.getAttrs();return c.focus(),tinymce.isIE&&(c.selection.moveToBookmark(c.windowManager.wplinkBookmark),c.windowManager.wplinkBookmark=null),f.href?(a=b(),e.wrap.hasClass("has-text-field")&&(d=e.text.val()||f.href),a?(d&&("innerText"in a?a.innerText=d:a.textContent=d),c.dom.setAttribs(a,f)):d?c.selection.setNode(c.dom.create("a",f,c.dom.encode(d))):c.execCommand("mceInsertLink",!1,f),wpLink.close(),void c.nodeChanged()):void c.execCommand("unlink")},setDefaultValues:function(){var a,b=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,d=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,4}[^ "]*$/i;this.isMCE()?a=c.selection.getContent():document.selection&&wpLink.range?a=wpLink.range.text:"undefined"!=typeof this.textarea.selectionStart&&(a=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)),a&&b.test(a)?e.url.val("mailto:"+a):a&&d.test(a)?e.url.val(a.replace(/&|�?38;/gi,"&")):e.url.val(""),e.submit.val(wpLinkL10n.save)}},a(document).ready(wpLink.init)}(jQuery); \ No newline at end of file +var wpLink;!function(a){function b(){return c.dom.getParent(c.selection.getNode(),"a")}var c,d,e={},f="ontouchend"in document;wpLink={textarea:"",init:function(){e.wrap=a("#wp-link-wrap"),e.dialog=a("#wp-link"),e.backdrop=a("#wp-link-backdrop"),e.submit=a("#wp-link-submit"),e.close=a("#wp-link-close"),e.text=a("#wp-link-text"),e.url=a("#wp-link-url"),e.openInNewTab=a("#wp-link-target"),a.ui&&a.ui.autocomplete&&wpLink.setAutocomplete(),e.dialog.on("keydown",wpLink.keydown),e.submit.on("click",function(a){a.preventDefault(),wpLink.update()}),e.close.add(e.backdrop).add("#wp-link-cancel a").click(function(a){a.preventDefault(),wpLink.close()}),e.url.on("paste",function(){setTimeout(wpLink.correctURL,0)})},setAutocomplete:function(){var b,c,d=e.url;d.on("keydown",function(){d.removeAttr("aria-activedescendant")}).autocomplete({source:function(d,e){return c===d.term?void e(b):/^https?:/.test(d.term)||-1!==d.term.indexOf(".")?e():(a.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:d.term,_ajax_linking_nonce:a("#_ajax_linking_nonce").val()},function(a){b=a,e(a)},"json"),void(c=d.term))},focus:function(a,b){d.attr("aria-activedescendant","mce-wp-autocomplete-"+b.item.ID)},select:function(a,b){return d.val(b.item.permalink),e.wrap.hasClass("has-text-field")&&""===tinymce.trim(e.text.val())&&e.text.val(b.item.title),!1},open:function(){d.attr("aria-expanded","true")},close:function(){d.attr("aria-expanded","false")},minLength:2,position:{my:"left top+2"}}).autocomplete("instance")._renderItem=function(b,c){return a('
  • ').append(''+c.title+' '+c.info+"").appendTo(b)},d.attr({"aria-owns":d.autocomplete("widget").attr("id")}).on("focus",function(){d.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox")},correctURL:function(){var b=a.trim(e.url.val());b&&d!==b&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(b)&&(e.url.val("http://"+b),d=b)},open:function(b,d,f){var g,h=a(document.body);h.addClass("modal-open"),wpLink.range=null,b&&(window.wpActiveEditor=b),window.wpActiveEditor&&(this.textarea=a("#"+window.wpActiveEditor).get(0),"undefined"!=typeof tinymce&&(h.append(e.backdrop,e.wrap),g=tinymce.get(wpActiveEditor),c=g&&!g.isHidden()?g:null,c&&tinymce.isIE&&!c.windowManager.wplinkBookmark&&(c.windowManager.wplinkBookmark=c.selection.getBookmark())),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),e.wrap.show(),e.backdrop.show(),wpLink.refresh(d,f),a(document).trigger("wplink-open",e.wrap))},isMCE:function(){return c&&!c.isHidden()},refresh:function(a,b){var c="";wpLink.isMCE()?wpLink.mceRefresh(a,b):(e.wrap.hasClass("has-text-field")||e.wrap.addClass("has-text-field"),document.selection?c=document.selection.createRange().text||b||"":"undefined"!=typeof this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||b||""),e.text.val(b),wpLink.setDefaultValues()),f?e.url.focus().blur():window.setTimeout(function(){e.url.focus()[0].select()}),d=e.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(a){var b,d,e,f=c.selection.getContent();if(/]+>[^<]+<\/a>$/.test(f)||-1===f.indexOf("href=")))return!1;if(a){if(d=a.childNodes,0===d.length)return!1;for(e=d.length-1;e>=0;e--)if(b=d[e],3!=b.nodeType&&!tinymce.dom.BookmarkManager.isBookmarkNode(b))return!1}return!0},mceRefresh:function(a,d){var f,g=b(),h=this.hasSelectedText(g);g?(f=g.innerText||g.textContent,tinymce.trim(f)||(f=d||""),a=a||c.dom.getAttrib(g,"href"),"_wp_link_placeholder"===a&&(a=""),e.url.val(a),e.openInNewTab.prop("checked","_blank"===c.dom.getAttrib(g,"target")),e.submit.val(wpLinkL10n.update)):(d=c.selection.getContent({format:"text"})||d,this.setDefaultValues()),h?(e.text.val(f||""),e.wrap.addClass("has-text-field")):(e.text.val(""),e.wrap.removeClass("has-text-field"))},close:function(){a(document.body).removeClass("modal-open"),wpLink.isMCE()?(c.plugins.wplink&&c.plugins.wplink.close(),c.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select())),e.backdrop.hide(),e.wrap.hide(),d=!1,a(document).trigger("wplink-close",e.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:a.trim(e.url.val()),target:e.openInNewTab.prop("checked")?"_blank":""}},buildHtml:function(a){var b='"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var a,b,c,d,f,g,h,i=wpLink.textarea;i&&(a=wpLink.getAttrs(),b=e.text.val(),a.href&&(c=wpLink.buildHtml(a),document.selection&&wpLink.range?(i.focus(),wpLink.range.text=c+(b||wpLink.range.text)+"",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):"undefined"!=typeof i.selectionStart&&(d=i.selectionStart,f=i.selectionEnd,h=b||i.value.substring(d,f),c=c+h+"",g=d+c.length,d!==f||h||(g-=4),i.value=i.value.substring(0,d)+c+i.value.substring(f,i.value.length),i.selectionStart=i.selectionEnd=g),wpLink.close(),i.focus()))},mceUpdate:function(){var a,d,f=wpLink.getAttrs();return c.focus(),tinymce.isIE&&(c.selection.moveToBookmark(c.windowManager.wplinkBookmark),c.windowManager.wplinkBookmark=null),f.href?(a=b(),e.wrap.hasClass("has-text-field")&&(d=e.text.val()||f.href),a?(d&&("innerText"in a?a.innerText=d:a.textContent=d),c.dom.setAttribs(a,f)):d?c.selection.setNode(c.dom.create("a",f,c.dom.encode(d))):c.execCommand("mceInsertLink",!1,f),wpLink.close(),void c.nodeChanged()):void c.execCommand("unlink")},keydown:function(a){var b;27===a.keyCode?(wpLink.close(),a.stopImmediatePropagation()):9===a.keyCode&&(b=a.target.id,"wp-link-submit"!==b||a.shiftKey?"wp-link-close"===b&&a.shiftKey&&(e.submit.focus(),a.preventDefault()):(e.close.focus(),a.preventDefault()))},setDefaultValues:function(){var a,b=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,d=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,4}[^ "]*$/i;this.isMCE()?a=c.selection.getContent():document.selection&&wpLink.range?a=wpLink.range.text:"undefined"!=typeof this.textarea.selectionStart&&(a=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)),a&&b.test(a)?e.url.val("mailto:"+a):a&&d.test(a)?e.url.val(a.replace(/&|�?38;/gi,"&")):e.url.val(""),e.submit.val(wpLinkL10n.save)}},a(document).ready(wpLink.init)}(jQuery); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 621429b98a..98a6e7e167 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta1-36742'; +$wp_version = '4.5-beta1-36743'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.