<!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>[15495] trunk: Fix ajaxification in network area by using ajaxurl.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15495">15495</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-08-12 00:45:40 +0000 (Thu, 12 Aug 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix ajaxification in network area by using ajaxurl. See <a href="http://trac.wordpress.org/ticket/14579">#14579</a></pre>

<h3>Modified 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>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsadmintabledevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/admin-table.dev.js (15494 => 15495)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/admin-table.dev.js        2010-08-12 00:38:46 UTC (rev 15494)
+++ trunk/wp-admin/js/admin-table.dev.js        2010-08-12 00:45:40 UTC (rev 15495)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">                 data['list_args'] = list_args;
</span><span class="cx"> 
</span><span class="cx">                 $.ajax({
</span><del>-                        url: 'admin-ajax.php',
</del><ins>+                        url: ajaxurl,
</ins><span class="cx">                         global: false,
</span><span class="cx">                         dataType: 'json',
</span><span class="cx">                         data: data,
</span></span></pre></div>
<a id="trunkwpadminjsadmintablejs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/admin-table.js (15494 => 15495)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/admin-table.js        2010-08-12 00:38:46 UTC (rev 15494)
+++ trunk/wp-admin/js/admin-table.js        2010-08-12 00:45:40 UTC (rev 15495)
</span><span class="lines">@@ -1 +1 @@
</span><del>-jQuery(document).ready(function($){$(&quot;form&quot;).each(function(){this.reset()});if(&quot;&quot;==$.query.GET(&quot;paged&quot;)){$.query.SET(&quot;paged&quot;,1)}var total_pages;var set_total_pages=function(){total_pages=parseInt($(&quot;.total-pages&quot;).eq(0).text())};set_total_pages();var loading=false,$tbody=$(&quot;#the-list, #the-comment-list&quot;),$overlay=$('&lt;div id=&quot;loading-items&gt;').html(adminTableL10n.loading).hide().prependTo($(&quot;body&quot;));var show_overlay=function(){loading=true;$(&quot;.error.ajax&quot;).remove();$overlay.css({width:$tbody.width()+&quot;px&quot;,height:$tbody.height()-20+&quot;px&quot;}).css($tbody.offset()).show()};var hide_overlay=function(){loading=false;$overlay.hide()};var handle_error=function(){hide_overlay();$(&quot;h2&quot;).after('&lt;div class=&quot;error ajax below-h2&quot;&gt;&lt;p&gt;'+adminTableL10n.error+&quot;&lt;/p&gt;&lt;/div&gt;&quot;)};var update_rows=function(args,reset_paging,callback){if(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}show_overlay();if(reset_paging){$.query.SET(&quot;paged&quot;,1)}var data=$.query.get();data.action=&quot;fetch-list&quot;;data.list_args=list_args;$.ajax({url:&quot;admin-ajax.php&quot;,global:false,dataType:&quot;json&quot;,data:data,success:function(response){if(&quot;object&quot;!=typeof response){handle_error()}else{hide_overlay();$tbody.html(response.rows);$(&quot;.displaying-num&quot;).html(response.total_items);$(&quot;.total-pages&quot;).html(response.total_pages);set_total_pages();$(&quot;.current-page&quot;).val($.query.GET(&quot;paged&quot;));if(callback){callback()}}},error:handle_error});return true};var change_page=function(paged){if(paged&lt;1||paged&gt;total_pages){return false}update_rows({paged:paged})};$(&quot;.tablenav-pages a&quot;).click(function(){var paged=$.query.GET(&quot;paged&quot;);switch($(this).attr(&quot;class&quot;)){case&quot;first-page&quot;:paged=1;break;case&quot;prev-page&quot;:paged-=1;break;case&quot;next-page&quot;:paged+=1;break;case&quot;last-page&quot;:paged=total_pages;break}change_page(paged);return false});$(&quot;.current-page&quot;).keypress(function(e){if(13!=e.keyCode){return}change_page(parseInt($(this).val()));return false});$(&quot;th a&quot;).click(function(){var orderby=$.query.GET(&quot;orderby&quot;),order=$.query.GET(&quot;order&quot;),$th=$(this).parent(&quot;th&quot;);if($th.hasClass(&quot;sortable&quot;)){orderby=$.query.load($(this).attr(&quot;href&quot;)).get(&quot;orderby&quot;);order=&quot;asc&quot;;$(&quot;th.sorted-desc, th.sorted-asc&quot;).removeClass(&quot;sorted-asc&quot;).removeClass(&quot;sorted-desc&quot;).addClass(&quot;sortable&quot;);$th.removeClass(&quot;sortable&quot;).addClass(&quot;sorted-asc&quot;)}else{if($th.hasClass(&quot;sorted-asc&quot;)){order=&quot;desc&quot;;$th.removeClass(&quot;sorted-asc&quot;).addClass(&quot;sorted-desc&quot;)}else{if($th.hasClass(&quot;sorted-desc&quot;)){order=&quot;asc&quot;;$th.removeClass(&quot;sorted-desc&quot;).addClass(&quot;sorted-asc&quot;)}}}update_rows({orderby:orderby,order:order},true);return false});var htmlencode=function(value){return $(&quot;&lt;div/&gt;&quot;).text(value).html()};var change_search=function(s){update_rows({s:s},true,function(){$(&quot;h2 .subtitle&quot;).remove();if(s){$(&quot;h2&quot;).eq(0).append($('&lt;span class=&quot;subtitle&quot;&gt;').html(adminTableL10n.search.replace(&quot;%s&quot;,htmlencode(s))))}})};$(&quot;.search-box :submit&quot;).click(function(){change_search($(this).parent(&quot;.search-box&quot;).find(&quot;:text&quot;).val());return false});$(&quot;.search-box :text&quot;).keypress(function(e){if(13!=e.keyCode){return}change_search($(this).val());return false});$(&quot;#post-query-submit&quot;).click(function(){var $this=$(this),key,val,args={};$this.parents(&quot;.actions&quot;).find('select[name!=&quot;action&quot;]').each(function(){args[$this.attr(&quot;name&quot;)]=$this.val()});update_rows(args,true);return false});$(&quot;.view-switch a&quot;).click(function(){var $this=$(this);update_rows({mode:$.query.load($this.attr(&quot;href&quot;)).get(&quot;mode&quot;)},false,function(){$(&quot;.view-switch .current&quot;).removeClass(&quot;current&quot;);$this.addClass(&quot;current&quot;)});return false})});
</del><span class="cx">\ No newline at end of file
</span><ins>+jQuery(document).ready(function(g){g(&quot;form&quot;).each(function(){this.reset()});if(&quot;&quot;==g.query.GET(&quot;paged&quot;)){g.query.SET(&quot;paged&quot;,1)}var l;var b=function(){l=parseInt(g(&quot;.total-pages&quot;).eq(0).text())};b();var c=false,f=g(&quot;#the-list, #the-comment-list&quot;),m=g('&lt;div id=&quot;loading-items&gt;').html(adminTableL10n.loading).hide().prependTo(g(&quot;body&quot;));var a=function(){c=true;g(&quot;.error.ajax&quot;).remove();m.css({width:f.width()+&quot;px&quot;,height:f.height()-20+&quot;px&quot;}).css(f.offset()).show()};var i=function(){c=false;m.hide()};var e=function(){i();g(&quot;h2&quot;).after('&lt;div class=&quot;error ajax below-h2&quot;&gt;&lt;p&gt;'+adminTableL10n.error+&quot;&lt;/p&gt;&lt;/div&gt;&quot;)};var k=function(o,n,r){if(c){return false}var q=false;g.each(o,function(s,t){if(t!=g.query.GET(s)){g.query.SET(s,t);q=true}});if(!q){return false}a();if(n){g.query.SET(&quot;paged&quot;,1)}var p=g.query.get();p.action=&quot;fetch-list&quot;;p.list_args=list_args;g.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:p,success:function(s){if(&quot;object&quot;!=typeof s){e()}else{i();f.html(s.rows);g(&quot;.displaying-num&quot;).html(s.total_items);g(&quot;.total-pages&quot;).html(s.total_pages);b();g(&quot;.current-page&quot;).val(g.query.GET(&quot;paged&quot;));if(r){r()}}},error:e});return true};var d=function(n){if(n&lt;1||n&gt;l){return false}k({paged:n})};g(&quot;.tablenav-pages a&quot;).click(function(){var n=g.query.GET(&quot;paged&quot;);switch(g(this).attr(&quot;class&quot;)){case&quot;first-page&quot;:n=1;break;case&quot;prev-page&quot;:n-=1;break;case&quot;next-page&quot;:n+=1;break;case&quot;last-page&quot;:n=l;break}d(n);return false});g(&quot;.current-page&quot;).keypress(function(n){if(13!=n.keyCode){return}d(parseInt(g(this).val()));return false});g(&quot;th a&quot;).click(function(){var p=g.query.GET(&quot;orderby&quot;),n=g.query.GET(&quot;order&quot;),o=g(this).parent(&quot;th&quot;);if(o.hasClass(&quot;sortable&quot;)){p=g.query.load(g(this).attr(&quot;href&quot;)).get(&quot;orderby&quot;);n=&quot;asc&quot;;g(&quot;th.sorted-desc, th.sorted-asc&quot;).removeClass(&quot;sorted-asc&quot;).removeClass(&quot;sorted-desc&quot;).addClass(&quot;sortable&quot;);o.removeClass(&quot;sortable&quot;).addClass(&quot;sorted-asc&quot;)}else{if(o.hasClass(&quot;sorted-asc&quot;)){n=&quot;desc&quot;;o.removeClass(&quot;sorted-asc&quot;).addClass(&quot;sorted-desc&quot;)}else{if(o.hasClass(&quot;sorted-desc&quot;)){n=&quot;asc&quot;;o.removeClass(&quot;sorted-desc&quot;).addClass(&quot;sorted-asc&quot;)}}}k({orderby:p,order:n},true);return false});var h=function(n){return g(&quot;&lt;div/&gt;&quot;).text(n).html()};var j=function(n){k({s:n},true,function(){g(&quot;h2 .subtitle&quot;).remove();if(n){g(&quot;h2&quot;).eq(0).append(g('&lt;span class=&quot;subtitle&quot;&gt;').html(adminTableL10n.search.replace(&quot;%s&quot;,h(n))))}})};g(&quot;.search-box :submit&quot;).click(function(){j(g(this).parent(&quot;.search-box&quot;).find(&quot;:text&quot;).val());return false});g(&quot;.search-box :text&quot;).keypress(function(n){if(13!=n.keyCode){return}j(g(this).val());return false});g(&quot;#post-query-submit&quot;).click(function(){var p=g(this),o,q,n={};p.parents(&quot;.actions&quot;).find('select[name!=&quot;action&quot;]').each(function(){n[p.attr(&quot;name&quot;)]=p.val()});k(n,true);return false});g(&quot;.view-switch a&quot;).click(function(){var n=g(this);k({mode:g.query.load(n.attr(&quot;href&quot;)).get(&quot;mode&quot;)},false,function(){g(&quot;.view-switch .current&quot;).removeClass(&quot;current&quot;);n.addClass(&quot;current&quot;)});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 (15494 => 15495)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-08-12 00:38:46 UTC (rev 15494)
+++ trunk/wp-includes/script-loader.php        2010-08-12 00:45:40 UTC (rev 15495)
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">                 $scripts-&gt;add( 'theme-preview', &quot;/wp-admin/js/theme-preview$suffix.js&quot;, array( 'thickbox', 'jquery' ), '20100407' );
</span><span class="cx">                 $scripts-&gt;add_data( 'theme-preview', 'group', 1 );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-table', &quot;/wp-admin/js/admin-table$suffix.js&quot;, array( 'jquery', 'jquery-query' ), '20100626' );
</del><ins>+                $scripts-&gt;add( 'admin-table', &quot;/wp-admin/js/admin-table$suffix.js&quot;, array( 'jquery', 'jquery-query' ), '20100812' );
</ins><span class="cx">                 $scripts-&gt;add_data( 'admin-table', 'group', 1 );
</span><span class="cx">                 $scripts-&gt;localize( 'admin-table', 'adminTableL10n', array(
</span><span class="cx">                         'loading' =&gt; __('Loading...'),
</span></span></pre>
</div>
</div>

</body>
</html>