+ $can_publish = current_user_can('publish_posts'); ?>
+
+
ID . '">
-
-
-
-
-
-
-
-
-
-
-
- ';
+
+
' . $title . '
+
' . $post->post_name . '
+
' . $post->post_author . '
+
+
' . $post->ping_status . '
+
' . $post->post_status . '
+
' . mysql2date( 'd', $post->post_date ) . '
+
' . mysql2date( 'm', $post->post_date ) . '
+
' . mysql2date( 'Y', $post->post_date ) . '
+
' . mysql2date( 'H', $post->post_date ) . '
+
' . mysql2date( 'i', $post->post_date ) . '
+
' . wp_specialchars($post->post_password, 1) . '
';
if( $post->post_type == 'page' )
echo '
-
-
- ';
+
' . $post->post_parent . '
+
' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . '
+ ';
if( $post->post_type == 'post' )
echo '
-
-
-
';
+
' . wp_specialchars( str_replace( ',', ', ', get_tags_to_edit($post->ID) ), 1) . '
+
' . implode( ',', wp_get_post_categories( $post->ID ) ) . '
+
' . (is_sticky($post->ID) ? 'sticky' : '') . '
';
echo '
';
}
@@ -1035,7 +1079,6 @@ function _post_row($a_post, $pending_comments, $mode) {
break;
case 'comments':
- $attributes = 'class="comments column-comments num"' . $style;
?>
>
$column_display_name) {
break;
case 'comments':
- $attributes = 'class="comments column-comments num"' . $style;
?>
>
0 ) {
+ t.revert();
+ }
+ });
+
+ $('#post-query-submit').click(function(e){
+ if ( $('form#posts-filter tr.inline-editor').length > 0 )
+ t.revert();
+ });
+
},
toggle : function(el) {
var t = this;
- $('#'+t.type+'-'+t.getId(el)).css('display') == 'none' ? t.revert(el) : t.edit(el);
+ $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
},
addEvents : function(r) {
@@ -38,48 +78,66 @@ inlineEdit = {
});
},
- edit : function(id) {
- var t = this, type = t.type, old = $('tr.inline-editor').attr('id');
+ setBulk : function() {
+ var te = '', c = '';
+ this.revert();
- if( typeof(id) == 'object' )
+ $('table.widefat tbody').prepend( $('#bulk-edit') );
+ $('#bulk-edit').addClass('inline-editor').show();
+
+ $('tbody th.check-column input[type="checkbox"]').each(function(i){
+ if ( $(this).attr('checked') ) {
+ var id = $(this).val();
+ c = c == '' ? ' class="alternate"' : '';
+ te += '
'+$('#inline_'+id+' .post_title').text()+'
';
+ }
+ });
+
+ $('#bulk-titles').html(te);
+
+ // enable autocomplete for tags
+ if ( this.type == 'post' )
+ $('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
+ },
+
+ edit : function(id) {
+ var t = this;
+ t.revert();
+
+ if ( typeof(id) == 'object' )
id = t.getId(id);
- if ( old ) {
- old = old.split('-')[1];
- t.revert(old);
- }
-
var fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'post_password'];
- if ( type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
- if ( type == 'post' ) fields.push('tags_input');
+ if ( t.type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
+ if ( t.type == 'post' ) fields.push('tags_input');
// add the new blank row
var editRow = $('#inline-edit').clone(true);
- if ( $('#'+type+'-'+id).hasClass('alternate') )
+ if ( $(t.what+id).hasClass('alternate') )
$(editRow).addClass('alternate');
- $('#'+type+'-'+id).hide().after(editRow);
+ $(t.what+id).hide().after(editRow);
// populate the data
var rowData = $('#inline_'+id);
for ( var f = 0; f < fields.length; f++ ) {
- $(':input[name="'+fields[f]+'"]', editRow).val( $('.'+fields[f], rowData).val() );
+ $(':input[name="'+fields[f]+'"]', editRow).val( $('.'+fields[f], rowData).text() );
}
- if ( $('.comment_status', rowData).val() == 'open' )
+ if ( $('.comment_status', rowData).text() == 'open' )
$('input[name="comment_status"]', editRow).attr("checked", "checked");
- if ( $('.ping_status', rowData).val() == 'open' )
+ if ( $('.ping_status', rowData).text() == 'open' )
$('input[name="ping_status"]', editRow).attr("checked", "checked");
- if ( $('.sticky', rowData).val() == 'sticky' )
+ if ( $('.sticky', rowData).text() == 'sticky' )
$('input[name="sticky"]', editRow).attr("checked", "checked");
// categories
var cats;
- if ( cats = $('.post_category', rowData).val() )
- $('ul.cat-checklist :checkbox').val(cats.split(','));
+ if ( cats = $('.post_category', rowData).text() )
+ $('ul.cat-checklist :checkbox', editRow).val(cats.split(','));
// handle the post status
- var status = $('._status', rowData).val();
+ var status = $('._status', rowData).text();
if ( status != 'future' ) $('select[name="_status"] option[value="future"]', editRow).remove();
if ( status == 'private' ) $('input[name="keep_private"]', editRow).attr("checked", "checked");
@@ -99,24 +157,11 @@ inlineEdit = {
pageOpt.remove();
}
- // categories expandable?
- $('span.catshow', editRow).click(function() {
- $('ul.cat-checklist', editRow).addClass("cat-hover");
- $('span.cathide', editRow).show();
- $(this).hide();
- });
-
- $('span.cathide', editRow).click(function() {
- $('ul.cat-checklist', editRow).removeClass("cat-hover");
- $('span.catshow', editRow).show();
- $(this).hide();
- });
-
$(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
$('.ptitle', editRow).focus();
// enable autocomplete for tags
- if ( type == 'post' )
+ if ( t.type == 'post' )
$('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
return false;
@@ -140,25 +185,36 @@ inlineEdit = {
// make ajax request
$.post('admin-ajax.php', params,
- function(html) {
- var row = $('#'+inlineEdit.type+'-'+id);
- $('#edit-'+id).hide();
- html = $(html).html();
- row.html(html).show();
- row.animate( { backgroundColor: '#FFFBCC' }, 200)
- .animate( { backgroundColor: row.css('background-color') }, 500);
+ function(r) {
+ var row = $(inlineEdit.what+id);
+ $('#edit-'+id).remove();
+ row.html($(r).html()).show()
+ .animate( { backgroundColor: '#CCEEBB' }, 500)
+ .animate( { backgroundColor: '#eefee7' }, 500);
inlineEdit.addEvents(row);
}
);
return false;
},
- revert : function(id) {
- if ( typeof(id) == 'object' )
- id = this.getId(id);
+ saveBulk : function() {
+ $('form#posts-filter').submit();
+ },
- $('#edit-'+id).remove();
- $('#'+this.type+'-'+id).show();
+ revert : function() {
+ var id;
+
+ if ( id = $('table.widefat tr.inline-editor').attr('id') ) {
+ if ( 'bulk-edit' == id ) {
+ $('table.widefat #bulk-edit').removeClass('inline-editor').hide();
+ $('#bulk-titles').html('');
+ $('#inlineedit').append( $('#bulk-edit') );
+ } else {
+ $('#'+id).remove();
+ id = id.substr( id.lastIndexOf('-') + 1 );
+ $(this.what+id).show();
+ }
+ }
return false;
},
diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php
index a2eaf4eebc..7c5fe9c80b 100644
--- a/wp-admin/link-manager.php
+++ b/wp-admin/link-manager.php
@@ -120,7 +120,7 @@ if ( isset($_GET['deleted']) ) {
-
+
\n";
diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php
index 5ac1f7fc69..210b3b26d9 100644
--- a/wp-admin/plugins.php
+++ b/wp-admin/plugins.php
@@ -331,7 +331,7 @@ function print_plugins_table($plugins, $context = '') {
-
+
@@ -356,7 +356,7 @@ function print_plugins_table($plugins, $context = '') {
-
+
diff --git a/wp-admin/upload.php b/wp-admin/upload.php
index 1d05cdb491..6f10c6704a 100644
--- a/wp-admin/upload.php
+++ b/wp-admin/upload.php
@@ -271,7 +271,7 @@ if ( $page_links )
-
+
-
+
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css
index 5222d3e03f..b56f7927ac 100644
--- a/wp-admin/wp-admin.css
+++ b/wp-admin/wp-admin.css
@@ -2203,7 +2203,9 @@ a.togbox {
}
.inline-editor div.title {
- padding: 2px 5px;
+ height: 18px;
+ line-height: 16px;
+ padding: 1px 5px;
cursor: default;
}
@@ -2212,6 +2214,12 @@ a.togbox {
width: 260px;
}
+#bulk-edit .post-title,
+#bulk-edit .page-title {
+ width: 200px;
+ height: 179px;
+}
+
.inline-editor .post-title .ptitle,
.inline-editor .page-title .ptitle {
width: 245px;
@@ -2258,7 +2266,7 @@ a.togbox {
}
.inline-editor .categories {
- width: 180px;
+ width: 200px;
}
.inline-editor .categories ul.cat-checklist {
@@ -2275,7 +2283,7 @@ a.togbox {
.inline-editor .categories ul.cat-hover {
height: 200px;
- overflow: auto;
+ overflow-x: auto;
}
.inline-editor .categories ul.children {
@@ -2301,14 +2309,14 @@ a.togbox {
}
.inline-editor .tags {
- width: 220px;
+ width: 200px;
}
.inline-editor textarea {
border-width: 1px;
border-style: solid;
height: 45px;
- width: 200px;
+ width: 180px;
font-size: 11px;
}
@@ -2317,10 +2325,33 @@ a.togbox {
width: 160px;
}
+#wpbody-content .inline-editor .comments select {
+ margin-bottom: 3px;
+ width: 150px;
+}
+
+.inline-editor .parent {
+ width: 180px;
+}
+
+#wpbody-content .inline-editor .parent select {
+ width: 170px;
+}
+
.inline-editor .quick-edit-save {
padding: 8px 10px;
}
+#bulk-titles {
+ height: 150px;
+ overflow: auto;
+ cursor: default;
+}
+
+#bulk-titles div {
+ padding: 1px 2px;
+}
+
/* Media library */
#wpbody-content .media-item-info tr {
background-color: transparent;