<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15530] trunk: Rename admin-table.js to list-table.js</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15530">15530</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-08-25 01:59:13 +0000 (Wed, 25 Aug 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename admin-table.js to list-table.js</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludeslisttablephp">trunk/wp-admin/includes/list-table.php</a></li>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
<li><a href="#trunkwpadminjseditcommentsjs">trunk/wp-admin/js/edit-comments.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminjslisttabledevjs">trunk/wp-admin/js/list-table.dev.js</a></li>
<li><a href="#trunkwpadminjslisttablejs">trunk/wp-admin/js/list-table.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminjsadmintabledevjs">trunk/wp-admin/js/admin-table.dev.js</a></li>
<li><a href="#trunkwpadminjsadmintablejs">trunk/wp-admin/js/admin-table.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/list-table.php (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table.php        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-admin/includes/list-table.php        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">                 $this->_args = $args;
</span><span class="cx">
</span><span class="cx">                 if ( $args['ajax'] ) {
</span><del>-                        wp_enqueue_script( 'admin-table' );
</del><ins>+                        wp_enqueue_script( 'list-table' );
</ins><span class="cx">                         add_action( 'admin_footer', array( $this, '_js_vars' ) );
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminjsadmintabledevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/admin-table.dev.js (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/admin-table.dev.js        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-admin/js/admin-table.dev.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -1,261 +0,0 @@
</span><del>-jQuery(document).ready(function($) {
-
-window.adminTable = {
-
-        init: function() {
-                this.loading = false;
-
-                $('form').each(function() {
-                        this.reset();
-                });
-
-                if ( '' == $.query.GET('paged') )
-                        $.query.SET('paged', 1);
-                this.set_total_pages();
-
-                this.$tbody = $('#the-list, #the-comment-list');
-
-                this.$overlay = $('<div id="loading-items>')
-                        .html(adminTableL10n.loading)
-                        .hide()
-                        .prependTo($('body'));
-        },
-
-        // paging
-        set_total_pages: function() {
-                this.total_pages = parseInt($('.total-pages').eq(0).text());
-        },
-
-        get_total_pages: function() {
-                return this.total_pages;
-        },
-
-        change_page: function(paged) {
-                if ( paged < 1 || paged >this.total_pages )
-                        return false;
-
-                this.update_rows({'paged': paged});
-        },
-
-        // searching
-        change_search: function(s) {
-                this.update_rows({'s': s}, true, function() {
-                        $('h2 .subtitle').remove();
-
-                        if ( s )
-                                $('h2').eq(0).append($('<span class="subtitle">').html(adminTableL10n.search.replace('%s', this.htmlencode(s))));
-                });
-        },
-
-        htmlencode: function(value) {
-                return $('<div/>').text(value).html();
-        },
-
-        update_rows: function(args, reset_paging, callback) {
-                if ( this.loading )
-                        return false;
-
-                var different = false;
-
-                $.each(args, function(key, val) {
-                        if ( val != $.query.GET(key) ) {
-                                $.query.SET(key, val);
-                                different = true;
-                        }
-                });
-
-                if ( !different )
-                        return false;
-
-                this.show_overlay();
-
-                if ( reset_paging )
-                        $.query.SET('paged', 1);
-
-                var data = $.query.get();
-
-                this._callback = callback;
-
-                this.fetch_list(
-                        data,
-                        $.proxy(this, 'handle_success'),
-                        $.proxy(this, 'handle_error')
-                );
-
-                return true;
-        },
-
-        fetch_list: function(data, success_callback, error_callback) {
-                data = $.extend(data, {
-                        'action': 'fetch-list',
-                        'list_args': list_args,
-                });
-
-                $.ajax({
-                        url: ajaxurl,
-                        global: false,
-                        dataType: 'json',
-                        data: data,
-                        success: success_callback,
-                        error: error_callback,
-                });
-        },
-
-        handle_success: function(response) {
-                if ( 'object' != typeof response ) {
-                        this.handle_error();
-                } else {
-                        this.hide_overlay();
-
-                        this.$tbody.html(response.rows);
-
-                        $('.displaying-num').html(response.total_items);
-
-                        $('.total-pages').html(response.total_pages);
-                        this.set_total_pages();
-
-                        $('.current-page').val($.query.GET('paged'));
-
-                        if ( this._callback )
-                                this._callback();
-                }
-        },
-
-        handle_error: function() {
-                this.hide_overlay();
-
-                $('h2').after('<div class="error ajax below-h2"><p>' + adminTableL10n.error + '</p></div>');
-        },
-
-        show_overlay: function() {
-                this.loading = true;
-
-                $('.error.ajax').remove();
-
-                this.$overlay
-                        .css({
-                                width: this.$tbody.width() + 'px',
-                                height: this.$tbody.height() - 20 + 'px'
-                        })
-                        .css(this.$tbody.offset())
-                        .show();
-        },
-
-        hide_overlay: function() {
-                this.loading = false;
-                this.$overlay.hide();
-        }
-}
-
-adminTable.init();
-
-// Ajaxify various UI elements
-
-        // pagination
-        $('.tablenav-pages a').click(function() {
-                var paged = $.query.GET('paged');
-
-                switch ( $(this).attr('class') ) {
-                        case 'first-page':
-                                paged = 1;
-                                break;
-                        case 'prev-page':
-                                paged -= 1;
-                                break;
-                        case 'next-page':
-                                paged += 1;
-                                break;
-                        case 'last-page':
-                                paged = adminTable.get_total_pages();
-                                break;
-                }
-
-                adminTable.change_page(paged);
-
-                return false;
-        });
-
-        $('.current-page').keypress(function(e) {
-                if ( 13 != e.keyCode )
-                        return;
-
-                adminTable.change_page(parseInt($(this).val()));
-
-                return false;
-        });
-
-        // sortable columns
-        $('th a').click(function() {
-                var orderby = $.query.GET('orderby'),
-                        order = $.query.GET('order'),
-                        $th = $(this).parent('th');
-
-                if ( $th.hasClass('sortable') ) {
-                        orderby = $.query.load($(this).attr('href')).get('orderby');
-                        order = 'asc';
-
-                        $('th.sorted-desc, th.sorted-asc')
-                                .removeClass('sorted-asc')
-                                .removeClass('sorted-desc')
-                                .addClass('sortable');
-
-                        $th.removeClass('sortable').addClass('sorted-asc');
-                }
-                else if ( $th.hasClass('sorted-asc') ) {
-                        order = 'desc';
-                        $th.removeClass('sorted-asc').addClass('sorted-desc');
-                }
-                else if ( $th.hasClass('sorted-desc') ) {
-                        order = 'asc';
-                        $th.removeClass('sorted-desc').addClass('sorted-asc');
-                }
-
-                adminTable.update_rows({'orderby': orderby, 'order': order}, true);
-
-                return false;
-        });
-
-        // searchbox
-        $('.search-box :submit').click(function() {
-                adminTable.change_search($(this).parent('.search-box').find(':text').val());
-
-                return false;
-        });
-
-        $('.search-box :text').keypress(function(e) {
-                if ( 13 != e.keyCode )
-                        return;
-
-                adminTable.change_search($(this).val());
-
-                return false;
-        });
-
-        // tablenav dropdowns
-        $('#post-query-submit').click(function() {
-                var key, val, args = {};
-
-                $(this).parents('.actions').find('select[name!="action"]').each(function() {
-                        var $el = $(this);
-
-                        args[$el.attr('name')] = $el.val();
-                });
-
-                adminTable.update_rows(args, true);
-
-                return false;
-        });
-
-        // view switch
-        $('.view-switch a').click(function() {
-                var $this = $(this);
-
-                adminTable.update_rows({'mode': $.query.load($this.attr('href')).get('mode')}, false, function() {
-                        $('.view-switch .current').removeClass('current');
-                        $this.addClass('current');
-                });
-
-                return false;
-        });
-});
-
</del></span></pre></div>
<a id="trunkwpadminjsadmintablejs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/admin-table.js (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/admin-table.js        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-admin/js/admin-table.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-jQuery(document).ready(function(a){window.adminTable={init:function(){this.loading=false;a("form").each(function(){this.reset()});if(""==a.query.GET("paged")){a.query.SET("paged",1)}this.set_total_pages();this.$tbody=a("#the-list, #the-comment-list");this.$overlay=a('<div id="loading-items>').html(adminTableL10n.loading).hide().prependTo(a("body"))},set_total_pages:function(){this.total_pages=parseInt(a(".total-pages").eq(0).text())},get_total_pages:function(){return this.total_pages},change_page:function(b){if(b<1||b>this.total_pages){return false}this.update_rows({paged:b})},change_search:function(b){this.update_rows({s:b},true,function(){a("h2 .subtitle").remove();if(b){a("h2").eq(0).append(a('<span class="subtitle">').html(adminTableL10n.search.replace("%s",this.htmlencode(b))))}})},htmlencode:function(b){return a("<div/>").text(b).html()},update_rows:function(c,b,f){if(this.loading){return false}var e=false;a.each(c,function(g,h){if(h!=a.query.GET(g)){a.query.SET(g,h);e=true}});if(!e){return false}this.show_overlay();if(b){a.query.SET("paged",1)}var d=a.query.get();this._callback=f;this.fetch_list(d,a.proxy(this,"handle_success"),a.proxy(this,"handle_error"));return true},fetch_list:function(c,d,b){c=a.extend(c,{action:"fetch-list",list_args:list_args,});a.ajax({url:ajaxurl,global:false,dataType:"json",data:c,success:d,error:b,})},handle_success:function(b){if("object"!=typeof b){this.handle_error()}else{this.hide_overlay();this.$tbody.html(b.rows);a(".displaying-num").html(b.total_items);a(".total-pages").html(b.total_pages);this.set_total_pages();a(".current-page").val(a.query.GET("paged"));if(this._callback){this._callback()}}},handle_error:function(){this.hide_overlay();a("h2").after('<div class="error ajax below-h2"><p>'+adminTableL10n.error+"</p></div>")},show_overlay:function(){this.loading=true;a(".error.ajax").remove();this.$overlay.css({width:this.$tbody.width()+"px",height:this.$tbody.height()-20+"px"}).css(this.$tbody.offset()).show()},hide_overlay:function(){this.loading=false;this.$overlay.hide()}};adminTable.init();a(".tablenav-pages a").click(function(){var b=a.query.GET("paged");switch(a(this).attr("class")){case"first-page":b=1;break;case"prev-page":b-=1;break;case"next-page":b+=1;break;case"last-page":b=adminTable.get_total_pages();break}adminTable.change_page(b);return false});a(".current-page").keypress(function(b){if(13!=b.keyCode){return}adminTable.change_page(parseInt(a(this).val()));return false});a("th a").click(function(){var d=a.query.GET("orderby"),b=a.query.GET("order"),c=a(this).parent("th");if(c.hasClass("sortable")){d=a.query.load(a(this).attr("href")).get("orderby");b="asc";a("th.sorted-desc, th.sorted-asc").removeClass("sorted-asc").removeClass("sorted-desc").addClass("sortable");c.removeClass("sortable").addClass("sorted-asc")}else{if(c.hasClass("sorted-asc")){b="desc";c.removeClass("sorted-asc").addClass("sorted-desc")}else{if(c.hasClass("sorted-desc")){b="asc";c.removeClass("sorted-desc").addClass("sorted-asc")}}}adminTable.update_rows({orderby:d,order:b},true);return false});a(".search-box :submit").click(function(){adminTable.change_search(a(this).parent(".search-box").find(":text").val());return false});a(".search-box :text").keypress(function(b){if(13!=b.keyCode){return}adminTable.change_search(a(this).val());return false});a("#post-query-submit").click(function(){var c,d,b={};a(this).parents(".actions").find('select[name!="action"]').each(function(){var e=a(this);b[e.attr("name")]=e.val()});adminTable.update_rows(b,true);return false});a(".view-switch a").click(function(){var b=a(this);adminTable.update_rows({mode:a.query.load(b.attr("href")).get("mode")},false,function(){a(".view-switch .current").removeClass("current");b.addClass("current")});return false})});
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-admin/js/edit-comments.dev.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx">                 var args = $.query.get();
</span><span class="cx">                 args.number = 1;
</span><span class="cx">                 args.paged++;
</span><del>-                adminTable.fetch_list(args, function(response) {
</del><ins>+                listTable.fetch_list(args, function(response) {
</ins><span class="cx">                         theExtraList.get(0).wpList.add( response.rows );
</span><span class="cx">                 });
</span><span class="cx">         };
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.js (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.js        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-admin/js/edit-comments.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var theList,theExtraList,toggleWithKeyboard=false;(function(a){setCommentsList=function(){var c,e,h,l=0,g,i,d,k;c=a('.tablenav input[name="_total"]',"#comments-form");e=a('.tablenav input[name="_per_page"]',"#comments-form");h=a('.tablenav input[name="_page"]',"#comments-form");g=function(n,m){var o=a("#"+m.element);if(o.is(".unapproved")){o.find("div.comment_status").html("0")}else{o.find("div.comment_status").html("1")}a("span.pending-count").each(function(){var p=a(this),r,q;r=p.html().replace(/[^0-9]+/g,"");r=parseInt(r,10);if(isNaN(r)){return}q=a("#"+m.element).is("."+m.dimClass)?1:-1;r=r+q;if(r<0){r=0}p.closest("#awaiting-mod")[0==r?"addClass":"removeClass"]("count-0");f(p,r);j()})};i=function(q,u){var w=a(q.target).attr("className"),m,o,p,t,v,s,r=false;q.data._total=c.val()||0;q.data._per_page=e.val()||0;q.data._page=h.val()||0;q.data._url=document.location.href;if(w.indexOf(":trash=1")!=-1){r="trash"}else{if(w.indexOf(":spam=1")!=-1){r="spam"}}if(r){m=w.replace(/.*?comment-([0-9]+).*/,"$1");o=a("#comment-"+m);note=a("#"+r+"-undo-holder").html();o.find(".check-column :checkbox").attr("checked","");if(o.siblings("#replyrow").length&&commentReply.cid==m){commentReply.close()}if(o.is("tr")){p=o.children(":visible").length;s=a(".author strong",o).text();t=a('<tr id="undo-'+m+'" class="undo un'+r+'" style="display:none;"><td colspan="'+p+'">'+note+"</td></tr>")}else{s=a(".comment-author",o).text();t=a('<div id="undo-'+m+'" style="display:none;" class="undo un'+r+'">'+note+"</div>")}o.before(t);a("strong","#undo-"+m).text(s+" ");v=a(".undo a","#undo-"+m);v.attr("href","comment.php?action=un"+r+"comment&c="+m+"&_wpnonce="+q.data._ajax_nonce);v.attr("className","delete:the-comment-list:comment-"+m+"::un"+r+"=1 vim-z vim-destructive");a(".avatar",o).clone().prependTo("#undo-"+m+" ."+r+"-undo-inside");v.click(function(){u.wpList.del(this);a("#undo-"+m).css({backgroundColor:"#ceb"}).fadeOut(350,function(){a(this).remove();a("#comment-"+m).css("backgroundColor","").fadeIn(300,function(){a(this).show()})});return false})}return q};d=function(m,n,o){if(n<l){return}if(o){l=n}c.val(m.toString());a("span.total-type-count").each(function(){f(a(this),m)})};function j(s){var r=a("#dashboard_right_now"),o,q,p,m;s=s||0;if(isNaN(s)||!r.length){return}o=a("span.total-count",r);q=a("span.approved-count",r);p=b(o);p=p+s;m=p-b(a("span.pending-count",r))-b(a("span.spam-count",r));f(o,p);f(q,m)}function b(m){var o=parseInt(m.html().replace(/[^0-9]+/g,""),10);if(isNaN(o)){return 0}return o}function f(o,p){var m="";if(isNaN(p)){return}p=p<1?"0":p.toString();if(p.length>3){while(p.length>3){m=thousandsSeparator+p.substr(p.length-3)+m;p=p.substr(0,p.length-3)}p=p+m}o.html(p)}k=function(m,o){var u,p,q,w=a(o.target).parent().is("span.untrash"),n=a(o.target).parent().is("span.unspam"),v,t;function x(r){if(a(o.target).parent().is("span."+r)){return 1}else{if(a("#"+o.element).is("."+r)){return -1}}return 0}v=x("spam");t=x("trash");if(w){t=-1}if(n){v=-1}a("span.pending-count").each(function(){var r=a(this),z=b(r),y=a("#"+o.element).is(".unapproved");if(a(o.target).parent().is("span.unapprove")||((w||n)&&y)){z=z+1}else{if(y){z=z-1}}if(z<0){z=0}r.closest("#awaiting-mod")[0==z?"addClass":"removeClass"]("count-0");f(r,z);j()});a("span.spam-count").each(function(){var r=a(this),y=b(r)+v;f(r,y)});a("span.trash-count").each(function(){var r=a(this),y=b(r)+t;f(r,y)});if(a("#dashboard_right_now").length){q=t?-1*t:0;j(q)}else{u=c.val()?parseInt(c.val(),10):0;u=u-v-t;if(u<0){u=0}if(("object"==typeof m)&&l<o.parsed.responses[0].supplemental.time){p=o.parsed.responses[0].supplemental.pageLinks||"";if(a.trim(p)){a(".tablenav-pages").find(".page-numbers").remove().end().append(a(p))}else{a(".tablenav-pages").find(".page-numbers").remove()}d(u,o.parsed.responses[0].supplemental.time,true)}else{d(u,m,false)}}if(theExtraList.size()==0||theExtraList.children().size()==0||w){return}theList.get(0).wpList.add(theExtraList.children(":eq(0)").remove().clone());var s=a.query.get();s.number=1;s.paged++;adminTable.fetch_list(s,function(r){theExtraList.get(0).wpList.add(r.rows)})};theExtraList=a("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"});theList=a("#the-comment-list").wpList({alt:"",delBefore:i,dimAfter:g,delAfter:k,addColor:"none"}).bind("wpListDelEnd",function(n,m){var o=m.element.replace(/[^0-9]+/g,"");if(m.target.className.indexOf(":trash=1")!=-1||m.target.className.indexOf(":spam=1")!=-1){a("#undo-"+o).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:"",act:"",init:function(){var b=a("#replyrow");a("a.cancel",b).click(function(){return commentReply.revert()});a("a.save",b).click(function(){return commentReply.send()});a("input#author, input#author-email, input#author-url",b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a("#the-comment-list .column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())});a("#doaction, #doaction2, #post-query-submit").click(function(c){if(a("#the-comment-list #replyrow").length>0){commentReply.close()}});this.comments_listing=a('#comments-form > input[name="comment_status"]').val()||""},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css("display")!="none"){a(b).find("a.vim-q").click()}},revert:function(){if(a("#the-comment-list #replyrow").length<1){return false}a("#replyrow").fadeOut("fast",function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a("#comment-"+this.cid);if(this.act=="edit-comment"){b.fadeIn(300,function(){b.show()}).css("backgroundColor","")}a("#replyrow").hide();a("#com-reply").append(a("#replyrow"));a("#replycontent").val("");a("input","#edithead").val("");a(".error","#replysubmit").html("").hide();a(".waiting","#replysubmit").hide();if(a.browser.msie){a("#replycontainer, #replycontent").css("height","120px")}else{a("#replycontainer").resizable("destroy").css("height","120px")}this.cid=""}},open:function(b,d,k){var l=this,e,f,i,g,j=a("#comment-"+b);l.close();l.cid=b;a("td","#replyrow").attr("colspan",a("table.widefat thead th:visible").length);e=a("#replyrow");f=a("#inline-"+b);i=l.act=(k=="edit")?"edit-comment":"replyto-comment";a("#action",e).val(i);a("#comment_post_ID",e).val(d);a("#comment_ID",e).val(b);if(k=="edit"){a("#author",e).val(a("div.author",f).text());a("#author-email",e).val(a("div.author-email",f).text());a("#author-url",e).val(a("div.author-url",f).text());a("#status",e).val(a("div.comment_status",f).text());a("#replycontent",e).val(a("textarea.comment",f).val());a("#edithead, #savebtn",e).show();a("#replyhead, #replybtn",e).hide();g=j.height();if(g>220){if(a.browser.msie){a("#replycontainer, #replycontent",e).height(g-105)}else{a("#replycontainer",e).height(g-105)}}j.after(e).fadeOut("fast",function(){a("#replyrow").fadeIn(300,function(){a(this).show()})})}else{a("#edithead, #savebtn",e).hide();a("#replyhead, #replybtn",e).show();j.after(e);a("#replyrow").fadeIn(300,function(){a(this).show()})}if(!a.browser.msie){a("#replycontainer").resizable({handles:"s",axis:"y",minHeight:80,stop:function(){a("#replycontainer").width("auto")}})}setTimeout(function(){var n,h,o,c,m;n=a("#replyrow").offset().top;h=n+a("#replyrow").height();o=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;m=o+c;if(m-20<h){window.scroll(0,h-c+35)}else{if(n-20<o){window.scroll(0,n-35)}}a("#replycontent").focus().keyup(function(p){if(p.which==27){commentReply.revert()}})},600);return false},send:function(){var b={};a("#replysubmit .waiting").show();a("#replyrow input").each(function(){b[a(this).attr("name")]=a(this).val()});b.content=a("#replycontent").val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;a.ajax({type:"POST",url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(b){var e,g,f,d;if(typeof(b)=="string"){this.error({responseText:b});return false}e=wpAjax.parseAjaxResponse(b);if(e.errors){this.error({responseText:wpAjax.broken});return false}e=e.responses[0];g=e.data;f="#comment-"+e.id;if("edit-comment"==this.act){a(f).remove()}a(g).hide();a("#replyrow").after(g);this.revert();this.addEvents(a(f));d=a(f).hasClass("unapproved")?"#ffffe0":"#fff";a(f).animate({backgroundColor:"#CCEEBB"},600).animate({backgroundColor:d},600);a.fn.wpList.process(a(f))},error:function(b){var c=b.statusText;a("#replysubmit .waiting").hide();if(b.responseText){c=b.responseText.replace(/<.[^<>]*?>/g,"")}if(c){a("#replysubmit .error").html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a("span.delete a.delete").click(function(){return false});if(typeof QTags!="undefined"){ed_reply=new QTags("ed_reply","replycontent","replycontainer","more")}if(typeof a.table_hotkeys!="undefined"){e=function(f){return function(){var h,g;h="next"==f?"first":"last";g=a("."+f+".page-numbers");if(g.length){window.location=g[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+h+"=1"}}};b=function(g,f){window.location=a("span.edit a",f).attr("href")};c=function(){toggleWithKeyboard=true;a("input:checkbox","#cb").click().attr("checked","");toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name="action"]');a("option[value="+f+"]",g).attr("selected","selected");a("#comments-form").submit()}};a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q","z",["e",b],["shift+x",c],["shift+a",d("approve")],["shift+s",d("markspam")],["shift+d",d("delete")],["shift+t",d("trash")],["shift+z",d("untrash")],["shift+u",d("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e("prev"),next_page_link_cb:e("next")})}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var theList,theExtraList,toggleWithKeyboard=false;(function(a){setCommentsList=function(){var c,e,h,l=0,g,i,d,k;c=a('.tablenav input[name="_total"]',"#comments-form");e=a('.tablenav input[name="_per_page"]',"#comments-form");h=a('.tablenav input[name="_page"]',"#comments-form");g=function(n,m){var o=a("#"+m.element);if(o.is(".unapproved")){o.find("div.comment_status").html("0")}else{o.find("div.comment_status").html("1")}a("span.pending-count").each(function(){var p=a(this),r,q;r=p.html().replace(/[^0-9]+/g,"");r=parseInt(r,10);if(isNaN(r)){return}q=a("#"+m.element).is("."+m.dimClass)?1:-1;r=r+q;if(r<0){r=0}p.closest("#awaiting-mod")[0==r?"addClass":"removeClass"]("count-0");f(p,r);j()})};i=function(q,u){var w=a(q.target).attr("className"),m,o,p,t,v,s,r=false;q.data._total=c.val()||0;q.data._per_page=e.val()||0;q.data._page=h.val()||0;q.data._url=document.location.href;if(w.indexOf(":trash=1")!=-1){r="trash"}else{if(w.indexOf(":spam=1")!=-1){r="spam"}}if(r){m=w.replace(/.*?comment-([0-9]+).*/,"$1");o=a("#comment-"+m);note=a("#"+r+"-undo-holder").html();o.find(".check-column :checkbox").attr("checked","");if(o.siblings("#replyrow").length&&commentReply.cid==m){commentReply.close()}if(o.is("tr")){p=o.children(":visible").length;s=a(".author strong",o).text();t=a('<tr id="undo-'+m+'" class="undo un'+r+'" style="display:none;"><td colspan="'+p+'">'+note+"</td></tr>")}else{s=a(".comment-author",o).text();t=a('<div id="undo-'+m+'" style="display:none;" class="undo un'+r+'">'+note+"</div>")}o.before(t);a("strong","#undo-"+m).text(s+" ");v=a(".undo a","#undo-"+m);v.attr("href","comment.php?action=un"+r+"comment&c="+m+"&_wpnonce="+q.data._ajax_nonce);v.attr("className","delete:the-comment-list:comment-"+m+"::un"+r+"=1 vim-z vim-destructive");a(".avatar",o).clone().prependTo("#undo-"+m+" ."+r+"-undo-inside");v.click(function(){u.wpList.del(this);a("#undo-"+m).css({backgroundColor:"#ceb"}).fadeOut(350,function(){a(this).remove();a("#comment-"+m).css("backgroundColor","").fadeIn(300,function(){a(this).show()})});return false})}return q};d=function(m,n,o){if(n<l){return}if(o){l=n}c.val(m.toString());a("span.total-type-count").each(function(){f(a(this),m)})};function j(s){var r=a("#dashboard_right_now"),o,q,p,m;s=s||0;if(isNaN(s)||!r.length){return}o=a("span.total-count",r);q=a("span.approved-count",r);p=b(o);p=p+s;m=p-b(a("span.pending-count",r))-b(a("span.spam-count",r));f(o,p);f(q,m)}function b(m){var o=parseInt(m.html().replace(/[^0-9]+/g,""),10);if(isNaN(o)){return 0}return o}function f(o,p){var m="";if(isNaN(p)){return}p=p<1?"0":p.toString();if(p.length>3){while(p.length>3){m=thousandsSeparator+p.substr(p.length-3)+m;p=p.substr(0,p.length-3)}p=p+m}o.html(p)}k=function(m,o){var u,p,q,w=a(o.target).parent().is("span.untrash"),n=a(o.target).parent().is("span.unspam"),v,t;function x(r){if(a(o.target).parent().is("span."+r)){return 1}else{if(a("#"+o.element).is("."+r)){return -1}}return 0}v=x("spam");t=x("trash");if(w){t=-1}if(n){v=-1}a("span.pending-count").each(function(){var r=a(this),z=b(r),y=a("#"+o.element).is(".unapproved");if(a(o.target).parent().is("span.unapprove")||((w||n)&&y)){z=z+1}else{if(y){z=z-1}}if(z<0){z=0}r.closest("#awaiting-mod")[0==z?"addClass":"removeClass"]("count-0");f(r,z);j()});a("span.spam-count").each(function(){var r=a(this),y=b(r)+v;f(r,y)});a("span.trash-count").each(function(){var r=a(this),y=b(r)+t;f(r,y)});if(a("#dashboard_right_now").length){q=t?-1*t:0;j(q)}else{u=c.val()?parseInt(c.val(),10):0;u=u-v-t;if(u<0){u=0}if(("object"==typeof m)&&l<o.parsed.responses[0].supplemental.time){p=o.parsed.responses[0].supplemental.pageLinks||"";if(a.trim(p)){a(".tablenav-pages").find(".page-numbers").remove().end().append(a(p))}else{a(".tablenav-pages").find(".page-numbers").remove()}d(u,o.parsed.responses[0].supplemental.time,true)}else{d(u,m,false)}}if(theExtraList.size()==0||theExtraList.children().size()==0||w){return}theList.get(0).wpList.add(theExtraList.children(":eq(0)").remove().clone());var s=a.query.get();s.number=1;s.paged++;listTable.fetch_list(s,function(r){theExtraList.get(0).wpList.add(r.rows)})};theExtraList=a("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"});theList=a("#the-comment-list").wpList({alt:"",delBefore:i,dimAfter:g,delAfter:k,addColor:"none"}).bind("wpListDelEnd",function(n,m){var o=m.element.replace(/[^0-9]+/g,"");if(m.target.className.indexOf(":trash=1")!=-1||m.target.className.indexOf(":spam=1")!=-1){a("#undo-"+o).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:"",act:"",init:function(){var b=a("#replyrow");a("a.cancel",b).click(function(){return commentReply.revert()});a("a.save",b).click(function(){return commentReply.send()});a("input#author, input#author-email, input#author-url",b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a("#the-comment-list .column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())});a("#doaction, #doaction2, #post-query-submit").click(function(c){if(a("#the-comment-list #replyrow").length>0){commentReply.close()}});this.comments_listing=a('#comments-form > input[name="comment_status"]').val()||""},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css("display")!="none"){a(b).find("a.vim-q").click()}},revert:function(){if(a("#the-comment-list #replyrow").length<1){return false}a("#replyrow").fadeOut("fast",function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a("#comment-"+this.cid);if(this.act=="edit-comment"){b.fadeIn(300,function(){b.show()}).css("backgroundColor","")}a("#replyrow").hide();a("#com-reply").append(a("#replyrow"));a("#replycontent").val("");a("input","#edithead").val("");a(".error","#replysubmit").html("").hide();a(".waiting","#replysubmit").hide();if(a.browser.msie){a("#replycontainer, #replycontent").css("height","120px")}else{a("#replycontainer").resizable("destroy").css("height","120px")}this.cid=""}},open:function(b,d,k){var l=this,e,f,i,g,j=a("#comment-"+b);l.close();l.cid=b;a("td","#replyrow").attr("colspan",a("table.widefat thead th:visible").length);e=a("#replyrow");f=a("#inline-"+b);i=l.act=(k=="edit")?"edit-comment":"replyto-comment";a("#action",e).val(i);a("#comment_post_ID",e).val(d);a("#comment_ID",e).val(b);if(k=="edit"){a("#author",e).val(a("div.author",f).text());a("#author-email",e).val(a("div.author-email",f).text());a("#author-url",e).val(a("div.author-url",f).text());a("#status",e).val(a("div.comment_status",f).text());a("#replycontent",e).val(a("textarea.comment",f).val());a("#edithead, #savebtn",e).show();a("#replyhead, #replybtn",e).hide();g=j.height();if(g>220){if(a.browser.msie){a("#replycontainer, #replycontent",e).height(g-105)}else{a("#replycontainer",e).height(g-105)}}j.after(e).fadeOut("fast",function(){a("#replyrow").fadeIn(300,function(){a(this).show()})})}else{a("#edithead, #savebtn",e).hide();a("#replyhead, #replybtn",e).show();j.after(e);a("#replyrow").fadeIn(300,function(){a(this).show()})}if(!a.browser.msie){a("#replycontainer").resizable({handles:"s",axis:"y",minHeight:80,stop:function(){a("#replycontainer").width("auto")}})}setTimeout(function(){var n,h,o,c,m;n=a("#replyrow").offset().top;h=n+a("#replyrow").height();o=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;m=o+c;if(m-20<h){window.scroll(0,h-c+35)}else{if(n-20<o){window.scroll(0,n-35)}}a("#replycontent").focus().keyup(function(p){if(p.which==27){commentReply.revert()}})},600);return false},send:function(){var b={};a("#replysubmit .waiting").show();a("#replyrow input").each(function(){b[a(this).attr("name")]=a(this).val()});b.content=a("#replycontent").val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;a.ajax({type:"POST",url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(b){var e,g,f,d;if(typeof(b)=="string"){this.error({responseText:b});return false}e=wpAjax.parseAjaxResponse(b);if(e.errors){this.error({responseText:wpAjax.broken});return false}e=e.responses[0];g=e.data;f="#comment-"+e.id;if("edit-comment"==this.act){a(f).remove()}a(g).hide();a("#replyrow").after(g);this.revert();this.addEvents(a(f));d=a(f).hasClass("unapproved")?"#ffffe0":"#fff";a(f).animate({backgroundColor:"#CCEEBB"},600).animate({backgroundColor:d},600);a.fn.wpList.process(a(f))},error:function(b){var c=b.statusText;a("#replysubmit .waiting").hide();if(b.responseText){c=b.responseText.replace(/<.[^<>]*?>/g,"")}if(c){a("#replysubmit .error").html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a("span.delete a.delete").click(function(){return false});if(typeof QTags!="undefined"){ed_reply=new QTags("ed_reply","replycontent","replycontainer","more")}if(typeof a.table_hotkeys!="undefined"){e=function(f){return function(){var h,g;h="next"==f?"first":"last";g=a("."+f+".page-numbers");if(g.length){window.location=g[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+h+"=1"}}};b=function(g,f){window.location=a("span.edit a",f).attr("href")};c=function(){toggleWithKeyboard=true;a("input:checkbox","#cb").click().attr("checked","");toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name="action"]');a("option[value="+f+"]",g).attr("selected","selected");a("#comments-form").submit()}};a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q","z",["e",b],["shift+x",c],["shift+a",d("approve")],["shift+s",d("markspam")],["shift+d",d("delete")],["shift+t",d("trash")],["shift+z",d("untrash")],["shift+u",d("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e("prev"),next_page_link_cb:e("next")})}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjslisttabledevjsfromrev15526trunkwpadminjsadmintabledevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/js/list-table.dev.js (from rev 15526, trunk/wp-admin/js/admin-table.dev.js) (0 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/list-table.dev.js         (rev 0)
+++ trunk/wp-admin/js/list-table.dev.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -0,0 +1,261 @@
</span><ins>+jQuery(document).ready(function($) {
+
+window.listTable = {
+
+        init: function() {
+                this.loading = false;
+
+                $('form').each(function() {
+                        this.reset();
+                });
+
+                if ( '' == $.query.GET('paged') )
+                        $.query.SET('paged', 1);
+                this.set_total_pages();
+
+                this.$tbody = $('#the-list, #the-comment-list');
+
+                this.$overlay = $('<div id="loading-items>')
+                        .html(listTableL10n.loading)
+                        .hide()
+                        .prependTo($('body'));
+        },
+
+        // paging
+        set_total_pages: function() {
+                this.total_pages = parseInt($('.total-pages').eq(0).text());
+        },
+
+        get_total_pages: function() {
+                return this.total_pages;
+        },
+
+        change_page: function(paged) {
+                if ( paged < 1 || paged >this.total_pages )
+                        return false;
+
+                this.update_rows({'paged': paged});
+        },
+
+        // searching
+        change_search: function(s) {
+                this.update_rows({'s': s}, true, function() {
+                        $('h2 .subtitle').remove();
+
+                        if ( s )
+                                $('h2').eq(0).append($('<span class="subtitle">').html(listTableL10n.search.replace('%s', this.htmlencode(s))));
+                });
+        },
+
+        htmlencode: function(value) {
+                return $('<div/>').text(value).html();
+        },
+
+        update_rows: function(args, reset_paging, callback) {
+                if ( this.loading )
+                        return false;
+
+                var different = false;
+
+                $.each(args, function(key, val) {
+                        if ( val != $.query.GET(key) ) {
+                                $.query.SET(key, val);
+                                different = true;
+                        }
+                });
+
+                if ( !different )
+                        return false;
+
+                this.show_overlay();
+
+                if ( reset_paging )
+                        $.query.SET('paged', 1);
+
+                var data = $.query.get();
+
+                this._callback = callback;
+
+                this.fetch_list(
+                        data,
+                        $.proxy(this, 'handle_success'),
+                        $.proxy(this, 'handle_error')
+                );
+
+                return true;
+        },
+
+        fetch_list: function(data, success_callback, error_callback) {
+                data = $.extend(data, {
+                        'action': 'fetch-list',
+                        'list_args': list_args,
+                });
+
+                $.ajax({
+                        url: ajaxurl,
+                        global: false,
+                        dataType: 'json',
+                        data: data,
+                        success: success_callback,
+                        error: error_callback,
+                });
+        },
+
+        handle_success: function(response) {
+                if ( 'object' != typeof response ) {
+                        this.handle_error();
+                } else {
+                        this.hide_overlay();
+
+                        this.$tbody.html(response.rows);
+
+                        $('.displaying-num').html(response.total_items);
+
+                        $('.total-pages').html(response.total_pages);
+                        this.set_total_pages();
+
+                        $('.current-page').val($.query.GET('paged'));
+
+                        if ( this._callback )
+                                this._callback();
+                }
+        },
+
+        handle_error: function() {
+                this.hide_overlay();
+
+                $('h2').after('<div class="error ajax below-h2"><p>' + listTableL10n.error + '</p></div>');
+        },
+
+        show_overlay: function() {
+                this.loading = true;
+
+                $('.error.ajax').remove();
+
+                this.$overlay
+                        .css({
+                                width: this.$tbody.width() + 'px',
+                                height: this.$tbody.height() - 20 + 'px'
+                        })
+                        .css(this.$tbody.offset())
+                        .show();
+        },
+
+        hide_overlay: function() {
+                this.loading = false;
+                this.$overlay.hide();
+        }
+}
+
+listTable.init();
+
+// Ajaxify various UI elements
+
+        // pagination
+        $('.tablenav-pages a').click(function() {
+                var paged = $.query.GET('paged');
+
+                switch ( $(this).attr('class') ) {
+                        case 'first-page':
+                                paged = 1;
+                                break;
+                        case 'prev-page':
+                                paged -= 1;
+                                break;
+                        case 'next-page':
+                                paged += 1;
+                                break;
+                        case 'last-page':
+                                paged = listTable.get_total_pages();
+                                break;
+                }
+
+                listTable.change_page(paged);
+
+                return false;
+        });
+
+        $('.current-page').keypress(function(e) {
+                if ( 13 != e.keyCode )
+                        return;
+
+                listTable.change_page(parseInt($(this).val()));
+
+                return false;
+        });
+
+        // sortable columns
+        $('th a').click(function() {
+                var orderby = $.query.GET('orderby'),
+                        order = $.query.GET('order'),
+                        $th = $(this).parent('th');
+
+                if ( $th.hasClass('sortable') ) {
+                        orderby = $.query.load($(this).attr('href')).get('orderby');
+                        order = 'asc';
+
+                        $('th.sorted-desc, th.sorted-asc')
+                                .removeClass('sorted-asc')
+                                .removeClass('sorted-desc')
+                                .addClass('sortable');
+
+                        $th.removeClass('sortable').addClass('sorted-asc');
+                }
+                else if ( $th.hasClass('sorted-asc') ) {
+                        order = 'desc';
+                        $th.removeClass('sorted-asc').addClass('sorted-desc');
+                }
+                else if ( $th.hasClass('sorted-desc') ) {
+                        order = 'asc';
+                        $th.removeClass('sorted-desc').addClass('sorted-asc');
+                }
+
+                listTable.update_rows({'orderby': orderby, 'order': order}, true);
+
+                return false;
+        });
+
+        // searchbox
+        $('.search-box :submit').click(function() {
+                listTable.change_search($(this).parent('.search-box').find(':text').val());
+
+                return false;
+        });
+
+        $('.search-box :text').keypress(function(e) {
+                if ( 13 != e.keyCode )
+                        return;
+
+                listTable.change_search($(this).val());
+
+                return false;
+        });
+
+        // tablenav dropdowns
+        $('#post-query-submit').click(function() {
+                var key, val, args = {};
+
+                $(this).parents('.actions').find('select[name!="action"]').each(function() {
+                        var $el = $(this);
+
+                        args[$el.attr('name')] = $el.val();
+                });
+
+                listTable.update_rows(args, true);
+
+                return false;
+        });
+
+        // view switch
+        $('.view-switch a').click(function() {
+                var $this = $(this);
+
+                listTable.update_rows({'mode': $.query.load($this.attr('href')).get('mode')}, false, function() {
+                        $('.view-switch .current').removeClass('current');
+                        $this.addClass('current');
+                });
+
+                return false;
+        });
+});
+
</ins></span></pre></div>
<a id="trunkwpadminjslisttablejsfromrev15526trunkwpadminjsadmintablejs"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/js/list-table.js (from rev 15526, trunk/wp-admin/js/admin-table.js) (0 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/list-table.js         (rev 0)
+++ trunk/wp-admin/js/list-table.js        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+jQuery(document).ready(function(a){window.listTable={init:function(){this.loading=false;a("form").each(function(){this.reset()});if(""==a.query.GET("paged")){a.query.SET("paged",1)}this.set_total_pages();this.$tbody=a("#the-list, #the-comment-list");this.$overlay=a('<div id="loading-items>').html(listTableL10n.loading).hide().prependTo(a("body"))},set_total_pages:function(){this.total_pages=parseInt(a(".total-pages").eq(0).text())},get_total_pages:function(){return this.total_pages},change_page:function(b){if(b<1||b>this.total_pages){return false}this.update_rows({paged:b})},change_search:function(b){this.update_rows({s:b},true,function(){a("h2 .subtitle").remove();if(b){a("h2").eq(0).append(a('<span class="subtitle">').html(listTableL10n.search.replace("%s",this.htmlencode(b))))}})},htmlencode:function(b){return a("<div/>").text(b).html()},update_rows:function(c,b,f){if(this.loading){return false}var e=false;a.each(c,function(g,h){if(h!=a.query.GET(g)){a.query.SET(g,h);e=true}});if(!e){return false}this.show_overlay();if(b){a.query.SET("paged",1)}var d=a.query.get();this._callback=f;this.fetch_list(d,a.proxy(this,"handle_success"),a.proxy(this,"handle_error"));return true},fetch_list:function(c,d,b){c=a.extend(c,{action:"fetch-list",list_args:list_args,});a.ajax({url:ajaxurl,global:false,dataType:"json",data:c,success:d,error:b,})},handle_success:function(b){if("object"!=typeof b){this.handle_error()}else{this.hide_overlay();this.$tbody.html(b.rows);a(".displaying-num").html(b.total_items);a(".total-pages").html(b.total_pages);this.set_total_pages();a(".current-page").val(a.query.GET("paged"));if(this._callback){this._callback()}}},handle_error:function(){this.hide_overlay();a("h2").after('<div class="error ajax below-h2"><p>'+listTableL10n.error+"</p></div>")},show_overlay:function(){this.loading=true;a(".error.ajax").remove();this.$overlay.css({width:this.$tbody.width()+"px",height:this.$tbody.height()-20+"px"}).css(this.$tbody.offset()).show()},hide_overlay:function(){this.loading=false;this.$overlay.hide()}};listTable.init();a(".tablenav-pages a").click(function(){var b=a.query.GET("paged");switch(a(this).attr("class")){case"first-page":b=1;break;case"prev-page":b-=1;break;case"next-page":b+=1;break;case"last-page":b=listTable.get_total_pages();break}listTable.change_page(b);return false});a(".current-page").keypress(function(b){if(13!=b.keyCode){return}listTable.change_page(parseInt(a(this).val()));return false});a("th a").click(function(){var d=a.query.GET("orderby"),b=a.query.GET("order"),c=a(this).parent("th");if(c.hasClass("sortable")){d=a.query.load(a(this).attr("href")).get("orderby");b="asc";a("th.sorted-desc, th.sorted-asc").removeClass("sorted-asc").removeClass("sorted-desc").addClass("sortable");c.removeClass("sortable").addClass("sorted-asc")}else{if(c.hasClass("sorted-asc")){b="desc";c.removeClass("sorted-asc").addClass("sorted-desc")}else{if(c.hasClass("sorted-desc")){b="asc";c.removeClass("sorted-desc").addClass("sorted-asc")}}}listTable.update_rows({orderby:d,order:b},true);return false});a(".search-box :submit").click(function(){listTable.change_search(a(this).parent(".search-box").find(":text").val());return false});a(".search-box :text").keypress(function(b){if(13!=b.keyCode){return}listTable.change_search(a(this).val());return false});a("#post-query-submit").click(function(){var c,d,b={};a(this).parents(".actions").find('select[name!="action"]').each(function(){var e=a(this);b[e.attr("name")]=e.val()});listTable.update_rows(b,true);return false});a(".view-switch a").click(function(){var b=a(this);listTable.update_rows({mode:a.query.load(b.attr("href")).get("mode")},false,function(){a(".view-switch .current").removeClass("current");b.addClass("current")});return false})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (15529 => 15530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-08-25 01:58:55 UTC (rev 15529)
+++ trunk/wp-includes/script-loader.php        2010-08-25 01:59:13 UTC (rev 15530)
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">                 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery'), '20100301' );
</span><span class="cx">                 $scripts->add_data( 'user-profile', 'group', 1 );
</span><span class="cx">
</span><del>-                $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'admin-table', 'jquery-ui-resizable', 'quicktags'), '20100818' );
</del><ins>+                $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20100818' );
</ins><span class="cx">                 $scripts->add_data( 'admin-comments', 'group', 1 );
</span><span class="cx">                 $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
</span><span class="cx">                         'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
</span><span class="lines">@@ -338,9 +338,9 @@
</span><span class="cx">                 $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
</span><span class="cx">                 $scripts->add_data( 'theme-preview', 'group', 1 );
</span><span class="cx">
</span><del>-                $scripts->add( 'admin-table', "/wp-admin/js/admin-table$suffix.js", array( 'jquery', 'jquery-query' ), '20100818' );
-                $scripts->add_data( 'admin-table', 'group', 1 );
-                $scripts->localize( 'admin-table', 'adminTableL10n', array(
</del><ins>+                $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery', 'jquery-query' ), '20100818' );
+                $scripts->add_data( 'list-table', 'group', 1 );
+                $scripts->localize( 'list-table', 'listTableL10n', array(
</ins><span class="cx">                         'loading' => __('Loading...'),
</span><span class="cx">                         'error' => __('An error has occured while loading the items.'),
</span><span class="cx">                         'search' => __('Search results for &#8220;%s&#8221;')
</span></span></pre>
</div>
</div>
</body>
</html>