2 namespace TYPO3\CMS\Rtehtmlarea\Extension;
44 protected $pluginButtons =
'table, toggleborders, tableproperties, tablerestyle, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
45 columnproperties, columninsertbefore, columninsertafter, columndelete, columnsplit,
46 cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge';
54 'table' =>
'InsertTable',
55 'toggleborders' =>
'TO-toggle-borders',
56 'tableproperties' =>
'TO-table-prop',
57 'tablerestyle' =>
'TO-table-restyle',
58 'rowproperties' =>
'TO-row-prop',
59 'rowinsertabove' =>
'TO-row-insert-above',
60 'rowinsertunder' =>
'TO-row-insert-under',
61 'rowdelete' =>
'TO-row-delete',
62 'rowsplit' =>
'TO-row-split',
63 'columnproperties' =>
'TO-col-prop',
64 'columninsertbefore' =>
'TO-col-insert-before',
65 'columninsertafter' =>
'TO-col-insert-after',
66 'columndelete' =>
'TO-col-delete',
67 'columnsplit' =>
'TO-col-split',
68 'cellproperties' =>
'TO-cell-prop',
69 'cellinsertbefore' =>
'TO-cell-insert-before',
70 'cellinsertafter' =>
'TO-cell-insert-after',
71 'celldelete' =>
'TO-cell-delete',
72 'cellsplit' =>
'TO-cell-split',
73 'cellmerge' =>
'TO-cell-merge'
84 $available = parent::main($configuration);
85 if ($this->configuration[
'client'][
'browser'] ===
'opera') {
86 $this->configuration[
'thisConfig'][
'hideTableOperationsInToolbar'] = 0;
99 if (in_array(
'table', $this->toolbar)) {
101 $disabledFieldsets = array(
'Alignment',
'Borders',
'Color',
'Description',
'Layout',
'RowGroup',
'Spacing',
'Style');
102 foreach ($disabledFieldsets as $index => $fieldset) {
103 if (!trim($this->configuration[
'thisConfig'][(
'disable' . $fieldset .
'FieldsetInTableOperations')])) {
104 unset($disabledFieldsets[$index]);
107 $disabledFieldsets = strtolower(implode(
',', $disabledFieldsets));
109 if ($disabledFieldsets) {
110 $dialogues = array(
'table',
'tableproperties',
'rowproperties',
'columnproperties',
'cellproperties');
111 foreach ($dialogues as $dialogue) {
112 if (in_array($dialogue, $this->toolbar)) {
113 if (!is_array($this->configuration[
'thisConfig'][
'buttons.']) || !is_array($this->configuration[
'thisConfig'][
'buttons.'][($dialogue .
'.')])) {
114 $jsArray[] =
'RTEarea[editornumber].buttons.' . $dialogue .
' = new Object();';
115 $jsArray[] =
'RTEarea[editornumber].buttons.' . $dialogue .
'.removeFieldsets = "' . $disabledFieldsets .
'";';
116 }
elseif ($this->configuration[
'thisConfig'][
'buttons.'][$dialogue .
'.'][
'removeFieldsets']) {
117 $jsArray[] =
'RTEarea[editornumber].buttons.' . $dialogue .
'.removeFieldsets += ",' . $disabledFieldsets .
'";';
119 $jsArray[] =
'RTEarea[editornumber].buttons.' . $dialogue .
'.removeFieldsets = ",' . $disabledFieldsets .
'";';
124 $jsArray[] =
'RTEarea[editornumber].hideTableOperationsInToolbar = ' . (trim($this->configuration[
'thisConfig'][
'hideTableOperationsInToolbar']) ?
'true' :
'false') .
';';
126 return implode(LF, $jsArray);
138 if (!in_array(
'table', $show)) {