From edf3c7907627b7c69490a3b0987aeb8d439303c8 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 12 Jan 2017 19:27:09 +0300 Subject: [PATCH] [SSE mobile] debug 'Add' options on android --- .../mobile/app/view/add/AddLink.js | 14 ++++++++------ .../mobile/app/view/add/AddOther.js | 17 +++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/view/add/AddLink.js b/apps/spreadsheeteditor/mobile/app/view/add/AddLink.js index cd2624dfe..30629e961 100644 --- a/apps/spreadsheeteditor/mobile/app/view/add/AddLink.js +++ b/apps/spreadsheeteditor/mobile/app/view/add/AddLink.js @@ -132,15 +132,17 @@ define([ if (root && this.layout) { var $content = this.layout; - // Android fix for navigation - if (Framework7.prototype.device.android) { - var html = $content.html() + navbar; - } else { - html = navbar + $content.html(); + if ( !$content.find('.navbar').length ) { + // Android fix for navigation + if (Framework7.prototype.device.android) { + $content.find('.page').append(navbar); + } else { + $content.prepend(navbar); + } } root.router.load({ - content: html + content: $content.html() }); initEvents.call(this); diff --git a/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js b/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js index 75db4972e..1292a3a8a 100644 --- a/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js +++ b/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js @@ -150,18 +150,19 @@ define([ if (rootView && this.layout) { var $content = this.layout.find(templateId); - var html, navbar = getNavigation.call(this, templateId); + var navbar = getNavigation.call(this, templateId); - // Android fix for navigation - if (Framework7.prototype.device.android) { - // $content.find('.page').append($content.find('.navbar')); - html = $content.html() + navbar; - } else { - html = navbar + $content.html(); + if ( !$content.find('.navbar').length ) { + // Android fix for navigation + if (Framework7.prototype.device.android) { + $content.find('.page').append(navbar); + } else { + $content.prepend(navbar); + } } rootView.router.load({ - content: html + content: $content.html() }); this.fireEvent('page:show', [this, templateId]);