DFW: add tagline, move the Word count under the editor, see #17136

git-svn-id: http://svn.automattic.com/wordpress/trunk@17856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-05-11 09:18:32 +00:00
parent 1109c6b919
commit e96949c9bd
6 changed files with 47 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -653,11 +653,18 @@ form.upgrade .hint {
resize: none; resize: none;
} }
#wp-fullscreen-tagline {
bottom: 20px;
color: #BBBBBB;
font-size: 18px;
position: fixed;
right: 20px;
}
/* =Top bar /* =Top bar
-------------------------------------------------------------- */ -------------------------------------------------------------- */
#fullscreen-topbar { #fullscreen-topbar {
position: fixed; position: fixed;
display: none;
filter: inherit; filter: inherit;
top: 0; top: 0;
left: 0; left: 0;
@ -681,12 +688,12 @@ form.upgrade .hint {
#wp-fullscreen-mode-bar, #wp-fullscreen-mode-bar,
#wp-fullscreen-button-bar, #wp-fullscreen-button-bar,
#wp-fullscreen-close { #wp-fullscreen-close,
#wp-fullscreen-count {
float: left; float: left;
} }
#wp-fullscreen-save, #wp-fullscreen-save {
#wp-fullscreen-count {
float: right; float: right;
} }

View File

