Project

General

Profile

Feature #22191 ยป rtehtmlarea_feature_13667.patch

Administrator Admin, 2010-02-25 18:41

View differences:

typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
getButton: function(buttonId) {
return this.editor.toolbar.getButton(buttonId);
},
/**
* Arrays of ExtJS config properties that may be used on a button or dropdown in Page TSConfig
*/
ExtJSProperties: {
htmlareabutton: [],
htmlareacombo: ['width', 'listWidth', 'maxHeight' ]
},
/**
* Registers a button for inclusion in the toolbar
*
* @param object buttonConfiguration: the configuration object of the button:
......
buttonConfiguration.dimensions.left = buttonConfiguration.dimensions.left ? buttonConfiguration.dimensions.left : this.editorConfiguration.dialogueWindows.defaultPositionFromLeft;
}
buttonConfiguration.hidden = buttonConfiguration.hide;
// Copy ExtJS properties for the button
// Apply additional ExtJS config properties set in Page TSConfig
// May not always work for values that must be integers
if (this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]]) {
buttonConfiguration = Ext.copyTo(buttonConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]], this.ExtJSProperties['htmlareabutton']);
Ext.applyIf(buttonConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonConfiguration.id]]);
}
if (this.editorConfiguration.registerButton(buttonConfiguration)) {
var hotKey = buttonConfiguration.hotKey ? buttonConfiguration.hotKey :
......
dropDownConfiguration.plugins = this;
dropDownConfiguration.hidden = dropDownConfiguration.hide;
dropDownConfiguration.xtype = 'htmlareacombo';
// Apply additional ExtJS config properties set in Page TSConfig
// May not always work for values that must be integers
if (this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[dropDownConfiguration.id]]) {
dropDownConfiguration = Ext.copyTo(dropDownConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[dropDownConfiguration.id]], this.ExtJSProperties['htmlareacombo']);
Ext.applyIf(dropDownConfiguration, this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[dropDownConfiguration.id]]);
}
return this.editorConfiguration.registerButton(dropDownConfiguration);
} else {
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail)
var dropDownConfiguration = {
id: buttonId,
tooltip: this.localize(buttonId + "-Tooltip"),
width: (this.buttonsConfiguration.formatblock && this.buttonsConfiguration.formatblock.width) ? this.buttonsConfiguration.formatblock.width : 200,
listWidth: (this.buttonsConfiguration.formatblock && this.buttonsConfiguration.formatblock.listWidth) ? this.buttonsConfiguration.formatblock.listWidth : 200,
maxHeight: (this.buttonsConfiguration.formatblock && this.buttonsConfiguration.formatblock.maxHeight) ? this.buttonsConfiguration.formatblock.maxHeight : 300,
options: (this.buttonsConfiguration.formatblock ? this.buttonsConfiguration.formatblock.data : null),
action: "onChange"
};
if (this.buttonsConfiguration.formatblock) {
dropDownConfiguration.width = this.buttonsConfiguration.formatblock.width ? parseInt(this.buttonsConfiguration.formatblock.width, 10) : 200;
if (this.buttonsConfiguration.formatblock.listWidth) {
dropDownConfiguration.listWidth = parseInt(this.buttonsConfiguration.formatblock.listWidth, 10);
}
if (this.buttonsConfiguration.formatblock.maxHeight) {
dropDownConfiguration.maxHeight = parseInt(this.buttonsConfiguration.formatblock.maxHeight, 10);
}
}
this.registerDropDown(dropDownConfiguration);
/*
* Establishing the list of allowed block elements
*/
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js (copie de travail)
id: dropDownId,
tooltip: this.localize(dropDownId + '-Tooltip'),
fieldLabel: fieldLabel,
width: this.pageTSconfiguration.width ? this.pageTSconfiguration.width : 'auto',
listWidth: this.pageTSconfiguration.listWidth ? this.pageTSconfiguration.listWidth : 250,
maxHeight: this.pageTSconfiguration.maxHeight ? this.pageTSconfiguration.maxHeight : 300,
options: [[this.localize('No style'), 'none']],
action: 'onChange',
storeFields: [ { name: 'text'}, { name: 'value'}, { name: 'style'} ],
tpl: '<tpl for="."><div ext:qtip="{value}" style="{style}text-align:left;font-size:11px;" class="x-combo-list-item">{text}</div></tpl>'
};
if (this.pageTSconfiguration.width) {
dropDownConfiguration.width = parseInt(this.pageTSconfiguration.width, 10);
}
if (this.pageTSconfiguration.listWidth) {
dropDownConfiguration.listWidth = parseInt(this.pageTSconfiguration.listWidth, 10);
}
if (this.pageTSconfiguration.maxHeight) {
dropDownConfiguration.maxHeight = parseInt(this.pageTSconfiguration.maxHeight, 10);
}
this.registerDropDown(dropDownConfiguration);
return true;
},
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (copie de travail)
id : buttonId,
tooltip : this.localize(buttonId + "-Tooltip"),
options : options,
action : "onChange",
listWidth : 200
action : "onChange"
};
if (this.buttonsConfiguration.language) {
dropDownConfiguration.width = this.buttonsConfiguration.language.width ? parseInt(this.buttonsConfiguration.language.width, 10) : 200;
if (this.buttonsConfiguration.language.listWidth) {
dropDownConfiguration.listWidth = parseInt(this.buttonsConfiguration.language.listWidth, 10);
}
if (this.buttonsConfiguration.language.maxHeight) {
dropDownConfiguration.maxHeight = parseInt(this.buttonsConfiguration.language.maxHeight, 10);
}
}
this.registerDropDown(dropDownConfiguration);
return true;
},
typo3/sysext/rtehtmlarea/htmlarea/plugins/SelectFont/select-font.js (copie de travail)
action: "onChange",
tpl: this.disablePCexamples ? '' : '<tpl for="."><div ext:qtip="{value}" style="' + dropDown[3] + '" class="x-combo-list-item">{text}</div></tpl>'
};
if (this.buttonsConfiguration[dropDown[2]]) {
if (this.editorConfiguration.buttons[dropDown[2]].width) {
dropDownConfiguration.width = parseInt(this.editorConfiguration.buttons[dropDown[2]].width, 10);
}
if (this.editorConfiguration.buttons[dropDown[2]].listWidth) {
dropDownConfiguration.listWidth = parseInt(this.editorConfiguration.buttons[dropDown[2]].listWidth, 10);
}
if (this.editorConfiguration.buttons[dropDown[2]].maxHeight) {
dropDownConfiguration.maxHeight = parseInt(this.editorConfiguration.buttons[dropDown[2]].maxHeight, 10);
}
}
this.registerDropDown(dropDownConfiguration);
return true;
}, this);
typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js (copie de travail)
id: buttonId,
tooltip: this.localize(buttonId + '-Tooltip'),
fieldLabel: fieldLabel,
width: this.pageTSconfiguration.width ? this.pageTSconfiguration.width : 'auto',
listWidth: this.pageTSconfiguration.listWidth ? this.pageTSconfiguration.listWidth : 250,
maxHeight: this.pageTSconfiguration.maxHeight ? this.pageTSconfiguration.maxHeight : 300,
options: [[this.localize('No style'), 'none']],
action: 'onChange',
storeFields: [ { name: 'text'}, { name: 'value'}, { name: 'style'} ],
tpl: '<tpl for="."><div ext:qtip="{value}" style="{style}text-align:left;font-size:11px;" class="x-combo-list-item">{text}</div></tpl>'
};
if (this.pageTSconfiguration.width) {
dropDownConfiguration.width = parseInt(this.pageTSconfiguration.width, 10);
}
if (this.pageTSconfiguration.listWidth) {
dropDownConfiguration.listWidth = parseInt(this.pageTSconfiguration.listWidth, 10);
}
if (this.pageTSconfiguration.maxHeight) {
dropDownConfiguration.maxHeight = parseInt(this.pageTSconfiguration.maxHeight, 10);
}
this.registerDropDown(dropDownConfiguration);
return true;
},
    (1-1/1)