[SSE mobile] Fix display Filter Options on tablet

This commit is contained in:
Julia Svinareva 2019-06-19 13:41:19 +03:00
parent ee8e572cce
commit af8e86f839
2 changed files with 13 additions and 5 deletions

View file

@ -356,7 +356,10 @@ define([
onApiFilterOptions: function(config) {
if(_isEdit) {
SSE.getController('FilterOptions').showModal();
var rect = config.asc_getCellCoord(),
posX = rect.asc_getX() + rect.asc_getWidth() - 9,
posY = rect.asc_getY() + rect.asc_getHeight() - 9;
SSE.getController('FilterOptions').showModal(posX,posY);
}
},

View file

@ -83,7 +83,7 @@ define([
this.appConfig = mode;
},
showModal: function(x,y) {
showModal: function(posX,posY) {
var me = this,
isAndroid = Framework7.prototype.device.android === true,
modalView,
@ -111,7 +111,7 @@ define([
});
mainView.hideNavbar();
} else {
modalView = uiApp.popover(
var popoverHTML =
'<div class="popover settings container-filter">' +
'<div class="popover-angle"></div>' +
'<div class="popover-inner">' +
@ -121,8 +121,13 @@ define([
'</div>' +
'</div>' +
'</div>' +
'</div>',
);
'</div>';
var $target = $('#context-menu-target')
.css({left: posX, top: Math.max(0, posY)});
var popover = uiApp.popover(popoverHTML, $target);
if (Common.SharedSettings.get('android')) {
Common.Utils.androidMenuTop($(popover), $target);
}
}
if (Framework7.prototype.device.android === true) {