Skip to content
Permalink
Browse files

Merge branch 't/9693'

  • Loading branch information...
Reinmar committed Dec 7, 2012
2 parents 2112bc4 + a4a796d commit 205c30ec68ceebf5d90b9cbc1e4280956532ff66
Showing with 5 additions and 21 deletions.
  1. +5 −21 plugins/uicolor/dialogs/uicolor.js
@@ -18,9 +18,8 @@ CKEDITOR.dialog.add( 'uicolor', function( editor ) {
picker.refresh( pickerId );
}

function setNewUiColor( color, force ) {
if ( force || dialog._.contents.tab1.livePeview.getValue() )
editor.setUiColor( color );
function setNewUiColor( color ) {
editor.setUiColor( color );
// Write new config string into textbox.
dialog._.contents.tab1.configBox.setValue( 'config.uiColor = "#' + picker.get( "hex" ) + '"' );
}
@@ -42,6 +41,9 @@ CKEDITOR.dialog.add( 'uicolor', function( editor ) {
}
});

// Make Yahoo widget available to public.
this.picker = picker;

// Set actual UI color to the picker.
if ( uiColor )
setNewPickerColor( uiColor );
@@ -60,8 +62,6 @@ CKEDITOR.dialog.add( 'uicolor', function( editor ) {
}
};

var skipPreviewChange = true;

return {
title: editor.lang.uicolor.title,
minWidth: 360,
@@ -87,22 +87,6 @@ CKEDITOR.dialog.add( 'uicolor', function( editor ) {
id: 'tab1',
type: 'vbox',
children: [
{
id: 'livePeview',
type: 'checkbox',
label: editor.lang.uicolor.preview,
'default': 1,
onLoad: function() {
skipPreviewChange = true;
},
onChange: function() {
if ( skipPreviewChange )
return;
var on = this.getValue(),
color = on ? '#' + picker.get( 'hex' ) : uiColor;
setNewUiColor( color, true );
}
},
{
type: 'hbox',
children: [

0 comments on commit 205c30e

Please sign in to comment.
You can’t perform that action at this time.