all files / document-editor-container/ribbon/header-footer-tab/ header-footer-tab.js

100% Statements 27/27
50% Branches 3/6
100% Functions 6/6
100% Lines 27/27
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   14× 14× 14× 14× 14× 14×   14×                     31×   14× 14×   14× 14×   14× 14×   14× 14× 14×        
define(["require", "exports", "../ribbon-base/ribbon-constants", "./page-numbers-group", "./options-group", "./close-group"], function (require, exports, ribbon_constants_1, page_numbers_group_1, options_group_1, close_group_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HEADER_FOOTER_TAB_ID = '_header_footer_tab';
    var HeaderFooterTab = (function () {
        function HeaderFooterTab(container) {
            this.container = container;
            this.localObj = this.container.localObj;
            this.commonID = this.container.element.id + ribbon_constants_1.RIBBON_ID;
            this.pageNumbersGroup = new page_numbers_group_1.PageNumbersGroup(container);
            this.optionsGroup = new options_group_1.OptionsGroup(container);
            this.closeGroup = new close_group_1.CloseGroup(container);
        }
        HeaderFooterTab.prototype.getHeaderFooterTab = function () {
            return {
                id: this.commonID + exports.HEADER_FOOTER_TAB_ID,
                header: this.localObj.getConstant('Header & Footer'),
                keyTip: 'JH',
                groups: [
                    this.pageNumbersGroup.getGroupModel(),
                    this.optionsGroup.getGroupModel(),
                    this.closeGroup.getGroupModel()
                ]
            };
        };
        HeaderFooterTab.prototype.updateCheckboxStates = function () {
            this.optionsGroup.updateSelection();
        };
        HeaderFooterTab.prototype.destroy = function () {
            Eif (this.pageNumbersGroup.destroy) {
                this.pageNumbersGroup.destroy();
            }
            Eif (this.optionsGroup.destroy) {
                this.optionsGroup.destroy();
            }
            Eif (this.closeGroup.destroy) {
                this.closeGroup.destroy();
            }
            this.pageNumbersGroup = undefined;
            this.optionsGroup = undefined;
            this.closeGroup = undefined;
        };
        return HeaderFooterTab;
    }());
    exports.HeaderFooterTab = HeaderFooterTab;
});