[PE, SSE mobile] Bug 37649 (add events for closing application by Back button)

This commit is contained in:
Julia Radzhabova 2018-06-21 16:38:32 +03:00
parent 9415bc03de
commit 471c7f5db5
3 changed files with 25 additions and 1 deletions

View file

@ -173,7 +173,7 @@ define([
Common.Gateway.on('internalcommand', function(data) {
if (data.command=='hardBack') {
if ($$('.modal-in').length>0) {
if ($('.modal-in').length>0) {
if ( !$(me.loadMask).hasClass('modal-in') )
uiApp.closeModal();
Common.Gateway.internalMessage('hardBack', false);

View file

@ -169,6 +169,18 @@ define([
Common.Gateway.on('showmessage', _.bind(me.onExternalMessage, me));
Common.Gateway.on('opendocument', _.bind(me.loadDocument, me));
Common.Gateway.appReady();
Common.Gateway.on('internalcommand', function(data) {
if (data.command=='hardBack') {
if ($('.modal-in').length>0) {
if ( !$(me.loadMask).hasClass('modal-in') )
uiApp.closeModal();
Common.Gateway.internalMessage('hardBack', false);
} else
Common.Gateway.internalMessage('hardBack', true);
}
});
Common.Gateway.internalMessage('listenHardBack');
}
me.initNames();

View file

@ -175,6 +175,18 @@ define([
Common.Gateway.on('showmessage', _.bind(me.onExternalMessage, me));
Common.Gateway.on('opendocument', _.bind(me.loadDocument, me));
Common.Gateway.appReady();
Common.Gateway.on('internalcommand', function(data) {
if (data.command=='hardBack') {
if ($('.modal-in').length>0) {
if ( !$(me.loadMask).hasClass('modal-in') )
uiApp.closeModal();
Common.Gateway.internalMessage('hardBack', false);
} else
Common.Gateway.internalMessage('hardBack', true);
}
});
Common.Gateway.internalMessage('listenHardBack');
}
},