all files / document-editor-container/ribbon/table-layout-tab/ table-tab.js

100% Statements 31/31
50% Branches 4/8
100% Functions 6/6
100% Lines 31/31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53   14× 14× 14× 14× 14× 14×   14×                       17× 17×   14× 14× 14×   14× 14× 14×   14× 14× 14×   14× 14× 14×          
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;
});