define(["require", "exports", "../ribbon-base/ribbon-constants", "./table-operations-group", "./cell-properties-group", "./cell-align-group", "./table-properties-group"], function (require, exports, ribbon_constants_1, table_operations_group_1, cell_properties_group_1, cell_align_group_1, table_properties_group_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TABLE_LAYOUT_TAB_ID = '_table_layout_tab';
var TableLayoutTab = (function () {
function TableLayoutTab(container) {
this.container = container;
this.localObj = this.container.localObj;
this.tableOperationsGroup = new table_operations_group_1.TableOperationsGroup(container);
this.cellPropertiesGroup = new cell_properties_group_1.CellPropertiesGroup(container);
this.cellAlignGroup = new cell_align_group_1.CellAlignGroup(container);
this.tablePropertiesGroup = new table_properties_group_1.TablePropertiesGroup(container);
}
TableLayoutTab.prototype.getTableLayoutTab = function () {
return {
id: this.container.element.id + ribbon_constants_1.RIBBON_ID + exports.TABLE_LAYOUT_TAB_ID,
keyTip: 'JL',
header: this.localObj.getConstant('Table Layout'),
groups: [
this.tablePropertiesGroup.getGroupModel(),
this.tableOperationsGroup.getGroupModel(),
this.cellPropertiesGroup.getGroupModel(),
this.cellAlignGroup.getGroupModel()
]
};
};
TableLayoutTab.prototype.onTableLayoutChange = function () {
this.cellPropertiesGroup.updateSelection();
this.cellAlignGroup.updateSelection();
};
TableLayoutTab.prototype.destroy = function () {
Eif (this.tablePropertiesGroup.destroy) {
this.tablePropertiesGroup.destroy();
this.tablePropertiesGroup = undefined;
}
Eif (this.tableOperationsGroup.destroy) {
this.tableOperationsGroup.destroy();
this.tableOperationsGroup = undefined;
}
Eif (this.cellPropertiesGroup.destroy) {
this.cellPropertiesGroup.destroy();
this.cellPropertiesGroup = undefined;
}
Eif (this.cellAlignGroup.destroy) {
this.cellAlignGroup.destroy();
this.cellAlignGroup = undefined;
}
};
return TableLayoutTab;
}());
exports.TableLayoutTab = TableLayoutTab;
});
|