mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Expand the Quick Draft section by default. Fixes #26463, props bassgang.
Built from https://develop.svn.wordpress.org/trunk@26813 git-svn-id: http://core.svn.wordpress.org/trunk@26700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d48df2d58
commit
cd465575f1
@ -3042,14 +3042,6 @@ input#save-post {
|
||||
float: right;
|
||||
}
|
||||
|
||||
form.initial-form label.prompt {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
form.initial-form input#title {
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
form.initial-form.quickpress-open label.prompt {
|
||||
font-style: normal;
|
||||
}
|
||||
@ -3089,11 +3081,6 @@ form.initial-form.quickpress-open input#title {
|
||||
padding: 7px 8px;
|
||||
}
|
||||
|
||||
.initial-form #description-wrap,
|
||||
.initial-form p.submit {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-text-wrap,
|
||||
.textarea-wrap {
|
||||
position: relative;
|
||||
|
2
wp-admin/css/wp-admin-rtl.min.css
vendored
2
wp-admin/css/wp-admin-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -3042,14 +3042,6 @@ input#save-post {
|
||||
float: left;
|
||||
}
|
||||
|
||||
form.initial-form label.prompt {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
form.initial-form input#title {
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
form.initial-form.quickpress-open label.prompt {
|
||||
font-style: normal;
|
||||
}
|
||||
@ -3089,11 +3081,6 @@ form.initial-form.quickpress-open input#title {
|
||||
padding: 7px 8px;
|
||||
}
|
||||
|
||||
.initial-form #description-wrap,
|
||||
.initial-form p.submit {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-text-wrap,
|
||||
.textarea-wrap {
|
||||
position: relative;
|
||||
|
2
wp-admin/css/wp-admin.min.css
vendored
2
wp-admin/css/wp-admin.min.css
vendored
File diff suppressed because one or more lines are too long
@ -344,12 +344,12 @@ function wp_dashboard_quick_press( $error_msg = false ) {
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="input-text-wrap" id="title-wrap">
|
||||
<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php _e( 'What’s on your mind?' ); ?></label>
|
||||
<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php echo apply_filters( 'enter_title_here', __( 'Title' ), $post ); ?></label>
|
||||
<input type="text" name="post_title" id="title" autocomplete="off" />
|
||||
</div>
|
||||
|
||||
<div class="textarea-wrap" id="description-wrap">
|
||||
<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php _e( 'Enter a description' ); ?></label>
|
||||
<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php _e( 'What’s on your mind?' ); ?></label>
|
||||
<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
|
||||
</div>
|
||||
|
||||
|
@ -114,8 +114,6 @@ jQuery(document).ready( function($) {
|
||||
});
|
||||
|
||||
$('#quick-press').on( 'click focusin', function() {
|
||||
$(this).addClass('quickpress-open');
|
||||
$('#description-wrap, p.submit').slideDown(200);
|
||||
wpActiveEditor = 'content';
|
||||
});
|
||||
|
||||
|
2
wp-admin/js/dashboard.min.js
vendored
2
wp-admin/js/dashboard.min.js
vendored
@ -1 +1 @@
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val().replace(/\n/g,"<br>")+" ",h=b.css("width",f.css("width")).html(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow-y","hidden"),f.css("height",d+"px"))})}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){a(this).addClass("quickpress-open"),a("#description-wrap, p.submit").slideDown(200),wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document"),a(".show-more a").on("click",function(b){a(this).fadeOut().closest(".activity-block").find("li.hidden").fadeIn().removeClass("hidden"),b.preventDefault()})});
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val().replace(/\n/g,"<br>")+" ",h=b.css("width",f.css("width")).html(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow-y","hidden"),f.css("height",d+"px"))})}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document"),a(".show-more a").on("click",function(b){a(this).fadeOut().closest(".activity-block").find("li.hidden").fadeIn().removeClass("hidden"),b.preventDefault()})});
|
Loading…
Reference in New Issue
Block a user