DFW: change width resizing to use hotkeys only: Alt (Win, Linux) or Ctrl (Mac) 0/reset, +/wider, -/narrower, see #17136
git-svn-id: http://svn.automattic.com/wordpress/trunk@17838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8267ff9aae
commit
a2fcf40bd8
File diff suppressed because one or more lines are too long
|
@ -794,15 +794,6 @@ form.upgrade .hint {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wp-fullscreen-plus,
|
|
||||||
#wp-fullscreen-minus,
|
|
||||||
#wp-fullscreen-reset {
|
|
||||||
font-size: 14px;
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
padding: 0 4px;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =Thickbox Adjustments
|
/* =Thickbox Adjustments
|
||||||
-------------------------------------------------------------- */
|
-------------------------------------------------------------- */
|
||||||
.fullscreen-active #TB_overlay {
|
.fullscreen-active #TB_overlay {
|
||||||
|
|
|
@ -1813,9 +1813,6 @@ function wp_fullscreen_html() {
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
<div id="wp-fullscreen-count">
|
<div id="wp-fullscreen-count">
|
||||||
<span title="<?php _e('Wider'); ?>" id="wp-fullscreen-plus">+</span>
|
|
||||||
<span title="<?php _e('Narrower'); ?>" id="wp-fullscreen-minus">–</span>
|
|
||||||
<span title="<?php _e('Reset width'); ?>" id="wp-fullscreen-reset">×</span>
|
|
||||||
<?php _e('Word Count:'); ?> <span class="word-count">0</span>
|
<?php _e('Word Count:'); ?> <span class="word-count">0</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -462,28 +462,32 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||||
if ( wptitlehint )
|
if ( wptitlehint )
|
||||||
wptitlehint('wp-fullscreen-title');
|
wptitlehint('wp-fullscreen-title');
|
||||||
|
|
||||||
$(document).keypress(function(e){
|
$(document).keyup(function(e){
|
||||||
if ( 27 != e.keyCode )
|
var c = e.charCode || e.keyCode, a;
|
||||||
|
|
||||||
|
if ( !fullscreen.settings.visible )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ( fullscreen.settings.visible )
|
if ( navigator.platform && navigator.platform.indexOf('Mac') != -1 )
|
||||||
|
a = e.ctrlKey; // Ctrl key for Mac
|
||||||
|
else
|
||||||
|
a = e.altKey; // Alt key for Win & Linux
|
||||||
|
|
||||||
|
if ( 27 == c ) // Esc
|
||||||
fullscreen.off();
|
fullscreen.off();
|
||||||
|
|
||||||
|
if ( a && (61 == c || 187 == c) ) // +
|
||||||
|
api.dfw_width(25);
|
||||||
|
|
||||||
|
if ( a && (45 == c || 189 == c) ) // -
|
||||||
|
api.dfw_width(-25);
|
||||||
|
|
||||||
|
if ( a && 48 == c ) // 0
|
||||||
|
api.dfw_width(0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#wp-fullscreen-plus').click(function(){
|
|
||||||
fullscreen.dfw_width(25);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#wp-fullscreen-minus').click(function(){
|
|
||||||
fullscreen.dfw_width(-25);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#wp-fullscreen-reset').click(function(){
|
|
||||||
fullscreen.dfw_width(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
topbar.mouseenter(function(e){
|
topbar.mouseenter(function(e){
|
||||||
$('#fullscreen-topbar').addClass('fullscreen-make-sticky');
|
$('#fullscreen-topbar').addClass('fullscreen-make-sticky');
|
||||||
$( document ).unbind( '.fullscreen' );
|
$( document ).unbind( '.fullscreen' );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -96,7 +96,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411' );
|
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411' );
|
||||||
$scripts->add_data( 'editor', 'group', 1 );
|
$scripts->add_data( 'editor', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110507' );
|
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110507a' );
|
||||||
$scripts->add_data( 'wp-fullscreen', 'group', 1 );
|
$scripts->add_data( 'wp-fullscreen', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
|
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
|
||||||
|
@ -487,7 +487,7 @@ function wp_default_styles( &$styles ) {
|
||||||
// Any rtl stylesheets that don't have a .dev version for ltr
|
// Any rtl stylesheets that don't have a .dev version for ltr
|
||||||
$no_suffix = array( 'farbtastic' );
|
$no_suffix = array( 'farbtastic' );
|
||||||
|
|
||||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110507c' );
|
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110507d' );
|
||||||
|
|
||||||
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
|
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
|
||||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||||
|
|
Loading…
Reference in New Issue