diff --git a/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js index 2c2a2e3f0..bf9a3c0dd 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js @@ -131,8 +131,9 @@ define([ break; case 'addlink': me.view.hideMenu(); - SSE.getController('AddContainer').showModal(); - SSE.getController('AddOther').getView('AddOther').showInsertLink(); + SSE.getController('AddContainer').showModal({ + panel: 'hyperlink' + }); break; case 'openlink': var linkinfo = info.asc_getHyperlink(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js b/apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js index 913cf345d..da8d230f7 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js +++ b/apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js @@ -104,7 +104,7 @@ define([ } options = opts; - parentButton = !opts ? '#toolbar-add' : opts.button; + parentButton = !opts || !opts.button ? '#toolbar-add' : opts.button; me._showByStack(Common.SharedSettings.get('phone')); this.api.asc_closeCellEditor(); @@ -151,6 +151,15 @@ define([ layout: SSE.getController('AddOther').getView('AddOther').rootLayout() }); + if ( options && options.panel == 'hyperlink' ) { + var view = SSE.getController('AddLink').getView(); + addViews.push({ + caption: view.getTitle(), + id: 'add-link', + layout: view.rootLayout() + }); + } + return addViews; }, @@ -174,11 +183,15 @@ define([ ); - if (layoutAdds.length < 2) { + if (layoutAdds.length == 1) { $layoutNavbar .find('.center') .removeClass('categories') .html(layoutAdds[0].caption); + + $layoutPages = $('