<!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" />
<title>[18636] trunk/wp-admin/js: '.widget', not '.postbox' in [18635], props aaroncampbell, see #17979</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/18636">18636</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-09-03 21:45:01 +0000 (Sat, 03 Sep 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>'.widget', not '.postbox' in <a href="http://core.trac.wordpress.org/changeset/18635">[18635]</a>, props aaroncampbell, see <a href="http://core.trac.wordpress.org/ticket/17979">#17979</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjswidgetsdevjs">trunk/wp-admin/js/widgets.dev.js</a></li>
<li><a href="#trunkwpadminjswidgetsjs">trunk/wp-admin/js/widgets.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjswidgetsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/widgets.dev.js (18635 => 18636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/widgets.dev.js        2011-09-03 21:26:32 UTC (rev 18635)
+++ trunk/wp-admin/js/widgets.dev.js        2011-09-03 21:45:01 UTC (rev 18636)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">                                 if ( !$(this).is(':visible') || this.id.indexOf('orphaned_widgets') != -1 )
</span><span class="cx">                                         sender.sortable('cancel');
</span><span class="cx"> 
</span><del>-                                if ( sender.attr('id').indexOf('orphaned_widgets') != -1 &amp;&amp; !sender.children('.postbox').length ) {
</del><ins>+                                if ( sender.attr('id').indexOf('orphaned_widgets') != -1 &amp;&amp; !sender.children('.widget').length ) {
</ins><span class="cx">                                         sender.parents('.orphan-sidebar').slideUp(400, function(){ $(this).remove(); });
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkwpadminjswidgetsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/widgets.js (18635 => 18636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/widgets.js        2011-09-03 21:26:32 UTC (rev 18635)
+++ trunk/wp-admin/js/widgets.js        2011-09-03 21:45:01 UTC (rev 18636)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var wpWidgets;(function(a){wpWidgets={init:function(){var e,c=a(&quot;div.widgets-sortables&quot;),b=!!(&quot;undefined&quot;!=typeof isRtl&amp;&amp;isRtl),d=(isRtl?&quot;marginRight&quot;:&quot;marginLeft&quot;);a(&quot;#widgets-right&quot;).children(&quot;.widgets-holder-wrap&quot;).children(&quot;.sidebar-name&quot;).click(function(){var g=a(this).siblings(&quot;.widgets-sortables&quot;),f=a(this).parent();if(!f.hasClass(&quot;closed&quot;)){g.sortable(&quot;disable&quot;);f.addClass(&quot;closed&quot;)}else{f.removeClass(&quot;closed&quot;);g.sortable(&quot;enable&quot;).sortable(&quot;refresh&quot;)}});a(&quot;#widgets-left&quot;).children(&quot;.widgets-holder-wrap&quot;).children(&quot;.sidebar-name&quot;).click(function(){a(this).parent().toggleClass(&quot;closed&quot;)});c.each(function(){if(a(this).parent().hasClass(&quot;inactive&quot;)){return true}var g=50,f=a(this).children(&quot;.widget&quot;).length;g=g+parseInt(f*48,10);a(this).css(&quot;minHeigh
 t&quot;,g+&quot;px&quot;)});a(&quot;a.widget-action&quot;).live(&quot;click&quot;,function(){var h={},i=a(this).closest(&quot;div.widget&quot;),f=i.children(&quot;.widget-inside&quot;),g=parseInt(i.find(&quot;input.widget-width&quot;).val(),10);if(f.is(&quot;:hidden&quot;)){if(g&gt;250&amp;&amp;f.closest(&quot;div.widgets-sortables&quot;).length){h.width=g+30+&quot;px&quot;;if(f.closest(&quot;div.widget-liquid-right&quot;).length){h[d]=235-g+&quot;px&quot;}i.css(h)}wpWidgets.fixLabels(i);f.slideDown(&quot;fast&quot;)}else{f.slideUp(&quot;fast&quot;,function(){i.css({width:&quot;&quot;,margin:&quot;&quot;})})}return false});a(&quot;input.widget-control-save&quot;).live(&quot;click&quot;,function(){wpWidgets.save(a(this).closest(&quot;div.widget&quot;),0,1,0);return false});a(&quot;a.widget-control-remove&quot;).live(&quot;click&quot;,function(){wpWidgets.save(a(this).closest(&quot;div.widget&quot;),1,1,0);return false});a(&quot;a.widget-control-close&quot;).live(&quot;click&q
 uot;,function(){wpWidgets.close(a(this).closest(&quot;div.widget&quot;));return false});c.children(&quot;.widget&quot;).each(function(){wpWidgets.appendTitle(this);if(a(&quot;p.widget-error&quot;,this).length){a(&quot;a.widget-action&quot;,this).click()}});a(&quot;#widget-list&quot;).children(&quot;.widget&quot;).draggable({connectToSortable:&quot;div.widgets-sortables&quot;,handle:&quot;&gt; .widget-top &gt; .widget-title&quot;,distance:2,helper:&quot;clone&quot;,zIndex:5,containment:&quot;document&quot;,start:function(g,f){wpWidgets.fixWebkit(1);f.helper.find(&quot;div.widget-description&quot;).hide()},stop:function(g,f){if(e){a(e).hide()}e=&quot;&quot;;wpWidgets.fixWebkit()}});c.sortable({placeholder:&quot;widget-placeholder&quot;,items:&quot;&gt; .widget&quot;,handle:&quot;&gt; .widget-top &gt; .widget-title&quot;,cursor:&quot;move&quot;,distance:2,containment:&quot;document&quot;,start:function(g,f){wpWidgets.fixWebkit(1);f.item.children(&quot;.widget-inside&quot;).hide
 ();f.item.css({margin:&quot;&quot;,width:&quot;&quot;})},stop:function(h,f){if(f.item.hasClass(&quot;ui-draggable&quot;)&amp;&amp;f.item.data(&quot;draggable&quot;)){f.item.draggable(&quot;destroy&quot;)}if(f.item.hasClass(&quot;deleting&quot;)){wpWidgets.save(f.item,1,0,1);f.item.remove();return}var g=f.item.find(&quot;input.add_new&quot;).val(),k=f.item.find(&quot;input.multi_number&quot;).val(),j=f.item.attr(&quot;id&quot;),i=a(this).attr(&quot;id&quot;);f.item.css({margin:&quot;&quot;,width:&quot;&quot;});wpWidgets.fixWebkit();if(g){if(&quot;multi&quot;==g){f.item.html(f.item.html().replace(/&lt;[^&lt;&gt;]+&gt;/g,function(l){return l.replace(/__i__|%i%/g,k)}));f.item.attr(&quot;id&quot;,j.replace(/__i__|%i%/g,k));k++;a(&quot;div#&quot;+j).find(&quot;input.multi_number&quot;).val(k)}else{if(&quot;single&quot;==g){f.item.attr(&quot;id&quot;,&quot;new-&quot;+j);e=&quot;div#&quot;+j}}wpWidgets.save(f.item,0,0,1);f.item.find(&quot;input.add_new&quot;).val(&quot;&quot;);f.ite
 m.find(&quot;a.widget-action&quot;).click();return}wpWidgets.saveOrder(i)},receive:function(h,g){var f=a(g.sender);if(!a(this).is(&quot;:visible&quot;)||this.id.indexOf(&quot;orphaned_widgets&quot;)!=-1){f.sortable(&quot;cancel&quot;)}if(f.attr(&quot;id&quot;).indexOf(&quot;orphaned_widgets&quot;)!=-1&amp;&amp;!f.children(&quot;.postbox&quot;).length){f.parents(&quot;.orphan-sidebar&quot;).slideUp(400,function(){a(this).remove()})}}}).sortable(&quot;option&quot;,&quot;connectWith&quot;,&quot;div.widgets-sortables&quot;).parent().filter(&quot;.closed&quot;).children(&quot;.widgets-sortables&quot;).sortable(&quot;disable&quot;);a(&quot;#available-widgets&quot;).droppable({tolerance:&quot;pointer&quot;,accept:function(f){return a(f).parent().attr(&quot;id&quot;)!=&quot;widget-list&quot;},drop:function(g,f){f.draggable.addClass(&quot;deleting&quot;);a(&quot;#removing-widget&quot;).hide().children(&quot;span&quot;).html(&quot;&quot;)},over:function(g,f){f.draggable.addClass(&quot
 ;deleting&quot;);a(&quot;div.widget-placeholder&quot;).hide();if(f.draggable.hasClass(&quot;ui-sortable-helper&quot;)){a(&quot;#removing-widget&quot;).show().children(&quot;span&quot;).html(f.draggable.find(&quot;div.widget-title&quot;).children(&quot;h4&quot;).html())}},out:function(g,f){f.draggable.removeClass(&quot;deleting&quot;);a(&quot;div.widget-placeholder&quot;).show();a(&quot;#removing-widget&quot;).hide().children(&quot;span&quot;).html(&quot;&quot;)}})},saveOrder:function(c){if(c){a(&quot;#&quot;+c).closest(&quot;div.widgets-holder-wrap&quot;).find(&quot;img.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;visible&quot;)}var b={action:&quot;widgets-order&quot;,savewidgets:a(&quot;#_wpnonce_widgets&quot;).val(),sidebars:[]};a(&quot;div.widgets-sortables&quot;).each(function(){if(a(this).sortable){b[&quot;sidebars[&quot;+a(this).attr(&quot;id&quot;)+&quot;]&quot;]=a(this).sortable(&quot;toArray&quot;).join(&quot;,&quot;)}});a.post(ajaxurl,b,function(){a(&quot;
 img.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)});this.resize()},save:function(g,d,e,b){var h=g.closest(&quot;div.widgets-sortables&quot;).attr(&quot;id&quot;),f=g.find(&quot;form&quot;).serialize(),c;g=a(g);a(&quot;.ajax-feedback&quot;,g).css(&quot;visibility&quot;,&quot;visible&quot;);c={action:&quot;save-widget&quot;,savewidgets:a(&quot;#_wpnonce_widgets&quot;).val(),sidebar:h};if(d){c.delete_widget=1}f+=&quot;&amp;&quot;+a.param(c);a.post(ajaxurl,f,function(i){var j;if(d){if(!a(&quot;input.widget_number&quot;,g).val()){j=a(&quot;input.widget-id&quot;,g).val();a(&quot;#available-widgets&quot;).find(&quot;input.widget-id&quot;).each(function(){if(a(this).val()==j){a(this).closest(&quot;div.widget&quot;).show()}})}if(e){b=0;g.slideUp(&quot;fast&quot;,function(){a(this).remove();wpWidgets.saveOrder()})}else{g.remove();wpWidgets.resize()}}else{a(&quot;.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;);if(i&amp;&amp;i.length&gt;2){a(&q
 uot;div.widget-content&quot;,g).html(i);wpWidgets.appendTitle(g);wpWidgets.fixLabels(g)}}if(b){wpWidgets.saveOrder()}})},appendTitle:function(b){var c=a('input[id*=&quot;-title&quot;]',b);if(c=c.val()){c=c.replace(/&lt;[^&lt;&gt;]+&gt;/g,&quot;&quot;).replace(/&lt;/g,&quot;&amp;lt;&quot;).replace(/&gt;/g,&quot;&amp;gt;&quot;);a(b).children(&quot;.widget-top&quot;).children(&quot;.widget-title&quot;).children().children(&quot;.in-widget-title&quot;).html(&quot;: &quot;+c)}},resize:function(){a(&quot;div.widgets-sortables&quot;).each(function(){if(a(this).parent().hasClass(&quot;inactive&quot;)){return true}var c=50,b=a(this).children(&quot;.widget&quot;).length;c=c+parseInt(b*48,10);a(this).css(&quot;minHeight&quot;,c+&quot;px&quot;)})},fixWebkit:function(b){b=b?&quot;none&quot;:&quot;&quot;;a(&quot;body&quot;).css({WebkitUserSelect:b,KhtmlUserSelect:b})},fixLabels:function(b){b.children(&quot;.widget-inside&quot;).find(&quot;label&quot;).each(function(){var c=a(this).attr(&q
 uot;for&quot;);if(c&amp;&amp;c==a(&quot;input&quot;,this).attr(&quot;id&quot;)){a(this).removeAttr(&quot;for&quot;)}})},close:function(b){b.children(&quot;.widget-inside&quot;).slideUp(&quot;fast&quot;,function(){b.css({width:&quot;&quot;,margin:&quot;&quot;})})}};a(document).ready(function(b){wpWidgets.init()})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var wpWidgets;(function(a){wpWidgets={init:function(){var e,c=a(&quot;div.widgets-sortables&quot;),b=!!(&quot;undefined&quot;!=typeof isRtl&amp;&amp;isRtl),d=(isRtl?&quot;marginRight&quot;:&quot;marginLeft&quot;);a(&quot;#widgets-right&quot;).children(&quot;.widgets-holder-wrap&quot;).children(&quot;.sidebar-name&quot;).click(function(){var g=a(this).siblings(&quot;.widgets-sortables&quot;),f=a(this).parent();if(!f.hasClass(&quot;closed&quot;)){g.sortable(&quot;disable&quot;);f.addClass(&quot;closed&quot;)}else{f.removeClass(&quot;closed&quot;);g.sortable(&quot;enable&quot;).sortable(&quot;refresh&quot;)}});a(&quot;#widgets-left&quot;).children(&quot;.widgets-holder-wrap&quot;).children(&quot;.sidebar-name&quot;).click(function(){a(this).parent().toggleClass(&quot;closed&quot;)});c.each(function(){if(a(this).parent().hasClass(&quot;inactive&quot;)){return true}var g=50,f=a(this).children(&quot;.widget&quot;).length;g=g+parseInt(f*48,10);a(this).css(&quot;minHeigh
 t&quot;,g+&quot;px&quot;)});a(&quot;a.widget-action&quot;).live(&quot;click&quot;,function(){var h={},i=a(this).closest(&quot;div.widget&quot;),f=i.children(&quot;.widget-inside&quot;),g=parseInt(i.find(&quot;input.widget-width&quot;).val(),10);if(f.is(&quot;:hidden&quot;)){if(g&gt;250&amp;&amp;f.closest(&quot;div.widgets-sortables&quot;).length){h.width=g+30+&quot;px&quot;;if(f.closest(&quot;div.widget-liquid-right&quot;).length){h[d]=235-g+&quot;px&quot;}i.css(h)}wpWidgets.fixLabels(i);f.slideDown(&quot;fast&quot;)}else{f.slideUp(&quot;fast&quot;,function(){i.css({width:&quot;&quot;,margin:&quot;&quot;})})}return false});a(&quot;input.widget-control-save&quot;).live(&quot;click&quot;,function(){wpWidgets.save(a(this).closest(&quot;div.widget&quot;),0,1,0);return false});a(&quot;a.widget-control-remove&quot;).live(&quot;click&quot;,function(){wpWidgets.save(a(this).closest(&quot;div.widget&quot;),1,1,0);return false});a(&quot;a.widget-control-close&quot;).live(&quot;click&q
 uot;,function(){wpWidgets.close(a(this).closest(&quot;div.widget&quot;));return false});c.children(&quot;.widget&quot;).each(function(){wpWidgets.appendTitle(this);if(a(&quot;p.widget-error&quot;,this).length){a(&quot;a.widget-action&quot;,this).click()}});a(&quot;#widget-list&quot;).children(&quot;.widget&quot;).draggable({connectToSortable:&quot;div.widgets-sortables&quot;,handle:&quot;&gt; .widget-top &gt; .widget-title&quot;,distance:2,helper:&quot;clone&quot;,zIndex:5,containment:&quot;document&quot;,start:function(g,f){wpWidgets.fixWebkit(1);f.helper.find(&quot;div.widget-description&quot;).hide()},stop:function(g,f){if(e){a(e).hide()}e=&quot;&quot;;wpWidgets.fixWebkit()}});c.sortable({placeholder:&quot;widget-placeholder&quot;,items:&quot;&gt; .widget&quot;,handle:&quot;&gt; .widget-top &gt; .widget-title&quot;,cursor:&quot;move&quot;,distance:2,containment:&quot;document&quot;,start:function(g,f){wpWidgets.fixWebkit(1);f.item.children(&quot;.widget-inside&quot;).hide
 ();f.item.css({margin:&quot;&quot;,width:&quot;&quot;})},stop:function(h,f){if(f.item.hasClass(&quot;ui-draggable&quot;)&amp;&amp;f.item.data(&quot;draggable&quot;)){f.item.draggable(&quot;destroy&quot;)}if(f.item.hasClass(&quot;deleting&quot;)){wpWidgets.save(f.item,1,0,1);f.item.remove();return}var g=f.item.find(&quot;input.add_new&quot;).val(),k=f.item.find(&quot;input.multi_number&quot;).val(),j=f.item.attr(&quot;id&quot;),i=a(this).attr(&quot;id&quot;);f.item.css({margin:&quot;&quot;,width:&quot;&quot;});wpWidgets.fixWebkit();if(g){if(&quot;multi&quot;==g){f.item.html(f.item.html().replace(/&lt;[^&lt;&gt;]+&gt;/g,function(l){return l.replace(/__i__|%i%/g,k)}));f.item.attr(&quot;id&quot;,j.replace(/__i__|%i%/g,k));k++;a(&quot;div#&quot;+j).find(&quot;input.multi_number&quot;).val(k)}else{if(&quot;single&quot;==g){f.item.attr(&quot;id&quot;,&quot;new-&quot;+j);e=&quot;div#&quot;+j}}wpWidgets.save(f.item,0,0,1);f.item.find(&quot;input.add_new&quot;).val(&quot;&quot;);f.ite
 m.find(&quot;a.widget-action&quot;).click();return}wpWidgets.saveOrder(i)},receive:function(h,g){var f=a(g.sender);if(!a(this).is(&quot;:visible&quot;)||this.id.indexOf(&quot;orphaned_widgets&quot;)!=-1){f.sortable(&quot;cancel&quot;)}if(f.attr(&quot;id&quot;).indexOf(&quot;orphaned_widgets&quot;)!=-1&amp;&amp;!f.children(&quot;.widget&quot;).length){f.parents(&quot;.orphan-sidebar&quot;).slideUp(400,function(){a(this).remove()})}}}).sortable(&quot;option&quot;,&quot;connectWith&quot;,&quot;div.widgets-sortables&quot;).parent().filter(&quot;.closed&quot;).children(&quot;.widgets-sortables&quot;).sortable(&quot;disable&quot;);a(&quot;#available-widgets&quot;).droppable({tolerance:&quot;pointer&quot;,accept:function(f){return a(f).parent().attr(&quot;id&quot;)!=&quot;widget-list&quot;},drop:function(g,f){f.draggable.addClass(&quot;deleting&quot;);a(&quot;#removing-widget&quot;).hide().children(&quot;span&quot;).html(&quot;&quot;)},over:function(g,f){f.draggable.addClass(&quot;
 deleting&quot;);a(&quot;div.widget-placeholder&quot;).hide();if(f.draggable.hasClass(&quot;ui-sortable-helper&quot;)){a(&quot;#removing-widget&quot;).show().children(&quot;span&quot;).html(f.draggable.find(&quot;div.widget-title&quot;).children(&quot;h4&quot;).html())}},out:function(g,f){f.draggable.removeClass(&quot;deleting&quot;);a(&quot;div.widget-placeholder&quot;).show();a(&quot;#removing-widget&quot;).hide().children(&quot;span&quot;).html(&quot;&quot;)}})},saveOrder:function(c){if(c){a(&quot;#&quot;+c).closest(&quot;div.widgets-holder-wrap&quot;).find(&quot;img.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;visible&quot;)}var b={action:&quot;widgets-order&quot;,savewidgets:a(&quot;#_wpnonce_widgets&quot;).val(),sidebars:[]};a(&quot;div.widgets-sortables&quot;).each(function(){if(a(this).sortable){b[&quot;sidebars[&quot;+a(this).attr(&quot;id&quot;)+&quot;]&quot;]=a(this).sortable(&quot;toArray&quot;).join(&quot;,&quot;)}});a.post(ajaxurl,b,function(){a(&quot;i
 mg.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)});this.resize()},save:function(g,d,e,b){var h=g.closest(&quot;div.widgets-sortables&quot;).attr(&quot;id&quot;),f=g.find(&quot;form&quot;).serialize(),c;g=a(g);a(&quot;.ajax-feedback&quot;,g).css(&quot;visibility&quot;,&quot;visible&quot;);c={action:&quot;save-widget&quot;,savewidgets:a(&quot;#_wpnonce_widgets&quot;).val(),sidebar:h};if(d){c.delete_widget=1}f+=&quot;&amp;&quot;+a.param(c);a.post(ajaxurl,f,function(i){var j;if(d){if(!a(&quot;input.widget_number&quot;,g).val()){j=a(&quot;input.widget-id&quot;,g).val();a(&quot;#available-widgets&quot;).find(&quot;input.widget-id&quot;).each(function(){if(a(this).val()==j){a(this).closest(&quot;div.widget&quot;).show()}})}if(e){b=0;g.slideUp(&quot;fast&quot;,function(){a(this).remove();wpWidgets.saveOrder()})}else{g.remove();wpWidgets.resize()}}else{a(&quot;.ajax-feedback&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;);if(i&amp;&amp;i.length&gt;2){a(&qu
 ot;div.widget-content&quot;,g).html(i);wpWidgets.appendTitle(g);wpWidgets.fixLabels(g)}}if(b){wpWidgets.saveOrder()}})},appendTitle:function(b){var c=a('input[id*=&quot;-title&quot;]',b);if(c=c.val()){c=c.replace(/&lt;[^&lt;&gt;]+&gt;/g,&quot;&quot;).replace(/&lt;/g,&quot;&amp;lt;&quot;).replace(/&gt;/g,&quot;&amp;gt;&quot;);a(b).children(&quot;.widget-top&quot;).children(&quot;.widget-title&quot;).children().children(&quot;.in-widget-title&quot;).html(&quot;: &quot;+c)}},resize:function(){a(&quot;div.widgets-sortables&quot;).each(function(){if(a(this).parent().hasClass(&quot;inactive&quot;)){return true}var c=50,b=a(this).children(&quot;.widget&quot;).length;c=c+parseInt(b*48,10);a(this).css(&quot;minHeight&quot;,c+&quot;px&quot;)})},fixWebkit:function(b){b=b?&quot;none&quot;:&quot;&quot;;a(&quot;body&quot;).css({WebkitUserSelect:b,KhtmlUserSelect:b})},fixLabels:function(b){b.children(&quot;.widget-inside&quot;).find(&quot;label&quot;).each(function(){var c=a(this).attr(&qu
 ot;for&quot;);if(c&amp;&amp;c==a(&quot;input&quot;,this).attr(&quot;id&quot;)){a(this).removeAttr(&quot;for&quot;)}})},close:function(b){b.children(&quot;.widget-inside&quot;).slideUp(&quot;fast&quot;,function(){b.css({width:&quot;&quot;,margin:&quot;&quot;})})}};a(document).ready(function(b){wpWidgets.init()})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>