X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fcolordialog%2Fdialogs%2Fcolordialog.js;h=e8e5d31784d4bbc5e102f8bf7532bbceab2f37a2;hp=d99d033e3dfe51907dac975993c7495bfffc908f;hb=8665a7c6c60586526e32e8941fe2896739b6ebfb;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1 diff --git a/_source/plugins/colordialog/dialogs/colordialog.js b/_source/plugins/colordialog/dialogs/colordialog.js index d99d033..e8e5d31 100644 --- a/_source/plugins/colordialog/dialogs/colordialog.js +++ b/_source/plugins/colordialog/dialogs/colordialog.js @@ -28,8 +28,8 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) var cellMouseover = function( event ) { var color = new $el( event.data.getTarget() ).getAttribute( 'title' ); - $doc.getById( 'hicolor' ).setStyle( 'background-color', color ); - $doc.getById( 'hicolortext' ).setHtml( color ); + $doc.getById( hicolorId ).setStyle( 'background-color', color ); + $doc.getById( hicolorTextId ).setHtml( color ); }; var cellClick = function( event ) @@ -97,16 +97,21 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) function clear() { - $doc.getById( 'selhicolor' ).removeStyle( 'background-color' ); + $doc.getById( selHiColorId ).removeStyle( 'background-color' ); dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' ); } var clearActual = $tools.addFunction( function() { - $doc.getById( 'hicolor' ).removeStyle( 'background-color' ); - $doc.getById( 'hicolortext' ).setHtml( ' ' ); + $doc.getById( hicolorId ).removeStyle( 'background-color' ); + $doc.getById( hicolorTextId ).setHtml( ' ' ); } ); + var numbering = function( id ){ return id + CKEDITOR.tools.getNextNumber(); }, + hicolorId = numbering( 'hicolor' ), + hicolorTextId = numbering( 'hicolortext' ), + selHiColorId = numbering( 'selhicolor' ); + return { title : lang.title, minWidth : 360, @@ -149,10 +154,10 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) { type : 'html', html : '' + lang.highlight +'\ -
\ -
 
\ +
\ +
 
\ ' + lang.selected +'\ -
' +
' }, { type : 'text', @@ -163,7 +168,7 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) // Try to update color preview with new value. If fails, then set it no none. try { - $doc.getById( 'selhicolor' ).setStyle( 'background-color', this.getValue() ); + $doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() ); } catch ( e ) {