| 1 | Index: wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css (revision 16929) |
|---|
| 4 | +++ wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css (working copy) |
|---|
| 5 | @@ -1,11 +1,17 @@ |
|---|
| 6 | -#wp-link p.howto { |
|---|
| 7 | - margin: 3px; |
|---|
| 8 | -} |
|---|
| 9 | -#link-options { |
|---|
| 10 | +#wp-link #link-options { |
|---|
| 11 | padding: 10px 0 14px; |
|---|
| 12 | border-bottom: 1px solid #dfdfdf; |
|---|
| 13 | margin: 0 6px 14px; |
|---|
| 14 | } |
|---|
| 15 | +#wp-link p.howto { |
|---|
| 16 | + margin: 3px; |
|---|
| 17 | +} |
|---|
| 18 | +#wp-link #internal-toggle { |
|---|
| 19 | + margin: 0 5px; |
|---|
| 20 | +} |
|---|
| 21 | +#wp-link #internal-toggle a { |
|---|
| 22 | + padding-left: 18px; |
|---|
| 23 | +} |
|---|
| 24 | #wp-link label input[type="text"] { |
|---|
| 25 | width: 360px; |
|---|
| 26 | margin-top: 5px; |
|---|
| 27 | @@ -17,7 +23,7 @@ |
|---|
| 28 | padding-right: 5px; |
|---|
| 29 | } |
|---|
| 30 | #wp-link .link-search-wrapper { |
|---|
| 31 | - margin: 5px 5px 9px; |
|---|
| 32 | + margin: 5px 6px 9px; |
|---|
| 33 | display: block; |
|---|
| 34 | overflow: hidden; |
|---|
| 35 | } |
|---|
| 36 | Index: wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js |
|---|
| 37 | =================================================================== |
|---|
| 38 | --- wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (revision 16929) |
|---|
| 39 | +++ wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (working copy) |
|---|
| 40 | @@ -32,6 +32,7 @@ |
|---|
| 41 | e.preventDefault(); |
|---|
| 42 | }); |
|---|
| 43 | $('#wp-link-cancel').click( wpLink.cancel ); |
|---|
| 44 | + $('#internal-toggle a').click( wpLink.toggleInternalLinking ); |
|---|
| 45 | |
|---|
| 46 | rivers.elements.bind('river-select', wpLink.updateFields ); |
|---|
| 47 | |
|---|
| 48 | @@ -242,6 +243,33 @@ |
|---|
| 49 | funcContext = this; |
|---|
| 50 | funcTriggered = true; |
|---|
| 51 | }; |
|---|
| 52 | + }, |
|---|
| 53 | + |
|---|
| 54 | + toggleInternalLinking : function( event ) { |
|---|
| 55 | + var panel = $('#search-panel'), |
|---|
| 56 | + widget = inputs.dialog.wpdialog('widget'), |
|---|
| 57 | + // We're about to toggle visibility; it's currently the opposite |
|---|
| 58 | + visible = !panel.is(':visible'), |
|---|
| 59 | + win = $(window); |
|---|
| 60 | + |
|---|
| 61 | + $(this).toggleClass('toggle-arrow-active', visible); |
|---|
| 62 | + panel.slideToggle( 300, function() { |
|---|
| 63 | + setUserSetting('wplink', visible ? '1' : '0'); |
|---|
| 64 | + inputs[ visible ? 'search' : 'url' ].focus(); |
|---|
| 65 | + |
|---|
| 66 | + // Move the box if the box is now expanded, was opened in a collapsed state, |
|---|
| 67 | + // and if it needs to be moved. (Judged by bottom not being positive or |
|---|
| 68 | + // bottom being smaller than top.) |
|---|
| 69 | + var scroll = win.scrollTop(), |
|---|
| 70 | + top = widget.offset().top, |
|---|
| 71 | + bottom = top + widget.outerHeight(), |
|---|
| 72 | + diff = bottom - win.height(); |
|---|
| 73 | + |
|---|
| 74 | + if ( diff > scroll ) { |
|---|
| 75 | + widget.animate({'top': diff < top ? top - diff : scroll }, 200); |
|---|
| 76 | + } |
|---|
| 77 | + }); |
|---|
| 78 | + event.preventDefault(); |
|---|
| 79 | } |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | Index: wp-admin/includes/internal-linking.php |
|---|
| 83 | =================================================================== |
|---|
| 84 | --- wp-admin/includes/internal-linking.php (revision 16929) |
|---|
| 85 | +++ wp-admin/includes/internal-linking.php (working copy) |
|---|
| 86 | @@ -84,9 +84,10 @@ |
|---|
| 87 | <label for="link-target-checkbox"><input type="checkbox" id="link-target-checkbox" tabindex="30" /> <?php _e( 'Open link in a new window/tab' ); ?></label> |
|---|
| 88 | </div> |
|---|
| 89 | </div> |
|---|
| 90 | - <div id="search-panel"> |
|---|
| 91 | + <?php $show_internal = '1' == get_user_setting( 'wplink', '0' ); ?> |
|---|
| 92 | + <p class="howto" id="internal-toggle"><a href="#" class="toggle-arrow <?php if ( $show_internal ) echo 'toggle-arrow-active'; ?>"><?php _e( 'Link to Content on this Site' ); ?></a></p> |
|---|
| 93 | + <div id="search-panel"<?php if ( ! $show_internal ) echo ' style="display:none"'; ?>> |
|---|
| 94 | <div class="link-search-wrapper"> |
|---|
| 95 | - <p class="howto"><?php _e( 'Or, link to existing site content:' ); ?></p> |
|---|
| 96 | <label for="search-field"> |
|---|
| 97 | <span><?php _e( 'Search' ); ?></span> |
|---|
| 98 | <input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" /> |
|---|
| 99 | Index: wp-admin/css/colors-classic.dev.css |
|---|
| 100 | =================================================================== |
|---|
| 101 | --- wp-admin/css/colors-classic.dev.css (revision 16929) |
|---|
| 102 | +++ wp-admin/css/colors-classic.dev.css (working copy) |
|---|
| 103 | @@ -1524,7 +1524,8 @@ |
|---|
| 104 | background: #D1E5ee; |
|---|
| 105 | } |
|---|
| 106 | |
|---|
| 107 | -#screen-meta a.show-settings { |
|---|
| 108 | +#screen-meta a.show-settings, |
|---|
| 109 | +.toggle-arrow { |
|---|
| 110 | background-image:url("../images/screen-options-toggle-vs.gif?ver=20100531"); |
|---|
| 111 | } |
|---|
| 112 | |
|---|
| 113 | Index: wp-admin/css/colors-fresh.dev.css |
|---|
| 114 | =================================================================== |
|---|
| 115 | --- wp-admin/css/colors-fresh.dev.css (revision 16929) |
|---|
| 116 | +++ wp-admin/css/colors-fresh.dev.css (working copy) |
|---|
| 117 | @@ -1517,7 +1517,8 @@ |
|---|
| 118 | text-decoration: underline; |
|---|
| 119 | } |
|---|
| 120 | |
|---|
| 121 | -#screen-meta a.show-settings { |
|---|
| 122 | +#screen-meta a.show-settings, |
|---|
| 123 | +.toggle-arrow { |
|---|
| 124 | background-image:url("../images/screen-options-toggle.gif?ver=20100531"); |
|---|
| 125 | } |
|---|
| 126 | |
|---|
| 127 | Index: wp-admin/css/wp-admin.dev.css |
|---|
| 128 | =================================================================== |
|---|
| 129 | --- wp-admin/css/wp-admin.dev.css (revision 16929) |
|---|
| 130 | +++ wp-admin/css/wp-admin.dev.css (working copy) |
|---|
| 131 | @@ -747,7 +747,17 @@ |
|---|
| 132 | list-style-type: disc; |
|---|
| 133 | margin-left: 18px; |
|---|
| 134 | } |
|---|
| 135 | - |
|---|
| 136 | +.toggle-arrow { |
|---|
| 137 | + background-repeat: no-repeat; |
|---|
| 138 | + background-position: top left; |
|---|
| 139 | + background-color: transparent; |
|---|
| 140 | + height: 22px; |
|---|
| 141 | + line-height: 22px; |
|---|
| 142 | + display: block; |
|---|
| 143 | +} |
|---|
| 144 | +.toggle-arrow-active { |
|---|
| 145 | + background-position: bottom left; |
|---|
| 146 | +} |
|---|
| 147 | #screen-meta a.show-settings { |
|---|
| 148 | text-decoration: none; |
|---|
| 149 | z-index: 1; |
|---|