Several list table JS fixes. restores XHR comment status changes. props garyc40. see #16262
git-svn-id: http://svn.automattic.com/wordpress/trunk@17326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0fff0819e0
commit
fb6bed81c7
|
@ -211,10 +211,10 @@ setCommentsList = function() {
|
|||
|
||||
theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
|
||||
|
||||
refillTheExtraList();
|
||||
// refillTheExtraList();
|
||||
};
|
||||
|
||||
var refillTheExtraList = function(ev) {
|
||||
/* var refillTheExtraList = function(ev) {
|
||||
var args = $.query.get(), total_pages = listTable.get_total_pages(), per_page = $('input[name=_per_page]', '#comments-form').val();
|
||||
|
||||
if (args.paged > total_pages) {
|
||||
|
@ -236,7 +236,7 @@ setCommentsList = function() {
|
|||
listTable.fetch_list(args, function(response) {
|
||||
theExtraList.get(0).wpList.add( response.rows );
|
||||
});
|
||||
};
|
||||
}; */
|
||||
|
||||
theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
|
||||
theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )
|
||||
|
@ -246,7 +246,7 @@ setCommentsList = function() {
|
|||
if ( s.target.className.indexOf(':trash=1') != -1 || s.target.className.indexOf(':spam=1') != -1 )
|
||||
$('#undo-' + id).fadeIn(300, function(){ $(this).show() });
|
||||
});
|
||||
$(listTable).bind('changePage', refillTheExtraList);
|
||||
// $(listTable).bind('changePage', refillTheExtraList);
|
||||
};
|
||||
|
||||
commentReply = {
|
||||
|
@ -278,9 +278,9 @@ commentReply = {
|
|||
|
||||
this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
|
||||
|
||||
$(listTable).bind('beforeChangePage', function(){
|
||||
/* $(listTable).bind('beforeChangePage', function(){
|
||||
commentReply.close();
|
||||
});
|
||||
}); */
|
||||
},
|
||||
|
||||
addEvents : function(r) {
|
||||
|
@ -462,7 +462,7 @@ commentReply = {
|
|||
.animate( { 'backgroundColor':'#CCEEBB' }, 600 )
|
||||
.animate( { 'backgroundColor': bg }, 600 );
|
||||
|
||||
$.fn.wpList.process($(id));
|
||||
// $.fn.wpList.process($(id));
|
||||
},
|
||||
|
||||
error : function(r) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@ var ThemeViewer;
|
|||
$( '#filter-click' ).text( text + ' (' + count + ')' );
|
||||
});
|
||||
|
||||
$('#filter-box :submit').unbind( 'click' ).click(function() {
|
||||
/* $('#filter-box :submit').unbind( 'click' ).click(function() {
|
||||
var features = [];
|
||||
$('#filter-box :checked').each(function() {
|
||||
features.push($(this).val());
|
||||
|
@ -37,7 +37,7 @@ var ThemeViewer;
|
|||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
// These are the functions we expose
|
||||
|
|
|
@ -1 +1 @@
|
|||
var ThemeViewer;(function(a){ThemeViewer=function(b){function d(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){a("#filter-click").toggleClass("current");a("#filter-box").slideToggle();a("#current-theme").slideToggle(300);return false});a("#filter-box :checkbox").unbind("click").click(function(){var e=a("#filter-box :checked").length,f=a("#filter-click").text();if(f.indexOf("(")!=-1){f=f.substr(0,f.indexOf("("))}if(e==0){a("#filter-click").text(f)}else{a("#filter-click").text(f+" ("+e+")")}});a("#filter-box :submit").unbind("click").click(function(){var e=[];a("#filter-box :checked").each(function(){e.push(a(this).val())});listTable.update_rows({features:e},true,function(){a("#filter-click").toggleClass("current");a("#filter-box").slideToggle();a("#current-theme").slideToggle(300)});return false})}var c={init:d};return c}})(jQuery);jQuery(document).ready(function(a){theme_viewer=new ThemeViewer();theme_viewer.init()});
|
||||
var ThemeViewer;(function(a){ThemeViewer=function(b){function d(){a("#filter-click, #mini-filter-click").unbind("click").click(function(){a("#filter-click").toggleClass("current");a("#filter-box").slideToggle();a("#current-theme").slideToggle(300);return false});a("#filter-box :checkbox").unbind("click").click(function(){var e=a("#filter-box :checked").length,f=a("#filter-click").text();if(f.indexOf("(")!=-1){f=f.substr(0,f.indexOf("("))}if(e==0){a("#filter-click").text(f)}else{a("#filter-click").text(f+" ("+e+")")}})}var c={init:d};return c}})(jQuery);jQuery(document).ready(function(a){theme_viewer=new ThemeViewer();theme_viewer.init()});
|
|
@ -299,7 +299,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' );
|
||||
$scripts->add_data( 'admin-custom-fields', 'group', 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101223' );
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20110118' );
|
||||
$scripts->add_data( 'admin-comments', 'group', 1 );
|
||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
|
@ -368,7 +368,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};'
|
||||
));
|
||||
|
||||
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox', 'list-table' ), '20101123' );
|
||||
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox' ), '20110118' );
|
||||
$scripts->add_data( 'theme', 'group', 1 );
|
||||
|
||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
|
||||
|
|
Loading…
Reference in New Issue