diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 61ac6a4b1..5e52e1e46 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -350,6 +350,24 @@ define([ Common.NotificationCenter.trigger('edit:complete', me.toolbar); }, 50); break; + case 'to-endnotes': + this.api.asc_ConvertFootnoteType(false, true, false); + setTimeout(function() { + Common.NotificationCenter.trigger('edit:complete', me.toolbar); + }, 50); + break; + case 'to-footnotes': + this.api.asc_ConvertFootnoteType(false, false, true); + setTimeout(function() { + Common.NotificationCenter.trigger('edit:complete', me.toolbar); + }, 50); + break; + case 'swap': + this.api.asc_ConvertFootnoteType(false, true, true); + setTimeout(function() { + Common.NotificationCenter.trigger('edit:complete', me.toolbar); + }, 50); + break; } }, diff --git a/apps/documenteditor/main/app/view/Links.js b/apps/documenteditor/main/app/view/Links.js index 535fadd8b..3a0a0cb32 100644 --- a/apps/documenteditor/main/app/view/Links.js +++ b/apps/documenteditor/main/app/view/Links.js @@ -82,6 +82,9 @@ define([ button.on('click', function (b, e) { me.fireEvent('links:notes', ['ins_footnote']); }); + button.menu.items[7].menu.on('item:click', function (menu, item, e) {//convert + me.fireEvent('links:notes', [item.value]); + }); }); this.btnsPrevNote.forEach(function(button) { @@ -265,7 +268,17 @@ define([ }), {caption: '--'}, {caption: me.mniDelFootnote, value: 'delele'}, - {caption: me.mniConvertNote, value: 'convert'}, + { + caption: me.mniConvertNote, value: 'convert', + menu: new Common.UI.Menu({ + menuAlign : 'tl-tr', + items: [ + {caption: me.textConvertToEndnotes, value: 'to-endnotes'}, + {caption: me.textConvertToFootnotes, value: 'to-footnotes'}, + {caption: me.textSwapNotes, value: 'swap'} + ] + }) + }, {caption: me.mniNoteSettings, value: 'settings'} ] }); @@ -341,7 +354,10 @@ define([ tipCaption: 'Insert caption', mniConvertNote: 'Convert All Notes', textGotoEndnote: 'Go to Endnote', - mniInsEndnote: 'Insert Endnote' + mniInsEndnote: 'Insert Endnote', + textConvertToEndnotes: 'Convert All Footnotes to Endnotes', + textConvertToFootnotes: 'Convert All Endnotes to Footnotes', + textSwapNotes: 'Swap Footnotes and Endnotes' } }()), DE.Views.Links || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 8e09393a2..8fbd56313 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1764,6 +1764,12 @@ "DE.Views.Links.tipContentsUpdate": "Refresh table of contents", "DE.Views.Links.tipInsertHyperlink": "Add hyperlink", "DE.Views.Links.tipNotes": "Insert or edit footnotes", + "DE.Views.Links.mniConvertNote": "Convert All Notes", + "DE.Views.Links.textGotoEndnote": "Go to Endnote", + "DE.Views.Links.mniInsEndnote": "Insert Endnote", + "DE.Views.Links.textConvertToEndnotes": "Convert All Footnotes to Endnotes", + "DE.Views.Links.textConvertToFootnotes": "Convert All Endnotes to Footnotes", + "DE.Views.Links.textSwapNotes": "Swap Footnotes and Endnotes", "DE.Views.ListSettingsDialog.textAuto": "Automatic", "DE.Views.ListSettingsDialog.textCenter": "Center", "DE.Views.ListSettingsDialog.textLeft": "Left",