BusyPopup: enable for mobile
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: If89a567bd4609ef6993b891a042a7958e4d340d3
This commit is contained in:
parent
617b1aeae5
commit
68e4498a87
3 changed files with 23 additions and 17 deletions
|
@ -256,13 +256,17 @@ p.mobile-wizard.ui-combobox-text.selected {
|
|||
width: 100%;
|
||||
position: relative;
|
||||
bottom: 0px;
|
||||
z-index: 1001;
|
||||
z-index: 2001;
|
||||
background-color: white;
|
||||
box-shadow: 0px -2px 4px 1px #00000030;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#mobile-wizard.menuwizard {
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#mobile-wizard-content *{
|
||||
font-family: var(--mobile-font);
|
||||
color: #212121;
|
||||
|
|
|
@ -121,6 +121,8 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
},
|
||||
|
||||
_hideWizard: function() {
|
||||
$('.jsdialog-overlay').remove();
|
||||
|
||||
// dialog
|
||||
if (this.map.dialog.hasDialogInMobilePanelOpened()) {
|
||||
this.map.dialog._onDialogClose(window.mobileDialogId, true);
|
||||
|
@ -452,10 +454,10 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
if (this._currentScrollPosition)
|
||||
lastScrollPosition = this._currentScrollPosition;
|
||||
|
||||
// for menubutton we inject popup into menu structure
|
||||
if (isPopup) {
|
||||
var popupContainer = $('.mobile-popup-container:visible');
|
||||
if (popupContainer.length) {
|
||||
// for menubutton we inject popup into menu structure
|
||||
if (data.action === 'close') {
|
||||
this.goLevelUp();
|
||||
popupContainer.empty();
|
||||
|
@ -465,10 +467,16 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
this._builder = L.control.mobileWizardBuilder({windowId: data.id, mobileWizard: this, map: this.map, cssClass: 'mobile-wizard'});
|
||||
this._builder.build(popupContainer.get(0), [data]);
|
||||
}
|
||||
}
|
||||
|
||||
this._inBuilding = false;
|
||||
return;
|
||||
} else if (data.action === 'close') {
|
||||
this._hideWizard();
|
||||
return;
|
||||
} else {
|
||||
// normal popup - continue to open mobile wizard
|
||||
L.DomUtil.create('div', 'mobile-wizard jsdialog-overlay', document.body);
|
||||
}
|
||||
}
|
||||
|
||||
this._reset();
|
||||
|
@ -534,6 +542,9 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
this._scrollToPosition(lastScrollPosition);
|
||||
}
|
||||
|
||||
if (isPopup)
|
||||
$('#mobile-wizard-titlebar').hide();
|
||||
|
||||
this._updateMapSize();
|
||||
|
||||
this._inBuilding = false;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
and allows to controll them (show/hide)
|
||||
*/
|
||||
|
||||
/* global app $ setupToolbar w2ui w2utils toolbarUpMobileItems _ Hammer */
|
||||
/* global app $ setupToolbar w2ui toolbarUpMobileItems _ Hammer */
|
||||
L.Control.UIManager = L.Control.extend({
|
||||
mobileWizard: null,
|
||||
blockedUI: false,
|
||||
|
@ -111,20 +111,11 @@ L.Control.UIManager = L.Control.extend({
|
|||
};
|
||||
|
||||
this.map.on('showbusy', function(e) {
|
||||
if (window.mode.isMobile()) {
|
||||
if (w2ui['actionbar'])
|
||||
w2utils.lock(w2ui['actionbar'].box, e.label, true);
|
||||
} else {
|
||||
closeBusyPopup();
|
||||
openBusyPopup(e.label);
|
||||
}
|
||||
});
|
||||
|
||||
this.map.on('hidebusy', function() {
|
||||
// If locked, unlock
|
||||
if (w2ui['actionbar'] && w2ui['actionbar'].box.firstChild.className === 'w2ui-lock') {
|
||||
w2utils.unlock(w2ui['actionbar'].box);
|
||||
}
|
||||
closeBusyPopup();
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue