<!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>[16391] trunk/wp-includes/js/tinymce/plugins/wplink/js: Minify wplink js.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16391">16391</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-11-15 18:42:49 +0000 (Mon, 15 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Minify wplink js. see <a href="http://trac.wordpress.org/ticket/11420">#11420</a></pre>

<h3>Added 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>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludesjstinymcepluginswplinkjswplinkjs">trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkdevjsfromrev16390trunkwpincludesjstinymcepluginswplinkjswplinkjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (from rev 16390, trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js) (0 => 16391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js        2010-11-15 18:42:49 UTC (rev 16391)
</span><span class="lines">@@ -0,0 +1,280 @@
</span><ins>+(function($){
+        $.widget('wp.wpTabs', {
+                options: {},
+                _create: function() {
+                        var self = this,
+                                ul = this.element,
+                                lis = ul.children();
+                        
+                        this.active = lis.filter('.wp-tab-active');
+                        // Calculate panel IDs
+                        lis.each(function() {
+                                var panel = self._getPanel( $(this) );
+                                if ( self.active[0] == this )
+                                        panel.show();
+                                else
+                                        panel.hide();
+                        });
+                        
+                        ul.delegate('li', 'click.wpTabs', function(e) {
+                                var li = $(this);
+                                
+                                // Prevent any child link from redirecting the page.
+                                e.preventDefault();
+                                // Deactivate previous tab.
+                                self._getPanel( self.active ).hide();
+                                self.active.removeClass('wp-tab-active');
+                                self._trigger(&quot;hide&quot;, e, self.widget() );
+                                
+                                // Activate current tab.
+                                self.active = li.addClass('wp-tab-active');
+                                self._getPanel( self.active ).show();
+                                self._trigger(&quot;show&quot;, e, self.widget() );
+                        });
+                },
+                widget: function() {
+                        return {
+                                ul: this.element,
+                                tab: this.active,
+                                panel: this._getPanel( this.active )
+                        };
+                },
+                _setPanel: function( $el ) {
+                        var panel = $( '#' + $el.children('.wp-tab-for-id').val() );
+                        $el.data( 'wp-tab-panel', panel );
+                        return panel;
+                },
+                _getPanel: function( $el ) {
+                        var panel = $el.data('wp-tab-panel');
+                        return ( !panel || !panel.length ) ? this._setPanel( $el ) : panel;
+                }
+        });
+        // Create tab bars by default.
+        $(function(){
+                $('.wp-tab-bar').wpTabs();
+        });
+})(jQuery);
+
+(function($){        
+        var inputs = {}, panels, active, ed,
+        wpLink = {
+                init : function() {
+                        var e, etarget, eclass;
+                        // Init shared vars
+                        ed = tinyMCEPopup.editor;
+                        // Secondary options
+                        inputs.title = $('#link-title-field');
+                        // Advanced Options
+                        inputs.openInNewTab = $('#link-target-checkbox');
+                        
+                        panels = $('.link-panel');
+                        active = $('.link-panel-active');
+                        $('#link-panel-tab-bar').wpTabs({
+                                show: function(e, widget) {
+                                        active = widget.panel;
+                                        active.addClass('link-panel-active');
+                                        wpLink.maybeLoadPanel();
+                                },
+                                hide: function(e, widget) {
+                                        active.removeClass('link-panel-active');
+                                }
+                        })
+                        
+                        panels.each( function(){
+                                var linkType = this.id.replace(/^link-panel-id-/,''),
+                                        parts = linkType.split('-');
+                                $(this).data( 'link-type', {
+                                        full : linkType,
+                                        type : parts[0],
+                                        name : parts[1] || ''
+                                });
+                        });
+                        
+                        // Bind event handlers
+                        $('#wp-update').click( wpLink.update );
+                        $('#wp-cancel').click( function() { tinyMCEPopup.close(); } );
+                        $('.link-panel .wp-tab-bar').wpTabs('option', 'show', wpLink.maybeLoadPanel );
+                        $('.link-panel .wp-tab-panel').delegate('li', 'click', wpLink.selectInternalLink );
+                        $('.wp-tab-panel-pagelinks').delegate('a', 'click', wpLink.selectPageLink );
+                        $('.link-panel .link-search-field').keyup( wpLink.searchInternalLinks );
+
+                        active.find('input.url-field').focus();
+
+                        // If link exists, select proper values.
+                        e = ed.dom.getParent(ed.selection.getNode(), 'A');
+                        if ( ! e )
+                                return;
+                        
+                        active.find('input.url-field').val( e.href );
+                        inputs.title.val( ed.dom.getAttrib(e, 'title') );
+                        // Advanced Options
+                        
+                        if ( &quot;_blank&quot; == ed.dom.getAttrib(e, 'target') )
+                                inputs.openInNewTab.attr('checked','checked');
+                },
+                
+                update : function() {
+                        var el,
+                                ed = tinyMCEPopup.editor,
+                                attrs = {
+                                        title : inputs.title.val(),
+                                        target : inputs.openInNewTab.attr('checked') ? '_blank' : ''
+                                }, defaultContent, e, b;
+                        
+                        if ( active.hasClass('link-panel-custom') ) {
+                                attrs.href = active.find('input.url-field').val();
+                                defaultContent = attrs.href;
+                        } else {
+                                el = active.find('li.selected:visible');
+                                if ( !el.length )
+                                        return;
+                                
+                                attrs.href = el.children('input').val();
+                                defaultContent = el.text();
+                        }
+                        
+                        tinyMCEPopup.restoreSelection();
+                        e = ed.dom.getParent(ed.selection.getNode(), 'A');
+                        
+                        // If the values are empty...
+                        if ( ! attrs.href ) {
+                                // ...and nothing is selected, we should return
+                                if ( ed.selection.isCollapsed() ) {
+                                        tinyMCEPopup.close();
+                                        return;
+                                // ...and a link exists, we should unlink and return
+                                } else if ( e ) {
+                                        tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);
+                                        b = ed.selection.getBookmark();
+                                        ed.dom.remove(e, 1);
+                                        ed.selection.moveToBookmark(b);
+                                        tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);
+                                        tinyMCEPopup.close();
+                                        return;
+                                }
+                        }
+                        
+                        tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);
+
+                        if (e == null) {
+                                ed.getDoc().execCommand(&quot;unlink&quot;, false, null);
+                                
+                                // If no selection exists, create a new link from scratch.
+                                if ( ed.selection.isCollapsed() ) {
+                                        var el = ed.dom.create('a', { href: &quot;#mce_temp_url#&quot; }, defaultContent);
+                                        ed.selection.setNode(el);
+                                // If a selection exists, wrap it in a link.
+                                } else {
+                                        tinyMCEPopup.execCommand(&quot;CreateLink&quot;, false, &quot;#mce_temp_url#&quot;, {skip_undo : 1});
+                                }
+
+                                tinymce.each(ed.dom.select(&quot;a&quot;), function(n) {
+                                        if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
+                                                e = n;
+                                                ed.dom.setAttribs(e, attrs);
+                                        }
+                                });
+                        } else {
+                                ed.dom.setAttribs(e, attrs);
+                        }
+
+                        // Don't move caret if selection was image
+                        if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
+                                ed.focus();
+                                ed.selection.select(e);
+                                ed.selection.collapse(0);
+                                tinyMCEPopup.storeSelection();
+                        }
+
+                        tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);
+                        tinyMCEPopup.close();
+                },
+                
+                maybeLoadPanel : function() {
+                        var panel = active.find('.wp-tab-panel:visible');
+                        if ( panel.length &amp;&amp; panel.find('.wp-tab-panel-loading').length )
+                                wpLink.linkPanelAJAX( panel );
+                },
+                
+                linkPanelAJAX : function( $panel, params, callback ) {
+                        if ( ! $panel.hasClass('wp-tab-panel') )
+                                $panel = $panel.parents('.wp-tab-panel');
+                        
+                        if ( ! $panel.length )
+                                return;
+                                
+                        var query = $panel.children('.wp-tab-panel-query').val();
+                        
+                        wpLink.linkAJAX( $panel, $.extend({
+                                preset : query,
+                                page : 'all' == query ? 1 : 0
+                        }, params), function(r, lt) {
+                                var pagelinks = $panel.children('.wp-tab-panel-pagelinks');
+                                
+                                // Set results
+                                $panel.children('ul').html( wpLink.generateListMarkup( r['results'], lt ) );
+                                
+                                // Handle page links
+                                if ( r['page_links'] )
+                                        pagelinks.html( r['page_links'] ).show();
+                                else
+                                        pagelinks.hide();
+                                // Run callback
+                                if ( callback )
+                                        callback(r, lt);
+                        })
+                },
+                
+                selectInternalLink : function() {
+                        var t = $(this);
+                        if ( t.hasClass('unselectable') )
+                                return;
+                        t.siblings('.selected').removeClass('selected');
+                        t.addClass('selected');
+                },
+                
+                selectPageLink : function(e) {
+                        var page = e.target.href.match(/page=(\d+)/);
+                        
+                        page = page ? page[1] : 1; // If there's no match, it's the first page.
+                        e.preventDefault(); // Prevent the link from redirecting.
+                        
+                        wpLink.linkPanelAJAX( $(this), { page : page });
+                },
+                
+                searchInternalLinks : function() {
+                        var t = $(this),
+                                waiting = t.siblings('img.waiting').show();
+                                
+                        wpLink.linkPanelAJAX( t, { title : t.val() }, function(){ waiting.hide(); });
+                },
+                
+                linkAJAX : function( el, params, callback ) {
+                        var linkType = el.parents('.link-panel').data('link-type');
+                        $.post( ajaxurl, $.extend({
+                                action : 'wp-link-ajax',
+                                type : linkType.type,
+                                name : linkType.name
+                        }, params ), function(r) {
+                                return callback(r, linkType); 
+                        }, &quot;json&quot; );
+                },
+                
+                generateListMarkup : function( results, linkType ) {
+                        var s = '';
+                        
+                        if ( ! results )
+                                return '&lt;li class=&quot;no-matches-found unselectable&quot;&gt;&lt;em&gt;' + wpLinkL10n.noMatchesFound + '&lt;/em&gt;&lt;/li&gt;';
+                        
+                        $.each( results, function() {
+                                s+= '&lt;li id=&quot;link-to-' + linkType.full + '-' + this['ID'] + '&quot;&gt;';
+                                s+= '&lt;input type=&quot;hidden&quot; value=&quot;' + this['permalink'] + '&quot; /&gt;';
+                                s+= this['title'] ? this['title'] : '&lt;em&gt;'+ wpLinkL10n.untitled + '&lt;/em&gt;';
+                                s+= '&lt;/li&gt;';
+                        });
+                        return s;
+                }
+        }
+        
+        $(document).ready( wpLink.init );
+})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkdevjs"></a>
<div class="propset"><h4>Property changes: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js (16390 => 16391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-11-15 18:40:34 UTC (rev 16390)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-11-15 18:42:49 UTC (rev 16391)
</span><span class="lines">@@ -1,280 +0,0 @@
</span><del>-(function($){
-        $.widget('wp.wpTabs', {
-                options: {},
-                _create: function() {
-                        var self = this,
-                                ul = this.element,
-                                lis = ul.children();
-                        
-                        this.active = lis.filter('.wp-tab-active');
-                        // Calculate panel IDs
-                        lis.each(function() {
-                                var panel = self._getPanel( $(this) );
-                                if ( self.active[0] == this )
-                                        panel.show();
-                                else
-                                        panel.hide();
-                        });
-                        
-                        ul.delegate('li', 'click.wpTabs', function(e) {
-                                var li = $(this);
-                                
-                                // Prevent any child link from redirecting the page.
-                                e.preventDefault();
-                                // Deactivate previous tab.
-                                self._getPanel( self.active ).hide();
-                                self.active.removeClass('wp-tab-active');
-                                self._trigger(&quot;hide&quot;, e, self.widget() );
-                                
-                                // Activate current tab.
-                                self.active = li.addClass('wp-tab-active');
-                                self._getPanel( self.active ).show();
-                                self._trigger(&quot;show&quot;, e, self.widget() );
-                        });
-                },
-                widget: function() {
-                        return {
-                                ul: this.element,
-                                tab: this.active,
-                                panel: this._getPanel( this.active )
-                        };
-                },
-                _setPanel: function( $el ) {
-                        var panel = $( '#' + $el.children('.wp-tab-for-id').val() );
-                        $el.data( 'wp-tab-panel', panel );
-                        return panel;
-                },
-                _getPanel: function( $el ) {
-                        var panel = $el.data('wp-tab-panel');
-                        return ( !panel || !panel.length ) ? this._setPanel( $el ) : panel;
-                }
-        });
-        // Create tab bars by default.
-        $(function(){
-                $('.wp-tab-bar').wpTabs();
-        });
-})(jQuery);
-
-(function($){        
-        var inputs = {}, panels, active, ed,
-        wpLink = {
-                init : function() {
-                        var e, etarget, eclass;
-                        // Init shared vars
-                        ed = tinyMCEPopup.editor;
-                        // Secondary options
-                        inputs.title = $('#link-title-field');
-                        // Advanced Options
-                        inputs.openInNewTab = $('#link-target-checkbox');
-                        
-                        panels = $('.link-panel');
-                        active = $('.link-panel-active');
-                        $('#link-panel-tab-bar').wpTabs({
-                                show: function(e, widget) {
-                                        active = widget.panel;
-                                        active.addClass('link-panel-active');
-                                        wpLink.maybeLoadPanel();
-                                },
-                                hide: function(e, widget) {
-                                        active.removeClass('link-panel-active');
-                                }
-                        })
-                        
-                        panels.each( function(){
-                                var linkType = this.id.replace(/^link-panel-id-/,''),
-                                        parts = linkType.split('-');
-                                $(this).data( 'link-type', {
-                                        full : linkType,
-                                        type : parts[0],
-                                        name : parts[1] || ''
-                                });
-                        });
-                        
-                        // Bind event handlers
-                        $('#wp-update').click( wpLink.update );
-                        $('#wp-cancel').click( function() { tinyMCEPopup.close(); } );
-                        $('.link-panel .wp-tab-bar').wpTabs('option', 'show', wpLink.maybeLoadPanel );
-                        $('.link-panel .wp-tab-panel').delegate('li', 'click', wpLink.selectInternalLink );
-                        $('.wp-tab-panel-pagelinks').delegate('a', 'click', wpLink.selectPageLink );
-                        $('.link-panel .link-search-field').keyup( wpLink.searchInternalLinks );
-
-                        active.find('input.url-field').focus();
-
-                        // If link exists, select proper values.
-                        e = ed.dom.getParent(ed.selection.getNode(), 'A');
-                        if ( ! e )
-                                return;
-                        
-                        active.find('input.url-field').val( e.href );
-                        inputs.title.val( ed.dom.getAttrib(e, 'title') );
-                        // Advanced Options
-                        
-                        if ( &quot;_blank&quot; == ed.dom.getAttrib(e, 'target') )
-                                inputs.openInNewTab.attr('checked','checked');
-                },
-                
-                update : function() {
-                        var el,
-                                ed = tinyMCEPopup.editor,
-                                attrs = {
-                                        title : inputs.title.val(),
-                                        target : inputs.openInNewTab.attr('checked') ? '_blank' : ''
-                                }, defaultContent, e, b;
-                        
-                        if ( active.hasClass('link-panel-custom') ) {
-                                attrs.href = active.find('input.url-field').val();
-                                defaultContent = attrs.href;
-                        } else {
-                                el = active.find('li.selected:visible');
-                                if ( !el.length )
-                                        return;
-                                
-                                attrs.href = el.children('input').val();
-                                defaultContent = el.text();
-                        }
-                        
-                        tinyMCEPopup.restoreSelection();
-                        e = ed.dom.getParent(ed.selection.getNode(), 'A');
-                        
-                        // If the values are empty...
-                        if ( ! attrs.href ) {
-                                // ...and nothing is selected, we should return
-                                if ( ed.selection.isCollapsed() ) {
-                                        tinyMCEPopup.close();
-                                        return;
-                                // ...and a link exists, we should unlink and return
-                                } else if ( e ) {
-                                        tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);
-                                        b = ed.selection.getBookmark();
-                                        ed.dom.remove(e, 1);
-                                        ed.selection.moveToBookmark(b);
-                                        tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);
-                                        tinyMCEPopup.close();
-                                        return;
-                                }
-                        }
-                        
-                        tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);
-
-                        if (e == null) {
-                                ed.getDoc().execCommand(&quot;unlink&quot;, false, null);
-                                
-                                // If no selection exists, create a new link from scratch.
-                                if ( ed.selection.isCollapsed() ) {
-                                        var el = ed.dom.create('a', { href: &quot;#mce_temp_url#&quot; }, defaultContent);
-                                        ed.selection.setNode(el);
-                                // If a selection exists, wrap it in a link.
-                                } else {
-                                        tinyMCEPopup.execCommand(&quot;CreateLink&quot;, false, &quot;#mce_temp_url#&quot;, {skip_undo : 1});
-                                }
-
-                                tinymce.each(ed.dom.select(&quot;a&quot;), function(n) {
-                                        if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
-                                                e = n;
-                                                ed.dom.setAttribs(e, attrs);
-                                        }
-                                });
-                        } else {
-                                ed.dom.setAttribs(e, attrs);
-                        }
-
-                        // Don't move caret if selection was image
-                        if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
-                                ed.focus();
-                                ed.selection.select(e);
-                                ed.selection.collapse(0);
-                                tinyMCEPopup.storeSelection();
-                        }
-
-                        tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);
-                        tinyMCEPopup.close();
-                },
-                
-                maybeLoadPanel : function() {
-                        var panel = active.find('.wp-tab-panel:visible');
-                        if ( panel.length &amp;&amp; panel.find('.wp-tab-panel-loading').length )
-                                wpLink.linkPanelAJAX( panel );
-                },
-                
-                linkPanelAJAX : function( $panel, params, callback ) {
-                        if ( ! $panel.hasClass('wp-tab-panel') )
-                                $panel = $panel.parents('.wp-tab-panel');
-                        
-                        if ( ! $panel.length )
-                                return;
-                                
-                        var query = $panel.children('.wp-tab-panel-query').val();
-                        
-                        wpLink.linkAJAX( $panel, $.extend({
-                                preset : query,
-                                page : 'all' == query ? 1 : 0
-                        }, params), function(r, lt) {
-                                var pagelinks = $panel.children('.wp-tab-panel-pagelinks');
-                                
-                                // Set results
-                                $panel.children('ul').html( wpLink.generateListMarkup( r['results'], lt ) );
-                                
-                                // Handle page links
-                                if ( r['page_links'] )
-                                        pagelinks.html( r['page_links'] ).show();
-                                else
-                                        pagelinks.hide();
-                                // Run callback
-                                if ( callback )
-                                        callback(r, lt);
-                        })
-                },
-                
-                selectInternalLink : function() {
-                        var t = $(this);
-                        if ( t.hasClass('unselectable') )
-                                return;
-                        t.siblings('.selected').removeClass('selected');
-                        t.addClass('selected');
-                },
-                
-                selectPageLink : function(e) {
-                        var page = e.target.href.match(/page=(\d+)/);
-                        
-                        page = page ? page[1] : 1; // If there's no match, it's the first page.
-                        e.preventDefault(); // Prevent the link from redirecting.
-                        
-                        wpLink.linkPanelAJAX( $(this), { page : page });
-                },
-                
-                searchInternalLinks : function() {
-                        var t = $(this),
-                                waiting = t.siblings('img.waiting').show();
-                                
-                        wpLink.linkPanelAJAX( t, { title : t.val() }, function(){ waiting.hide(); });
-                },
-                
-                linkAJAX : function( el, params, callback ) {
-                        var linkType = el.parents('.link-panel').data('link-type');
-                        $.post( ajaxurl, $.extend({
-                                action : 'wp-link-ajax',
-                                type : linkType.type,
-                                name : linkType.name
-                        }, params ), function(r) {
-                                return callback(r, linkType); 
-                        }, &quot;json&quot; );
-                },
-                
-                generateListMarkup : function( results, linkType ) {
-                        var s = '';
-                        
-                        if ( ! results )
-                                return '&lt;li class=&quot;no-matches-found unselectable&quot;&gt;&lt;em&gt;' + wpLinkL10n.noMatchesFound + '&lt;/em&gt;&lt;/li&gt;';
-                        
-                        $.each( results, function() {
-                                s+= '&lt;li id=&quot;link-to-' + linkType.full + '-' + this['ID'] + '&quot;&gt;';
-                                s+= '&lt;input type=&quot;hidden&quot; value=&quot;' + this['permalink'] + '&quot; /&gt;';
-                                s+= this['title'] ? this['title'] : '&lt;em&gt;'+ wpLinkL10n.untitled + '&lt;/em&gt;';
-                                s+= '&lt;/li&gt;';
-                        });
-                        return s;
-                }
-        }
-        
-        $(document).ready( wpLink.init );
-})(jQuery);
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js (0 => 16391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-11-15 18:42:49 UTC (rev 16391)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+(function(a){a.widget(&quot;wp.wpTabs&quot;,{options:{},_create:function(){var b=this,d=this.element,c=d.children();this.active=c.filter(&quot;.wp-tab-active&quot;);c.each(function(){var e=b._getPanel(a(this));if(b.active[0]==this){e.show()}else{e.hide()}});d.delegate(&quot;li&quot;,&quot;click.wpTabs&quot;,function(g){var f=a(this);g.preventDefault();b._getPanel(b.active).hide();b.active.removeClass(&quot;wp-tab-active&quot;);b._trigger(&quot;hide&quot;,g,b.widget());b.active=f.addClass(&quot;wp-tab-active&quot;);b._getPanel(b.active).show();b._trigger(&quot;show&quot;,g,b.widget())})},widget:function(){return{ul:this.element,tab:this.active,panel:this._getPanel(this.active)}},_setPanel:function(c){var b=a(&quot;#&quot;+c.children(&quot;.wp-tab-for-id&quot;).val());c.data(&quot;wp-tab-panel&quot;,b);return b},_getPanel:function(c){var b=c.data(&quot;wp-tab-panel&quot;);return(!b||!b.length)?this._setPanel(c):b}});a(function(){a(&quot;.wp-tab-bar&quot;).wpTabs()})})(jQuery);(function(d){var a={},c,f,b,e={init:function(){var i,h,g;b=tinyMCEPopup.editor;a.title=d(&quot;#link-title-field&quot;);a.openInNewTab=d(&quot;#link-target-checkbox&quot;);c=d(&quot;.link-panel&quot;);f=d(&quot;.link-panel-active&quot;);d(&quot;#link-panel-tab-bar&quot;).wpTabs({show:function(k,j){f=j.panel;f.addClass(&quot;link-panel-active&quot;);e.maybeLoadPanel()},hide:function(k,j){f.removeClass(&quot;link-panel-active&quot;)}});c.each(function(){var j=this.id.replace(/^link-panel-id-/,&quot;&quot;),k=j.split(&quot;-&quot;);d(this).data(&quot;link-type&quot;,{full:j,type:k[0],name:k[1]||&quot;&quot;})});d(&quot;#wp-update&quot;).click(e.update);d(&quot;#wp-cancel&quot;).click(function(){tinyMCEPopup.close()});d(&quot;.link-panel .wp-tab-bar&quot;).wpTabs(&quot;option&quot;,&quot;show&quot;,e.maybeLoadPanel);d(&quot;.link-panel .wp-tab-panel&quot;).delegate(&quot;li&quot;,&quot;click&quot;,e.selectInternalLink);d(&quot;.wp-tab-panel-pagelinks&quot;).delegate(&quot;a&quot;,&quot;click&quot;,e.selectPageLink);d(&quot;.link-panel .link-search-field&quot;).keyup(e.searchInternalLinks);f.find(&quot;input.url-field&quot;).focus();i=b.dom.getParent(b.selection.getNode(),&quot;A&quot;);if(!i){return}f.find(&quot;input.url-field&quot;).val(i.href);a.title.val(b.dom.getAttrib(i,&quot;title&quot;));if(&quot;_blank&quot;==b.dom.getAttrib(i,&quot;target&quot;)){a.openInNewTab.attr(&quot;checked&quot;,&quot;checked&quot;)}},update:function(){var k,h=tinyMCEPopup.editor,i={title:a.title.val(),target:a.openInNewTab.attr(&quot;checked&quot;)?&quot;_blank&quot;:&quot;&quot;},j,l,g;if(f.hasClass(&quot;link-panel-custom&quot;)){i.href=f.find(&quot;input.url-field&quot;).val();j=i.href}else{k=f.find(&quot;li.selected:visible&quot;);if(!k.length){return}i.href=k.children(&quot;input&quot;).val();j=k.text()}tinyMCEPopup.restoreSelection();l=h.dom.getParent(h.selection.getNode(),&quot;A&quot;);if(!i.href){if(h.selection.isCollapsed()){tinyMCEPopup.close();return}else{if(l){tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);g=h.selection.getBookmark();h.dom.remove(l,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close();return}}}tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);if(l==null){h.getDoc().execCommand(&quot;unlink&quot;,false,null);if(h.selection.isCollapsed()){var k=h.dom.create(&quot;a&quot;,{href:&quot;#mce_temp_url#&quot;},j);h.selection.setNode(k)}else{tinyMCEPopup.execCommand(&quot;CreateLink&quot;,false,&quot;#mce_temp_url#&quot;,{skip_undo:1})}tinymce.each(h.dom.select(&quot;a&quot;),function(m){if(h.dom.getAttrib(m,&quot;href&quot;)==&quot;#mce_temp_url#&quot;){l=m;h.dom.setAttribs(l,i)}})}else{h.dom.setAttribs(l,i)}if(l.childNodes.length!=1||l.firstChild.nodeName!=&quot;IMG&quot;){h.focus();h.selection.select(l);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()},maybeLoadPanel:function(){var g=f.find(&quot;.wp-tab-panel:visible&quot;);if(g.length&amp;&amp;g.find(&quot;.wp-tab-panel-loading&quot;).length){e.linkPanelAJAX(g)}},linkPanelAJAX:function(i,h,j){if(!i.hasClass(&quot;wp-tab-panel&quot;)){i=i.parents(&quot;.wp-tab-panel&quot;)}if(!i.length){return}var g=i.children(&quot;.wp-tab-panel-query&quot;).val();e.linkAJAX(i,d.extend({preset:g,page:&quot;all&quot;==g?1:0},h),function(m,k){var l=i.children(&quot;.wp-tab-panel-pagelinks&quot;);i.children(&quot;ul&quot;).html(e.generateListMarkup(m.results,k));if(m.page_links){l.html(m.page_links).show()}else{l.hide()}if(j){j(m,k)}})},selectInternalLink:function(){var g=d(this);if(g.hasClass(&quot;unselectable&quot;)){return}g.siblings(&quot;.selected&quot;).removeClass(&quot;selected&quot;);g.addClass(&quot;selected&quot;)},selectPageLink:function(h){var g=h.target.href.match(/page=(\d+)/);g=g?g[1]:1;h.preventDefault();e.linkPanelAJAX(d(this),{page:g})},searchInternalLinks:function(){var g=d(this),h=g.siblings(&quot;img.waiting&quot;).show();e.linkPanelAJAX(g,{title:g.val()},function(){h.hide()})},linkAJAX:function(h,i,j){var g=h.parents(&quot;.link-panel&quot;).data(&quot;link-type&quot;);d.post(ajaxurl,d.extend({action:&quot;wp-link-ajax&quot;,type:g.type,name:g.name},i),function(k){return j(k,g)},&quot;json&quot;)},generateListMarkup:function(h,g){var i=&quot;&quot;;if(!h){return'&lt;li class=&quot;no-matches-found unselectable&quot;&gt;&lt;em&gt;'+wpLinkL10n.noMatchesFound+&quot;&lt;/em&gt;&lt;/li&gt;&quot;}d.each(h,function(){i+='&lt;li id=&quot;link-to-'+g.full+&quot;-&quot;+this[&quot;ID&quot;]+'&quot;&gt;';i+='&lt;input type=&quot;hidden&quot; value=&quot;'+this[&quot;permalink&quot;]+'&quot; /&gt;';i+=this[&quot;title&quot;]?this[&quot;title&quot;]:&quot;&lt;em&gt;&quot;+wpLinkL10n.untitled+&quot;&lt;/em&gt;&quot;;i+=&quot;&lt;/li&gt;&quot;});return i}};d(document).ready(e.init)})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre>
</div>
</div>

</body>
</html>