Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 7685)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
@@ -3597,20 +3597,24 @@
)
}
});
+ }
+ if (this.colors.length) {
+ paletteItems.push({
+ xtype: 'container',
+ layout: 'anchor',
+ items: {
+ xtype: 'colorpalette',
+ itemId: 'color-palette',
+ cls: 'color-palette',
+ colors: this.colors,
+ value: this.value,
+ allowReselect: true
+ }
+ });
+ }
+ if (this.colorsConfiguration && this.colors.length) {
width = 350;
}
- paletteItems.push({
- xtype: 'container',
- layout: 'anchor',
- items: {
- xtype: 'colorpalette',
- itemId: 'color-palette',
- cls: 'color-palette',
- colors: this.colors,
- value: this.value,
- allowReselect: true
- }
- });
Ext.apply(this, {
layout: 'menu',
width: width,
@@ -3644,8 +3648,8 @@
* Based on http://www.extjs.com/forum/showthread.php?t=89312
*/
Ext.ux.form.ColorPaletteField = Ext.extend(Ext.form.TriggerField, {
- triggerClass : 'x-form-color-trigger',
- colors : [
+ triggerClass: 'x-form-color-trigger',
+ defaultColors: [
'000000', '222222', '444444', '666666', '999999', 'BBBBBB', 'DDDDDD', 'FFFFFF',
'660000', '663300', '996633', '003300', '003399', '000066', '330066', '660066',
'990000', '993300', 'CC9900', '006600', '0033FF', '000099', '660099', '990066',
@@ -3663,7 +3667,10 @@
editable: true,
initComponent: function () {
Ext.ux.form.ColorPaletteField.superclass.initComponent.call(this);
- this.addEvents(
+ if (!this.colors) {
+ this.colors = this.defaultColors;
+ }
+ this.addEvents(
'select'
);
},
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js (révision 7685)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/QuickTag/quick-tag.js (copie de travail)
@@ -213,6 +213,7 @@
xtype: 'colorpalettefield',
fieldLabel: this.localize('Colors'),
itemId: 'colors',
+ colors: this.editorConfiguration.disableColorPicker ? [] : null,
colorsConfiguration: this.editorConfiguration.colors,
hidden: true,
listeners: {
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (révision 7685)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail)
@@ -2270,6 +2270,7 @@
xtype: 'colorpalettefield',
fieldLabel: this.localize('Color:'),
itemId: 'f_st_borderColor',
+ colors: this.editorConfiguration.disableColorPicker ? [] : null,
colorsConfiguration: this.editorConfiguration.colors,
value: HTMLArea.util.Color.colorToHex(element && element.style.borderColor ? element.style.borderColor : ((this.properties.borderColor && this.properties.borderColor.defaultValue) ? this.properties.borderColor.defaultValue : '')).substr(1, 6),
helpTitle: this.localize('Border color'),
@@ -2394,6 +2395,7 @@
xtype: 'colorpalettefield',
fieldLabel: this.localize('FG Color:'),
itemId: 'f_st_color',
+ colors: this.editorConfiguration.disableColorPicker ? [] : null,
colorsConfiguration: this.editorConfiguration.colors,
value: HTMLArea.util.Color.colorToHex(element && element.style.color ? element.style.color : ((this.properties.color && this.properties.color.defaultValue) ? this.properties.color.defaultValue : '')).substr(1, 6)
});
@@ -2402,6 +2404,7 @@
xtype: 'colorpalettefield',
fieldLabel: this.localize('Background:'),
itemId: 'f_st_backgroundColor',
+ colors: this.editorConfiguration.disableColorPicker ? [] : null,
colorsConfiguration: this.editorConfiguration.colors,
value: HTMLArea.util.Color.colorToHex(element && element.style.backgroundColor ? element.style.backgroundColor : ((this.properties.backgroundColor && this.properties.backgroundColor.defaultValue) ? this.properties.backgroundColor.defaultValue : '')).substr(1, 6)
});