@ -1747,13 +1747,7 @@ function wp_fullscreen_html( $extra = array() ) {
<div id="wp-fullscreen-body"> <div id="wp-fullscreen-body">
<div id="fullscreen-topbar"> <div id="fullscreen-topbar">
<div id="wp-fullscreen-toolbar"> <div id="wp-fullscreen-toolbar">
<div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div> <div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div>
<div id="wp-fullscreen-save">
<span><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
<img src="images/wpspin_light.gif" alt="" />
<input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" />
</div>
<div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;"> <div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;">
<div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes"> <div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes">
@ -1841,9 +1835,12 @@ function wp_fullscreen_html( $extra = array() ) {
</div> </div>
</div></div> </div></div>
<div id="wp-fullscreen-count"> <div id="wp-fullscreen-save">
<?php _e('Word Count:'); ?> <span class="word-count">0</span> <span><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
<img src="images/wpspin_light.gif" alt="" />
<input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -1855,7 +1852,14 @@ function wp_fullscreen_html( $extra = array() ) {
<div id="wp-fullscreen-container"> <div id="wp-fullscreen-container">
<textarea id="wp_mce_fullscreen"></textarea> <textarea id="wp_mce_fullscreen"></textarea>
</div> </div>
<div id="wp-fullscreen-status">
<div id="wp-fullscreen-count"><?php _e('Word Count:'); ?> <span class="word-count">0</span></div>
</div>
</div> </div>
<div id="wp-fullscreen-tagline"><?php _e('Just write.'); ?></div>
</div> </div>
<div class="fullscreen-overlay" id="fullscreen-overlay"></div> <div class="fullscreen-overlay" id="fullscreen-overlay"></div>

View File

@ -239,23 +239,23 @@ PubSub.prototype.publish = function( topic, args ) {
} }
ps.subscribe( 'showToolbar', function() { ps.subscribe( 'showToolbar', function() {
s.topbar.removeClass('fade-1000').addClass('fade-300'); s.toolbars.removeClass('fade-1000').addClass('fade-300');
api.fade.In( s.topbar, 300, function(){ ps.publish('toolbarShown'); }, true ); api.fade.In( s.toolbars, 300, function(){ ps.publish('toolbarShown'); }, true );
$('#wp-fullscreen-body').addClass('wp-fullscreen-focus'); $('#wp-fullscreen-body').addClass('wp-fullscreen-focus');
}); });
ps.subscribe( 'hideToolbar', function() { ps.subscribe( 'hideToolbar', function() {
s.topbar.removeClass('fade-300').addClass('fade-1000'); s.toolbars.removeClass('fade-300').addClass('fade-1000');
api.fade.Out( s.topbar, 1000, function(){ ps.publish('toolbarHidden'); }, true ); api.fade.Out( s.toolbars, 1000, function(){ ps.publish('toolbarHidden'); }, true );
$('#wp-fullscreen-body').removeClass('wp-fullscreen-focus'); $('#wp-fullscreen-body').removeClass('wp-fullscreen-focus');
}); });
ps.subscribe( 'toolbarShown', function() { ps.subscribe( 'toolbarShown', function() {
s.topbar.removeClass('fade-300'); s.toolbars.removeClass('fade-300');
}); });
ps.subscribe( 'toolbarHidden', function() { ps.subscribe( 'toolbarHidden', function() {
s.topbar.removeClass('fade-1000'); s.toolbars.removeClass('fade-1000');
}); });
ps.subscribe( 'show', function() { // This event occurs before the overlay blocks the UI. ps.subscribe( 'show', function() { // This event occurs before the overlay blocks the UI.
@ -466,7 +466,8 @@ PubSub.prototype.publish = function( topic, args ) {
*/ */
api.ui = { api.ui = {
init: function() { init: function() {
var topbar = s.topbar = $('#fullscreen-topbar'); var topbar = $('#fullscreen-topbar');
s.toolbars = topbar.add( $('#wp-fullscreen-status') );
s.element = $('#fullscreen-fader'); s.element = $('#fullscreen-fader');
s.textarea_obj = document.getElementById('wp_mce_fullscreen'); s.textarea_obj = document.getElementById('wp_mce_fullscreen');
s.has_tinymce = typeof(tinyMCE) != 'undefined'; s.has_tinymce = typeof(tinyMCE) != 'undefined';
@ -504,12 +505,12 @@ PubSub.prototype.publish = function( topic, args ) {
}); });
topbar.mouseenter(function(e){ topbar.mouseenter(function(e){
$('#fullscreen-topbar').addClass('fullscreen-make-sticky'); s.toolbars.addClass('fullscreen-make-sticky');
$( document ).unbind( '.fullscreen' ); $( document ).unbind( '.fullscreen' );
clearTimeout( s.timer ); clearTimeout( s.timer );
s.timer = 0; s.timer = 0;
}).mouseleave(function(e){ }).mouseleave(function(e){
$('#fullscreen-topbar').removeClass('fullscreen-make-sticky'); s.toolbars.removeClass('fullscreen-make-sticky');
$( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000 ); } ); $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000 ); } );
}); });
}, },
@ -553,7 +554,7 @@ PubSub.prototype.publish = function( topic, args ) {
} }
element.show(); element.show();
element.one( this.transitionend, function() { element.first().one( this.transitionend, function() {
callback(); callback();
}); });
setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity ); setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity );
@ -561,7 +562,11 @@ PubSub.prototype.publish = function( topic, args ) {
if ( stop ) if ( stop )
element.stop(); element.stop();
element.css( 'opacity', 1 ).fadeIn( speed, callback ); element.css( 'opacity', 1 );
element.first().fadeIn( speed, callback );
if ( element.length > 1 )
element.not(':first').fadeIn( speed );
} }
return element; return element;
@ -577,7 +582,7 @@ PubSub.prototype.publish = function( topic, args ) {
return element; return element;
if ( api.fade.transitions ) { if ( api.fade.transitions ) {
element.one( api.fade.transitionend, function() { element.first().one( api.fade.transitionend, function() {
if ( element.hasClass('fade-trigger') ) if ( element.hasClass('fade-trigger') )
return; return;
@ -589,7 +594,10 @@ PubSub.prototype.publish = function( topic, args ) {
if ( stop ) if ( stop )
element.stop(); element.stop();
element.fadeOut( speed, callback ); element.first().fadeOut( speed, callback );
if ( element.length > 1 )
element.not(':first').fadeOut( speed );
} }
return element; return element;

File diff suppressed because one or more lines are too long

View File

@ -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'), '20110510' ); $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110511' );
$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');