<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[16458] trunk/wp-includes/js/tinymce:
  Second pass on internal linking preloading.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16458">16458</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-11-18 07:56:47 +0000 (Thu, 18 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Second pass on internal linking preloading. Adjust styles, svn add the wpdialogs plugin, adjust files and docs. see <a href="http://trac.wordpress.org/ticket/11420">#11420</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjstinymcepluginswplinkjswplinkdevjs">trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkjswplinkjs">trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js</a></li>
<li><a href="#trunkwpincludesjstinymcewptinymcejsgz">trunk/wp-includes/js/tinymce/wp-tinymce.js.gz</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/wp-includes/js/tinymce/plugins/wpdialogs/</li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogseditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogseditor_pluginjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js</a></li>
<li>trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/</li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogsjspopupdevjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogsjspopupjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludesjstinymcewpmcelinkphp">trunk/wp-includes/js/tinymce/wp-mce-link.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjstinymcepluginswpdialogseditor_plugindevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js (0 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function($) {
+        var wpDialogFn = function( fn ) {
+                return function() {
+                        if ( this.features.wpDialog )
+                                return fn.apply( this, arguments );
+                        else
+                                return this.parent.apply( this, arguments );
+                };
+        };
+
+        tinymce.create('tinymce.plugins.WPDialogs', {
+                init : function(ed, url) {
+                        // Replace window manager
+                        ed.onBeforeRenderUI.add(function() {
+                                ed.windowManager = new tinymce.WPWindowManager(ed);
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'WPDialogs',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : 'http://wordpress.org',
+                                version : '0.1'
+                        };
+                }
+        });
+
+        tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', {
+                WPWindowManager : function(ed) {
+                        this.parent(ed);
+                },
+
+                open : function(f, p) {
+                        var t = this, element;
+                        // Can't use wpDialogFn here; this.features isn't set yet.
+                        if ( ! f.wpDialog )
+                                return this.parent( f, p );
+                        else if ( ! f.id )
+                                return;
+                        
+                        element = $('#' + f.id);
+                        if ( ! element.length )
+                                return;
+                        
+                        t.features = f;
+                        t.params = p;
+                        t.onOpen.dispatch(t, f, p);
+                        t.element = t.windows[ f.id ] = element;
+                        
+                        if ( tinyMCEPopup )
+                                tinyMCEPopup.init();
+                        
+                        element.dialog({
+                                title: f.title,
+                                width: f.width,
+                                height: f.height,
+                                modal: true,
+                                dialogClass: 'wp-dialog'
+                        });
+                },
+                close : wpDialogFn(function() {
+                        this.element.dialog('close');
+                }),
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('wpdialogs', tinymce.plugins.WPDialogs);
+})(jQuery);
+
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpdialogseditor_pluginjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js (0 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+(function(b){var a=function(c){return function(){if(this.features.wpDialog){return c.apply(this,arguments)}else{return this.parent.apply(this,arguments)}}};tinymce.create(&quot;tinymce.plugins.WPDialogs&quot;,{init:function(c,d){c.onBeforeRenderUI.add(function(){c.windowManager=new tinymce.WPWindowManager(c)})},getInfo:function(){return{longname:&quot;WPDialogs&quot;,author:&quot;WordPress&quot;,authorurl:&quot;http://wordpress.org&quot;,infourl:&quot;http://wordpress.org&quot;,version:&quot;0.1&quot;}}});tinymce.create(&quot;tinymce.WPWindowManager:tinymce.InlineWindowManager&quot;,{WPWindowManager:function(c){this.parent(c)},open:function(e,g){var d=this,c;if(!e.wpDialog){return this.parent(e,g)}else{if(!e.id){return}}c=b(&quot;#&quot;+e.id);if(!c.length){return}d.features=e;d.params=g;d.onOpen.dispatch(d,e,g);d.element=d.windows[e.id]=c;if(tinyMCEPopup){tinyMCEPopup.init()}c.dialog({title:e.title,width:e.width,height:e.height,modal:true,dialogClass:&quot;wp-dialog&quot;})},close:a(function(){this.element.dialog(&quot;close&quot;)}),});tinymce.PluginManager.add(&quot;wpdialogs&quot;,tinymce.plugins.WPDialogs)})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpdialogsjspopupdevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js (0 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -0,0 +1,432 @@
</span><ins>+/**
+ * popup.js
+ * 
+ * An altered version of tinyMCEPopup to work in the same window as tinymce.
+ * 
+ * ------------------------------------------------------------------
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+// Some global instances
+
+/**
+ * TinyMCE popup/dialog helper class. This gives you easy access to the
+ * parent editor instance and a bunch of other things. It's higly recommended
+ * that you load this script into your dialogs.
+ *
+ * @static
+ * @class tinyMCEPopup
+ */
+var tinyMCEPopup = {
+        /**
+         * Initializes the popup this will be called automatically.
+         *
+         * @method init
+         */
+        init : function() {
+                var t = this, w, ti;
+
+                // Find window &amp; API
+                w = t.getWin();
+                tinymce = w.tinymce;
+                tinyMCE = w.tinyMCE;
+                t.editor = tinymce.EditorManager.activeEditor;
+                t.params = t.editor.windowManager.params;
+                t.features = t.editor.windowManager.features;
+                t.dom = tinymce.dom;
+
+                // Setup on init listeners
+                t.listeners = [];
+                t.onInit = {
+                        add : function(f, s) {
+                                t.listeners.push({func : f, scope : s});
+                        }
+                };
+
+                t.isWindow = !t.getWindowArg('mce_inline');
+                t.id = t.features.id;
+                t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
+        },
+
+        /**
+         * Returns the reference to the parent window that opened the dialog.
+         *
+         * @method getWin
+         * @return {Window} Reference to the parent window that opened the dialog.
+         */
+        getWin : function() {
+                return window;
+        },
+
+        /**
+         * Returns a window argument/parameter by name.
+         *
+         * @method getWindowArg
+         * @param {String} n Name of the window argument to retrive.
+         * @param {String} dv Optional default value to return.
+         * @return {String} Argument value or default value if it wasn't found.
+         */
+        getWindowArg : function(n, dv) {
+                var v = this.params[n];
+
+                return tinymce.is(v) ? v : dv;
+        },
+
+        /**
+         * Returns a editor parameter/config option value.
+         *
+         * @method getParam
+         * @param {String} n Name of the editor config option to retrive.
+         * @param {String} dv Optional default value to return.
+         * @return {String} Parameter value or default value if it wasn't found.
+         */
+        getParam : function(n, dv) {
+                return this.editor.getParam(n, dv);
+        },
+
+        /**
+         * Returns a language item by key.
+         *
+         * @method getLang
+         * @param {String} n Language item like mydialog.something.
+         * @param {String} dv Optional default value to return.
+         * @return {String} Language value for the item like &quot;my string&quot; or the default value if it wasn't found.
+         */
+        getLang : function(n, dv) {
+                return this.editor.getLang(n, dv);
+        },
+
+        /**
+         * Executed a command on editor that opened the dialog/popup.
+         *
+         * @method execCommand
+         * @param {String} cmd Command to execute.
+         * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
+         * @param {Object} val Optional value to pass with the comman like an URL.
+         * @param {Object} a Optional arguments object.
+         */
+        execCommand : function(cmd, ui, val, a) {
+                a = a || {};
+                a.skip_focus = 1;
+
+                this.restoreSelection();
+                return this.editor.execCommand(cmd, ui, val, a);
+        },
+
+        /**
+         * Resizes the dialog to the inner size of the window. This is needed since various browsers
+         * have different border sizes on windows.
+         *
+         * @method resizeToInnerSize
+         */
+        resizeToInnerSize : function() {
+                var t = this;
+
+                // Detach it to workaround a Chrome specific bug
+                // https://sourceforge.net/tracker/?func=detail&amp;atid=635682&amp;aid=2926339&amp;group_id=103281
+                setTimeout(function() {
+                        var vp = t.dom.getViewPort(window);
+
+                        t.editor.windowManager.resizeBy(
+                                t.getWindowArg('mce_width') - vp.w,
+                                t.getWindowArg('mce_height') - vp.h,
+                                t.id || window
+                        );
+                }, 0);
+        },
+
+        /**
+         * Will executed the specified string when the page has been loaded. This function
+         * was added for compatibility with the 2.x branch.
+         *
+         * @method executeOnLoad
+         * @param {String} s String to evalutate on init.
+         */
+        executeOnLoad : function(s) {
+                this.onInit.add(function() {
+                        eval(s);
+                });
+        },
+
+        /**
+         * Stores the current editor selection for later restoration. This can be useful since some browsers
+         * looses it's selection if a control element is selected/focused inside the dialogs.
+         *
+         * @method storeSelection
+         */
+        storeSelection : function() {
+                this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
+        },
+
+        /**
+         * Restores any stored selection. This can be useful since some browsers
+         * looses it's selection if a control element is selected/focused inside the dialogs.
+         *
+         * @method restoreSelection
+         */
+        restoreSelection : function() {
+                var t = tinyMCEPopup;
+
+                if (!t.isWindow &amp;&amp; tinymce.isIE)
+                        t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
+        },
+
+        /**
+         * Loads a specific dialog language pack. If you pass in plugin_url as a arugment
+         * when you open the window it will load the &lt;plugin url&gt;/langs/&lt;code&gt;_dlg.js lang pack file.
+         *
+         * @method requireLangPack
+         */
+        requireLangPack : function() {
+                var t = this, u = t.getWindowArg('plugin_url') || t.getWindowArg('theme_url');
+
+                if (u &amp;&amp; t.editor.settings.language &amp;&amp; t.features.translate_i18n !== false) {
+                        u += '/langs/' + t.editor.settings.language + '_dlg.js';
+
+                        if (!tinymce.ScriptLoader.isDone(u)) {
+                                document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;' + tinymce._addVer(u) + '&quot;&gt;&lt;/script&gt;');
+                                tinymce.ScriptLoader.markDone(u);
+                        }
+                }
+        },
+
+        /**
+         * Executes a color picker on the specified element id. When the user
+         * then selects a color it will be set as the value of the specified element.
+         *
+         * @method pickColor
+         * @param {DOMEvent} e DOM event object.
+         * @param {string} element_id Element id to be filled with the color value from the picker.
+         */
+        pickColor : function(e, element_id) {
+                this.execCommand('mceColorPicker', true, {
+                        color : document.getElementById(element_id).value,
+                        func : function(c) {
+                                document.getElementById(element_id).value = c;
+
+                                try {
+                                        document.getElementById(element_id).onchange();
+                                } catch (ex) {
+                                        // Try fire event, ignore errors
+                                }
+                        }
+                });
+        },
+
+        /**
+         * Opens a filebrowser/imagebrowser this will set the output value from
+         * the browser as a value on the specified element.
+         *
+         * @method openBrowser
+         * @param {string} element_id Id of the element to set value in.
+         * @param {string} type Type of browser to open image/file/flash.
+         * @param {string} option Option name to get the file_broswer_callback function name from.
+         */
+        openBrowser : function(element_id, type, option) {
+                tinyMCEPopup.restoreSelection();
+                this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
+        },
+
+        /**
+         * Creates a confirm dialog. Please don't use the blocking behavior of this
+         * native version use the callback method instead then it can be extended.
+         *
+         * @method confirm
+         * @param {String} t Title for the new confirm dialog.
+         * @param {function} cb Callback function to be executed after the user has selected ok or cancel.
+         * @param {Object} s Optional scope to execute the callback in.
+         */
+        confirm : function(t, cb, s) {
+                this.editor.windowManager.confirm(t, cb, s, window);
+        },
+
+        /**
+         * Creates a alert dialog. Please don't use the blocking behavior of this
+         * native version use the callback method instead then it can be extended.
+         *
+         * @method alert
+         * @param {String} t Title for the new alert dialog.
+         * @param {function} cb Callback function to be executed after the user has selected ok.
+         * @param {Object} s Optional scope to execute the callback in.
+         */
+        alert : function(tx, cb, s) {
+                this.editor.windowManager.alert(tx, cb, s, window);
+        },
+
+        /**
+         * Closes the current window.
+         *
+         * @method close
+         */
+        close : function() {
+                var t = this;
+
+                // To avoid domain relaxing issue in Opera
+                function close() {
+                        t.editor.windowManager.close(window);
+                        t.editor = null;
+                };
+
+                if (tinymce.isOpera)
+                        t.getWin().setTimeout(close, 0);
+                else
+                        close();
+        },
+
+        // Internal functions        
+
+        _restoreSelection : function() {
+                var e = window.event.srcElement;
+
+                if (e.nodeName == 'INPUT' &amp;&amp; (e.type == 'submit' || e.type == 'button'))
+                        tinyMCEPopup.restoreSelection();
+        },
+
+/*        _restoreSelection : function() {
+                var e = window.event.srcElement;
+
+                // If user focus a non text input or textarea
+                if ((e.nodeName != 'INPUT' &amp;&amp; e.nodeName != 'TEXTAREA') || e.type != 'text')
+                        tinyMCEPopup.restoreSelection();
+        },*/
+
+        _onDOMLoaded : function() {
+                var t = tinyMCEPopup, ti = document.title, bm, h, nv;
+
+                if (t.domLoaded)
+                        return;
+
+                t.domLoaded = 1;
+
+                tinyMCEPopup.init();
+
+                // Translate page
+                if (t.features.translate_i18n !== false) {
+                        h = document.body.innerHTML;
+
+                        // Replace a=x with a=&quot;x&quot; in IE
+                        if (tinymce.isIE)
+                                h = h.replace(/ (value|title|alt)=([^&quot;][^\s&gt;]+)/gi, ' $1=&quot;$2&quot;')
+
+                        document.dir = t.editor.getParam('directionality','');
+
+                        if ((nv = t.editor.translate(h)) &amp;&amp; nv != h)
+                                document.body.innerHTML = nv;
+
+                        if ((nv = t.editor.translate(ti)) &amp;&amp; nv != ti)
+                                document.title = ti = nv;
+                }
+
+                document.body.style.display = '';
+
+                // Restore selection in IE when focus is placed on a non textarea or input element of the type text
+                if (tinymce.isIE) {
+                        document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
+
+                        // Add base target element for it since it would fail with modal dialogs
+                        t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});
+                }
+
+                t.restoreSelection();
+
+                // Set inline title
+                if (!t.isWindow)
+                        t.editor.windowManager.setTitle(window, ti);
+                else
+                        window.focus();
+
+                if (!tinymce.isIE &amp;&amp; !t.isWindow) {
+                        tinymce.dom.Event._add(document, 'focus', function() {
+                                t.editor.windowManager.focus(t.id);
+                        });
+                }
+
+                // Patch for accessibility
+                tinymce.each(t.dom.select('select'), function(e) {
+                        e.onkeydown = tinyMCEPopup._accessHandler;
+                });
+
+                // Call onInit
+                // Init must be called before focus so the selection won't get lost by the focus call
+                tinymce.each(t.listeners, function(o) {
+                        o.func.call(o.scope, t.editor);
+                });
+
+                // Move focus to window
+                if (t.getWindowArg('mce_auto_focus', true)) {
+                        window.focus();
+
+                        // Focus element with mceFocus class
+                        tinymce.each(document.forms, function(f) {
+                                tinymce.each(f.elements, function(e) {
+                                        if (t.dom.hasClass(e, 'mceFocus') &amp;&amp; !e.disabled) {
+                                                e.focus();
+                                                return false; // Break loop
+                                        }
+                                });
+                        });
+                }
+
+                document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
+        },
+
+        _accessHandler : function(e) {
+                e = e || window.event;
+
+                if (e.keyCode == 13 || e.keyCode == 32) {
+                        e = e.target || e.srcElement;
+
+                        if (e.onchange)
+                                e.onchange();
+
+                        return tinymce.dom.Event.cancel(e);
+                }
+        },
+
+        _closeWinKeyHandler : function(e) {
+                e = e || window.event;
+
+                if (e.keyCode == 27)
+                        tinyMCEPopup.close();
+        },
+
+        _wait : function() {
+                // Use IE method
+                if (document.attachEvent) {
+                        document.attachEvent(&quot;onreadystatechange&quot;, function() {
+                                if (document.readyState === &quot;complete&quot;) {
+                                        document.detachEvent(&quot;onreadystatechange&quot;, arguments.callee);
+                                        tinyMCEPopup._onDOMLoaded();
+                                }
+                        });
+
+                        if (document.documentElement.doScroll &amp;&amp; window == window.top) {
+                                (function() {
+                                        if (tinyMCEPopup.domLoaded)
+                                                return;
+
+                                        try {
+                                                // If IE is used, use the trick by Diego Perini
+                                                // http://javascript.nwbox.com/IEContentLoaded/
+                                                document.documentElement.doScroll(&quot;left&quot;);
+                                        } catch (ex) {
+                                                setTimeout(arguments.callee, 0);
+                                                return;
+                                        }
+
+                                        tinyMCEPopup._onDOMLoaded();
+                                })();
+                        }
+
+                        document.attachEvent('onload', tinyMCEPopup._onDOMLoaded);
+                } else if (document.addEventListener) {
+                        window.addEventListener('DOMContentLoaded', tinyMCEPopup._onDOMLoaded, false);
+                        window.addEventListener('load', tinyMCEPopup._onDOMLoaded, false);
+                }
+        }
+};
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpdialogsjspopupjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js (0 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+var tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=tinymce.dom;b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg(&quot;mce_inline&quot;);b.id=b.features.id;b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return window},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg(&quot;mce_width&quot;)-b.w,a.getWindowArg(&quot;mce_height&quot;)-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&amp;&amp;tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg(&quot;plugin_url&quot;)||b.getWindowArg(&quot;theme_url&quot;);if(a&amp;&amp;b.editor.settings.language&amp;&amp;b.features.translate_i18n!==false){a+=&quot;/langs/&quot;+b.editor.settings.language+&quot;_dlg.js&quot;;if(!tinymce.ScriptLoader.isDone(a)){document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;'+tinymce._addVer(a)+'&quot;&gt;&lt;\/script&gt;');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand(&quot;mceColorPicker&quot;,true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback(&quot;file_browser_callback&quot;,a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);a.editor=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName==&quot;INPUT&quot;&amp;&amp;(a.type==&quot;submit&quot;||a.type==&quot;button&quot;)){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;tinyMCEPopup.init();if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^&quot;][^\s&gt;]+)/gi,' $1=&quot;$2&quot;')}document.dir=b.editor.getParam(&quot;directionality&quot;,&quot;&quot;);if((a=b.editor.translate(c))&amp;&amp;a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&amp;&amp;a!=d){document.title=d=a}}document.body.style.display=&quot;&quot;;if(tinymce.isIE){document.attachEvent(&quot;onmouseup&quot;,tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select(&quot;head&quot;)[0],&quot;base&quot;,{target:&quot;_self&quot;})}b.restoreSelection();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&amp;&amp;!b.isWindow){tinymce.dom.Event._add(document,&quot;focus&quot;,function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select(&quot;select&quot;),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg(&quot;mce_auto_focus&quot;,true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,&quot;mceFocus&quot;)&amp;&amp;!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&amp;&amp;window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent(&quot;onload&quot;,tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener(&quot;DOMContentLoaded&quot;,tinyMCEPopup._onDOMLoaded,false);window.addEventListener(&quot;load&quot;,tinyMCEPopup._onDOMLoaded,false)}}}};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (16457 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js        2010-11-18 06:22:13 UTC (rev 16457)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -213,20 +213,22 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 processAJAXResponse: function( $panel, results, callback, opts ) {
</span><del>-                        var list = '';
</del><ins>+                        var list = '', alt = true;
</ins><span class="cx"> 
</span><span class="cx">                         if ( !results ) {
</span><span class="cx">                                 if ( !opts.append ) {
</span><del>-                                        list += '&lt;li class=&quot;no-matches-found unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'
</del><ins>+                                        list += '&lt;li class=&quot;unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'
</ins><span class="cx">                                         + wpLinkL10n.noMatchesFound
</span><span class="cx">                                         + '&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;';
</span><span class="cx">                                 }
</span><span class="cx">                         } else {
</span><span class="cx">                                 $.each( results, function() {
</span><del>-                                        list += '&lt;li&gt;&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;' + this['permalink'] + '&quot; /&gt;';
</del><ins>+                                        list += alt ? '&lt;li class=&quot;alternate&quot;&gt;' : '&lt;li&gt;';
+                                        list += '&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;' + this['permalink'] + '&quot; /&gt;';
</ins><span class="cx">                                         list += '&lt;span class=&quot;item-title&quot;&gt;';
</span><span class="cx">                                         list += this['title'] ? this['title'] : '&lt;em&gt;'+ wpLinkL10n.untitled + '&lt;/em&gt;';
</span><span class="cx">                                         list += '&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;' + this['info'] + '&lt;/span&gt;&lt;/li&gt;';
</span><ins>+                                        alt = ! alt;
</ins><span class="cx">                                 });
</span><span class="cx">                         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js (16457 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-11-18 06:22:13 UTC (rev 16457)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -1 +1 @@
</span><del>-(function(d){var a={},c={},b,e={timeToTriggerRiver:150,minRiverAJAXDuration:200,lastSearch:&quot;&quot;,riverDefaults:function(){return{page:2,allLoaded:false,active:false}},init:function(){a.dialog=d(&quot;#wp-link&quot;);a.url=d(&quot;#url-field&quot;);a.title=d(&quot;#link-title-field&quot;);a.openInNewTab=d(&quot;#link-target-checkbox&quot;);a.search=d(&quot;#search-field&quot;);c.search=d(&quot;#search-results&quot;);c.recent=d(&quot;#most-recent-results&quot;);c.search.data(&quot;river&quot;,e.riverDefaults());c.recent.data(&quot;river&quot;,e.riverDefaults());c.group=d(&quot;.query-results&quot;,a.dialog);d(&quot;#wp-link-update&quot;).click(e.update);d(&quot;#wp-link-cancel&quot;).click(function(){tinyMCEPopup.close()});c.group.delegate(&quot;li&quot;,&quot;click&quot;,e.selectInternalLink);c.group.scroll(e.maybeLoadRiver);a.search.keyup(e.searchInternalLinks);a.dialog.bind(&quot;dialogopen&quot;,e.refresh)},refresh:function(){var f;b=tinyMCEPopup.editor;if(f=b.dom.getParent(b.selection.getNode(),&quot;A&quot;)){a.url.val(f.href);a.title.val(b.dom.getAttrib(f,&quot;title&quot;));if(&quot;_blank&quot;==b.dom.getAttrib(f,&quot;target&quot;)){a.openInNewTab.attr(&quot;checked&quot;,&quot;checked&quot;)}}c.group.find(&quot;.selected&quot;).removeClass(&quot;selected&quot;);a.url.focus()},update:function(){var j,g=tinyMCEPopup.editor,h={href:a.url.val(),title:a.title.val(),target:a.openInNewTab.attr(&quot;checked&quot;)?&quot;_blank&quot;:&quot;&quot;},k,f,i=h.title?h.title:h.href;tinyMCEPopup.restoreSelection();k=g.dom.getParent(g.selection.getNode(),&quot;A&quot;);if(!h.href){if(g.selection.isCollapsed()){tinyMCEPopup.close();return}else{if(k){tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);f=g.selection.getBookmark();g.dom.remove(k,1);g.selection.moveToBookmark(f);tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close();return}}}tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);if(k==null){g.getDoc().execCommand(&quot;unlink&quot;,false,null);if(g.selection.isCollapsed()){j=g.dom.create(&quot;a&quot;,{href:&quot;#mce_temp_url#&quot;},i);g.selection.setNode(j)}else{tinyMCEPopup.execCommand(&quot;CreateLink&quot;,false,&quot;#mce_temp_url#&quot;,{skip_undo:1})}tinymce.each(g.dom.select(&quot;a&quot;),function(l){if(g.dom.getAttrib(l,&quot;href&quot;)==&quot;#mce_temp_url#&quot;){k=l;g.dom.setAttribs(k,h)}})}else{g.dom.setAttribs(k,h)}if(k.childNodes.length!=1||k.firstChild.nodeName!=&quot;IMG&quot;){g.focus();g.selection.select(k);g.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()},selectInternalLink:function(){var f=d(this);if(f.hasClass(&quot;unselectable&quot;)){return}f.siblings(&quot;.selected&quot;).removeClass(&quot;selected&quot;);f.addClass(&quot;selected&quot;);a.url.val(f.children(&quot;.item-permalink&quot;).val());a.title.val(f.children(&quot;.item-title&quot;).text())},maybeLoadRiver:function(){var h=d(this),g=h.children(&quot;ul&quot;),i=h.data(&quot;river&quot;),f=h.scrollTop()+h.height();if(f!=g.height()||i.active||i.allLoaded){return}setTimeout(function(){var j=h.scrollTop(),k=j+h.height(),l=h.find(&quot;.river-waiting&quot;);if(f!=k||k!=g.height()||i.active||i.allLoaded){return}i.active=true;l.show();h.scrollTop(j+l.outerHeight());e.linkAJAX(h,{page:i.page},function(m){i.page++;i.active=false;i.allLoaded=!m;l.hide()},{append:true,delay:e.minRiverAJAXDuration})},e.timeToTriggerRiver)},searchInternalLinks:function(){var f=d(this),h,g=f.val();if(g.length&gt;2){c.recent.hide();c.search.show();if(e.lastSearch==g){return}e.lastSearch=g;h=f.siblings(&quot;img.waiting&quot;).show();c.search.data(&quot;river&quot;,e.riverDefaults());c.search.scrollTop(0);e.linkAJAX(c.search,{title:g},function(){h.hide()})}else{c.search.hide();c.recent.show()}},linkAJAX:function(i,h,j,g){var f;g=g||{};if(!i.hasClass(&quot;query-results&quot;)){i=i.parents(&quot;.query-results&quot;)}if(!i.length){return}f=e.delayedCallback(function(k){e.processAJAXResponse(i,k,j,g)},g.delay);d.post(ajaxurl,d.extend({action:&quot;wp-link-ajax&quot;},h),f,&quot;json&quot;)},processAJAXResponse:function(i,f,j,g){var h=&quot;&quot;;if(!f){if(!g.append){h+='&lt;li class=&quot;no-matches-found unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'+wpLinkL10n.noMatchesFound+&quot;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&quot;}}else{d.each(f,function(){h+='&lt;li&gt;&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;'+this[&quot;permalink&quot;]+'&quot; /&gt;';h+='&lt;span class=&quot;item-title&quot;&gt;';h+=this[&quot;title&quot;]?this[&quot;title&quot;]:&quot;&lt;em&gt;&quot;+wpLinkL10n.untitled+&quot;&lt;/em&gt;&quot;;h+='&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;'+this[&quot;info&quot;]+&quot;&lt;/span&gt;&lt;/li&gt;&quot;})}i.children(&quot;ul&quot;)[g.append?&quot;append&quot;:&quot;html&quot;](h);if(j){j(f)}},delayedCallback:function(h,f){var k,j,i,g;if(!f){return h}setTimeout(function(){if(j){return h.apply(g,i)}k=true},f);return function(){if(k){return h.apply(this,arguments)}i=arguments;g=this;j=true}}};d(document).ready(e.init)})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+(function(d){var a={},c={},b,e={timeToTriggerRiver:150,minRiverAJAXDuration:200,lastSearch:&quot;&quot;,riverDefaults:function(){return{page:2,allLoaded:false,active:false}},init:function(){a.dialog=d(&quot;#wp-link&quot;);a.url=d(&quot;#url-field&quot;);a.title=d(&quot;#link-title-field&quot;);a.openInNewTab=d(&quot;#link-target-checkbox&quot;);a.search=d(&quot;#search-field&quot;);c.search=d(&quot;#search-results&quot;);c.recent=d(&quot;#most-recent-results&quot;);c.search.data(&quot;river&quot;,e.riverDefaults());c.recent.data(&quot;river&quot;,e.riverDefaults());c.group=d(&quot;.query-results&quot;,a.dialog);d(&quot;#wp-link-update&quot;).click(e.update);d(&quot;#wp-link-cancel&quot;).click(function(){tinyMCEPopup.close()});c.group.delegate(&quot;li&quot;,&quot;click&quot;,e.selectInternalLink);c.group.scroll(e.maybeLoadRiver);a.search.keyup(e.searchInternalLinks);a.dialog.bind(&quot;dialogopen&quot;,e.refresh)},refresh:function(){var f;b=tinyMCEPopup.editor;if(f=b.dom.getParent(b.selection.getNode(),&quot;A&quot;)){a.url.val(f.href);a.title.val(b.dom.getAttrib(f,&quot;title&quot;));if(&quot;_blank&quot;==b.dom.getAttrib(f,&quot;target&quot;)){a.openInNewTab.attr(&quot;checked&quot;,&quot;checked&quot;)}}c.group.find(&quot;.selected&quot;).removeClass(&quot;selected&quot;);a.url.focus()},update:function(){var j,g=tinyMCEPopup.editor,h={href:a.url.val(),title:a.title.val(),target:a.openInNewTab.attr(&quot;checked&quot;)?&quot;_blank&quot;:&quot;&quot;},k,f,i=h.title?h.title:h.href;tinyMCEPopup.restoreSelection();k=g.dom.getParent(g.selection.getNode(),&quot;A&quot;);if(!h.href){if(g.selection.isCollapsed()){tinyMCEPopup.close();return}else{if(k){tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);f=g.selection.getBookmark();g.dom.remove(k,1);g.selection.moveToBookmark(f);tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close();return}}}tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);if(k==null){g.getDoc().execCommand(&quot;unlink&quot;,false,null);if(g.selection.isCollapsed()){j=g.dom.create(&quot;a&quot;,{href:&quot;#mce_temp_url#&quot;},i);g.selection.setNode(j)}else{tinyMCEPopup.execCommand(&quot;CreateLink&quot;,false,&quot;#mce_temp_url#&quot;,{skip_undo:1})}tinymce.each(g.dom.select(&quot;a&quot;),function(l){if(g.dom.getAttrib(l,&quot;href&quot;)==&quot;#mce_temp_url#&quot;){k=l;g.dom.setAttribs(k,h)}})}else{g.dom.setAttribs(k,h)}if(k.childNodes.length!=1||k.firstChild.nodeName!=&quot;IMG&quot;){g.focus();g.selection.select(k);g.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()},selectInternalLink:function(){var f=d(this);if(f.hasClass(&quot;unselectable&quot;)){return}f.siblings(&quot;.selected&quot;).removeClass(&quot;selected&quot;);f.addClass(&quot;selected&quot;);a.url.val(f.children(&quot;.item-permalink&quot;).val());a.title.val(f.children(&quot;.item-title&quot;).text())},maybeLoadRiver:function(){var h=d(this),g=h.children(&quot;ul&quot;),i=h.data(&quot;river&quot;),f=h.scrollTop()+h.height();if(f!=g.height()||i.active||i.allLoaded){return}setTimeout(function(){var j=h.scrollTop(),k=j+h.height(),l=h.find(&quot;.river-waiting&quot;);if(f!=k||k!=g.height()||i.active||i.allLoaded){return}i.active=true;l.show();h.scrollTop(j+l.outerHeight());e.linkAJAX(h,{page:i.page},function(m){i.page++;i.active=false;i.allLoaded=!m;l.hide()},{append:true,delay:e.minRiverAJAXDuration})},e.timeToTriggerRiver)},searchInternalLinks:function(){var f=d(this),h,g=f.val();if(g.length&gt;2){c.recent.hide();c.search.show();if(e.lastSearch==g){return}e.lastSearch=g;h=f.siblings(&quot;img.waiting&quot;).show();c.search.data(&quot;river&quot;,e.riverDefaults());c.search.scrollTop(0);e.linkAJAX(c.search,{title:g},function(){h.hide()})}else{c.search.hide();c.recent.show()}},linkAJAX:function(i,h,j,g){var f;g=g||{};if(!i.hasClass(&quot;query-results&quot;)){i=i.parents(&quot;.query-results&quot;)}if(!i.length){return}f=e.delayedCallback(function(k){e.processAJAXResponse(i,k,j,g)},g.delay);d.post(ajaxurl,d.extend({action:&quot;wp-link-ajax&quot;},h),f,&quot;json&quot;)},processAJAXResponse:function(j,f,k,g){var h=&quot;&quot;,i=true;if(!f){if(!g.append){h+='&lt;li class=&quot;unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'+wpLinkL10n.noMatchesFound+&quot;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&quot;}}else{d.each(f,function(){h+=i?'&lt;li class=&quot;alternate&quot;&gt;':&quot;&lt;li&gt;&quot;;h+='&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;'+this[&quot;permalink&quot;]+'&quot; /&gt;';h+='&lt;span class=&quot;item-title&quot;&gt;';h+=this[&quot;title&quot;]?this[&quot;title&quot;]:&quot;&lt;em&gt;&quot;+wpLinkL10n.untitled+&quot;&lt;/em&gt;&quot;;h+='&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;'+this[&quot;info&quot;]+&quot;&lt;/span&gt;&lt;/li&gt;&quot;;i=!i})}j.children(&quot;ul&quot;)[g.append?&quot;append&quot;:&quot;html&quot;](h);if(k){k(f)}},delayedCallback:function(h,f){var k,j,i,g;if(!f){return h}setTimeout(function(){if(j){return h.apply(g,i)}k=true},f);return function(){if(k){return h.apply(this,arguments)}i=arguments;g=this;j=true}}};d(document).ready(e.init)})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcewpmcelinkphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/wp-mce-link.php (16457 => 16458)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/wp-mce-link.php        2010-11-18 06:22:13 UTC (rev 16457)
+++ trunk/wp-includes/js/tinymce/wp-mce-link.php        2010-11-18 07:56:47 UTC (rev 16458)
</span><span class="lines">@@ -1,126 +0,0 @@
</span><del>-&lt;?php
-// args expects optionally 'pagenum' and 's'
-function wp_link_query( $args = array() ) {
-        $pts = get_post_types( array( 'publicly_queryable' =&gt; true ), 'objects' );
-        $pt_names = array_keys( $pts );
-
-        $query = array(
-                'post_type' =&gt; $pt_names,
-                'suppress_filters' =&gt; true,
-                'update_post_term_cache' =&gt; false,
-                'update_post_meta_cache' =&gt; false,
-                'post_status' =&gt; 'publish',
-                'order' =&gt; 'DESC',
-                'orderby' =&gt; 'post_date',
-                'posts_per_page' =&gt; 20,
-        );
-
-        $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1;
-
-        if ( isset( $args['s'] ) )
-                $query['s'] = $args['s'];
-
-        $query['offset'] = $args['pagenum'] &gt; 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
-
-        // Do main query.
-        $get_posts = new WP_Query;
-        $posts = $get_posts-&gt;query( $query );
-        // Check if any posts were found.
-        if ( ! $get_posts-&gt;post_count )
-                return false;
-
-        // Build results.
-        $results = array();
-        foreach ( $posts as $post ) {
-                if ( 'post' == $post-&gt;post_type )
-                        $info = mysql2date( __( 'Y/m/d' ), $post-&gt;post_date );
-                else
-                        $info = $pts[ $post-&gt;post_type ]-&gt;labels-&gt;singular_name;
-
-                $results[] = array(
-                        'ID' =&gt; $post-&gt;ID,
-                        'title' =&gt; esc_html( strip_tags($post-&gt;post_title) ),
-                        'permalink' =&gt; get_permalink( $post-&gt;ID ),
-                        'info' =&gt; $info,
-                );
-        }
-
-        return $results;
-}
-
-function wp_link_ajax( $request ) {
-        // Searches have a title term.
-        if ( isset( $request['title'] ) )
-                $args['s'] = stripslashes( $request['title'] );
-        $args['pagenum'] = ! empty( $request['page'] ) ? absint( $request['page'] ) : 1;
-
-        $results = wp_link_query( $args );
-
-        if ( ! isset( $results ) )
-                die( '0' );
-
-        echo json_encode( $results );
-        echo &quot;\n&quot;;
-}
-
-function wp_link_dialog() {
-?&gt;
-&lt;div id=&quot;wp-link&quot;&gt;
-&lt;div id=&quot;link-selector&quot;&gt;
-        &lt;div id=&quot;link-options&quot;&gt;
-                &lt;p class=&quot;howto&quot;&gt;&lt;?php _e( 'Enter the destination URL:' ); ?&gt;&lt;/p&gt;
-                &lt;label for=&quot;url-field&quot;&gt;
-                        &lt;span&gt;&lt;?php _e( 'URL' ); ?&gt;&lt;/span&gt;&lt;input id=&quot;url-field&quot; type=&quot;text&quot; /&gt;
-                &lt;/label&gt;
-                &lt;label for=&quot;link-title-field&quot;&gt;
-                        &lt;span&gt;&lt;?php _e( 'Title' ); ?&gt;&lt;/span&gt;&lt;input id=&quot;link-title-field&quot; type=&quot;text&quot; /&gt;
-                &lt;/label&gt;
-                &lt;label for=&quot;link-target-checkbox&quot; id=&quot;open-in-new-tab&quot;&gt;
-                        &lt;input type=&quot;checkbox&quot; id=&quot;link-target-checkbox&quot; /&gt;&lt;span&gt;&lt;?php _e( 'Open link in a new window/tab' ); ?&gt;&lt;/span&gt;
-                &lt;/label&gt;
-        &lt;/div&gt;
-        &lt;div id=&quot;search-panel&quot;&gt;
-                &lt;div class=&quot;link-search-wrapper&quot;&gt;
-                        &lt;p class=&quot;howto&quot;&gt;&lt;?php _e( 'Or, link to existing site content:' ); ?&gt;&lt;/p&gt;
-                        &lt;label for=&quot;search-field&quot;&gt;
-                                &lt;span&gt;&lt;?php _e( 'Search' ); ?&gt;&lt;/span&gt;
-                                &lt;input type=&quot;text&quot; id=&quot;search-field&quot; class=&quot;link-search-field&quot; /&gt;
-                                &lt;img class=&quot;waiting&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
-                        &lt;/label&gt;
-                &lt;/div&gt;
-                &lt;div id=&quot;search-results&quot; class=&quot;query-results&quot;&gt;
-                        &lt;ul&gt;
-                                &lt;li class=&quot;wp-results-loading unselectable&quot;&gt;&lt;em&gt;&lt;?php _e( 'Loading...' ); ?&gt;&lt;/em&gt;&lt;/li&gt;
-                        &lt;/ul&gt;
-                        &lt;div class=&quot;river-waiting&quot;&gt;
-                                &lt;img class=&quot;waiting&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
-                        &lt;/div&gt;
-                &lt;/div&gt;
-                &lt;?php $most_recent = wp_link_query(); ?&gt;
-                &lt;div id=&quot;most-recent-results&quot; class=&quot;query-results&quot;&gt;
-                        &lt;ul&gt;
-                                &lt;li class=&quot;unselectable&quot;&gt;&lt;em&gt;&lt;?php _e( 'No search term specified. Showing recent items.' ); ?&gt;&lt;/em&gt;&lt;/li&gt;
-                                &lt;?php foreach ( $most_recent as $item ) : ?&gt;
-                                        &lt;li&gt;
-                                                &lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;&lt;?php echo esc_url( $item['permalink'] ); ?&gt;&quot; /&gt;
-                                                &lt;span class=&quot;item-title&quot;&gt;&lt;?php echo $item['title']; ?&gt;&lt;/span&gt;
-                                                &lt;span class=&quot;item-info&quot;&gt;&lt;?php echo esc_html( $item['info'] ); ?&gt;&lt;/span&gt;
-                                        &lt;/li&gt;
-                                &lt;?php endforeach; ?&gt;
-                        &lt;/ul&gt;
-                        &lt;div class=&quot;river-waiting&quot;&gt;
-                                &lt;img class=&quot;waiting&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
-                        &lt;/div&gt;
-                &lt;/div&gt;
-        &lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&quot;submitbox&quot;&gt;
-        &lt;div id=&quot;wp-link-cancel&quot;&gt;
-                &lt;a class=&quot;submitdelete deletion&quot;&gt;&lt;?php _e( 'Cancel' ); ?&gt;&lt;/a&gt;
-        &lt;/div&gt;
-        &lt;div id=&quot;wp-link-update&quot;&gt;
-                &lt;a class=&quot;button-primary&quot;&gt;&lt;?php _e( 'Update' ); ?&gt;&lt;/a&gt;
-        &lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;?php } ?&gt;
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcewptinymcejsgz"></a>
<div class="binary"><h4>Modified: trunk/wp-includes/js/tinymce/wp-tinymce.js.gz</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
</div>

</body>
</html>