Ticket #28873: 28873.5.patch
| File 28873.5.patch, 8.5 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/css/forms.css
675 675 19.0 - Tools 676 676 ------------------------------------------------------------------------------*/ 677 677 678 .tool-box .title {679 margin: 8px 0;680 font-size: 18px;681 font-weight: normal;682 line-height: 24px;683 }684 685 678 .pressthis { 686 679 margin: 20px 0; 687 680 } … … 704 697 text-decoration: none; 705 698 } 706 699 707 .pressthis a:active {708 outline: none;709 }710 711 .pressthis a:hover:after {712 -webkit-transform: skew(20deg) rotate(9deg);713 -ms-transform: skew(20deg) rotate(9deg);714 transform: skew(20deg) rotate(9deg);715 -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);716 box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);717 }718 719 700 .pressthis a span { 720 701 display: inline-block; 721 702 margin: 0px 0 0; … … 748 729 box-shadow: 0 10px 8px rgba(0, 0, 0, 0.6); 749 730 } 750 731 732 .pressthis a:hover:after { 733 -webkit-transform: skew(20deg) rotate(9deg); 734 -ms-transform: skew(20deg) rotate(9deg); 735 transform: skew(20deg) rotate(9deg); 736 -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); 737 box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7); 738 } 739 740 .pressthis .separator-or { 741 margin: 0 1em; 742 } 743 744 #pressthis-code-wrap { 745 /* avoid a few pixels jump on slideToggle making this a new formatting context */ 746 overflow: hidden; 747 } 748 749 #pressthis-code { 750 height: 100px; 751 width: 60em; 752 max-width: 100%; 753 margin: 1em 0; 754 } 755 751 756 /*------------------------------------------------------------------------------ 752 757 20.0 - Settings 753 758 ------------------------------------------------------------------------------*/ -
src/wp-admin/options-writing.php
116 116 <h3 class="title"><?php _e('Press This') ?></h3> 117 117 <p><?php _e('Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.');?></p> 118 118 <p><?php _e('Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.'); ?></p> 119 <p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?></p> 120 <p class="pressthis"><a onclick="return false;" oncontextmenu="if(window.navigator.userAgent.indexOf('WebKit')!=-1||window.navigator.userAgent.indexOf('MSIE')!=-1){jQuery('.pressthis-code').show().find('textarea').focus().select();return false;}" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e('Press This') ?></span></a></p> 121 <div class="pressthis-code" style="display:none;"> 122 <p class="description"><?php _e('If your bookmarks toolbar is hidden: copy the code below, open your Bookmarks manager, create new bookmark, type Press This into the name field and paste the code into the URL field.') ?></p> 123 <p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p> 119 <p class="description"><?php _e('Drag-and-drop the Press This link to your bookmarks bar or copy the link code and follow instructions for a posting shortcut.') ?></p> 120 <p class="pressthis"> 121 <a onclick="return false;" oncontextmenu="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ) ?></span></a> 122 <span class="separator-or"><?php echo __( 'or' ); ?></span> 123 <button type="button" class="button button-large show-pressthis-code" aria-expanded="false" aria-controls="pressthis-code-wrap"><?php _e( 'Copy Press This code' ); ?></button> 124 </p> 125 <div class="hidden" id="pressthis-code-wrap"> 126 <p class="description" id="pressthis-code-desc"><?php _e( 'Copy the selected code below, open your Bookmarks manager, create new bookmark, type Press This into the name field and paste the code into the URL field.' ) ?></p> 127 <label for="pressthis-code" class="screen-reader-text"><?php _e( 'Press This code' ); ?></label> 128 <textarea rows="5" cols="120" readonly="readonly" id="pressthis-code" class="pressthis-code" aria-labelledby="pressthis-code-desc"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea> 124 129 </div> 130 <script> 131 jQuery( document ).ready( function( $ ) { 132 var $pressthisCode = $( '#pressthis-code' ); 133 $( '.show-pressthis-code' ).on( 'click', function( event ) { 134 $( '#pressthis-code-wrap' ).slideToggle( 200 ); 135 $( this ).attr( 'aria-expanded', $( this ).attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); 136 }); 137 // Select Press This code when focusing (tabbing) or clicking the textarea. 138 $pressthisCode.on( 'click focus', function() { 139 var self = this; 140 setTimeout( function() { self.select(); }, 50 ); 141 }); 142 }); 143 </script> 125 144 126 145 <?php 127 146 /** This filter is documented in wp-admin/options.php */ -
src/wp-admin/tools.php
37 37 38 38 <?php if ( current_user_can('edit_posts') ) : ?> 39 39 <div class="tool-box"> 40 <h3 class="title"><?php _e('Press This') ?></h3> 41 <p><?php _e('Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.');?></p> 42 43 <p><?php _e('Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.'); ?></p> 44 <p class="description"><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?></p> 45 <p class="pressthis"><a onclick="return false;" oncontextmenu="if(window.navigator.userAgent.indexOf('WebKit')!=-1||window.navigator.userAgent.indexOf('MSIE')!=-1){jQuery('.pressthis-code').show().find('textarea').focus().select();return false;}" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e('Press This') ?></span></a></p> 46 <div class="pressthis-code" style="display:none;"> 47 <p class="description"><?php _e('If your bookmarks toolbar is hidden: copy the code below, open your Bookmarks manager, create new bookmark, type Press This into the name field and paste the code into the URL field.') ?></p> 48 <p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p> 49 </div> 40 <h3 class="title"><?php _e('Press This') ?></h3> 41 <p><?php _e('Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.');?></p> 42 <p><?php _e('Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.'); ?></p> 43 <p class="description"><?php _e('Drag-and-drop the Press This link to your bookmarks bar or copy the link code and follow instructions for a posting shortcut.') ?></p> 44 <p class="pressthis"> 45 <a onclick="return false;" oncontextmenu="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ) ?></span></a> 46 <span class="separator-or"><?php echo __( 'or' ); ?></span> 47 <button type="button" class="button button-large show-pressthis-code" aria-expanded="false" aria-controls="pressthis-code-wrap"><?php _e( 'Copy Press This code' ); ?></button> 48 </p> 49 <div class="hidden" id="pressthis-code-wrap"> 50 <p class="description" id="pressthis-code-desc"><?php _e( 'Copy the selected code below, open your Bookmarks manager, create new bookmark, type Press This into the name field and paste the code into the URL field.' ) ?></p> 51 <label for="pressthis-code" class="screen-reader-text"><?php _e( 'Press This code' ); ?></label> 52 <textarea rows="5" cols="120" readonly="readonly" id="pressthis-code" class="pressthis-code" aria-labelledby="pressthis-code-desc"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea> 50 53 </div> 54 <script> 55 jQuery( document ).ready( function( $ ) { 56 var $pressthisCode = $( '#pressthis-code' ); 57 $( '.show-pressthis-code' ).on( 'click', function( event ) { 58 $( '#pressthis-code-wrap' ).slideToggle( 200 ); 59 $( this ).attr( 'aria-expanded', $( this ).attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); 60 }); 61 // Select Press This code when focusing (tabbing) or clicking the textarea. 62 $pressthisCode.on( 'click focus', function() { 63 var self = this; 64 setTimeout( function() { self.select(); }, 50 ); 65 }); 66 }); 67 </script> 68 </div> 51 69 <?php 52 70 endif; 53 71