[Mobile] Bug 37649 (add events for closing application by Back button)

This commit is contained in:
Julia Radzhabova 2018-06-25 11:17:31 +03:00
parent e70951333f
commit ef1bf69e33
3 changed files with 36 additions and 0 deletions

View file

@ -170,6 +170,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');
}
},

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');
}
},