diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index e86c0190a9..12852ae848 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1,4 +1,8 @@ +html { + background-color: #f9f9f9; +} + .find-box-search { border-color: #dfdfdf; background-color: #f1f1f1; @@ -65,6 +69,7 @@ div.dashboard-widget, .widefat { border-color: #dfdfdf; + background-color: #fff; } div.dashboard-widget-error { @@ -1160,8 +1165,9 @@ div.star.select:hover { } /* inline editor */ -.inline-editor input, -.inline-editor textarea, +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, #replyrow input { border-color: #ddd; } @@ -1172,6 +1178,11 @@ div.star.select:hover { .inline-editor ul.cat-checklist { background-color: #FFFFFF; + border-color: #ddd; +} + +.inline-edit-row p.submit { + background-color: #f1f1f1; } .inline-editor .categories .catshow, diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css index 7060ef5d6a..927ed27a4b 100644 --- a/wp-admin/css/dashboard.css +++ b/wp-admin/css/dashboard.css @@ -296,20 +296,6 @@ div.postbox div.inside { margin: 0 1em 0 10px; } -#dashboard-widgets #dashboard_quick_press form p.submit .cancel { - padding-left: 0; - padding-right: 0; - border: none; - background-color: transparent; - text-decoration: underline; - color: red; -} - -#dashboard-widgets #dashboard_quick_press form p.submit .cancel:hover { - text-decoration: none; -} - - #dashboard-widgets #dashboard_quick_press form p.submit #publish { float: right; } diff --git a/wp-admin/css/global.css b/wp-admin/css/global.css index e6e12d32e8..2457298878 100644 --- a/wp-admin/css/global.css +++ b/wp-admin/css/global.css @@ -61,7 +61,6 @@ table { #wpwrap { height: auto; min-height: 100%; - overflow: hidden; width: 100%; } diff --git a/wp-admin/css/ie.css b/wp-admin/css/ie.css index eaa9fe5fdf..51323ddf30 100644 --- a/wp-admin/css/ie.css +++ b/wp-admin/css/ie.css @@ -137,6 +137,43 @@ input.button-highlighted { margin-top: 10px; } +/* Inline Editor */ +#wpbody-content .quick-edit-row-post .inline-edit-col-left { + width: 39%; +} + +#wpbody-content .inline-edit-row-post .inline-edit-col-center { + width: 19%; +} + +#wpbody-content .quick-edit-row-page .inline-edit-col-left { + width: 49%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-left { + width: 29%; +} + +.inline-edit-row p.submit { + zoom: 100%; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: left; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + margin-left: 0; + zoom: 100%; +} + +#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input { + line-height: 130%; +} +/* end Inline Editor */ + * html div.widget-liquid-left-holder, * html div.widget-liquid-right { display: block; diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 849a4ff96b..eb8c090974 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -215,7 +215,7 @@ function bulk_edit_posts( $post_data = null ) { $post_IDs = array_map( intval, (array) $post_data['post'] ); - $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category' ); + $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' ); foreach ( $reset as $field ) { if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) ) unset($post_data[$field]); @@ -274,6 +274,14 @@ function bulk_edit_posts( $post_data = null ) { $post_data['ID'] = $post_ID; $updated[] = wp_update_post( $post_data ); + + if ( current_user_can( 'edit_others_posts' ) && isset( $post_data['sticky'] ) ) { + if ( 'sticky' == $post_data['sticky'] ) + stick_post( $post_ID ); + else + unstick_post( $post_ID ); + } + } return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked ); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 1f9f746ea1..f535e014ca 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -204,66 +204,57 @@ function inline_edit_term_row($type) { $is_tag = $type == 'tag'; $columns = $is_tag ? get_column_headers('tag') : get_column_headers('category'); - $hidden = (array) get_user_option( "manage-$type-columns-hidden" ); + $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden" ) ) ); + $col_count = count($columns) - count($hidden); $output = ''; ?>
- "; - break; - case 'slug': ?> -
title=""> -
-
- -
-
- "; - break; - case 'posts': - if ( 'category' == $type ) { ?> -
title=""> -
-
- 0, 'name' => 'parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('None'))); ?> -
-
- -
-
- - + +?> + +

+ + -

+
+

+ $can_publish = current_user_can('publish_posts'); + $core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true ); + +?>
- " style="display: none"> -

