Ticket #11420: update.and.save.diff

File update.and.save.diff, 3.0 KB (added by koopersmith, 18 months ago)
  • wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js

     
    1010                lastSearch: '', 
    1111                init : function() { 
    1212                        inputs.dialog = $('#wp-link'); 
     13                        inputs.update = $('#wp-link-update a'); 
    1314                        // URL 
    1415                        inputs.url = $('#url-field'); 
    1516                        // Secondary options 
     
    2324                        rivers.elements = $('.query-results', inputs.dialog); 
    2425 
    2526                        // Bind event handlers 
    26                         $('#wp-link-update').click( wpLink.update ); 
     27                        inputs.update.click( wpLink.update ); 
    2728                        $('#wp-link-cancel').click( function() { tinyMCEPopup.close(); } ); 
    2829                         
    2930                        rivers.elements.delegate('li', 'click', wpLink.selectInternalLink ) 
     
    3940                         
    4041                        // Clear previously selected links 
    4142                        rivers.elements.find('.selected').removeClass('selected'); 
    42                         // Clear fields and focus the URL field 
    43                         inputs.url.val('http://'); 
    44                         inputs.title.val(''); 
    4543                         
    4644                        tinyMCEPopup.restoreSelection(); 
     45 
    4746                        // If link exists, select proper values. 
    4847                        if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) { 
    4948                                // Set URL and description. 
     
    5251                                // Set open in new tab. 
    5352                                if ( "_blank" == ed.dom.getAttrib(e, 'target') ) 
    5453                                        inputs.openInNewTab.attr('checked','checked'); 
     54                                // Update save prompt. 
     55                                inputs.update.text( wpLinkL10n.update ); 
     56 
     57                        // If there's no link, set the default values. 
     58                        } else { 
     59                                // Set URL and description to defaults. 
     60                                // Leave the new tab setting as-is. 
     61                                inputs.url.val('http://'); 
     62                                inputs.title.val(''); 
     63                                // Update save prompt. 
     64                                inputs.update.text( wpLinkL10n.save ); 
    5565                        } 
     66 
    5667                        tinyMCEPopup.storeSelection(); 
    5768                        // If the focus is moved above the selection changes, 
    5869                        // IE will show a flashing cursor over the dialog. 
  • wp-includes/script-loader.php

     
    272272 
    273273        $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20101119d' ); 
    274274        $scripts->localize( 'wplink', 'wpLinkL10n', array( 
     275                'update' => __('Update'), 
     276                'save' => __('Save Link'), 
    275277                'untitled' => __('Untitled'), 
    276278                'noMatchesFound' => __('No matches found.'), 
    277279                'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};', 
  • wp-admin/includes/internal-linking.php

     
    113113                <a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a> 
    114114        </div> 
    115115        <div id="wp-link-update"> 
    116                 <a class="button-primary" href="#"><?php _e( 'Update' ); ?></a> 
     116                <a class="button-primary" href="#"></a> 
    117117        </div> 
    118118</div> 
    119119</div>