+2011-01-19 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Fixed bug #17156: htmlArea RTE: Disable Cell merge button in FF when less than two cells are selected
+
2011-01-19 Steffen Kamper <steffen@typo3.org>
* Fixed bug in tx_em_Connection_ExtDirectServer (from em svn)
+2011-01-19 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Fixed bug #17156: htmlArea RTE: Disable Cell merge button in FF when less than two cells are selected
+
2011-01-18 Stanislas Rolland <typo3@sjbr.ca>
* Fixed bug #16045: htmlArea RTE: Merging table cells using context menu doesn't work in Firefox
* This function gets called when the toolbar is being updated
*/
onUpdateToolbar: function (button, mode, selectionEmpty, ancestors) {
- if (mode === 'wysiwyg' && this.editor.isEditable() && button.itemId === 'TO-toggle-borders') {
- button.setInactive(!HTMLArea.DOM.hasClass(this.editor._doc.body, 'htmlarea-showtableborders'));
+ if (mode === 'wysiwyg' && this.editor.isEditable()) {
+ switch (button.itemId) {
+ case 'TO-toggle-borders':
+ button.setInactive(!HTMLArea.DOM.hasClass(this.editor.document.body, 'htmlarea-showtableborders'));
+ break;
+ case 'TO-cell-merge':
+ if (Ext.isGecko) {
+ var selection = this.editor._getSelection();
+ button.setDisabled(button.disabled || selection.rangeCount < 2);
+ }
+ break;
+ }
}
},
/*