diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 14a12cb0a..fb22e26ef 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -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); diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index f43f7d1cd..290fa2c28 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -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(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index a1a81924a..7aa72ad3e 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -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'); } },