[desktop] for bug 53723
This commit is contained in:
parent
88397446a0
commit
eb1d1d7191
|
@ -251,6 +251,17 @@ define([
|
||||||
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
webapp.addListeners({
|
||||||
|
'FileMenu': {
|
||||||
|
'item:click': function (menu, action, isopts) {
|
||||||
|
if ( action == 'app:exit' ) {
|
||||||
|
native.execCommand('editor:event', JSON.stringify({action: 'close'}));
|
||||||
|
menu.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, {id: 'desktop'});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
process: function (opts) {
|
process: function (opts) {
|
||||||
|
@ -278,7 +289,14 @@ define([
|
||||||
if ( config.isDesktopApp && !!native ) {
|
if ( config.isDesktopApp && !!native ) {
|
||||||
native.execCommand('editor:event', JSON.stringify({action:'close', url: config.customization.goback.url}));
|
native.execCommand('editor:event', JSON.stringify({action:'close', url: config.customization.goback.url}));
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
isActive: function () {
|
||||||
|
return !!native;
|
||||||
|
},
|
||||||
|
isOffline: function () {
|
||||||
|
// return webapp.getController('Main').api.asc_isOffline();
|
||||||
|
return webapp.getController('Main').appOptions.isOffline;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -419,6 +419,21 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide']();
|
this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide']();
|
||||||
|
|
||||||
|
if ( Common.Controllers.Desktop.isActive() ) {
|
||||||
|
$('<li class="devider" />' +
|
||||||
|
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
|
||||||
|
this.items.push(
|
||||||
|
new Common.UI.MenuItem({
|
||||||
|
el : $('#fm-btn-exit', this.$el),
|
||||||
|
action : 'app:exit',
|
||||||
|
caption : 'Exit',
|
||||||
|
canFocused: false,
|
||||||
|
dataHint: 1,
|
||||||
|
dataHintDirection: 'left-top',
|
||||||
|
dataHintOffset: [2, 14]
|
||||||
|
}));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setMode: function(mode, delay) {
|
setMode: function(mode, delay) {
|
||||||
|
|
Loading…
Reference in a new issue