Ticket #15739: 15739.nacin.diff
File 15739.nacin.diff, 3.6 KB (added by , 14 years ago) |
---|
-
wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css
1 #wp-link p.howto { 2 margin: 3px; 3 } 4 #link-options { 1 #wp-link #link-options { 5 2 padding: 10px 0 14px; 6 3 border-bottom: 1px solid #dfdfdf; 7 4 margin: 0 6px 14px; 8 5 } 6 #wp-link p.howto { 7 margin: 3px; 8 } 9 #wp-link p#internal-toggle { 10 margin: 3px 9px 0; 11 } 9 12 #wp-link label input[type="text"] { 10 13 width: 360px; 11 14 margin-top: 5px; … … 17 20 padding-right: 5px; 18 21 } 19 22 #wp-link .link-search-wrapper { 20 margin: 5px 5px 9px;23 margin: 5px 6px 9px; 21 24 display: block; 22 25 overflow: hidden; 23 26 } -
wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
9 9 riverBottomThreshold: 5, 10 10 keySensitivity: 100, 11 11 lastSearch: '', 12 startState: '', 12 13 init : function() { 13 14 inputs.dialog = $('#wp-link'); 14 15 inputs.submit = $('#wp-link-submit'); … … 32 33 e.preventDefault(); 33 34 }); 34 35 $('#wp-link-cancel').click( wpLink.cancel ); 36 $('#internal-toggle a').click( wpLink.toggleInternalLinking ); 35 37 36 38 rivers.elements.bind('river-select', wpLink.updateFields ); 37 39 … … 76 78 // Load the most recent results if this is the first time opening the panel. 77 79 if ( ! rivers.recent.ul.children().length ) 78 80 rivers.recent.ajax(); 81 82 wpLink.startState = getUserSetting('wplink', '1'); 79 83 }, 80 84 81 85 cancel : function() { … … 242 246 funcContext = this; 243 247 funcTriggered = true; 244 248 }; 249 }, 250 251 toggleInternalLinking : function( event ) { 252 var panel = $('#search-panel'), d = $('.wp-dialog'), o, 253 v = 'block' == panel.css('display') ? '0' : '1'; 254 panel.slideToggle(function(){ 255 o = d.offset(); 256 setUserSetting('wplink', v); 257 // Move the box if the box is now expanded, was opened in a collapsed state, 258 // and if it needs to be moved. (Judged by bottom not being positive or 259 // bottom being smaller than top.) 260 // @todo calculate bottom offset. 261 alert(o.bottom + ' ' + o.top); 262 if ( '1' == v && '1' != wpLink.startState ) { // && !( o.bottom > 0 && o.bottom > o.top ) ) { 263 d.animate({'top': Math.max(0, d.position().top - 115)}, 'fast'); 264 wpLink.startState = '1'; 265 } 266 }); 267 event.preventDefault(); 245 268 } 246 269 } 247 270 -
wp-admin/includes/internal-linking.php
84 84 <label for="link-target-checkbox"><input type="checkbox" id="link-target-checkbox" tabindex="30" /> <?php _e( 'Open link in a new window/tab' ); ?></label> 85 85 </div> 86 86 </div> 87 <div id="search-panel"> 87 <p class="howto" id="internal-toggle"><?php _e( 'Or, link to existing site content:' ); ?> <a href="#">Expand/Collapse</a></p> 88 <div id="search-panel"<?php if ( '0' == get_user_setting( 'wplink', '1' ) ) echo ' style="display:none"'; ?>> 88 89 <div class="link-search-wrapper"> 89 <p class="howto"><?php _e( 'Or, link to existing site content:' ); ?></p>90 90 <label for="search-field"> 91 91 <span><?php _e( 'Search' ); ?></span> 92 92 <input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />