Feature #15474 ยป rtehtmlarea_feature_2342.patch
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/locallang.xml (copie de travail) | ||
---|---|---|
<label index="scope_column">Column</label>
|
||
<label index="scope_rowgroup">Group of rows</label>
|
||
<label index="Scope of header cell">Scope of the header</label>
|
||
<label index="Abbreviation">Abbreviation</label>
|
||
<label index="Header abbreviation">Header abbreviation</label>
|
||
<label index="Center">Center</label>
|
||
<label index="Character">Character</label>
|
||
<label index="Align on this character">Align text relative to this character</label>
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail) | ||
---|---|---|
element.scope = val.substring(2,10);
|
||
}
|
||
break;
|
||
case "f_cell_abbr":
|
||
if (!column) {
|
||
element.abbr = (element.nodeName.toLowerCase() == 'td') ? '' : val;
|
||
}
|
||
break;
|
||
case "f_rowgroup":
|
||
var nodeName = section.nodeName.toLowerCase();
|
||
if (val != nodeName) {
|
||
... | ... | |
var attributes = element.attributes, attributeName, attributeValue;
|
||
for (var i = attributes.length; --i >= 0;) {
|
||
attributeName = attributes.item(i).nodeName;
|
||
attributeValue = element.getAttribute(attributeName);
|
||
if (attributeValue) newCell.setAttribute(attributeName, attributeValue);
|
||
if (nodeName != 'td' || (attributeName != 'scope' && attributeName != 'abbr')) {
|
||
attributeValue = element.getAttribute(attributeName);
|
||
if (attributeValue) {
|
||
newCell.setAttribute(attributeName, attributeValue);
|
||
}
|
||
}
|
||
}
|
||
// In IE, the above fails to update the classname and style attributes.
|
||
if (HTMLArea.is_ie) {
|
||
... | ... | |
[this.localize('Header for row group'), 'throwgroup']
|
||
];
|
||
}
|
||
// onChange handler: reset the CSS class dropdown when the cell type changes
|
||
// onChange handler: reset the CSS class dropdown and show/hide abbr field when the cell type changes
|
||
// @param object cellTypeField: the combo object
|
||
// @param string value: the value of the cell type field
|
||
// @param object record: the selected record
|
||
// @return void
|
||
var self = this;
|
||
function resetStyleOptions(cellTypeField, value) {
|
||
self.setStyleOptions(self.dialog.find('itemId', 'f_class'), element, value.substring(0,2));
|
||
function cellTypeChange(cellTypeField, record) {
|
||
value = record.get('value');
|
||
var styleCombo = self.dialog.find('itemId', 'f_class')[0];
|
||
if (styleCombo) {
|
||
self.setStyleOptions(styleCombo, element, value.substring(0,2));
|
||
}
|
||
// abbr field present only for single cell, not for column
|
||
var abbrField = self.dialog.find('itemId', 'f_cell_abbr')[0];
|
||
if (abbrField) {
|
||
abbrField.setVisible(value != 'td');
|
||
abbrField.label.setVisible(value != 'td');
|
||
}
|
||
}
|
||
var selected = element.nodeName.toLowerCase() + element.scope.toLowerCase();
|
||
itemsConfig.push(Ext.apply({
|
||
... | ... | |
width: (this.properties && this.properties.cellType && this.properties.cellType.width) ? this.properties.cellType.width : 250,
|
||
value: (column && selected == 'thcol') ? 'td' : selected,
|
||
listeners: {
|
||
change: {
|
||
fn: resetStyleOptions,
|
||
select: {
|
||
fn: cellTypeChange,
|
||
scope: this
|
||
}
|
||
}
|
||
}, this.configDefaults['combo']));
|
||
if (!column) {
|
||
itemsConfig.push({
|
||
xtype: 'textfield',
|
||
fieldLabel: this.localize('Abbreviation'),
|
||
labelSeparator: ':',
|
||
itemId: 'f_cell_abbr',
|
||
helpTitle: this.localize('Header abbreviation'),
|
||
width: 300,
|
||
value: element.abbr,
|
||
hideMode: 'visibility',
|
||
hidden: (selected == 'td'),
|
||
hideLabel: (selected == 'td')
|
||
});
|
||
}
|
||
return {
|
||
xtype: 'fieldset',
|
||
title: this.localize(column ? 'Type of cells' : 'Cell Type and Scope'),
|