WordPress.org

Make WordPress Core

Changeset 16457


Ignore:
Timestamp:
11/18/2010 06:22:13 AM (10 years ago)
Author:
nacin
Message:

Ludicrous speed for internal linking. First pass. props koopersmith, see #11420.

Location:
trunk
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r16438 r16457  
    10751075    break;
    10761076case 'wp-link-ajax':
    1077     require_once ABSPATH . WPINC . '/js/tinymce/wp-mce-link-includes.php';
     1077    require_once ABSPATH . WPINC . '/js/tinymce/wp-mce-link.php';
    10781078
    10791079    wp_link_ajax( $_POST );
  • trunk/wp-admin/admin-header.php

    r16292 r16457  
    6767if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
    6868    add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
     69    add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );
    6970    wp_enqueue_script('quicktags');
    7071}
  • trunk/wp-admin/includes/post.php

    r16365 r16457  
    13281328
    13291329    if ( $teeny ) {
    1330         $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'media', 'fullscreen', 'wordpress', 'wplink') );
     1330        $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'media', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs') );
    13311331        $ext_plugins = '';
    13321332    } else {
    1333         $plugins = array( 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus', 'wplink' );
     1333        $plugins = array( 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus', 'wplink', 'wpdialogs' );
    13341334
    13351335        /*
     
    14111411        }
    14121412    }
    1413 
    1414     $plugins = implode($plugins, ',');
    14151413
    14161414    if ( $teeny ) {
     
    14861484        'paste_text_use_dialog' => true,
    14871485        'wpeditimage_disable_captions' => $no_captions,
    1488         'plugins' => $plugins
     1486        'plugins' => implode($plugins, ',')
    14891487    );
    14901488
     
    16091607</script>
    16101608<?php
    1611 }
     1609
     1610    // Load additional inline scripts based on active plugins.
     1611    if ( in_array( 'wpdialogs', $plugins ) ) {
     1612        wp_print_scripts( array('jquery-ui-dialog', 'wpdialogsPopup') );
     1613        wp_print_styles('wp-jquery-ui-dialog');
     1614    }
     1615    if ( in_array( 'wplink', $plugins ) ) {
     1616        require_once ABSPATH . WPINC . "/js/tinymce/wp-mce-link.php";
     1617        add_action('tiny_mce_preload_dialogs', 'wp_link_dialog');
     1618        wp_print_scripts('wplink');
     1619        wp_print_styles('wplink');
     1620    }
     1621}
     1622function wp_tiny_mce_preload_dialogs() { ?>
     1623    <div id="preloaded-dialogs" style="display:none;">
     1624<?php   do_action('tiny_mce_preload_dialogs'); ?>
     1625    </div>
     1626<?php }
  • trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js

    r16439 r16457  
    1313            ed.addCommand('WP_Link', function() {
    1414                ed.windowManager.open({
    15                     file : tinymce.baseURL + '/wp-mce-link.php',
     15                    id : 'wp-link',
    1616                    width : 480,
    17                     height : 430,
    18                     inline : 1
     17                    height : "auto",
     18                    wpDialog : true,
     19                    title : ed.getLang('advlink.link_desc')
    1920                }, {
    2021                    plugin_url : url // Plugin absolute URL
  • trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js

    r16399 r16457  
    1 (function(){tinymce.create("tinymce.plugins.wpLink",{init:function(a,b){a.addCommand("WP_Link",function(){a.windowManager.open({file:tinymce.baseURL+"/wp-mce-link.php",width:480,height:430,inline:1},{plugin_url:b})});a.addButton("link",{title:a.getLang("advanced.link_desc"),cmd:"WP_Link"});a.addShortcut("alt+shift+a",a.getLang("advanced.link_desc"),"WP_Link");a.onNodeChange.add(function(d,c,e){c.setActive("wplink",e.nodeName=="A")})},getInfo:function(){return{longname:"WordPress Link Dialog",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wplink",tinymce.plugins.wpLink)})();
     1(function(){tinymce.create("tinymce.plugins.wpLink",{init:function(a,b){a.addCommand("WP_Link",function(){a.windowManager.open({id:"wp-link",width:480,height:"auto",wpDialog:true,title:a.getLang("advlink.link_desc")},{plugin_url:b})});a.addButton("link",{title:a.getLang("advanced.link_desc"),cmd:"WP_Link"});a.addShortcut("alt+shift+a",a.getLang("advanced.link_desc"),"WP_Link");a.onNodeChange.add(function(d,c,e){c.setActive("wplink",e.nodeName=="A")})},getInfo:function(){return{longname:"WordPress Link Dialog",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wplink",tinymce.plugins.wpLink)})();
  • trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js

    r16439 r16457  
    1313        },
    1414        init : function() {
    15             var e;
    16             // Init shared vars
    17             ed = tinyMCEPopup.editor;
    18 
    19 
     15            inputs.dialog = $('#wp-link');
    2016            // URL
    2117            inputs.url = $('#url-field');
     
    3026            results.search.data('river', wpLink.riverDefaults() );
    3127            results.recent.data('river', wpLink.riverDefaults() );
     28            results.group = $('.query-results', inputs.dialog);
    3229
    3330            // Bind event handlers
    34             $('#wp-update').click( wpLink.update );
    35             $('#wp-cancel').click( function() { tinyMCEPopup.close(); } );
    36             $('.query-results').delegate('li', 'click', wpLink.selectInternalLink );
    37             $('.query-results').scroll( wpLink.maybeLoadRiver );
     31            $('#wp-link-update').click( wpLink.update );
     32            $('#wp-link-cancel').click( function() { tinyMCEPopup.close(); } );
     33           
     34            results.group.delegate('li', 'click', wpLink.selectInternalLink )
     35            results.group.scroll( wpLink.maybeLoadRiver );
     36           
    3837            inputs.search.keyup( wpLink.searchInternalLinks );
    39 
     38           
     39            inputs.dialog.bind('dialogopen', wpLink.refresh);
     40        },
     41
     42        refresh : function() {
     43            var e;
     44           
     45            ed = tinyMCEPopup.editor;
     46           
    4047            // If link exists, select proper values.
    4148            if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) {
     
    4855            }
    4956
     57            // Clear previously selected links
     58            results.group.find('.selected').removeClass('selected');
    5059            // Focus the URL field
    5160            inputs.url.focus();
  • trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js

    r16407 r16457  
    1 (function(d){var a={},c={},b,e={timeToTriggerRiver:150,minRiverAJAXDuration:200,lastSearch:"",riverDefaults:function(){return{page:2,allLoaded:false,active:false}},init:function(){var f;b=tinyMCEPopup.editor;a.url=d("#url-field");a.title=d("#link-title-field");a.openInNewTab=d("#link-target-checkbox");a.search=d("#search-field");c.search=d("#search-results");c.recent=d("#most-recent-results");c.search.data("river",e.riverDefaults());c.recent.data("river",e.riverDefaults());d("#wp-update").click(e.update);d("#wp-cancel").click(function(){tinyMCEPopup.close()});d(".query-results").delegate("li","click",e.selectInternalLink);d(".query-results").scroll(e.maybeLoadRiver);a.search.keyup(e.searchInternalLinks);if(f=b.dom.getParent(b.selection.getNode(),"A")){a.url.val(f.href);a.title.val(b.dom.getAttrib(f,"title"));if("_blank"==b.dom.getAttrib(f,"target")){a.openInNewTab.attr("checked","checked")}}a.url.focus()},update:function(){var j,g=tinyMCEPopup.editor,h={href:a.url.val(),title:a.title.val(),target:a.openInNewTab.attr("checked")?"_blank":""},k,f,i=h.title?h.title:h.href;tinyMCEPopup.restoreSelection();k=g.dom.getParent(g.selection.getNode(),"A");if(!h.href){if(g.selection.isCollapsed()){tinyMCEPopup.close();return}else{if(k){tinyMCEPopup.execCommand("mceBeginUndoLevel");f=g.selection.getBookmark();g.dom.remove(k,1);g.selection.moveToBookmark(f);tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close();return}}}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(k==null){g.getDoc().execCommand("unlink",false,null);if(g.selection.isCollapsed()){j=g.dom.create("a",{href:"#mce_temp_url#"},i);g.selection.setNode(j)}else{tinyMCEPopup.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1})}tinymce.each(g.dom.select("a"),function(l){if(g.dom.getAttrib(l,"href")=="#mce_temp_url#"){k=l;g.dom.setAttribs(k,h)}})}else{g.dom.setAttribs(k,h)}if(k.childNodes.length!=1||k.firstChild.nodeName!="IMG"){g.focus();g.selection.select(k);g.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close()},selectInternalLink:function(){var f=d(this);if(f.hasClass("unselectable")){return}f.siblings(".selected").removeClass("selected");f.addClass("selected");a.url.val(f.children(".item-permalink").val());a.title.val(f.children(".item-title").text())},maybeLoadRiver:function(){var h=d(this),g=h.children("ul"),i=h.data("river"),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(".river-waiting");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>2){c.recent.hide();c.search.show();if(e.lastSearch==g){return}e.lastSearch=g;h=f.siblings("img.waiting").show();c.search.data("river",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("query-results")){i=i.parents(".query-results")}if(!i.length){return}f=e.delayedCallback(function(k){e.processAJAXResponse(i,k,j,g)},g.delay);d.post(ajaxurl,d.extend({action:"wp-link-ajax"},h),f,"json")},processAJAXResponse:function(i,f,j,g){var h="";if(!f){if(!g.append){h+='<li class="no-matches-found unselectable"><span class="item-title"><em>'+wpLinkL10n.noMatchesFound+"</em></span></li>"}}else{d.each(f,function(){h+='<li><input type="hidden" class="item-permalink" value="'+this["permalink"]+'" />';h+='<span class="item-title">';h+=this["title"]?this["title"]:"<em>"+wpLinkL10n.untitled+"</em>";h+='</span><span class="item-info">'+this["info"]+"</span></li>"})}i.children("ul")[g.append?"append":"html"](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);
     1(function(d){var a={},c={},b,e={timeToTriggerRiver:150,minRiverAJAXDuration:200,lastSearch:"",riverDefaults:function(){return{page:2,allLoaded:false,active:false}},init:function(){a.dialog=d("#wp-link");a.url=d("#url-field");a.title=d("#link-title-field");a.openInNewTab=d("#link-target-checkbox");a.search=d("#search-field");c.search=d("#search-results");c.recent=d("#most-recent-results");c.search.data("river",e.riverDefaults());c.recent.data("river",e.riverDefaults());c.group=d(".query-results",a.dialog);d("#wp-link-update").click(e.update);d("#wp-link-cancel").click(function(){tinyMCEPopup.close()});c.group.delegate("li","click",e.selectInternalLink);c.group.scroll(e.maybeLoadRiver);a.search.keyup(e.searchInternalLinks);a.dialog.bind("dialogopen",e.refresh)},refresh:function(){var f;b=tinyMCEPopup.editor;if(f=b.dom.getParent(b.selection.getNode(),"A")){a.url.val(f.href);a.title.val(b.dom.getAttrib(f,"title"));if("_blank"==b.dom.getAttrib(f,"target")){a.openInNewTab.attr("checked","checked")}}c.group.find(".selected").removeClass("selected");a.url.focus()},update:function(){var j,g=tinyMCEPopup.editor,h={href:a.url.val(),title:a.title.val(),target:a.openInNewTab.attr("checked")?"_blank":""},k,f,i=h.title?h.title:h.href;tinyMCEPopup.restoreSelection();k=g.dom.getParent(g.selection.getNode(),"A");if(!h.href){if(g.selection.isCollapsed()){tinyMCEPopup.close();return}else{if(k){tinyMCEPopup.execCommand("mceBeginUndoLevel");f=g.selection.getBookmark();g.dom.remove(k,1);g.selection.moveToBookmark(f);tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close();return}}}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(k==null){g.getDoc().execCommand("unlink",false,null);if(g.selection.isCollapsed()){j=g.dom.create("a",{href:"#mce_temp_url#"},i);g.selection.setNode(j)}else{tinyMCEPopup.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1})}tinymce.each(g.dom.select("a"),function(l){if(g.dom.getAttrib(l,"href")=="#mce_temp_url#"){k=l;g.dom.setAttribs(k,h)}})}else{g.dom.setAttribs(k,h)}if(k.childNodes.length!=1||k.firstChild.nodeName!="IMG"){g.focus();g.selection.select(k);g.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close()},selectInternalLink:function(){var f=d(this);if(f.hasClass("unselectable")){return}f.siblings(".selected").removeClass("selected");f.addClass("selected");a.url.val(f.children(".item-permalink").val());a.title.val(f.children(".item-title").text())},maybeLoadRiver:function(){var h=d(this),g=h.children("ul"),i=h.data("river"),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(".river-waiting");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>2){c.recent.hide();c.search.show();if(e.lastSearch==g){return}e.lastSearch=g;h=f.siblings("img.waiting").show();c.search.data("river",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("query-results")){i=i.parents(".query-results")}if(!i.length){return}f=e.delayedCallback(function(k){e.processAJAXResponse(i,k,j,g)},g.delay);d.post(ajaxurl,d.extend({action:"wp-link-ajax"},h),f,"json")},processAJAXResponse:function(i,f,j,g){var h="";if(!f){if(!g.append){h+='<li class="no-matches-found unselectable"><span class="item-title"><em>'+wpLinkL10n.noMatchesFound+"</em></span></li>"}}else{d.each(f,function(){h+='<li><input type="hidden" class="item-permalink" value="'+this["permalink"]+'" />';h+='<span class="item-title">';h+=this["title"]?this["title"]:"<em>"+wpLinkL10n.untitled+"</em>";h+='</span><span class="item-info">'+this["info"]+"</span></li>"})}i.children("ul")[g.append?"append":"html"](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);
  • trunk/wp-includes/js/tinymce/wp-mce-link.php

    r16407 r16457  
    11<?php
     2// args expects optionally 'pagenum' and 's'
     3function wp_link_query( $args = array() ) {
     4    $pts = get_post_types( array( 'publicly_queryable' => true ), 'objects' );
     5    $pt_names = array_keys( $pts );
    26
    3 require_once '../../../wp-load.php';
    4 include './wp-mce-link-includes.php';
     7    $query = array(
     8        'post_type' => $pt_names,
     9        'suppress_filters' => true,
     10        'update_post_term_cache' => false,
     11        'update_post_meta_cache' => false,
     12        'post_status' => 'publish',
     13        'order' => 'DESC',
     14        'orderby' => 'post_date',
     15        'posts_per_page' => 20,
     16    );
    517
    6 header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
     18    $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1;
     19
     20    if ( isset( $args['s'] ) )
     21        $query['s'] = $args['s'];
     22
     23    $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
     24
     25    // Do main query.
     26    $get_posts = new WP_Query;
     27    $posts = $get_posts->query( $query );
     28    // Check if any posts were found.
     29    if ( ! $get_posts->post_count )
     30        return false;
     31
     32    // Build results.
     33    $results = array();
     34    foreach ( $posts as $post ) {
     35        if ( 'post' == $post->post_type )
     36            $info = mysql2date( __( 'Y/m/d' ), $post->post_date );
     37        else
     38            $info = $pts[ $post->post_type ]->labels->singular_name;
     39
     40        $results[] = array(
     41            'ID' => $post->ID,
     42            'title' => esc_html( strip_tags($post->post_title) ),
     43            'permalink' => get_permalink( $post->ID ),
     44            'info' => $info,
     45        );
     46    }
     47
     48    return $results;
     49}
     50
     51function wp_link_ajax( $request ) {
     52    // Searches have a title term.
     53    if ( isset( $request['title'] ) )
     54        $args['s'] = stripslashes( $request['title'] );
     55    $args['pagenum'] = ! empty( $request['page'] ) ? absint( $request['page'] ) : 1;
     56
     57    $results = wp_link_query( $args );
     58
     59    if ( ! isset( $results ) )
     60        die( '0' );
     61
     62    echo json_encode( $results );
     63    echo "\n";
     64}
     65
     66function wp_link_dialog() {
    767?>
    8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    9 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    10 <head>
    11 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_bloginfo('charset'); ?>" />
    12 <title><?php _e( 'Insert/edit link' ); ?></title>
    13 <script type="text/javascript">
    14 //<![CDATA[
    15 var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>',
    16     wpLinkL10n = {
    17         untitled : '<?php _e('Untitled'); ?>',
    18         noMatchesFound : '<?php _e( 'No matches found.' ); ?>'
    19     };
    20 //]]>
    21 </script>
    22 <script type="text/javascript" src="tiny_mce_popup.js?ver=3223"></script>
    23 <?php
    24 wp_print_scripts( array( 'jquery', 'jquery-ui-widget' ) );
    25 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';
    26 $src = "plugins/wplink/js/wplink$suffix.js?ver=20101116b";
    27 ?>
    28 <script type="text/javascript" src="<?php echo $src; ?>"></script>
    29 <?php
    30 wp_admin_css( 'global', true );
    31 wp_admin_css( 'wp-admin', true );
    32 register_admin_color_schemes();
    33 wp_admin_css( 'colors', true );
    34 ?>
    35 <style>
    36 html {
    37     background: #f1f1f1;
    38 }
    39 a:link, a:visited {
    40     color: #21759b;
    41 }
    42 p.howto {
    43     margin: 3px;
    44 }
    45 #link-options {
    46     padding: 10px 0 14px;
    47     border-bottom: 1px solid #dfdfdf;
    48     margin: 0 6px 14px;
    49 }
    50 label input[type="text"] {
    51     width: 360px;
    52     margin-top: 5px;
    53 }
    54 label span {
    55     display: inline-block;
    56     width: 80px;
    57     text-align: right;
    58     padding-right: 5px;
    59 }
    60 .link-search-wrapper {
    61     margin: 5px 5px 9px;
    62     display: block;
    63     overflow: hidden;
    64 }
    65 .link-search-wrapper span {
    66     float: left;
    67     margin-top: 6px;
    68 }
    69 .link-search-wrapper input[type="text"] {
    70     float: left;
    71     width: 220px;
    72 }
    73 .link-search-wrapper img.waiting {
    74     margin: 8px 1px 0 4px;
    75     float: left;
    76     display: none;
    77 }
    78 #open-in-new-tab {
    79     display: inline-block;
    80     padding: 3px 0 0;
    81     margin: 0 0 0 87px;
    82 }
    83 #open-in-new-tab span {
    84     width: auto;
    85     margin-left: 6px;
    86     font-size: 11px;
    87 }
    88 .query-results {
    89     border: 1px #dfdfdf solid;
    90     margin: 0 5px 5px;
    91     background: #fff;
    92     height: 185px;
    93     overflow: auto;
    94 }
    95 .query-results li {
    96     margin-bottom: 0;
    97     border-bottom: 1px solid #f1f1f1;
    98     color: #555;
    99     padding: 4px 6px;
    100     cursor: pointer;
    101 }
    102 .query-results li:hover {
    103     background: #eaf2fa;
    104     color: #333;
    105 }
    106 .query-results li.unselectable:hover {
    107     background: #fff;
    108     cursor: auto;
    109     color: #555;
    110 }
    111 .query-results li.unselectable {
    112     border-bottom: 1px solid #dfdfdf;
    113 }
    114 .query-results li.selected {
    115     background: #f1f1f1;
    116     color: #333;
    117 }
    118 .query-results li.selected .item-title {
    119     font-weight: bold;
    120 }
    121 .item-info {
    122     text-transform: uppercase;
    123     color: #aaa;
    124     font-size: 11px;
    125     float: right;
    126 }
    127 #search-results {
    128     display: none;
    129 }
    130 .river-waiting {
    131     display: none;
    132     padding: 10px 0;
    133 }
    134 .river-waiting img.waiting {
    135     margin: 0 auto;
    136     display: block;
    137 }
    138 .submitbox {
    139     padding: 5px 5px 0;
    140     font-size: 11px;
    141     overflow: auto;
    142     height: 29px;
    143 }
    144 #wp-cancel {
    145     line-height: 25px;
    146     float: left;
    147 }
    148 #wp-update {
    149     line-height: 23px;
    150     float: right;
    151 }
    152 #wp-update a {
    153     display: inline-block;
    154 }
    155 </style>
    156 </head>
    157 <body id="post-body">
     68<div id="wp-link">
    15869<div id="link-selector">
    15970    <div id="link-options">
     
    205116</div>
    206117<div class="submitbox">
    207     <div id="wp-cancel">
     118    <div id="wp-link-cancel">
    208119        <a class="submitdelete deletion"><?php _e( 'Cancel' ); ?></a>
    209120    </div>
    210     <div id="wp-update">
     121    <div id="wp-link-update">
    211122        <a class="button-primary"><?php _e( 'Update' ); ?></a>
    212123    </div>
    213124</div>
    214 </body>
    215 </html>
     125</div>
     126<?php } ?>
  • trunk/wp-includes/script-loader.php

    r16451 r16457  
    269269        'noShortlink' => __( 'No shortlink available for this page.' ),
    270270    ) );
     271   
     272    $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20101117' );
     273    $scripts->localize( 'wplink', 'wpLinkL10n', array(
     274        'untitled' => __('Untitled'),
     275        'noMatchesFound' => __('No matches found.'),
     276    ) );
     277   
     278    $scripts->add( 'wpdialogsPopup', "/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js", false, '20101117' );
    271279
    272280    if ( is_admin() ) {
     
    505513    // Admin bar
    506514    $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20101117' );
     515   
     516    // WP jQuery UI Dialog
     517    $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101117' );
     518    // WPLink TinyMCE plugin
     519    $styles->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css", array(), '20101117' );
    507520
    508521    foreach ( $rtl_styles as $rtl_style ) {
Note: See TracChangeset for help on using the changeset viewer.