<!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>[15939] trunk/wp-admin/js: Clean list-table.js:
  when declaring JS object a comma after the last property is invalid,
  remove unused vars.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15939">15939</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2010-10-23 20:52:49 +0000 (Sat, 23 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean list-table.js: when declaring JS object a comma after the last property is invalid, remove unused vars. See <a href="http://trac.wordpress.org/ticket/14579">#14579</a></pre>

<h3>Modified 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>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjslisttabledevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/list-table.dev.js (15938 => 15939)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/list-table.dev.js        2010-10-23 19:49:25 UTC (rev 15938)
+++ trunk/wp-admin/js/list-table.dev.js        2010-10-23 20:52:49 UTC (rev 15939)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                 if ( this.loading )
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><del>-                var different = false;
</del><ins>+                var different = false, data;
</ins><span class="cx"> 
</span><span class="cx">                 $.each(args, function(key, val) {
</span><span class="cx">                         if ( val != $.query.GET(key) ) {
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">                 if ( reset_paging )
</span><span class="cx">                         $.query.SET('paged', 1);
</span><span class="cx"> 
</span><del>-                var data = $.query.get();
</del><ins>+                data = $.query.get();
</ins><span class="cx"> 
</span><span class="cx">                 this._callback = callback;
</span><span class="cx"> 
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">         fetch_list: function(data, success_callback, error_callback) {
</span><span class="cx">                 data = $.extend(data, {
</span><span class="cx">                         'action': 'fetch-list',
</span><del>-                        'list_args': list_args,
</del><ins>+                        'list_args': list_args
</ins><span class="cx">                 });
</span><span class="cx"> 
</span><span class="cx">                 $.ajax({
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">                         dataType: 'json',
</span><span class="cx">                         data: data,
</span><span class="cx">                         success: success_callback,
</span><del>-                        error: error_callback,
</del><ins>+                        error: error_callback
</ins><span class="cx">                 });
</span><span class="cx">         },
</span><span class="cx"> 
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> 
</span><span class="cx">         // tablenav dropdowns
</span><span class="cx">         $('#post-query-submit').click(function() {
</span><del>-                var key, val, args = {};
</del><ins>+                var args = {};
</ins><span class="cx"> 
</span><span class="cx">                 $(this).parents('.actions').find('select[name!=&quot;action&quot;]').each(function() {
</span><span class="cx">                         var $el = $(this);
</span></span></pre></div>
<a id="trunkwpadminjslisttablejs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/list-table.js (15938 => 15939)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/list-table.js        2010-10-23 19:49:25 UTC (rev 15938)
+++ trunk/wp-admin/js/list-table.js        2010-10-23 20:52:49 UTC (rev 15939)
</span><span class="lines">@@ -1 +1 @@
</span><del>-jQuery(document).ready(function(a){window.listTable={init:function(){this.loading=false;a(&quot;form&quot;).each(function(){this.reset()});if(&quot;&quot;==a.query.GET(&quot;paged&quot;)){a.query.SET(&quot;paged&quot;,1)}this.set_total_pages();this.$tbody=a(&quot;#the-list, #the-comment-list&quot;);this.$overlay=a('&lt;div id=&quot;loading-items&gt;').html(listTableL10n.loading).hide().prependTo(a(&quot;body&quot;))},set_total_pages:function(){this.total_pages=parseInt(a(&quot;.total-pages&quot;).eq(0).text())},get_total_pages:function(){return this.total_pages},change_page:function(b){if(b&lt;1||b&gt;this.total_pages){return false}this.update_rows({paged:b})},change_search:function(b){this.update_rows({s:b},true,function(){a(&quot;h2 .subtitle&quot;).remove();if(b){a(&quot;h2&quot;).eq(0).append(a('&lt;span class=&quot;subtitle&quot;&gt;').html(listTableL10n.search.replace(&quot;%s&quot;,this.htmlencode(b))))}})},htmlencode:function(b){return a(&quot;&lt;div/&gt;&quot;).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(&quot;paged&quot;,1)}var d=a.query.get();this._callback=f;this.fetch_list(d,a.proxy(this,&quot;handle_success&quot;),a.proxy(this,&quot;handle_error&quot;));return true},fetch_list:function(c,d,b){c=a.extend(c,{action:&quot;fetch-list&quot;,list_args:list_args,});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:c,success:d,error:b,})},handle_success:function(b){if(&quot;object&quot;!=typeof b){this.handle_error()}else{this.hide_overlay();this.$tbody.html(b.rows);a(&quot;.displaying-num&quot;).html(b.total_items);a(&quot;.total-pages&quot;).html(b.total_pages);this.set_total_pages();a(&quot;.current-page&quot;).val(a.query.GET(&quot;paged&quot;));if(this._callback){this._callback()}}},handle_error:function(){this.hide_overlay();a(&quot;h2&quot;).after('&lt;div class=&quot;error ajax below-h2&quot;&gt;&lt;p&gt;'+listTableL10n.error+&quot;&lt;/p&gt;&lt;/div&gt;&quot;)},show_overlay:function(){this.loading=true;a(&quot;.error.ajax&quot;).remove();this.$overlay.css({width:this.$tbody.width()+&quot;px&quot;,height:this.$tbody.height()-20+&quot;px&quot;}).css(this.$tbody.offset()).show()},hide_overlay:function(){this.loading=false;this.$overlay.hide()}};listTable.init();a(&quot;.tablenav-pages a&quot;).click(function(){var b=a.query.GET(&quot;paged&quot;);switch(a(this).attr(&quot;class&quot;)){case&quot;first-page&quot;:b=1;break;case&quot;prev-page&quot;:b-=1;break;case&quot;next-page&quot;:b+=1;break;case&quot;last-page&quot;:b=listTable.get_total_pages();break}listTable.change_page(b);return false});a(&quot;.current-page&quot;).keypress(function(b){if(13!=b.keyCode){return}listTable.change_page(parseInt(a(this).val()));return false});a(&quot;th a&quot;).click(function(){var d=a.query.GET(&quot;orderby&quot;),b=a.query.GET(&quot;order&quot;),c=a(this).parent(&quot;th&quot;);if(c.hasClass(&quot;sortable&quot;)){d=a.query.load(a(this).attr(&quot;href&quot;)).get(&quot;orderby&quot;);b=&quot;asc&quot;;a(&quot;th.sorted-desc, th.sorted-asc&quot;).removeClass(&quot;sorted-asc&quot;).removeClass(&quot;sorted-desc&quot;).addClass(&quot;sortable&quot;);c.removeClass(&quot;sortable&quot;).addClass(&quot;sorted-asc&quot;)}else{if(c.hasClass(&quot;sorted-asc&quot;)){b=&quot;desc&quot;;c.removeClass(&quot;sorted-asc&quot;).addClass(&quot;sorted-desc&quot;)}else{if(c.hasClass(&quot;sorted-desc&quot;)){b=&quot;asc&quot;;c.removeClass(&quot;sorted-desc&quot;).addClass(&quot;sorted-asc&quot;)}}}listTable.update_rows({orderby:d,order:b},true);return false});a(&quot;.search-box :submit&quot;).click(function(){listTable.change_search(a(this).parent(&quot;.search-box&quot;).find(&quot;:text&quot;).val());return false});a(&quot;.search-box :text&quot;).keypress(function(b){if(13!=b.keyCode){return}listTable.change_search(a(this).val());return false});a(&quot;#post-query-submit&quot;).click(function(){var c,d,b={};a(this).parents(&quot;.actions&quot;).find('select[name!=&quot;action&quot;]').each(function(){var e=a(this);b[e.attr(&quot;name&quot;)]=e.val()});listTable.update_rows(b,true);return false});a(&quot;.view-switch a&quot;).click(function(){var b=a(this);listTable.update_rows({mode:a.query.load(b.attr(&quot;href&quot;)).get(&quot;mode&quot;)},false,function(){a(&quot;.view-switch .current&quot;).removeClass(&quot;current&quot;);b.addClass(&quot;current&quot;)});return false})});
</del><span class="cx">\ No newline at end of file
</span><ins>+jQuery(document).ready(function(a){window.listTable={init:function(){this.loading=false;a(&quot;form&quot;).each(function(){this.reset()});if(&quot;&quot;==a.query.GET(&quot;paged&quot;)){a.query.SET(&quot;paged&quot;,1)}this.set_total_pages();this.$tbody=a(&quot;#the-list, #the-comment-list&quot;);this.$overlay=a('&lt;div id=&quot;loading-items&gt;').html(listTableL10n.loading).hide().prependTo(a(&quot;body&quot;))},set_total_pages:function(){this.total_pages=parseInt(a(&quot;.total-pages&quot;).eq(0).text())},get_total_pages:function(){return this.total_pages},change_page:function(b){if(b&lt;1||b&gt;this.total_pages){return false}this.update_rows({paged:b})},change_search:function(b){this.update_rows({s:b},true,function(){a(&quot;h2 .subtitle&quot;).remove();if(b){a(&quot;h2&quot;).eq(0).append(a('&lt;span class=&quot;subtitle&quot;&gt;').html(listTableL10n.search.replace(&quot;%s&quot;,this.htmlencode(b))))}})},htmlencode:function(b){return a(&quot;&lt;div/&gt;&quot;).text(b).html()},update_rows:function(c,b,f){if(this.loading){return false}var e=false,d;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(&quot;paged&quot;,1)}d=a.query.get();this._callback=f;this.fetch_list(d,a.proxy(this,&quot;handle_success&quot;),a.proxy(this,&quot;handle_error&quot;));return true},fetch_list:function(c,d,b){c=a.extend(c,{action:&quot;fetch-list&quot;,list_args:list_args});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:c,success:d,error:b})},handle_success:function(b){if(&quot;object&quot;!=typeof b){this.handle_error()}else{this.hide_overlay();this.$tbody.html(b.rows);a(&quot;.displaying-num&quot;).html(b.total_items);a(&quot;.total-pages&quot;).html(b.total_pages);this.set_total_pages();a(&quot;.current-page&quot;).val(a.query.GET(&quot;paged&quot;));if(this._callback){this._callback()}}},handle_error:function(){this.hide_overlay();a(&quot;h2&quot;).after('&lt;div class=&quot;error ajax below-h2&quot;&gt;&lt;p&gt;'+listTableL10n.error+&quot;&lt;/p&gt;&lt;/div&gt;&quot;)},show_overlay:function(){this.loading=true;a(&quot;.error.ajax&quot;).remove();this.$overlay.css({width:this.$tbody.width()+&quot;px&quot;,height:this.$tbody.height()-20+&quot;px&quot;}).css(this.$tbody.offset()).show()},hide_overlay:function(){this.loading=false;this.$overlay.hide()}};listTable.init();a(&quot;.tablenav-pages a&quot;).click(function(){var b=a.query.GET(&quot;paged&quot;);switch(a(this).attr(&quot;class&quot;)){case&quot;first-page&quot;:b=1;break;case&quot;prev-page&quot;:b-=1;break;case&quot;next-page&quot;:b+=1;break;case&quot;last-page&quot;:b=listTable.get_total_pages();break}listTable.change_page(b);return false});a(&quot;.current-page&quot;).keypress(function(b){if(13!=b.keyCode){return}listTable.change_page(parseInt(a(this).val()));return false});a(&quot;th a&quot;).click(function(){var d=a.query.GET(&quot;orderby&quot;),b=a.query.GET(&quot;order&quot;),c=a(this).parent(&quot;th&quot;);if(c.hasClass(&quot;sortable&quot;)){d=a.query.load(a(this).attr(&quot;href&quot;)).get(&quot;orderby&quot;);b=&quot;asc&quot;;a(&quot;th.sorted-desc, th.sorted-asc&quot;).removeClass(&quot;sorted-asc&quot;).removeClass(&quot;sorted-desc&quot;).addClass(&quot;sortable&quot;);c.removeClass(&quot;sortable&quot;).addClass(&quot;sorted-asc&quot;)}else{if(c.hasClass(&quot;sorted-asc&quot;)){b=&quot;desc&quot;;c.removeClass(&quot;sorted-asc&quot;).addClass(&quot;sorted-desc&quot;)}else{if(c.hasClass(&quot;sorted-desc&quot;)){b=&quot;asc&quot;;c.removeClass(&quot;sorted-desc&quot;).addClass(&quot;sorted-asc&quot;)}}}listTable.update_rows({orderby:d,order:b},true);return false});a(&quot;.search-box :submit&quot;).click(function(){listTable.change_search(a(this).parent(&quot;.search-box&quot;).find(&quot;:text&quot;).val());return false});a(&quot;.search-box :text&quot;).keypress(function(b){if(13!=b.keyCode){return}listTable.change_search(a(this).val());return false});a(&quot;#post-query-submit&quot;).click(function(){var b={};a(this).parents(&quot;.actions&quot;).find('select[name!=&quot;action&quot;]').each(function(){var c=a(this);b[c.attr(&quot;name&quot;)]=c.val()});listTable.update_rows(b,true);return false});a(&quot;.view-switch a&quot;).click(function(){var b=a(this);listTable.update_rows({mode:a.query.load(b.attr(&quot;href&quot;)).get(&quot;mode&quot;)},false,function(){a(&quot;.view-switch .current&quot;).removeClass(&quot;current&quot;);b.addClass(&quot;current&quot;)});return false})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>