Postbox.js fixes and css reset
git-svn-id: http://svn.automattic.com/wordpress/trunk@9408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cdb2fa6a66
commit
f846c853d5
|
@ -1,8 +1,4 @@
|
||||||
|
|
||||||
textarea, input, select {
|
|
||||||
border-color: #dfdfdf;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidemenu-bg,
|
#sidemenu-bg,
|
||||||
.find-box-search {
|
.find-box-search {
|
||||||
background-color: #e4f2fd;
|
background-color: #e4f2fd;
|
||||||
|
@ -17,7 +13,6 @@ body,
|
||||||
#wpbody,
|
#wpbody,
|
||||||
.form-table .pre,
|
.form-table .pre,
|
||||||
.find-box-inside {
|
.find-box-inside {
|
||||||
background-color: #f9f9f9;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,8 +426,9 @@ input.readonly {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ed_toolbar input, #ed_reply_toolbar input {
|
#ed_toolbar input,
|
||||||
background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px;
|
#ed_reply_toolbar input {
|
||||||
|
background: #fff url("../images/fade-butt.png") repeat-x 0 -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#editable-post-name {
|
#editable-post-name {
|
||||||
|
@ -629,6 +625,15 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #dfdfdf;
|
background-color: #dfdfdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ed_toolbar input {
|
||||||
|
border-color: #C3C3C3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ed_toolbar input:hover {
|
||||||
|
border-color: #aaa;
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
#poststuff .wp_themeSkin .mceStatusbar {
|
#poststuff .wp_themeSkin .mceStatusbar {
|
||||||
border-color: #EDEDED;
|
border-color: #EDEDED;
|
||||||
}
|
}
|
||||||
|
@ -810,11 +815,11 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
|
|
||||||
#editorcontainer,
|
#editorcontainer,
|
||||||
#post-status-info,
|
#post-status-info,
|
||||||
#poststuff #titlewrap {
|
#titlediv #title {
|
||||||
border-color: #dfdfdf;
|
border-color: #dfdfdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff #titlewrap {
|
#titlediv #title {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -823,6 +828,10 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#timestampdiv input {
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
/* Diff */
|
/* Diff */
|
||||||
|
|
||||||
table.diff .diff-deletedline {
|
table.diff .diff-deletedline {
|
||||||
|
|
|
@ -1,3 +1,60 @@
|
||||||
|
/* http://meyerweb.com/eric/tools/css/reset/ */
|
||||||
|
/* v1.0 | 20080212 */
|
||||||
|
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remember to define focus styles! */
|
||||||
|
/*
|
||||||
|
:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/* remember to highlight inserts somehow! */
|
||||||
|
ins {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tables still need 'cellspacing="0"' in the markup */
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
/* end reset css */
|
||||||
|
|
||||||
|
|
||||||
/* 2 column liquid layout */
|
/* 2 column liquid layout */
|
||||||
#wpwrap {
|
#wpwrap {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
@ -72,6 +129,20 @@
|
||||||
width: 59%;
|
width: 59%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* include margin and padding in the width calculation of input and textarea */
|
||||||
|
input[type="text"],
|
||||||
|
textarea {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box; /* ie8 only */
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
vertical-align: text-top;
|
||||||
|
}
|
||||||
|
|
||||||
/* styles for use by people extending the WordPress interface */
|
/* styles for use by people extending the WordPress interface */
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -83,22 +154,31 @@ body, td {
|
||||||
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
form, label input { margin: 0; padding: 0; }
|
form, label input {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
img { border: 0; }
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
label { cursor: pointer; }
|
label {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
li, dd { margin-bottom: 6px; }
|
li, dd {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
p, li, dl, dd, dt { line-height: 140%; }
|
p, li, dl, dd, dt {
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
|
||||||
textarea, input, select {
|
textarea, input, select {
|
||||||
font: 13px Verdana, Arial, Helvetica, sans-serif;
|
font: 13px Verdana, Arial, Helvetica, sans-serif;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.alignleft {
|
.alignleft {
|
||||||
|
@ -205,7 +285,6 @@ h6 {
|
||||||
-khtml-border-radius: 4px;
|
-khtml-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.widefat a {
|
.widefat a {
|
||||||
|
|
|
@ -37,7 +37,7 @@ $today = current_time('mysql', 1);
|
||||||
|
|
||||||
<?php wp_dashboard(); ?>
|
<?php wp_dashboard(); ?>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
</div><!-- dashboard-widgets-wrap -->
|
</div><!-- dashboard-widgets-wrap -->
|
||||||
|
|
||||||
</div><!-- wrap -->
|
</div><!-- wrap -->
|
||||||
|
|
|
@ -9,79 +9,68 @@
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
$('.hide-postbox-tog').click( function() {
|
$('.hide-postbox-tog').click( function() {
|
||||||
var box = jQuery(this).val();
|
var box = jQuery(this).val();
|
||||||
if ( jQuery(this).attr('checked') ) {
|
if ( jQuery(this).attr('checked') ) {
|
||||||
jQuery('#' + box).show();
|
jQuery('#' + box).show();
|
||||||
if ( $.isFunction( postboxes.onShow ) ) {
|
if ( $.isFunction( postboxes.pbshow ) )
|
||||||
postboxes.onShow( box );
|
postboxes.pbshow( box );
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
jQuery('#' + box).hide();
|
jQuery('#' + box).hide();
|
||||||
}
|
if ( $.isFunction( postboxes.pbhide ) )
|
||||||
|
postboxes.pbhide( box );
|
||||||
|
|
||||||
|
}
|
||||||
postboxes.save_state(page);
|
postboxes.save_state(page);
|
||||||
} );
|
} );
|
||||||
|
|
||||||
this.makeItTall();
|
this.expandSidebar();
|
||||||
this.init(page,args);
|
this.init(page,args);
|
||||||
},
|
},
|
||||||
|
|
||||||
makeItTall : function() {
|
|
||||||
var t = $('#make-it-tall').remove();
|
|
||||||
|
|
||||||
if ( t.length < 1 )
|
expandSidebar : function(doIt) {
|
||||||
t = $.browser.mozilla ? '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' : '<div id="make-it-tall"> <br /> <br /></div>';
|
if ( doIt || $('#side-sortables > .postbox:visible').length ) {
|
||||||
|
$('#post-body').addClass('has-sidebar');
|
||||||
$('#side-sortables').append(t);
|
$('#side-sortables').height( $('#post-body').height() );
|
||||||
|
|
||||||
if ( $('#side-sortables').children().length > 1 )
|
|
||||||
$('#side-sortables').css({'minHeight':'300px'});
|
|
||||||
|
|
||||||
$('#wpbody-content').css( 'overflow', 'hidden' );
|
|
||||||
},
|
|
||||||
|
|
||||||
expandSidebar : function( doIt ) {
|
|
||||||
if ( doIt || $.trim( $( '#side-info-column' ).text() ) ) {
|
|
||||||
$( '#post-body' ).addClass( 'has-sidebar' );
|
|
||||||
$( '#side-sortables' ).css('z-index','0');
|
|
||||||
} else {
|
} else {
|
||||||
$( '#post-body' ).removeClass( 'has-sidebar' );
|
$('#post-body').removeClass('has-sidebar');
|
||||||
$( '#side-sortables' ).css('z-index','-1');
|
$('#side-sortables').height('0')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
init : function(page,args) {
|
init : function(page, args) {
|
||||||
$.extend( this, args || {} );
|
$.extend( this, args || {} );
|
||||||
jQuery('.meta-box-sortables').sortable( {
|
$('.meta-box-sortables').sortable( {
|
||||||
placeholder: 'sortable-placeholder',
|
placeholder: 'sortable-placeholder',
|
||||||
connectWith: [ '.meta-box-sortables' ],
|
connectWith: [ '.meta-box-sortables' ],
|
||||||
items: '> .postbox',
|
items: '> .postbox',
|
||||||
handle: '.hndle',
|
handle: '.hndle',
|
||||||
distance: 2,
|
distance: 2,
|
||||||
tolerance: 'pointer',
|
tolerance: 'pointer',
|
||||||
receive: function() {
|
sort: function(e,ui) {
|
||||||
postboxes.makeItTall();
|
if ( $(document).width() - e.clientX < 300 ) {
|
||||||
|
if ( ! $('#post-body').hasClass('has-sidebar') ) {
|
||||||
|
var pos = $('#side-sortables').offset();
|
||||||
|
|
||||||
|
$('#side-sortables').append(ui.item)
|
||||||
|
$(ui.placeholder).css({'top':pos.top,'left':pos.left}).width($(ui.item).width())
|
||||||
|
postboxes.expandSidebar(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
stop: function() {
|
stop: function() {
|
||||||
if ( $('#side-sortables').children().length < 2 )
|
|
||||||
$('#side-sortables').css({'minHeight':''});
|
|
||||||
|
|
||||||
var postVars = {
|
var postVars = {
|
||||||
action: 'meta-box-order',
|
action: 'meta-box-order',
|
||||||
_ajax_nonce: jQuery('#meta-box-order-nonce').val(),
|
_ajax_nonce: $('#meta-box-order-nonce').val(),
|
||||||
page: page
|
page: page
|
||||||
}
|
}
|
||||||
jQuery('.meta-box-sortables').each( function() {
|
$('.meta-box-sortables').each( function() {
|
||||||
postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(',');
|
postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(',');
|
||||||
} );
|
} );
|
||||||
jQuery.post( postboxL10n.requestFile, postVars, function() {
|
$.post( postboxL10n.requestFile, postVars, function() {
|
||||||
postboxes.expandSidebar();
|
postboxes.expandSidebar();
|
||||||
} );
|
} );
|
||||||
},
|
|
||||||
over: function(e, ui) {
|
|
||||||
if ( !ui.element.is( '#side-sortables' ) )
|
|
||||||
return;
|
|
||||||
postboxes.expandSidebar( true );
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
@ -96,12 +85,13 @@
|
||||||
closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
|
closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
|
||||||
page: page
|
page: page
|
||||||
});
|
});
|
||||||
|
postboxes.expandSidebar();
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
onShow : false
|
pbshow : false,
|
||||||
|
|
||||||
|
pbhide : false
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function(){postboxes.expandSidebar();});
|
|
||||||
|
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|
|
@ -448,10 +448,18 @@ textarea.all-options, input.all-options {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ed_toolbar input {
|
#ed_toolbar input {
|
||||||
margin: 3px 2px 2px;
|
margin: 3px 2px 4px;
|
||||||
padding: 2px 4px;
|
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
min-width: 26px;
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
-khtml-border-radius: 3px;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#quicktags #ed_link,
|
#quicktags #ed_link,
|
||||||
|
@ -472,7 +480,6 @@ textarea.all-options, input.all-options {
|
||||||
#quicktags #ed_code,
|
#quicktags #ed_code,
|
||||||
#ed_reply_toolbar #ed_reply_code {
|
#ed_reply_toolbar #ed_reply_code {
|
||||||
font-family: "Courier New", Courier, mono;
|
font-family: "Courier New", Courier, mono;
|
||||||
font-size: 1.1em;
|
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1486,6 +1493,23 @@ table.form-table td .updated {
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-sortable .postbox h3 {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-sortable .postbox .hndle span {
|
||||||
|
padding: 6px 0;
|
||||||
|
}
|
||||||
|
.ui-sortable .postbox .hndle {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sortable-placeholder {
|
||||||
|
border: 1px dashed #bbb;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
#poststuff h3,
|
#poststuff h3,
|
||||||
.metabox-holder h3 {
|
.metabox-holder h3 {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -1536,15 +1560,13 @@ table.form-table td .updated {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#titlediv #title {
|
#poststuff #titlewrap {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 1.7em;
|
|
||||||
width: 100%;
|
|
||||||
outline: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff #titlewrap {
|
#titlediv #title {
|
||||||
padding: 3px 4px;
|
padding: 3px 4px;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
@ -1552,6 +1574,9 @@ table.form-table td .updated {
|
||||||
-khtml-border-radius: 6px;
|
-khtml-border-radius: 6px;
|
||||||
-webkit-border-radius: 6px;
|
-webkit-border-radius: 6px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
font-size: 1.7em;
|
||||||
|
width: 100%;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff .inside-submitbox,
|
#poststuff .inside-submitbox,
|
||||||
|
@ -2081,31 +2106,22 @@ fieldset {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-sortable .postbox h3 {
|
#timestampdiv select {
|
||||||
cursor: pointer;
|
height: 20px;
|
||||||
}
|
line-height: 20px;
|
||||||
|
padding: 0;
|
||||||
.ui-sortable .postbox .hndle span {
|
}
|
||||||
padding: 6px 0;
|
|
||||||
}
|
|
||||||
.ui-sortable .postbox .hndle {
|
|
||||||
cursor: move;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sortable-placeholder {
|
|
||||||
border: 1px #bbb dashed;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jj, #hh, #mn {
|
#jj, #hh, #mn {
|
||||||
width: 1.5em;
|
width: 2em;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#aa {
|
#aa {
|
||||||
width: 2.7em;
|
width: 3.4em;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.curtime #timestamp {
|
.curtime #timestamp {
|
||||||
|
@ -2116,6 +2132,16 @@ fieldset {
|
||||||
|
|
||||||
#timestampdiv {
|
#timestampdiv {
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
|
line-height: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#timestampdiv p {
|
||||||
|
margin: 8px 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#timestampdiv input {
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
#inbox-filter .actions {
|
#inbox-filter .actions {
|
||||||
|
|
Loading…
Reference in New Issue