diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 12af9d8d2b..c47aa989f3 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -171,6 +171,9 @@ define([ toolbar.btnSelectAll.on('click', _.bind(this.onSelectAll, this)); toolbar.btnSelectTool.on('click', _.bind(this.onSelectTool, this, 'select')); toolbar.btnHandTool.on('click', _.bind(this.onSelectTool, this, 'hand')); + toolbar.btnAddComment.on('click', function (btn, e) { + Common.NotificationCenter.trigger('app:comment:add', 'toolbar'); + }); this.onBtnChangeState('undo:disabled', toolbar.btnUndo, toolbar.btnUndo.isDisabled()); this.onBtnChangeState('redo:disabled', toolbar.btnRedo, toolbar.btnRedo.isDisabled()); diff --git a/apps/pdfeditor/main/app/template/Toolbar.template b/apps/pdfeditor/main/app/template/Toolbar.template index a14e7234d6..b30ee1842e 100644 --- a/apps/pdfeditor/main/app/template/Toolbar.template +++ b/apps/pdfeditor/main/app/template/Toolbar.template @@ -43,6 +43,7 @@
+
diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 6ae6bc3eb7..c66b16bc29 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -261,6 +261,18 @@ define([ }); this.toolbarControls.push(this.btnHandTool); + this.btnAddComment = new Common.UI.Button({ + id: 'tlbtn-addcomment', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-big-menu-comments', + lock: [_set.disableOnStart], + caption: this.capBtnComment, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'small' + }); + this.toolbarControls.push(this.btnAddComment); + // // Menus // @@ -347,6 +359,7 @@ define([ _injectComponent('#slot-btn-select-all', this.btnSelectAll); _injectComponent('#slot-btn-select-tool', this.btnSelectTool); _injectComponent('#slot-btn-hand-tool', this.btnHandTool); + _injectComponent('#slot-btn-comment', this.btnAddComment); this.btnPrint.menu && this.btnPrint.$el.addClass('split'); return $host; @@ -401,6 +414,7 @@ define([ this.btnSelectAll.updateHint(this.tipSelectAll + Common.Utils.String.platformKey('Ctrl+A')); this.btnSelectTool.updateHint(this.tipSelectTool); this.btnHandTool.updateHint(this.tipHandTool); + this.btnAddComment.updateHint(this.tipAddComment); }, onToolbarAfterRender: function(toolbar) { @@ -560,7 +574,9 @@ define([ textTabView: 'View', tipSelectAll: 'Select all', tipCut: 'Cut', - textTabDraw: 'Draw' + textTabDraw: 'Draw', + capBtnComment: 'Comment', + tipAddComment: 'Add comment' } })(), PDFE.Views.Toolbar || {})); });