From 3a035f42dbeade36e0e4db4ea594a9b98abffbca Mon Sep 17 00:00:00 2001 From: Alexander Yuzhin <alexander.yuzhin@onlyoffice.com> Date: Fri, 23 Dec 2016 13:57:23 +0300 Subject: [PATCH] [DE mobile] Fixed display context menu. --- apps/documenteditor/mobile/app/controller/DocumentHolder.js | 2 +- apps/documenteditor/mobile/app/controller/Settings.js | 2 ++ apps/documenteditor/mobile/app/view/Search.js | 4 +++- apps/presentationeditor/mobile/app/template/Settings.template | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js index b74c56921..45b6d6495 100644 --- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js @@ -134,7 +134,7 @@ define([ }, onApiShowPopMenu: function(posX, posY) { - if ($('.popover.settings').length > 0) { + if ($('.popover.settings, .popup.settings, .picker-modal.settings').length > 0) { return; } diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index 371a26c45..615ae3c31 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -102,6 +102,8 @@ define([ }, showModal: function() { + uiApp.closeModal(); + if (Common.SharedSettings.get('phone')) { modalView = uiApp.popup( '<div class="popup settings container-settings">' + diff --git a/apps/documenteditor/mobile/app/view/Search.js b/apps/documenteditor/mobile/app/view/Search.js index d9b4dc64a..aebc45f04 100644 --- a/apps/documenteditor/mobile/app/view/Search.js +++ b/apps/documenteditor/mobile/app/view/Search.js @@ -91,9 +91,11 @@ define([ showSettings: function (e) { var me = this; + uiApp.closeModal(); + if (Common.SharedSettings.get('phone')) { me.picker = $$(uiApp.popup([ - '<div class="popup">', + '<div class="popup settings">', '<div class="view search-settings-view navbar-through">', _layout.find('#search-settings-view').html(), '</div>', diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template index 67a4ca7fa..74273c274 100644 --- a/apps/presentationeditor/mobile/app/template/Settings.template +++ b/apps/presentationeditor/mobile/app/template/Settings.template @@ -242,7 +242,6 @@ <div class="navbar-inner"> <div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div> <div class="center sliding"><%= scope.textSlideSize %></div> - <div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div> </div> </div> <div class="page" id="page-settings-setup-view" data-page="settings-setup-view">