<!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>[16486] trunk/wp-includes: Use event delegation in wp-lists.js.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16486">16486</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-11-19 16:11:56 +0000 (Fri, 19 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use event delegation in wp-lists.js. Fixes <a href="http://trac.wordpress.org/ticket/15488">#15488</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjswplistsdevjs">trunk/wp-includes/js/wp-lists.dev.js</a></li>
<li><a href="#trunkwpincludesjswplistsjs">trunk/wp-includes/js/wp-lists.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="trunkwpincludesjswplistsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/wp-lists.dev.js (16485 => 16486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/wp-lists.dev.js        2010-11-19 14:48:11 UTC (rev 16485)
+++ trunk/wp-includes/js/wp-lists.dev.js        2010-11-19 16:11:56 UTC (rev 16486)
</span><span class="lines">@@ -321,12 +321,24 @@
</span><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         process: function(el) {
</span><del>-                var list = this;
-                $(&quot;[class^=add:&quot; + list.id + &quot;:]&quot;, el || null)
-                        .filter('form').submit( function() { return list.wpList.add(this); } ).end()
-                        .not('form').click( function() { return list.wpList.add(this); } );
-                $(&quot;[class^=delete:&quot; + list.id + &quot;:]&quot;, el || null).click( function() { return list.wpList.del(this); } );
-                $(&quot;[class^=dim:&quot; + list.id + &quot;:]&quot;, el || null).click( function() { return list.wpList.dim(this); } );
</del><ins>+                var list = this,
+                        $el = $(el || document);
+
+                $el.delegate( &quot;form[class^=add:&quot; + list.id + &quot;:]&quot;, 'submit', function(){ 
+                        return list.wpList.add(this); 
+                });
+
+                $el.delegate( &quot;[class^=add:&quot; + list.id + &quot;:]:not(form)&quot;, 'click', function(){
+                        return list.wpList.add(this);
+                });
+
+                $el.delegate( &quot;[class^=delete:&quot; + list.id + &quot;:]&quot;, 'click', function(){
+                        return list.wpList.del(this); 
+                });
+
+                $el.delegate( &quot;[class^=dim:&quot; + list.id + &quot;:]&quot;, 'click', function(){
+                        return list.wpList.dim(this);
+                });
</ins><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         recolor: function() {
</span></span></pre></div>
<a id="trunkwpincludesjswplistsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/wp-lists.js (16485 => 16486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/wp-lists.js        2010-11-19 14:48:11 UTC (rev 16485)
+++ trunk/wp-includes/js/wp-lists.js        2010-11-19 16:11:56 UTC (rev 16486)
</span><span class="lines">@@ -1 +1 @@
</span><del>-(function(b){var a={add:&quot;ajaxAdd&quot;,del:&quot;ajaxDel&quot;,dim:&quot;ajaxDim&quot;,process:&quot;process&quot;,recolor:&quot;recolor&quot;},c;c={settings:{url:ajaxurl,type:&quot;POST&quot;,response:&quot;ajax-response&quot;,what:&quot;&quot;,alt:&quot;alternate&quot;,altOffset:0,addColor:null,delColor:null,dimAddColor:null,dimDelColor:null,confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(g,f){var d=wpAjax.unserialize(g.attr(&quot;href&quot;));return f.nonce||d._ajax_nonce||b(&quot;#&quot;+f.element+&quot; input[name=_ajax_nonce]&quot;).val()||d._wpnonce||b(&quot;#&quot;+f.element+&quot; input[name=_wpnonce]&quot;).val()||0},parseClass:function(h,f){var i=[],d;try{d=b(h).attr(&quot;class&quot;)||&quot;&quot;;d=d.match(new RegExp(f+&quot;:[\\S]+&quot;));if(d){i=d[0].split(&quot;:&quot;)}}catch(g){}return i},pre:function(i,g,d){var f,h;g=b.extend({},this.wpList.settings,{element:null,nonce:0,target:i.get(0)},g||{});if(b.isFunction(g.confirm)){if(&quot;add&quot;!=d){f=b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;);b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;,&quot;#FF9966&quot;)}h=g.confirm.call(this,i,g,d,f);if(&quot;add&quot;!=d){b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;,f)}if(!h){return false}}return g},ajaxAdd:function(j,f){j=b(j);f=f||{};var h=this,d=c.parseClass(j,&quot;add&quot;),k,g,i;f=c.pre.call(h,j,f,&quot;add&quot;);f.element=d[2]||j.attr(&quot;id&quot;)||f.element||null;if(d[3]){f.addColor=&quot;#&quot;+d[3]}else{f.addColor=f.addColor||&quot;#FFFF33&quot;}if(!f){return false}if(!j.is(&quot;[class^=add:&quot;+h.id+&quot;:]&quot;)){return !c.add.call(h,j,f)}if(!f.element){return true}f.action=&quot;add-&quot;+f.what;f.nonce=c.nonce(j,f);k=b(&quot;#&quot;+f.element+&quot; :input&quot;).not(&quot;[name=_ajax_nonce], [name=_wpnonce], [name=action]&quot;);g=wpAjax.validateForm(&quot;#&quot;+f.element);if(!g){return false}f.data=b.param(b.extend({_ajax_nonce:f.nonce,action:f.action},wpAjax.unserialize(d[4]||&quot;&quot;)));i=b.isFunction(k.fieldSerialize)?k.fieldSerialize():k.serialize();if(i){f.data+=&quot;&amp;&quot;+i}if(b.isFunction(f.addBefore)){f=f.addBefore(f);if(!f){return true}}if(!f.data.match(/_ajax_nonce=[a-f0-9]+/)){return true}f.success=function(l){var e=wpAjax.parseAjaxResponse(l,f.response,f.element),m;if(!e||e.errors){return false}if(true===e){return true}jQuery.each(e.responses,function(){c.add.call(h,this.data,b.extend({},f,{pos:this.position||0,id:this.id||0,oldId:this.oldId||null}))});if(b.isFunction(f.addAfter)){m=this.complete;this.complete=function(n,o){var p=b.extend({xml:n,status:o,parsed:e},f);f.addAfter(l,p);if(b.isFunction(m)){m(n,o)}}}h.wpList.recolor();b(h).trigger(&quot;wpListAddEnd&quot;,[f,h.wpList]);c.clear.call(h,&quot;#&quot;+f.element)};b.ajax(f);return false},ajaxDel:function(i,g){i=b(i);g=g||{};var h=this,d=c.parseClass(i,&quot;delete&quot;),f;g=c.pre.call(h,i,g,&quot;delete&quot;);g.element=d[2]||g.element||null;if(d[3]){g.delColor=&quot;#&quot;+d[3]}else{g.delColor=g.delColor||&quot;#faa&quot;}if(!g||!g.element){return false}g.action=&quot;delete-&quot;+g.what;g.nonce=c.nonce(i,g);g.data=b.extend({action:g.action,id:g.element.split(&quot;-&quot;).pop(),_ajax_nonce:g.nonce},wpAjax.unserialize(d[4]||&quot;&quot;));if(b.isFunction(g.delBefore)){g=g.delBefore(g,h);if(!g){return true}}if(!g.data._ajax_nonce){return true}f=b(&quot;#&quot;+g.element);if(&quot;none&quot;!=g.delColor){f.css(&quot;backgroundColor&quot;,g.delColor).fadeOut(350,function(){h.wpList.recolor();b(h).trigger(&quot;wpListDelEnd&quot;,[g,h.wpList])})}else{h.wpList.recolor();b(h).trigger(&quot;wpListDelEnd&quot;,[g,h.wpList])}g.success=function(j){var e=wpAjax.parseAjaxResponse(j,g.response,g.element),k;if(!e||e.errors){f.stop().stop().css(&quot;backgroundColor&quot;,&quot;#faa&quot;).show().queue(function(){h.wpList.recolor();b(this).dequeue()});return false}if(b.isFunction(g.delAfter)){k=this.complete;this.complete=function(l,m){f.queue(function(){var n=b.extend({xml:l,status:m,parsed:e},g);g.delAfter(j,n);if(b.isFunction(k)){k(l,m)}}).dequeue()}}};b.ajax(g);return false},ajaxDim:function(k,h){if(b(k).parent().css(&quot;display&quot;)==&quot;none&quot;){return false}k=b(k);h=h||{};var j=this,d=c.parseClass(k,&quot;dim&quot;),g,l,f,i;h=c.pre.call(j,k,h,&quot;dim&quot;);h.element=d[2]||h.element||null;h.dimClass=d[3]||h.dimClass||null;if(d[4]){h.dimAddColor=&quot;#&quot;+d[4]}else{h.dimAddColor=h.dimAddColor||&quot;#FFFF33&quot;}if(d[5]){h.dimDelColor=&quot;#&quot;+d[5]}else{h.dimDelColor=h.dimDelColor||&quot;#FF3333&quot;}if(!h||!h.element||!h.dimClass){return true}h.action=&quot;dim-&quot;+h.what;h.nonce=c.nonce(k,h);h.data=b.extend({action:h.action,id:h.element.split(&quot;-&quot;).pop(),dimClass:h.dimClass,_ajax_nonce:h.nonce},wpAjax.unserialize(d[6]||&quot;&quot;));if(b.isFunction(h.dimBefore)){h=h.dimBefore(h);if(!h){return true}}g=b(&quot;#&quot;+h.element);l=g.toggleClass(h.dimClass).is(&quot;.&quot;+h.dimClass);f=c.getColor(g);g.toggleClass(h.dimClass);i=l?h.dimAddColor:h.dimDelColor;if(&quot;none&quot;!=i){g.animate({backgroundColor:i},&quot;fast&quot;).queue(function(){g.toggleClass(h.dimClass);b(this).dequeue()}).animate({backgroundColor:f},{complete:function(){b(this).css(&quot;backgroundColor&quot;,&quot;&quot;);b(j).trigger(&quot;wpListDimEnd&quot;,[h,j.wpList])}})}else{b(j).trigger(&quot;wpListDimEnd&quot;,[h,j.wpList])}if(!h.data._ajax_nonce){return true}h.success=function(m){var e=wpAjax.parseAjaxResponse(m,h.response,h.element),n;if(!e||e.errors){g.stop().stop().css(&quot;backgroundColor&quot;,&quot;#FF3333&quot;)[l?&quot;removeClass&quot;:&quot;addClass&quot;](h.dimClass).show().queue(function(){j.wpList.recolor();b(this).dequeue()});return false}if(b.isFunction(h.dimAfter)){n=this.complete;this.complete=function(o,p){g.queue(function(){var q=b.extend({xml:o,status:p,parsed:e},h);h.dimAfter(m,q);if(b.isFunction(n)){n(o,p)}}).dequeue()}}};b.ajax(h);return false},getColor:function(e){if(e.constructor==Object){e=e.get(0)}var f=e,d,g=new RegExp(&quot;rgba\\(\\s*0,\\s*0,\\s*0,\\s*0\\s*\\)&quot;,&quot;i&quot;);do{d=jQuery.curCSS(f,&quot;backgroundColor&quot;);if(d!=&quot;&quot;&amp;&amp;d!=&quot;transparent&quot;&amp;&amp;!d.match(g)||jQuery.nodeName(f,&quot;body&quot;)){break}}while(f=f.parentNode);return d||&quot;#ffffff&quot;},add:function(k,g){k=b(k);var i=b(this),d=false,j={pos:0,id:0,oldId:null},l,h,f;if(&quot;string&quot;==typeof g){g={what:g}}g=b.extend(j,this.wpList.settings,g);if(!k.size()||!g.what){return false}if(g.oldId){d=b(&quot;#&quot;+g.what+&quot;-&quot;+g.oldId)}if(g.id&amp;&amp;(g.id!=g.oldId||!d||!d.size())){b(&quot;#&quot;+g.what+&quot;-&quot;+g.id).remove()}if(d&amp;&amp;d.size()){d.before(k);d.remove()}else{if(isNaN(g.pos)){l=&quot;after&quot;;if(&quot;-&quot;==g.pos.substr(0,1)){g.pos=g.pos.substr(1);l=&quot;before&quot;}h=i.find(&quot;#&quot;+g.pos);if(1===h.size()){h[l](k)}else{i.append(k)}}else{if(g.pos&lt;0){i.prepend(k)}else{i.append(k)}}}if(g.alt){if((i.children(&quot;:visible&quot;).index(k[0])+g.altOffset)%2){k.removeClass(g.alt)}else{k.addClass(g.alt)}}if(&quot;none&quot;!=g.addColor){f=c.getColor(k);k.css(&quot;backgroundColor&quot;,g.addColor).animate({backgroundColor:f},{complete:function(){b(this).css(&quot;backgroundColor&quot;,&quot;&quot;)}})}i.each(function(){this.wpList.process(k)});return k},clear:function(h){var g=this,f,d;h=b(h);if(g.wpList&amp;&amp;h.parents(&quot;#&quot;+g.id).size()){return}h.find(&quot;:input&quot;).each(function(){if(b(this).parents(&quot;.form-no-clear&quot;).size()){return}f=this.type.toLowerCase();d=this.tagName.toLowerCase();if(&quot;text&quot;==f||&quot;password&quot;==f||&quot;textarea&quot;==d){this.value=&quot;&quot;}else{if(&quot;checkbox&quot;==f||&quot;radio&quot;==f){this.checked=false}else{if(&quot;select&quot;==d){this.selectedIndex=null}}}})},process:function(d){var e=this;b(&quot;[class^=add:&quot;+e.id+&quot;:]&quot;,d||null).filter(&quot;form&quot;).submit(function(){return e.wpList.add(this)}).end().not(&quot;form&quot;).click(function(){return e.wpList.add(this)});b(&quot;[class^=delete:&quot;+e.id+&quot;:]&quot;,d||null).click(function(){return e.wpList.del(this)});b(&quot;[class^=dim:&quot;+e.id+&quot;:]&quot;,d||null).click(function(){return e.wpList.dim(this)})},recolor:function(){var f=this,e,d;if(!f.wpList.settings.alt){return}e=b(&quot;.list-item:visible&quot;,f);if(!e.size()){e=b(f).children(&quot;:visible&quot;)}d=[&quot;:even&quot;,&quot;:odd&quot;];if(f.wpList.settings.altOffset%2){d.reverse()}e.filter(d[0]).addClass(f.wpList.settings.alt).end().filter(d[1]).removeClass(f.wpList.settings.alt)},init:function(){var d=this;d.wpList.process=function(e){d.each(function(){this.wpList.process(e)})};d.wpList.recolor=function(){d.each(function(){this.wpList.recolor()})}}};b.fn.wpList=function(d){this.each(function(){var e=this;this.wpList={settings:b.extend({},c.settings,{what:c.parseClass(this,&quot;list&quot;)[1]||&quot;&quot;},d)};b.each(a,function(g,h){e.wpList[g]=function(i,f){return c[h].call(e,i,f)}})});c.init.call(this);this.wpList.process();return this}})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+(function(b){var a={add:&quot;ajaxAdd&quot;,del:&quot;ajaxDel&quot;,dim:&quot;ajaxDim&quot;,process:&quot;process&quot;,recolor:&quot;recolor&quot;},c;c={settings:{url:ajaxurl,type:&quot;POST&quot;,response:&quot;ajax-response&quot;,what:&quot;&quot;,alt:&quot;alternate&quot;,altOffset:0,addColor:null,delColor:null,dimAddColor:null,dimDelColor:null,confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(g,f){var d=wpAjax.unserialize(g.attr(&quot;href&quot;));return f.nonce||d._ajax_nonce||b(&quot;#&quot;+f.element+&quot; input[name=_ajax_nonce]&quot;).val()||d._wpnonce||b(&quot;#&quot;+f.element+&quot; input[name=_wpnonce]&quot;).val()||0},parseClass:function(h,f){var i=[],d;try{d=b(h).attr(&quot;class&quot;)||&quot;&quot;;d=d.match(new RegExp(f+&quot;:[\\S]+&quot;));if(d){i=d[0].split(&quot;:&quot;)}}catch(g){}return i},pre:function(i,g,d){var f,h;g=b.extend({},this.wpList.settings,{element:null,nonce:0,target:i.get(0)},g||{});if(b.isFunction(g.confirm)){if(&quot;add&quot;!=d){f=b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;);b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;,&quot;#FF9966&quot;)}h=g.confirm.call(this,i,g,d,f);if(&quot;add&quot;!=d){b(&quot;#&quot;+g.element).css(&quot;backgroundColor&quot;,f)}if(!h){return false}}return g},ajaxAdd:function(j,f){j=b(j);f=f||{};var h=this,d=c.parseClass(j,&quot;add&quot;),k,g,i;f=c.pre.call(h,j,f,&quot;add&quot;);f.element=d[2]||j.attr(&quot;id&quot;)||f.element||null;if(d[3]){f.addColor=&quot;#&quot;+d[3]}else{f.addColor=f.addColor||&quot;#FFFF33&quot;}if(!f){return false}if(!j.is(&quot;[class^=add:&quot;+h.id+&quot;:]&quot;)){return !c.add.call(h,j,f)}if(!f.element){return true}f.action=&quot;add-&quot;+f.what;f.nonce=c.nonce(j,f);k=b(&quot;#&quot;+f.element+&quot; :input&quot;).not(&quot;[name=_ajax_nonce], [name=_wpnonce], [name=action]&quot;);g=wpAjax.validateForm(&quot;#&quot;+f.element);if(!g){return false}f.data=b.param(b.extend({_ajax_nonce:f.nonce,action:f.action},wpAjax.unserialize(d[4]||&quot;&quot;)));i=b.isFunction(k.fieldSerialize)?k.fieldSerialize():k.serialize();if(i){f.data+=&quot;&amp;&quot;+i}if(b.isFunction(f.addBefore)){f=f.addBefore(f);if(!f){return true}}if(!f.data.match(/_ajax_nonce=[a-f0-9]+/)){return true}f.success=function(l){var e=wpAjax.parseAjaxResponse(l,f.response,f.element),m;if(!e||e.errors){return false}if(true===e){return true}jQuery.each(e.responses,function(){c.add.call(h,this.data,b.extend({},f,{pos:this.position||0,id:this.id||0,oldId:this.oldId||null}))});if(b.isFunction(f.addAfter)){m=this.complete;this.complete=function(n,o){var p=b.extend({xml:n,status:o,parsed:e},f);f.addAfter(l,p);if(b.isFunction(m)){m(n,o)}}}h.wpList.recolor();b(h).trigger(&quot;wpListAddEnd&quot;,[f,h.wpList]);c.clear.call(h,&quot;#&quot;+f.element)};b.ajax(f);return false},ajaxDel:function(i,g){i=b(i);g=g||{};var h=this,d=c.parseClass(i,&quot;delete&quot;),f;g=c.pre.call(h,i,g,&quot;delete&quot;);g.element=d[2]||g.element||null;if(d[3]){g.delColor=&quot;#&quot;+d[3]}else{g.delColor=g.delColor||&quot;#faa&quot;}if(!g||!g.element){return false}g.action=&quot;delete-&quot;+g.what;g.nonce=c.nonce(i,g);g.data=b.extend({action:g.action,id:g.element.split(&quot;-&quot;).pop(),_ajax_nonce:g.nonce},wpAjax.unserialize(d[4]||&quot;&quot;));if(b.isFunction(g.delBefore)){g=g.delBefore(g,h);if(!g){return true}}if(!g.data._ajax_nonce){return true}f=b(&quot;#&quot;+g.element);if(&quot;none&quot;!=g.delColor){f.css(&quot;backgroundColor&quot;,g.delColor).fadeOut(350,function(){h.wpList.recolor();b(h).trigger(&quot;wpListDelEnd&quot;,[g,h.wpList])})}else{h.wpList.recolor();b(h).trigger(&quot;wpListDelEnd&quot;,[g,h.wpList])}g.success=function(j){var e=wpAjax.parseAjaxResponse(j,g.response,g.element),k;if(!e||e.errors){f.stop().stop().css(&quot;backgroundColor&quot;,&quot;#faa&quot;).show().queue(function(){h.wpList.recolor();b(this).dequeue()});return false}if(b.isFunction(g.delAfter)){k=this.complete;this.complete=function(l,m){f.queue(function(){var n=b.extend({xml:l,status:m,parsed:e},g);g.delAfter(j,n);if(b.isFunction(k)){k(l,m)}}).dequeue()}}};b.ajax(g);return false},ajaxDim:function(k,h){if(b(k).parent().css(&quot;display&quot;)==&quot;none&quot;){return false}k=b(k);h=h||{};var j=this,d=c.parseClass(k,&quot;dim&quot;),g,l,f,i;h=c.pre.call(j,k,h,&quot;dim&quot;);h.element=d[2]||h.element||null;h.dimClass=d[3]||h.dimClass||null;if(d[4]){h.dimAddColor=&quot;#&quot;+d[4]}else{h.dimAddColor=h.dimAddColor||&quot;#FFFF33&quot;}if(d[5]){h.dimDelColor=&quot;#&quot;+d[5]}else{h.dimDelColor=h.dimDelColor||&quot;#FF3333&quot;}if(!h||!h.element||!h.dimClass){return true}h.action=&quot;dim-&quot;+h.what;h.nonce=c.nonce(k,h);h.data=b.extend({action:h.action,id:h.element.split(&quot;-&quot;).pop(),dimClass:h.dimClass,_ajax_nonce:h.nonce},wpAjax.unserialize(d[6]||&quot;&quot;));if(b.isFunction(h.dimBefore)){h=h.dimBefore(h);if(!h){return true}}g=b(&quot;#&quot;+h.element);l=g.toggleClass(h.dimClass).is(&quot;.&quot;+h.dimClass);f=c.getColor(g);g.toggleClass(h.dimClass);i=l?h.dimAddColor:h.dimDelColor;if(&quot;none&quot;!=i){g.animate({backgroundColor:i},&quot;fast&quot;).queue(function(){g.toggleClass(h.dimClass);b(this).dequeue()}).animate({backgroundColor:f},{complete:function(){b(this).css(&quot;backgroundColor&quot;,&quot;&quot;);b(j).trigger(&quot;wpListDimEnd&quot;,[h,j.wpList])}})}else{b(j).trigger(&quot;wpListDimEnd&quot;,[h,j.wpList])}if(!h.data._ajax_nonce){return true}h.success=function(m){var e=wpAjax.parseAjaxResponse(m,h.response,h.element),n;if(!e||e.errors){g.stop().stop().css(&quot;backgroundColor&quot;,&quot;#FF3333&quot;)[l?&quot;removeClass&quot;:&quot;addClass&quot;](h.dimClass).show().queue(function(){j.wpList.recolor();b(this).dequeue()});return false}if(b.isFunction(h.dimAfter)){n=this.complete;this.complete=function(o,p){g.queue(function(){var q=b.extend({xml:o,status:p,parsed:e},h);h.dimAfter(m,q);if(b.isFunction(n)){n(o,p)}}).dequeue()}}};b.ajax(h);return false},getColor:function(e){if(e.constructor==Object){e=e.get(0)}var f=e,d,g=new RegExp(&quot;rgba\\(\\s*0,\\s*0,\\s*0,\\s*0\\s*\\)&quot;,&quot;i&quot;);do{d=jQuery.curCSS(f,&quot;backgroundColor&quot;);if(d!=&quot;&quot;&amp;&amp;d!=&quot;transparent&quot;&amp;&amp;!d.match(g)||jQuery.nodeName(f,&quot;body&quot;)){break}}while(f=f.parentNode);return d||&quot;#ffffff&quot;},add:function(k,g){k=b(k);var i=b(this),d=false,j={pos:0,id:0,oldId:null},l,h,f;if(&quot;string&quot;==typeof g){g={what:g}}g=b.extend(j,this.wpList.settings,g);if(!k.size()||!g.what){return false}if(g.oldId){d=b(&quot;#&quot;+g.what+&quot;-&quot;+g.oldId)}if(g.id&amp;&amp;(g.id!=g.oldId||!d||!d.size())){b(&quot;#&quot;+g.what+&quot;-&quot;+g.id).remove()}if(d&amp;&amp;d.size()){d.before(k);d.remove()}else{if(isNaN(g.pos)){l=&quot;after&quot;;if(&quot;-&quot;==g.pos.substr(0,1)){g.pos=g.pos.substr(1);l=&quot;before&quot;}h=i.find(&quot;#&quot;+g.pos);if(1===h.size()){h[l](k)}else{i.append(k)}}else{if(g.pos&lt;0){i.prepend(k)}else{i.append(k)}}}if(g.alt){if((i.children(&quot;:visible&quot;).index(k[0])+g.altOffset)%2){k.removeClass(g.alt)}else{k.addClass(g.alt)}}if(&quot;none&quot;!=g.addColor){f=c.getColor(k);k.css(&quot;backgroundColor&quot;,g.addColor).animate({backgroundColor:f},{complete:function(){b(this).css(&quot;backgroundColor&quot;,&quot;&quot;)}})}i.each(function(){this.wpList.process(k)});return k},clear:function(h){var g=this,f,d;h=b(h);if(g.wpList&amp;&amp;h.parents(&quot;#&quot;+g.id).size()){return}h.find(&quot;:input&quot;).each(function(){if(b(this).parents(&quot;.form-no-clear&quot;).size()){return}f=this.type.toLowerCase();d=this.tagName.toLowerCase();if(&quot;text&quot;==f||&quot;password&quot;==f||&quot;textarea&quot;==d){this.value=&quot;&quot;}else{if(&quot;checkbox&quot;==f||&quot;radio&quot;==f){this.checked=false}else{if(&quot;select&quot;==d){this.selectedIndex=null}}}})},process:function(e){var f=this,d=b(e||document);d.delegate(&quot;form[class^=add:&quot;+f.id+&quot;:]&quot;,&quot;submit&quot;,function(){return f.wpList.add(this)});d.delegate(&quot;[class^=add:&quot;+f.id+&quot;:]:not(form)&quot;,&quot;click&quot;,function(){return f.wpList.add(this)});d.delegate(&quot;[class^=delete:&quot;+f.id+&quot;:]&quot;,&quot;click&quot;,function(){return f.wpList.del(this)});d.delegate(&quot;[class^=dim:&quot;+f.id+&quot;:]&quot;,&quot;click&quot;,function(){return f.wpList.dim(this)})},recolor:function(){var f=this,e,d;if(!f.wpList.settings.alt){return}e=b(&quot;.list-item:visible&quot;,f);if(!e.size()){e=b(f).children(&quot;:visible&quot;)}d=[&quot;:even&quot;,&quot;:odd&quot;];if(f.wpList.settings.altOffset%2){d.reverse()}e.filter(d[0]).addClass(f.wpList.settings.alt).end().filter(d[1]).removeClass(f.wpList.settings.alt)},init:function(){var d=this;d.wpList.process=function(e){d.each(function(){this.wpList.process(e)})};d.wpList.recolor=function(){d.each(function(){this.wpList.recolor()})}}};b.fn.wpList=function(d){this.each(function(){var e=this;this.wpList={settings:b.extend({},c.settings,{what:c.parseClass(this,&quot;list&quot;)[1]||&quot;&quot;},d)};b.each(a,function(g,h){e.wpList[g]=function(i,f){return c[h].call(e,i,f)}})});c.init.call(this);this.wpList.process();return this}})(jQuery);
</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 (16485 => 16486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-11-19 14:48:11 UTC (rev 16485)
+++ trunk/wp-includes/script-loader.php        2010-11-19 16:11:56 UTC (rev 16486)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">         $scripts-&gt;add( 'autosave', &quot;/wp-includes/js/autosave$suffix.js&quot;, array('schedule', 'wp-ajax-response'), '20101004' );
</span><span class="cx">         $scripts-&gt;add_data( 'autosave', 'group', 1 );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-lists', &quot;/wp-includes/js/wp-lists$suffix.js&quot;, array('wp-ajax-response'), '20091128' );
</del><ins>+        $scripts-&gt;add( 'wp-lists', &quot;/wp-includes/js/wp-lists$suffix.js&quot;, array('wp-ajax-response'), '20101119' );
</ins><span class="cx">         $scripts-&gt;add_data( 'wp-lists', 'group', 1 );
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.8.3');
</span></span></pre>
</div>
</div>

</body>
</html>