| 1 | Index: wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (revision 16508) |
|---|
| 4 | +++ wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (working copy) |
|---|
| 5 | @@ -10,6 +10,7 @@ |
|---|
| 6 | lastSearch: '', |
|---|
| 7 | init : function() { |
|---|
| 8 | inputs.dialog = $('#wp-link'); |
|---|
| 9 | + inputs.update = $('#wp-link-update a'); |
|---|
| 10 | // URL |
|---|
| 11 | inputs.url = $('#url-field'); |
|---|
| 12 | // Secondary options |
|---|
| 13 | @@ -23,7 +24,7 @@ |
|---|
| 14 | rivers.elements = $('.query-results', inputs.dialog); |
|---|
| 15 | |
|---|
| 16 | // Bind event handlers |
|---|
| 17 | - $('#wp-link-update').click( wpLink.update ); |
|---|
| 18 | + inputs.update.click( wpLink.update ); |
|---|
| 19 | $('#wp-link-cancel').click( function() { tinyMCEPopup.close(); } ); |
|---|
| 20 | |
|---|
| 21 | rivers.elements.delegate('li', 'click', wpLink.selectInternalLink ) |
|---|
| 22 | @@ -39,11 +40,9 @@ |
|---|
| 23 | |
|---|
| 24 | // Clear previously selected links |
|---|
| 25 | rivers.elements.find('.selected').removeClass('selected'); |
|---|
| 26 | - // Clear fields and focus the URL field |
|---|
| 27 | - inputs.url.val('http://'); |
|---|
| 28 | - inputs.title.val(''); |
|---|
| 29 | |
|---|
| 30 | tinyMCEPopup.restoreSelection(); |
|---|
| 31 | + |
|---|
| 32 | // If link exists, select proper values. |
|---|
| 33 | if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) { |
|---|
| 34 | // Set URL and description. |
|---|
| 35 | @@ -52,7 +51,19 @@ |
|---|
| 36 | // Set open in new tab. |
|---|
| 37 | if ( "_blank" == ed.dom.getAttrib(e, 'target') ) |
|---|
| 38 | inputs.openInNewTab.attr('checked','checked'); |
|---|
| 39 | + // Update save prompt. |
|---|
| 40 | + inputs.update.text( wpLinkL10n.update ); |
|---|
| 41 | + |
|---|
| 42 | + // If there's no link, set the default values. |
|---|
| 43 | + } else { |
|---|
| 44 | + // Set URL and description to defaults. |
|---|
| 45 | + // Leave the new tab setting as-is. |
|---|
| 46 | + inputs.url.val('http://'); |
|---|
| 47 | + inputs.title.val(''); |
|---|
| 48 | + // Update save prompt. |
|---|
| 49 | + inputs.update.text( wpLinkL10n.save ); |
|---|
| 50 | } |
|---|
| 51 | + |
|---|
| 52 | tinyMCEPopup.storeSelection(); |
|---|
| 53 | // If the focus is moved above the selection changes, |
|---|
| 54 | // IE will show a flashing cursor over the dialog. |
|---|
| 55 | Index: wp-includes/script-loader.php |
|---|
| 56 | =================================================================== |
|---|
| 57 | --- wp-includes/script-loader.php (revision 16508) |
|---|
| 58 | +++ wp-includes/script-loader.php (working copy) |
|---|
| 59 | @@ -272,6 +272,8 @@ |
|---|
| 60 | |
|---|
| 61 | $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20101119d' ); |
|---|
| 62 | $scripts->localize( 'wplink', 'wpLinkL10n', array( |
|---|
| 63 | + 'update' => __('Update'), |
|---|
| 64 | + 'save' => __('Save Link'), |
|---|
| 65 | 'untitled' => __('Untitled'), |
|---|
| 66 | 'noMatchesFound' => __('No matches found.'), |
|---|
| 67 | 'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};', |
|---|
| 68 | Index: wp-admin/includes/internal-linking.php |
|---|
| 69 | =================================================================== |
|---|
| 70 | --- wp-admin/includes/internal-linking.php (revision 16508) |
|---|
| 71 | +++ wp-admin/includes/internal-linking.php (working copy) |
|---|
| 72 | @@ -113,7 +113,7 @@ |
|---|
| 73 | <a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a> |
|---|
| 74 | </div> |
|---|
| 75 | <div id="wp-link-update"> |
|---|
| 76 | - <a class="button-primary" href="#"><?php _e( 'Update' ); ?></a> |
|---|
| 77 | + <a class="button-primary" href="#"></a> |
|---|
| 78 | </div> |
|---|
| 79 | </div> |
|---|
| 80 | </div> |
|---|