define(["require", "exports", "./pages-group", "./tables-group", "./illustrations-group", "./links-group", "./toc-group", "./bookmarks-group", "./comments-group", "./header-footer-group", "../ribbon-base/ribbon-constants"], function (require, exports, pages_group_1, tables_group_1, illustrations_group_1, links_group_1, toc_group_1, bookmarks_group_1, comments_group_1, header_footer_group_1, ribbon_constants_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.INSERT_TAB_ID = '_insert_tab';
var InsertTab = (function () {
function InsertTab(container) {
this.container = container;
this.pagesGroup = new pages_group_1.PagesGroup(container);
this.tablesGroup = new tables_group_1.TablesGroup(container);
this.illustrationsGroup = new illustrations_group_1.IllustrationsGroup(container);
this.linksGroup = new links_group_1.LinksGroup(container);
this.tocGroup = new toc_group_1.TOCGroup(container);
this.bookmarksGroup = new bookmarks_group_1.BookmarksGroup(container);
this.commentsGroup = new comments_group_1.CommentsGroup(container);
this.headerFooterGroup = new header_footer_group_1.HeaderFooterGroup(container);
}
InsertTab.prototype.getInsertTab = function () {
var id = this.container.element.id + ribbon_constants_1.RIBBON_ID;
return {
id: id + exports.INSERT_TAB_ID,
header: this.container.localObj.getConstant('Insert'),
keyTip: 'N',
groups: [
this.pagesGroup.getGroupModel(),
this.tablesGroup.getGroupModel(),
this.illustrationsGroup.getGroupModel(),
this.linksGroup.getGroupModel(),
this.tocGroup.getGroupModel(),
this.bookmarksGroup.getGroupModel(),
this.commentsGroup.getGroupModel(),
this.headerFooterGroup.getGroupModel()
]
};
};
InsertTab.prototype.updateControlState = function () {
this.pagesGroup.updateSelection();
this.commentsGroup.updateSelection();
};
InsertTab.prototype.destroy = function () {
Eif (this.pagesGroup) {
this.pagesGroup.destroy();
}
Eif (this.tablesGroup) {
this.tablesGroup.destroy();
}
Eif (this.illustrationsGroup) {
this.illustrationsGroup.destroy();
}
Eif (this.linksGroup) {
this.linksGroup.destroy();
}
Eif (this.tocGroup) {
this.tocGroup.destroy();
}
Eif (this.bookmarksGroup) {
this.bookmarksGroup.destroy();
}
Eif (this.commentsGroup) {
this.commentsGroup.destroy();
}
Eif (this.headerFooterGroup) {
this.headerFooterGroup.destroy();
}
this.pagesGroup = undefined;
this.tablesGroup = undefined;
this.illustrationsGroup = undefined;
this.linksGroup = undefined;
this.tocGroup = undefined;
this.bookmarksGroup = undefined;
this.commentsGroup = undefined;
this.headerFooterGroup = undefined;
this.container = undefined;
};
return InsertTab;
}());
exports.InsertTab = InsertTab;
});
|