From 2b10bc3411bd9acec4da0a1b36b861553712b09c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Jan 2017 21:27:30 +0300 Subject: [PATCH] [DE] Add footnote by clicking btnNotes button. --- apps/documenteditor/main/app/controller/Toolbar.js | 10 ++++++++-- apps/documenteditor/main/app/view/Toolbar.js | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index b5368dc6f..6a1a5152e 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -266,7 +266,8 @@ define([ toolbar.mnuZoomIn.on('click', _.bind(this.onZoomInClick, this)); toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this)); toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this)); - toolbar.btnNotes.menu.on('item:click', _.bind(this.onNotesClick, this)); + toolbar.btnNotes.on('click', _.bind(this.onNotesClick, this)); + toolbar.btnNotes.menu.on('item:click', _.bind(this.onNotesMenuClick, this)); toolbar.mnuGotoFootPrev.on('click', _.bind(this.onFootnotePrevClick, this)); toolbar.mnuGotoFootNext.on('click', _.bind(this.onFootnoteNextClick, this)); @@ -1997,7 +1998,12 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.toolbar); }, - onNotesClick: function(menu, item) { + onNotesClick: function() { + if (this.api) + this.api.asc_AddFootnote(); + }, + + onNotesMenuClick: function(menu, item) { if (this.api) { if (item.value == 'ins_footnote') this.api.asc_AddFootnote(); diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 5c5030f40..474884217 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -741,6 +741,7 @@ define([ id : 'id-toolbar-btn-notes', cls : 'btn-toolbar', iconCls : 'btn-notes', + split : true, menu : true }); this.paragraphControls.push(this.btnNotes);