- - +

+ + +

diff --git a/wp-admin/js/inline-edit-post.js b/wp-admin/js/inline-edit-post.js index 17e99608e1..9fd45dd985 100644 --- a/wp-admin/js/inline-edit-post.js +++ b/wp-admin/js/inline-edit-post.js @@ -29,9 +29,12 @@ inlineEditPost = { // t.rows.dblclick(function() { inlineEditPost.toggle(this); }); t.addEvents(t.rows); - $('#bulk-title-div').after( - $('#inline-edit div.categories').clone(), - $('#inline-edit div.tags').clone() + $('#bulk-title-div').parents('fieldset').after( + $('#inline-edit fieldset.inline-edit-categories').clone() + ).siblings( 'fieldset:last' ).prepend( +// ).siblings( 'fieldset:last' ).after( '
' ); +// $('fieldset.inline-edit-col-bottom').prepend( + $('#inline-edit label.inline-edit-tags').clone() ); // categories expandable? @@ -97,8 +100,7 @@ inlineEditPost = { $('tbody th.check-column input[type="checkbox"]').each(function(i){ if ( $(this).attr('checked') ) { var id = $(this).val(); - c = c == '' ? ' class="alternate"' : ''; - te += 'X'+$('#inline_'+id+' .post_title').text()+''; + te += '
X'+$('#inline_'+id+' .post_title').text()+'
'; } }); @@ -188,7 +190,7 @@ inlineEditPost = { if( typeof(id) == 'object' ) id = this.getId(id); - $('table.widefat .quick-edit-save .waiting').show(); + $('table.widefat .inline-edit-save .waiting').show(); var params = { action: 'inline-save', @@ -218,7 +220,7 @@ inlineEditPost = { .animate( { backgroundColor: '#eefee7' }, 500); inlineEditPost.addEvents(row); } else { - $('#edit-'+id+' .quick-edit-save').append(''+inlineEditL10n.error+''); + $('#edit-'+id+' .inline-edit-save').append(''+inlineEditL10n.error+''); } } ); @@ -233,7 +235,7 @@ inlineEditPost = { var id; if ( id = $('table.widefat tr.inline-editor').attr('id') ) { - $('table.widefat .quick-edit-save .waiting').hide(); + $('table.widefat .inline-edit-save .waiting').hide(); if ( 'bulk-edit' == id ) { $('table.widefat #bulk-edit').removeClass('inline-editor').hide(); diff --git a/wp-admin/js/inline-edit-tax.js b/wp-admin/js/inline-edit-tax.js index f2870f2557..a6d8cb3f8a 100644 --- a/wp-admin/js/inline-edit-tax.js +++ b/wp-admin/js/inline-edit-tax.js @@ -92,7 +92,7 @@ inlineEditTax = { if( typeof(id) == 'object' ) id = this.getId(id); - $('table.widefat .quick-edit-save .waiting').show(); + $('table.widefat .inline-edit-save .waiting').show(); var params = { action: 'inline-save-tax', @@ -117,9 +117,9 @@ inlineEditTax = { .animate( { backgroundColor: '#eefee7' }, 500); inlineEditTax.addEvents(row); } else - $('#edit-'+id+' .quick-edit-save .error').html(r).show(); + $('#edit-'+id+' .inline-edit-save .error').html(r).show(); } else - $('#edit-'+id+' .quick-edit-save .error').html(inlineEditL10n.error).show(); + $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show(); } ); return false; @@ -129,7 +129,7 @@ inlineEditTax = { var id = $('table.widefat tr.inline-editor').attr('id'); if ( id ) { - $('table.widefat .quick-edit-save .waiting').hide(); + $('table.widefat .inline-edit-save .waiting').hide(); $('#'+id).remove(); id = id.substr( id.lastIndexOf('-') + 1 ); $(this.what+id).show(); diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 0f2d53b262..29f27954f8 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -204,6 +204,19 @@ table#availablethemes td.bottom { border-bottom-right-radius: 3px; } +form p.submit .cancel { + padding-left: 0; + padding-right: 0; + border: none; + background: transparent; + text-decoration: underline; + color: red; +} + +form p.submit .cancel:hover { + text-decoration: none; +} + .submit-top { border-top: 0 none; border-bottom-style: solid; @@ -2383,7 +2396,7 @@ fieldset { } #replysubmit img.waiting, -.quick-edit-save img.waiting, +.inline-edit-save img.waiting, #commentstatusdiv img.waiting { padding: 0 10px; vertical-align: top; @@ -2556,209 +2569,248 @@ fieldset { display: none; } -/* Inline Editor */ -.inline-editor { - font-size: 11px; +/* Inline Editor + .quick-edit* is for Quick Edit + .bulk-edit* is for Bulk Edit + .inline-edit* is for everything +*/ +/* Layout */ +tr.inline-edit-row td { + padding: 0 0.5em; } -.inline-editor td { - padding: 3px; -} - -.inline-editor .save, -.inline-editor .cancel { - margin-right: 5px; -} - -.inline-editor .quick-edit-div { +#wpbody-content .inline-edit-row fieldset { + font-size: 12px; float: left; - height: 85px; - margin: 0 5px 3px 0; - width: 130px; - border-style: solid; - border-width: 1px; - padding: 2px; -} - -.inline-editor .in { - padding: 4px; - margin: 2px 0 0; - line-height: 15px; -} - -.inline-editor input { - font-size: 11px !important; - padding: 2px; - border-width: 1px; - border-style: solid; -} - -#wpbody-content .inline-editor select { + margin: 0; padding: 0; - height: auto; - width: 120px; - font-size: 11px !important; + width: 100%; } -.inline-editor div.title { - height: 18px; - line-height: 16px; - padding: 1px 5px; - cursor: default; +#wpbody-content .inline-edit-row fieldset .inline-edit-col { + padding: 0 0.5em; } -.inline-editor .post-title, -.inline-editor .page-title, -.inline-editor .tax-name, -.inline-editor .tax-slug { - width: 260px; +#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col { + border-left: 1px solid; } -#bulk-edit .post-title, -#bulk-edit .page-title { - width: 200px; - height: 179px; +#wpbody-content .quick-edit-row-post .inline-edit-col-left { + width: 40%; } -.inline-editor .post-title .ptitle, -.inline-editor .page-title .ptitle, -.inline-editor .tax-name .ptitle, -.inline-editor .tax-slug .ptitle { - width: 245px; - margin-bottom: 5px; - font-size: 12px !important; +#wpbody-content .quick-edit-row-post .inline-edit-col-right { + width: 39%; } -.inline-editor .post-title .slug, -.inline-editor .page-title .slug { - text-align: right; +#wpbody-content .inline-edit-row-post .inline-edit-col-center { + width: 20%; } -.inline-editor .slug input { - width: 170px; - margin: 0 2px 0 4px; +#wpbody-content .quick-edit-row-page .inline-edit-col-left { + width: 50%; } -.inline-editor .password input, -.inline-editor .order input { - width: 112px; +#wpbody-content .quick-edit-row-page .inline-edit-col-right, +#wpbody-content .bulk-edit-row-post .inline-edit-col-right { + width: 49%; } -.inline-editor .password label input { +#wpbody-content .bulk-edit-row .inline-edit-col-left { + width: 30%; +} + +#wpbody-content .bulk-edit-row-page .inline-edit-col-right { + width: 69%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-bottom { + float: right; + width: 69%; +} + +#wpbody-content .inline-edit-row-page .inline-edit-col-right, +#owpbody-content .bulk-edit-row-post .inline-edit-col-right { + margin-top: 27px; +} + +.inline-edit-row fieldset .inline-edit-group { + clear: both; +} + +.inline-edit-row fieldset .inline-edit-group:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.inline-edit-row p.submit { + clear: both; + padding: 0.5em; + margin: 0.5em 0 0; +} + +/* Positioning */ +.inline-edit-row h4 { + margin: .2em 0; + padding: 0; + line-height: 27px; +} +.inline-edit-row fieldset span.title, +.inline-edit-row fieldset span.checkbox-title { + margin: 0; + padding: 0; + line-height: 27px; +} + +.inline-edit-row fieldset label, +.inline-edit-row fieldset span.inline-edit-categories-label { + display: block; + margin: .2em 0; +} + +.inline-edit-row fieldset label.inline-edit-tags { + margin-top: 0; +} + +.inline-edit-row fieldset label.inline-edit-tags span.title { + margin: .2em 0; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: left; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + display: block; + margin-left: 5em; +} + +.quick-edit-row-post fieldset.inline-edit-col-right label span.title { width: auto; - margin: 3px 0 0; + padding-right: 0.5em; } -.inline-editor .date, -.inline-editor .modified { - width: 160px; +.inline-edit-row fieldset label input[type=text] { + width: 100%; } -.inline-editor .date input, -.inline-editor .modified input { - padding: 2px 1px; - margin: 1px; - width: 2em; +.inline-edit-row fieldset label input[type=checkbox] { + vertical-align: text-bottom; } -.inline-editor .date input[name="aa"], -.inline-editor .modified input[name="aa"] { +.inline-edit-row fieldset label textarea { + width: 100%; + height: 4em; +} + +#wpbody-content .bulk-edit-row fieldset .inline-edit-group label { + max-width: 50%; +} + +#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child { + margin-right: 0.5em +} + +/* Styling */ +.inline-edit-row h4 { + text-transform: uppercase; +} + +.inline-edit-row fieldset span.title, +.inline-edit-row fieldset span.checkbox-title { + font-family: Georgia, serif; + font-style: italic; +} + +/* Specific Elements */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea { + border-style: solid; + border-width: 1px; +} + +.inline-edit-row fieldset .inline-edit-date { + float: left; +} + +.inline-edit-row fieldset input[name=jj], +.inline-edit-row fieldset input[name=hh], +.inline-edit-row fieldset input[name=mn] { + font-size: 12px; + width: 2.1em; +} + +.inline-edit-row fieldset input[name=aa] { + font-size: 12px; width: 3.5em; } -#wpbody-content .inline-editor .date select, -#wpbody-content .inline-editor .modified select { - width: 6em; +.inline-edit-row fieldset label input.inline-edit-password-input { + width: 8em; } -.inline-editor .categories, -.inline-editor .column-posts { - width: 200px; -} - -.inline-editor .categories ul.cat-checklist { - list-style: none; - padding: 0 0 0 4px; - margin: 0; - height: 65px; - overflow: auto; - font-size: 11px; - z-index: 5; - position: relative; - overflow-x: hidden; -} - -.inline-editor .categories ul.cat-hover { - height: 200px; - overflow-x: auto; -} - -.inline-editor .categories ul.children { - list-style: none; - padding-left: 15px; -} - -.inline-editor .categories li { - margin-bottom: 3px; - line-height: auto; -} - -.inline-editor .categories input { - vertical-align: middle; - padding: 0; - border: 0; -} - -.inline-editor .categories .catshow, -.inline-editor .categories .cathide { - font-size: 9px; - cursor: pointer; -} - -.inline-editor .tags { - width: 200px; -} - -.inline-editor textarea { - border-width: 1px; +ul.cat-checklist { + height: 12em; border-style: solid; - height: 45px; - width: 180px; - font-size: 11px; -} - -.inline-editor .comments { - text-align: left; - width: 160px; -} - -#wpbody-content .inline-editor .comments select { - margin-bottom: 3px; - width: 150px; -} - -.inline-editor .parent, -.inline-editor .tax-parent { - width: 180px; -} - -#wpbody-content .inline-editor .parent select, -#wpbody-content .inline-editor .tax-parent select { - width: 170px; -} - -.inline-editor .quick-edit-save { - padding: 8px 10px; + border-width: 1px; + overflow-y: scroll; + padding: 0 5px; + margin: 0 0 5px; } #bulk-titles { - height: 150px; - overflow: auto; - cursor: default; + display: block; + height: 12em; + border-style: solid; + border-width: 1px; + overflow-y: scroll; + padding: 0 5px; + margin: 0 0 5px; } +.inline-edit-row fieldset ul.cat-checklist li, +.inline-edit-row fieldset ul.cat-checklist input { + margin: 0; +} + +.inline-edit-row fieldset ul.cat-checklist label, +.inline-edit-row .catshow, +.inline-edit-row .cathide, +.inline-edit-row #bulk-titles div { + font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + font-style: normal; + font-size: 11px; +} + +table .inline-edit-row fieldset ul.cat-hover { + height: auto; + max-height: 30em; + overflow-y: auto; + position: absolute; +} + +.inline-edit-row fieldset label input.inline-edit-menu-order-input { + width: 3em; +} + +.inline-edit-row fieldset label input.inline-edit-slug-input { + width: 75%; +} + +.quick-edit-row-post fieldset label.inline-edit-status { + float: left; +} + +#bulk-titles { + line-height: 140%; +} #bulk-titles div { - padding: 1px 2px; + margin: 0.2em 0.3em; } #bulk-titles div a { @@ -3058,3 +3110,4 @@ br.clear { vertical-align: middle; } + diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index f3b8e2b505..0e383d457d 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -263,12 +263,12 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' ); - $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081107' ); + $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081110' ); $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( 'error' => __('Error while saving the changes.') ) ); - $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081107' ); + $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081110' ); $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( 'error' => __('Error while saving the changes.') ) ); @@ -328,7 +328,7 @@ function wp_default_styles( &$styles ) { $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie', 'plugin-install', 'farbtastic' ); - $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081109' ); + $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081110' ); $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); $styles->add( 'ie', '/wp-admin/css/ie.css' ); @@ -341,7 +341,7 @@ function wp_default_styles( &$styles ) { $styles->add( 'global', '/wp-admin/css/global.css', array(), '20081106' ); $styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' ); $styles->add( 'widgets', '/wp-admin/css/widgets.css' ); - $styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081105' ); + $styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081110' ); $styles->add( 'install', '/wp-admin/css/install.css', array(), '20080708' ); $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); $styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080922' );
- $style = ''; - if ( in_array($column_name, $hidden) ) - $style = ' style="display:none;"'; +
+

- $attributes = "$class$style"; - switch($column_name) { - case 'cb': - break; + +
+
+
- case 'date': - if ( ! $bulk ) { ?> -
title=""> -
-
- -
-
- - case 'title': - $attributes = "class=\"$type-title column-title quick-edit-div\"" . $style; ?> - -
id="bulk-title-div" title=""> -
-
-
-
-
- -
> -
-
-
-
-
-
-
- + -
-
-
- - - - -
-
+ - -
-
-
- -
-
-
-
-
- -
-
+ - -
-
-
- -
-
- + + + - break; + +
+ +
+
- case 'categories': ?> - -
title=""> -
- -
-
    - -
-
- - -
title=""> -
-
- -
-
- id ); // TODO: ROLE SYSTEM + if ( $authors && count( $authors ) > 1 ) : + $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); + if ( $bulk ) + $users_opt['show_option_none'] = __('- No Change -'); +?> + - case 'comments': - ?> -
title=""> -
-
- - - - -
- - -
-
- - case 'author': - $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM - if ( $authors && count( $authors ) > 1 ) { ?> -
title=""> -
-
- $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); - if ( $bulk ) $users_opt['show_option_none'] = __('- No Change -'); - wp_dropdown_users( $users_opt ); ?> -
-
- + - -
-
-
- - -
-
- + - default: - if ( $bulk ) - do_action('bulk_edit_custom_box', $column_name, $type); - else - do_action('quick_edit_custom_box', $column_name, $type); + +
- break; - } - } ?> + -
-
- - +
+ + + +
+ + + + +
    + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ +
+ + $column_display_name ) { + if ( isset( $core_columns[$column_name] ) ) + continue; + do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $type); + } +?> +

+ + - +
+