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

This commit is contained in:
Julia Radzhabova 2018-06-20 16:57:06 +03:00
parent 169c4f90b7
commit c730f5a60e

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