From a27ec329a089c3be6fa6502b6450c7731cd6d1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Reinmar=20Koszuli=C5=84ski?= Date: Thu, 29 Nov 2012 13:29:55 +0100 Subject: [PATCH 1/2] Remove livePreview switch from ui color dialog. --- plugins/uicolor/dialogs/uicolor.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/plugins/uicolor/dialogs/uicolor.js b/plugins/uicolor/dialogs/uicolor.js index 540ed718c12..14e2f628266 100644 --- a/plugins/uicolor/dialogs/uicolor.js +++ b/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" ) + '"' ); } @@ -60,8 +59,6 @@ CKEDITOR.dialog.add( 'uicolor', function( editor ) { } }; - var skipPreviewChange = true; - return { title: editor.lang.uicolor.title, minWidth: 360, @@ -87,22 +84,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: [ From a4a796d73584a2ecddd2a76d0778a63b241f0c16 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Fri, 7 Dec 2012 13:35:42 +0100 Subject: [PATCH 2/2] Made uicolor yahoo widget available to public for testing purposes. --- plugins/uicolor/dialogs/uicolor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/uicolor/dialogs/uicolor.js b/plugins/uicolor/dialogs/uicolor.js index 14e2f628266..c3ff3ec1ffc 100644 --- a/plugins/uicolor/dialogs/uicolor.js +++ b/plugins/uicolor/dialogs/uicolor.js @@ -41,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 );