[desktop] cut unused code

This commit is contained in:
Maxim Kadushkin 2020-09-04 20:23:57 +03:00
parent b7f410def8
commit aa0242e16d
2 changed files with 1 additions and 30 deletions

View file

@ -78,16 +78,6 @@ define([
} else } else
if (/window:features/.test(cmd)) { if (/window:features/.test(cmd)) {
var obj = JSON.parse(param); var obj = JSON.parse(param);
if ( obj.canUndock == 'true' ) {
if ( !config.canUndock ) {
config.canUndock = true;
if ( !_.isEmpty(config) )
Common.NotificationCenter.trigger('app:config', {canUndock:true});
}
}
if (_.isNumber(obj.skiptoparea)) { if (_.isNumber(obj.skiptoparea)) {
if ( $('.asc-window.modal').length && $('.asc-window.modal').position().top < obj.skiptoparea ) if ( $('.asc-window.modal').length && $('.asc-window.modal').position().top < obj.skiptoparea )
$('.asc-window.modal').css('top', obj.skiptoparea); $('.asc-window.modal').css('top', obj.skiptoparea);
@ -95,13 +85,6 @@ define([
Common.Utils.InternalSettings.set('window-inactive-area-top', obj.skiptoparea); Common.Utils.InternalSettings.set('window-inactive-area-top', obj.skiptoparea);
} }
} else } else
if (/window:status/.test(cmd)) {
var obj = JSON.parse(param);
if ( obj.action == 'undocking' ) {
Common.NotificationCenter.trigger('undock:status', {status:obj.status=='undocked'?'undocked':'docked'});
}
} else
if (/editor:config/.test(cmd)) { if (/editor:config/.test(cmd)) {
if ( param == 'request' ) { if ( param == 'request' ) {
if ( !!titlebuttons ) { if ( !!titlebuttons ) {
@ -209,15 +192,7 @@ define([
} }
}); });
Common.NotificationCenter.on('action:undocking', function (opts) {
native.execCommand('editor:event', JSON.stringify({action:'undocking', state: opts == 'dock' ? 'dock' : 'undock'}));
});
Common.NotificationCenter.on('app:face', function (mode) { Common.NotificationCenter.on('app:face', function (mode) {
if ( config.canUndock ) {
Common.NotificationCenter.trigger('app:config', {canUndock: true});
}
native.execCommand('webapps:features', JSON.stringify( native.execCommand('webapps:features', JSON.stringify(
{version: config.version, eventloading:true, titlebuttons:true, viewmode:!mode.isEdit, crypted:mode.isCrypted} )); {version: config.version, eventloading:true, titlebuttons:true, viewmode:!mode.isEdit, crypted:mode.isCrypted} ));

View file

@ -321,9 +321,6 @@ define([
me.btnOptions.updateHint(me.tipViewSettings); me.btnOptions.updateHint(me.tipViewSettings);
} }
function onAppConfig(config) {
}
function onDocNameKeyDown(e) { function onDocNameKeyDown(e) {
var me = this; var me = this;
@ -407,8 +404,7 @@ define([
Common.NotificationCenter.on({ Common.NotificationCenter.on({
'app:ready': function(mode) {Common.Utils.asyncCall(onAppReady, me, mode);}, 'app:ready': function(mode) {Common.Utils.asyncCall(onAppReady, me, mode);},
'app:face': function(mode) {Common.Utils.asyncCall(onAppShowed, me, mode);}, 'app:face': function(mode) {Common.Utils.asyncCall(onAppShowed, me, mode);}
'app:config' : function (c) {Common.Utils.asyncCall(onAppConfig, me, c);}
}); });
Common.NotificationCenter.on('collaboration:sharingdeny', onLostEditRights); Common.NotificationCenter.on('collaboration:sharingdeny', onLostEditRights);
}, },