[Mobile] Fix Bug 48004

This commit is contained in:
Julia Radzhabova 2021-01-25 21:59:01 +03:00
parent b9baf6f469
commit 831933bc87

View file

@ -893,28 +893,31 @@ define([
});
mainView.hideNavbar();
} else {
me.modalViewComment = uiApp.popover(
'<div class="popover container-view-comment">' +
'<div class="popover-inner">' +
me.view.getTemplateContainerViewComments() +
'</div>' +
'</div>',
$$('#toolbar-collaboration')
);
this.picker = $$(me.modalViewComment);
var $overlay = $('.modal-overlay');
$$(this.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
if (!me.openModal) {
me.modalViewComment = uiApp.popover(
'<div class="popover container-view-comment">' +
'<div class="popover-inner">' +
me.view.getTemplateContainerViewComments() +
'</div>' +
'</div>',
$$('#toolbar-collaboration')
);
this.picker = $$(me.modalViewComment);
var $overlay = $('.modal-overlay');
me.openModal = true;
$$(this.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
});
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible');
$('.popover').remove();
me.openModal = false;
});
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible');
$('.popover').remove();
});
}
}
me.getView('Common.Views.Collaboration').renderViewComments(me.showComments, me.indexCurrentComment);
$('.prev-comment').single('click', _.bind(me.onViewPrevComment, me));