<!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>[20598] trunk/wp-includes: Theme Customizer: Add statuses to the color and image controls.</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/20598">20598</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-04-25 21:03:29 +0000 (Wed, 25 Apr 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Theme Customizer: Add statuses to the color and image controls. see <a href="http://core.trac.wordpress.org/ticket/19910">#19910</a>.
Move the color control from the switch statement to WP_Customize_Color_Control.
Markup improvements.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpcustomizecontrolphp">trunk/wp-includes/class-wp-customize-control.php</a></li>
<li><a href="#trunkwpincludesclasswpcustomizephp">trunk/wp-includes/class-wp-customize.php</a></li>
<li><a href="#trunkwpincludescsscustomizecontrolsdevcss">trunk/wp-includes/css/customize-controls.dev.css</a></li>
<li><a href="#trunkwpincludesjscustomizecontrolsdevjs">trunk/wp-includes/js/customize-controls.dev.js</a></li>
<li><a href="#trunkwpincludesjscustomizepreviewdevjs">trunk/wp-includes/js/customize-preview.dev.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpcustomizecontrolphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-control.php (20597 => 20598)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-control.php        2012-04-25 20:56:26 UTC (rev 20597)
+++ trunk/wp-includes/class-wp-customize-control.php        2012-04-25 21:03:29 UTC (rev 20598)
</span><span class="lines">@@ -64,14 +64,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          */
</span><del>-        public function enqueue() {
-                switch( $this->type ) {
-                        case 'color':
-                                wp_enqueue_script( 'farbtastic' );
-                                wp_enqueue_style( 'farbtastic' );
-                                break;
-                }
-        }
</del><ins>+        public function enqueue() {}
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">         /**
</span><span class="lines">@@ -176,27 +169,11 @@
</span><span class="cx">                                 </label>
</span><span class="cx">                                 <?php
</span><span class="cx">                                 break;
</span><del>-                        case 'color':
-                                ?>
-                                <label>
-                                        <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
-                                        <div class="dropdown color-picker-toggle">
-                                                <div class="dropdown-content color-picker-spot"></div>
-                                                <div class="dropdown-arrow"></div>
-                                        </div>
-                                        <div class="color-picker-control color-picker-hex">
-                                                <span>#</span>
-                                                <input type="text" <?php $this->link(); ?> />
-                                        </div>
-                                        <div class="color-picker-control farbtastic-placeholder"></div>
-                                </label>
-                                <?php
-                                break;
</del><span class="cx">                         case 'checkbox':
</span><span class="cx">                                 ?>
</span><span class="cx">                                 <label>
</span><span class="cx">                                         <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
</span><del>-                                        <input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> class="customize-control-content" />
</del><ins>+                                        <input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> />
</ins><span class="cx">                                 </label>
</span><span class="cx">                                 <?php
</span><span class="cx">                                 break;
</span><span class="lines">@@ -225,7 +202,7 @@
</span><span class="cx">                                 ?>
</span><span class="cx">                                 <label>
</span><span class="cx">                                         <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
</span><del>-                                        <select <?php $this->link(); ?> class="customize-control-content">
</del><ins>+                                        <select <?php $this->link(); ?>>
</ins><span class="cx">                                                 <?php
</span><span class="cx">                                                 foreach ( $this->choices as $value => $label )
</span><span class="cx">                                                         echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
</span><span class="lines">@@ -258,6 +235,47 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+class WP_Customize_Color_Control extends WP_Customize_Control {
+        public $type = 'color';
+        public $statuses;
+
+        public function __construct( $manager, $id, $args = array() ) {
+                $this->statuses = array( '' => __('Default') );
+                parent::__construct( $manager, $id, $args );
+        }
+
+        public function enqueue() {
+                wp_enqueue_script( 'farbtastic' );
+                wp_enqueue_style( 'farbtastic' );
+        }
+
+        public function to_json() {
+                parent::to_json();
+                $this->json['statuses'] = $this->statuses;
+        }
+
+        public function render_content() {
+                ?>
+                <label>
+                        <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
+                        <div class="customize-control-content">
+                                <div class="dropdown">
+                                        <div class="dropdown-content">
+                                                <div class="dropdown-status"></div>
+                                        </div>
+                                        <div class="dropdown-arrow"></div>
+                                </div>
+                                <div class="color-picker-hex">
+                                        <span>#</span>
+                                        <input type="text" <?php $this->link(); ?> />
+                                </div>
+                        </div>
+                        <div class="farbtastic-placeholder"></div>
+                </label>
+                <?php
+        }
+}
+
</ins><span class="cx"> class WP_Customize_Upload_Control extends WP_Customize_Control {
</span><span class="cx">         public $type = 'upload';
</span><span class="cx">         public $removed = '';
</span><span class="lines">@@ -292,16 +310,24 @@
</span><span class="cx"> class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
</span><span class="cx">         public $type = 'image';
</span><span class="cx">         public $get_url;
</span><ins>+        public $statuses;
</ins><span class="cx">
</span><span class="cx">         protected $tabs = array();
</span><span class="cx">
</span><span class="cx">         public function __construct( $manager, $id, $args ) {
</span><ins>+                $this->statuses = array( '' => __('No Image') );
+
</ins><span class="cx">                 parent::__construct( $manager, $id, $args );
</span><span class="cx">
</span><span class="cx">                 $this->add_tab( 'upload-new', __('Upload New'), array( $this, 'tab_upload_new' ) );
</span><span class="cx">                 $this->add_tab( 'uploaded', __('Uploaded'), array( $this, 'tab_uploaded' ) );
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        public function to_json() {
+                parent::to_json();
+                $this->json['statuses'] = $this->statuses;
+        }
+
</ins><span class="cx">         public function render_content() {
</span><span class="cx">                 $src = $this->value();
</span><span class="cx">                 if ( isset( $this->get_url ) )
</span><span class="lines">@@ -311,16 +337,18 @@
</span><span class="cx">                 <label class="customize-image-picker">
</span><span class="cx">                         <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
</span><span class="cx">
</span><del>-
-                        <div class="dropdown preview-thumbnail">
-                                <div class="dropdown-content">
-                                        <?php if ( empty( $src ) ): ?>
-                                                <img style="display:none;" />
-                                        <?php else: ?>
-                                                <img src="<?php echo esc_url( $src ); ?>" />
-                                        <?php endif; ?>
</del><ins>+                        <div class="customize-control-content">
+                                <div class="dropdown preview-thumbnail">
+                                        <div class="dropdown-content">
+                                                <?php if ( empty( $src ) ): ?>
+                                                        <img style="display:none;" />
+                                                <?php else: ?>
+                                                        <img src="<?php echo esc_url( $src ); ?>" />
+                                                <?php endif; ?>
+                                                <div class="dropdown-status"></div>
+                                        </div>
+                                        <div class="dropdown-arrow"></div>
</ins><span class="cx">                                 </div>
</span><del>-                                <div class="dropdown-arrow"></div>
</del><span class="cx">                         </div>
</span><span class="cx">
</span><span class="cx">                         <div class="library">
</span><span class="lines">@@ -374,11 +402,17 @@
</span><span class="cx"> class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
</span><span class="cx">         public function __construct( $manager ) {
</span><span class="cx">                 parent::__construct( $manager, 'header_image', array(
</span><del>-                        'label' => __( 'Header Image' ),
-                        'section' => 'header',
-                        'context' => 'custom-header',
-                        'removed' => 'remove-header',
-                        'get_url' => 'get_header_image',
</del><ins>+                        'label' => __( 'Header Image' ),
+                        'section' => 'header',
+                        'context' => 'custom-header',
+                        'removed' => 'remove-header',
+                        'get_url' => 'get_header_image',
+                        'statuses' => array(
+                                '' => __('Default'),
+                                'remove-header' => __('No Image'),
+                                'random-default-image' => __('Random Default Image'),
+                                'random-uploaded-image' => __('Random Uploaded Image'),
+                        )
</ins><span class="cx">                 ) );
</span><span class="cx">
</span><span class="cx">                 $this->add_tab( 'default', __('Default'), array( $this, 'tab_default_headers' ) );
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize.php (20597 => 20598)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize.php        2012-04-25 20:56:26 UTC (rev 20597)
+++ trunk/wp-includes/class-wp-customize.php        2012-04-25 21:03:29 UTC (rev 20598)
</span><span class="lines">@@ -539,7 +539,6 @@
</span><span class="cx">                 $this->add_setting( 'header_textcolor', array(
</span><span class="cx">                         // @todo: replace with a new accept() setting method
</span><span class="cx">                         // 'sanitize_callback' => 'sanitize_hexcolor',
</span><del>-                        'control' => 'color',
</del><span class="cx">                         'theme_supports' => array( 'custom-header', 'header-text' ),
</span><span class="cx">                         'default' => get_theme_support( 'custom-header', 'default-text-color' ),
</span><span class="cx">                 ) );
</span><span class="lines">@@ -551,11 +550,10 @@
</span><span class="cx">                         'type' => 'checkbox',
</span><span class="cx">                 ) );
</span><span class="cx">
</span><del>-                $this->add_control( 'header_textcolor', array(
</del><ins>+                $this->add_control( new WP_Customize_Color_Control( $this, 'header_textcolor', array(
</ins><span class="cx">                         'label' => __( 'Text Color' ),
</span><span class="cx">                         'section' => 'header',
</span><del>-                        'type' => 'color',
-                ) );
</del><ins>+                ) ) );
</ins><span class="cx">
</span><span class="cx">                 // Input type: checkbox
</span><span class="cx">                 // With custom value
</span><span class="lines">@@ -583,21 +581,19 @@
</span><span class="cx">                         'transport' => 'postMessage',
</span><span class="cx">                 ) );
</span><span class="cx">
</span><del>-                $this->add_control( 'background_color', array(
</del><ins>+                $this->add_control( new WP_Customize_Color_Control( $this, 'background_color', array(
</ins><span class="cx">                         'label' => __( 'Background Color' ),
</span><span class="cx">                         'section' => 'background',
</span><del>-                        'type' => 'color',
-                ) );
</del><ins>+                ) ) );
</ins><span class="cx">
</span><span class="cx">                 $this->add_setting( 'background_image', array(
</span><span class="cx">                         'default' => get_theme_support( 'custom-background', 'default-image' ),
</span><span class="cx">                         'theme_supports' => 'custom-background',
</span><span class="cx">                 ) );
</span><span class="cx">
</span><del>-                $this->add_control( new WP_Customize_Upload_Control( $this, 'background_image', array(
</del><ins>+                $this->add_control( new WP_Customize_Image_Control( $this, 'background_image', array(
</ins><span class="cx">                         'label' => __( 'Background Image' ),
</span><span class="cx">                         'section' => 'background',
</span><del>-                        'type' => 'upload',
</del><span class="cx">                         'context' => 'custom-background',
</span><span class="cx">                 ) ) );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludescsscustomizecontrolsdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/customize-controls.dev.css (20597 => 20598)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/customize-controls.dev.css        2012-04-25 20:56:26 UTC (rev 20597)
+++ trunk/wp-includes/css/customize-controls.dev.css        2012-04-25 21:03:29 UTC (rev 20598)
</span><span class="lines">@@ -141,6 +141,10 @@
</span><span class="cx">         margin-right: 10px;
</span><span class="cx">         line-height: 28px;
</span><span class="cx"> }
</span><ins>+.customize-control-content {
+        float: right;
+        width: 140px;
+}
</ins><span class="cx">
</span><span class="cx"> .customize-control-text input,
</span><span class="cx"> .customize-control-select select,
</span><span class="lines">@@ -217,14 +221,18 @@
</span><span class="cx">         overflow: hidden;
</span><span class="cx">         float: left;
</span><span class="cx">         min-width: 30px;
</span><del>-        height: 24px;
-        line-height: 24px;
</del><ins>+        height: 16px;
+        line-height: 16px;
</ins><span class="cx">         margin-right: 16px;
</span><del>-        padding: 0 5px;
</del><ins>+        padding: 4px 5px;
</ins><span class="cx">         background-color: #eee;
</span><span class="cx">         border: 1px solid #ccc;
</span><span class="cx">         -webkit-border-radius: 3px 0 0 3px;
</span><span class="cx">         border-radius: 3px 0 0 3px;
</span><ins>+
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        user-select: none;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .customize-control .dropdown-arrow {
</span><span class="lines">@@ -269,29 +277,41 @@
</span><span class="cx">         border-color: #aaa transparent;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.customize-control .dropdown-status {
+        display: none;
+        max-width: 112px;
+        color: #999;
+}
+
</ins><span class="cx"> /*
</span><span class="cx"> * Color Picker
</span><span class="cx"> */
</span><del>-.customize-control .color-picker-control {
</del><ins>+.customize-control-color .color-picker-hex,
+.customize-control-color .farbtastic-placeholder {
</ins><span class="cx">         display: none;
</span><span class="cx"> }
</span><del>-.customize-control.open .color-picker-control {
</del><ins>+.customize-control-color.open .color-picker-hex,
+.customize-control-color.open .farbtastic-placeholder {
</ins><span class="cx">         display: block;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.customize-control .dropdown .color-picker-spot {
</del><ins>+.customize-control-color .dropdown {
+        margin-right: 5px;
+        margin-bottom: 5px;
+}
+
+.customize-control-color .dropdown .dropdown-content {
</ins><span class="cx">         background-color: #fff;
</span><span class="cx">         border: 1px solid rgba( 0, 0, 0, 0.15 );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.customize-section .dropdown:hover .color-picker-spot {
</del><ins>+.customize-control-color .dropdown:hover .dropdown-content {
</ins><span class="cx">         border-color: rgba( 0, 0, 0, 0.25 );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .customize-section .color-picker-hex {
</span><span class="cx">         float: left;
</span><span class="cx">         width: 70px;
</span><del>-        margin-left: 5px;
</del><span class="cx">         font-family: monospace;
</span><span class="cx">         background-color: #fff;
</span><span class="cx">         color: #777;
</span><span class="lines">@@ -322,13 +342,13 @@
</span><span class="cx">         border-radius: 0 3px 3px 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.customize-section .color-picker-control.farbtastic-placeholder {
</del><ins>+.customize-control-color .farbtastic-placeholder {
</ins><span class="cx">         width: 235px;
</span><span class="cx">         margin: 5px 0 10px 25px;
</span><span class="cx">         float: left;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.customize-section .color-picker-control .farbtastic {
</del><ins>+.customize-control-color .farbtastic {
</ins><span class="cx">         margin: 0 auto;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -339,6 +359,7 @@
</span><span class="cx"> .customize-control-image .library,
</span><span class="cx"> .customize-control-image .actions {
</span><span class="cx">         display: none;
</span><ins>+        float: left;
</ins><span class="cx"> }
</span><span class="cx"> .customize-control-image.open .library,
</span><span class="cx"> .customize-control-image.open .actions {
</span><span class="lines">@@ -352,6 +373,10 @@
</span><span class="cx">         padding: 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.customize-section .customize-control-image .dropdown-status {
+        padding: 4px 5px;
+}
+
</ins><span class="cx"> .customize-section .customize-control-image .preview-thumbnail img {
</span><span class="cx">         display: block;
</span><span class="cx">         max-width: 122px;
</span><span class="lines">@@ -397,7 +422,7 @@
</span><span class="cx">
</span><span class="cx"> .customize-section .customize-control-image .library-content {
</span><span class="cx">         display: none;
</span><del>-        width: 260px;
</del><ins>+        width: 100%;
</ins><span class="cx">         float: left;
</span><span class="cx">         padding: 10px 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesjscustomizecontrolsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/customize-controls.dev.js (20597 => 20598)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/customize-controls.dev.js        2012-04-25 20:56:26 UTC (rev 20597)
+++ trunk/wp-includes/js/customize-controls.dev.js        2012-04-25 21:03:29 UTC (rev 20598)
</span><span class="lines">@@ -90,14 +90,30 @@
</span><span class="cx">                                         element.set( setting() );
</span><span class="cx">                                 });
</span><span class="cx">                         });
</span><ins>+                },
</ins><span class="cx">
</span><ins>+                ready: function() {},
+
+                dropdownInit: function() {
+                        var control = this,
+                                statuses = this.container.find('.dropdown-status'),
+                                params = this.params,
+                                update = function( to ) {
+                                        if ( typeof        to === 'string' && params.statuses && params.statuses[ to ] )
+                                                statuses.html( params.statuses[ to ] ).show();
+                                        else
+                                                statuses.hide();
+                                };
+
</ins><span class="cx">                         // Support the .dropdown class to open/close complex elements
</span><span class="cx">                         this.container.on( 'click', '.dropdown', function( event ) {
</span><span class="cx">                                 event.preventDefault();
</span><span class="cx">                                 control.container.toggleClass('open');
</span><span class="cx">                         });
</span><del>-                },
-                ready: function() {}
</del><ins>+
+                        this.setting.bind( update );
+                        update( this.setting() );
+                }
</ins><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         api.ColorControl = api.Control.extend({
</span><span class="lines">@@ -105,9 +121,9 @@
</span><span class="cx">                         var control = this,
</span><span class="cx">                                 spot, text, update;
</span><span class="cx">
</span><del>-                        spot = this.container.find('.color-picker-spot');
</del><ins>+                        spot = this.container.find('.dropdown-content');
</ins><span class="cx">                         update = function( color ) {
</span><del>-                                color = '#' + color;
</del><ins>+                                color = color ? '#' + color : '';
</ins><span class="cx">                                 spot.css( 'background', color );
</span><span class="cx">                                 control.farbtastic.setColor( color );
</span><span class="cx">                         };
</span><span class="lines">@@ -118,6 +134,8 @@
</span><span class="cx">
</span><span class="cx">                         this.setting.bind( update );
</span><span class="cx">                         update( this.setting() );
</span><ins>+
+                        this.dropdownInit();
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx">
</span><span class="lines">@@ -218,6 +236,8 @@
</span><span class="cx">                                 if ( ! this.tabs.uploaded.panel.find('.thumbnail').length )
</span><span class="cx">                                         this.tabs.uploaded.both.addClass('hidden');
</span><span class="cx">                         }
</span><ins>+
+                        this.dropdownInit();
</ins><span class="cx">                 },
</span><span class="cx">                 success: function( attachment ) {
</span><span class="cx">                         api.UploadControl.prototype.success.call( this, attachment );
</span></span></pre></div>
<a id="trunkwpincludesjscustomizepreviewdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/customize-preview.dev.js (20597 => 20598)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/customize-preview.dev.js        2012-04-25 20:56:26 UTC (rev 20597)
+++ trunk/wp-includes/js/customize-preview.dev.js        2012-04-25 21:03:29 UTC (rev 20598)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">                 // Auto update background color by default
</span><span class="cx">                 api( 'background_color', function( value ) {
</span><span class="cx">                         value.bind( function( to ) {
</span><del>-                                body.css( 'background-color', '#' + to );
</del><ins>+                                body.css( 'background-color', to ? '#' + to : '' );
</ins><span class="cx">                         });
</span><span class="cx">                 });
</span><span class="cx">         });
</span></span></pre>
</div>
</div>
</body>
</html>