Fix advanced settings

This commit is contained in:
Julia Radzhabova
2024-02-22 14:20:08 +03:00
parent e72340caad
commit befe933815
6 changed files with 24 additions and 20 deletions

View File

@ -1714,10 +1714,8 @@ define([
}
}
fastCoauth = (value===null || parseInt(value) == 1);
value = Common.localStorage.getItem((fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
if (value == null) value = fastCoauth ? 'none' : 'last';
Common.Utils.InternalSettings.set((fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict", value);
Common.Utils.InternalSettings.set("de-settings-showchanges-fast", Common.localStorage.getItem("de-settings-showchanges-fast") || 'none');
Common.Utils.InternalSettings.set("de-settings-showchanges-strict", Common.localStorage.getItem("de-settings-showchanges-strict") || 'last');
} else if (!this.appOptions.isEdit && this.appOptions.isRestrictedEdit) {
fastCoauth = true;
} else if (this.appOptions.canLiveView && !this.appOptions.isOffline) { // viewer

View File

@ -611,9 +611,11 @@ define([
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.rbCoAuthModeFast.on('change', function(){
me.chAutosave.setValue(1);
me.onChangeCoAuthMode(1);
this.rbCoAuthModeFast.on('change', function(field, newValue, eOpts){
if (newValue) {
me.chAutosave.setValue(1);
me.onChangeCoAuthMode(1);
}
});
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});
@ -624,7 +626,9 @@ define([
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.rbCoAuthModeStrict.on('change', _.bind(this.onChangeCoAuthMode, this,0));
this.rbCoAuthModeStrict.on('change', function(field, newValue, eOpts){
newValue && me.onChangeCoAuthMode(0);
});
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
this.rbChangesBallons = new Common.UI.RadioBox({

View File

@ -1320,10 +1320,8 @@ define([
}
}
fastCoauth = (value===null || parseInt(value) == 1);
value = Common.localStorage.getItem((fastCoauth) ? "pdfe-settings-showchanges-fast" : "pdfe-settings-showchanges-strict");
if (value == null) value = fastCoauth ? 'none' : 'last';
Common.Utils.InternalSettings.set((fastCoauth) ? "pdfe-settings-showchanges-fast" : "pdfe-settings-showchanges-strict", value);
Common.Utils.InternalSettings.set("pdfe-settings-showchanges-fast", Common.localStorage.getItem("pdfe-settings-showchanges-fast") || 'none');
Common.Utils.InternalSettings.set("pdfe-settings-showchanges-strict", Common.localStorage.getItem("pdfe-settings-showchanges-strict") || 'last');
} else {
fastCoauth = false;
autosave = 0;

View File

@ -494,9 +494,11 @@ define([
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.rbCoAuthModeFast.on('change', function(){
me.chAutosave.setValue(1);
me.onChangeCoAuthMode(1);
this.rbCoAuthModeFast.on('change', function(field, newValue, eOpts){
if (newValue) {
me.chAutosave.setValue(1);
me.onChangeCoAuthMode(1);
}
});
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});
@ -507,7 +509,9 @@ define([
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.rbCoAuthModeStrict.on('change', _.bind(this.onChangeCoAuthMode, this,0));
this.rbCoAuthModeStrict.on('change', function(field, newValue, eOpts){
newValue && me.onChangeCoAuthMode(0);
});
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
this.rbShowChangesNone = new Common.UI.RadioBox({

View File

@ -466,8 +466,8 @@ define([
dataHint : '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
}).on('change', function () {
me.chAutosave.setValue(1);
}).on('change', function (field, newValue, eOpts) {
newValue && me.chAutosave.setValue(1);
});
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});

View File

@ -466,8 +466,8 @@ define([
dataHint : '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
}).on('change', function () {
me.chAutosave.setValue(1);
}).on('change', function (field, newValue, eOpts) {
newValue && me.chAutosave.setValue(1);
});
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});