all files / document-editor-container/ribbon/review-tab/ review-tab.js

100% Statements 28/28
50% Branches 3/6
100% Functions 6/6
100% Lines 28/28
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   14× 14× 14× 14× 14×   14×                     53× 53× 53×   14× 14×   14× 14×   14× 14×   14× 14× 14×        
define(["require", "exports", "./comments-group", "./tracking-group", "./protect-group"], function (require, exports, comments_group_1, tracking_group_1, protect_group_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.REVIEW_TAB_ID = '_review_tab';
    var ReviewTab = (function () {
        function ReviewTab(container) {
            this.container = container;
            this.ribbonId = this.container.element.id + '_ribbon';
            this.commentsGroup = new comments_group_1.CommentsGroup(container);
            this.trackingGroup = new tracking_group_1.TrackingGroup(container);
            this.protectGroup = new protect_group_1.ProtectGroup(container);
        }
        ReviewTab.prototype.getReviewTab = function () {
            return {
                id: this.ribbonId + exports.REVIEW_TAB_ID,
                keyTip: 'R',
                header: this.container.localObj.getConstant('Review'),
                groups: [
                    this.commentsGroup.getGroupModel(),
                    this.trackingGroup.getGroupModel(),
                    this.protectGroup.getGroupModel()
                ]
            };
        };
        ReviewTab.prototype.updateReviewTabOnSelectionChange = function () {
            this.commentsGroup.updateSelection();
            this.trackingGroup.updateSelection();
            this.protectGroup.updateSelection();
        };
        ReviewTab.prototype.destroy = function () {
            Eif (this.commentsGroup.destroy) {
                this.commentsGroup.destroy();
            }
            Eif (this.trackingGroup.destroy) {
                this.trackingGroup.destroy();
            }
            Eif (this.protectGroup.destroy) {
                this.protectGroup.destroy();
            }
            this.commentsGroup = undefined;
            this.trackingGroup = undefined;
            this.protectGroup = undefined;
        };
        return ReviewTab;
    }());
    exports.ReviewTab = ReviewTab;
});