This commit is contained in:
OVSharova 2022-02-19 20:18:22 +03:00
parent d220dba95c
commit c6a9e1ccbc
6 changed files with 38 additions and 27 deletions

View file

@ -285,7 +285,7 @@ define([
'</tr>', '</tr>',
'<tr class="coauth changes-show">', '<tr class="coauth changes-show">',
'<td colspan="2"><div id="fms-rb-show-changes-last"></div></td>', '<td colspan="2"><div id="fms-rb-show-changes-last"></div></td>',
'</tr>', '</tr>','<tr class="divider cchanges-show"></tr>',
'<tr class="comments">', '<tr class="comments">',
'<td colspan="2"><div id="fms-chb-live-comment"></div></td>', '<td colspan="2"><div id="fms-chb-live-comment"></div></td>',
'</tr>', '</tr>',
@ -313,7 +313,7 @@ define([
'<tr class="themes">', '<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>', '<td><label><%= scope.strTheme %></label></td>',
'<td>', '<td>',
'<div style="display: flex;"><div id="fms-cmb-theme" style="display: inline-block; margin-right: 15px;vertical-align: middle;"></div>', '<div><div id="fms-cmb-theme" style="display: inline-block; margin-right: 15px;vertical-align: middle;"></div>',
'<div id="fms-chb-dark-mode" style="display: inline-block; vertical-align: middle;margin-top: 2px;"></div></div></td>', '<div id="fms-chb-dark-mode" style="display: inline-block; vertical-align: middle;margin-top: 2px;"></div></div></td>',
'</tr>', '</tr>',
'<tr class="edit">', '<tr class="edit">',
@ -331,7 +331,11 @@ define([
'<tr class="macros">', '<tr class="macros">',
'<td><label><%= scope.strMacrosSettings %></label></td>', '<td><label><%= scope.strMacrosSettings %></label></td>',
'<td>', '<td>',
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px;vertical-align: middle;"></div>', '<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px; vertical-align: middle;"></div>',
'</tr>',
'<tr class="fms-btn-apply">',
'<td style="padding-top:15px; padding-bottom: 15px;"><button class="btn normal dlg-btn primary" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.okButtonText %></button></td>',
'<td></td>',
'</tr>', '</tr>',
'</tbody></table>', '</tbody></table>',
@ -469,6 +473,7 @@ define([
me.chAutosave.setValue(1); me.chAutosave.setValue(1);
me.onChangeCoAuthMode(1); me.onChangeCoAuthMode(1);
}); });
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});
this.rbCoAuthModeStrict = new Common.UI.RadioBox({ this.rbCoAuthModeStrict = new Common.UI.RadioBox({
el :$markup.findById('#fms-rb-coauth-mode-strict'), el :$markup.findById('#fms-rb-coauth-mode-strict'),
@ -478,6 +483,7 @@ define([
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.rbCoAuthModeStrict.on('change', _.bind(this.onChangeCoAuthMode, this,0)); this.rbCoAuthModeStrict.on('change', _.bind(this.onChangeCoAuthMode, this,0));
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
this.rbChangesBallons = new Common.UI.RadioBox({ this.rbChangesBallons = new Common.UI.RadioBox({
el :$markup.findById('#fms-rb-show-track-ballons'), el :$markup.findById('#fms-rb-show-track-ballons'),
@ -679,7 +685,7 @@ define([
this.chAutosave.setCaption(this.strAutoRecover); this.chAutosave.setCaption(this.strAutoRecover);
} }
/** coauthoring begin **/ /** coauthoring begin **/
$('tr.collaboration', this.el)[mode.isEdit && mode.canCoAuthoring || mode.canViewReview ? 'show' : 'hide'](); $('tr.collaboration', this.el)[mode.canCoAuthoring || mode.canViewReview ? 'show' : 'hide']();
$('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
@ -829,7 +835,10 @@ define([
}, },
fillShowChanges: function(fastmode) { fillShowChanges: function(fastmode) {
this.rbShowChangesLast.setVisible(!fastmode); if(fastmode)
this.rbShowChangesLast.$el.parent().hide();
else
this.rbShowChangesLast.$el.parent().show();
}, },
onChangeCoAuthMode: function (val){ onChangeCoAuthMode: function (val){
@ -881,7 +890,7 @@ define([
strCoAuthMode: 'Co-editing mode', strCoAuthMode: 'Co-editing mode',
strFast: 'Fast', strFast: 'Fast',
strStrict: 'Strict', strStrict: 'Strict',
strAutoRecover: 'Turn on autorecover', textAutoRecover: 'Autorecover',
txtInch: 'Inch', txtInch: 'Inch',
txtFitPage: 'Fit to Page', txtFitPage: 'Fit to Page',
txtFitWidth: 'Fit to Width', txtFitWidth: 'Fit to Width',

View file

@ -1737,7 +1737,7 @@
"DE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures", "DE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures",
"DE.Views.FileMenuPanels.Settings.okButtonText": "Apply", "DE.Views.FileMenuPanels.Settings.okButtonText": "Apply",
"DE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", "DE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides",
"DE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover", "del_DE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover",
"del_DE.Views.FileMenuPanels.Settings.strAutosave": "Turn on autosave", "del_DE.Views.FileMenuPanels.Settings.strAutosave": "Turn on autosave",
"DE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode", "DE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode",
"del_DE.Views.FileMenuPanels.Settings.strCoAuthModeDescFast": "Other users will see your changes at once", "del_DE.Views.FileMenuPanels.Settings.strCoAuthModeDescFast": "Other users will see your changes at once",
@ -1765,7 +1765,7 @@
"DE.Views.FileMenuPanels.Settings.text5Minutes": "Every 5 Minutes", "DE.Views.FileMenuPanels.Settings.text5Minutes": "Every 5 Minutes",
"DE.Views.FileMenuPanels.Settings.text60Minutes": "Every Hour", "DE.Views.FileMenuPanels.Settings.text60Minutes": "Every Hour",
"DE.Views.FileMenuPanels.Settings.textAlignGuides": "Alignment Guides", "DE.Views.FileMenuPanels.Settings.textAlignGuides": "Alignment Guides",
"del_DE.Views.FileMenuPanels.Settings.textAutoRecover": "Autorecover", "DE.Views.FileMenuPanels.Settings.textAutoRecover": "Autorecover",
"DE.Views.FileMenuPanels.Settings.textAutoSave": "Autosave", "DE.Views.FileMenuPanels.Settings.textAutoSave": "Autosave",
"DE.Views.FileMenuPanels.Settings.textCompatible": "Compatibility", "DE.Views.FileMenuPanels.Settings.textCompatible": "Compatibility",
"DE.Views.FileMenuPanels.Settings.textDisabled": "Disabled", "DE.Views.FileMenuPanels.Settings.textDisabled": "Disabled",

View file

@ -200,7 +200,7 @@ define([
template: _.template([ template: _.template([
'<div class="flex-settings">', '<div class="flex-settings">',
'<table style="margin: 10px 14px auto;"><tbody>', '<table style="margin: 10px 14px auto;"><tbody>',
'<tr class="autosave edit">', '<tr class="editsave">',
'<td colspan="2" class="group-name top"><label><%= scope.txtEditingSaving %></label></td>', '<td colspan="2" class="group-name top"><label><%= scope.txtEditingSaving %></label></td>',
'</tr>', '</tr>',
'<tr class="autosave">', '<tr class="autosave">',
@ -222,17 +222,17 @@ define([
'<td colspan="2"><div style="display: flex;">', '<td colspan="2"><div style="display: flex;">',
'<div id="fms-rb-coauth-mode-fast"></div>', '<div id="fms-rb-coauth-mode-fast"></div>',
'<span style ="display: flex; flex-direction: column;"><label><%= scope.strFast %></label>', '<span style ="display: flex; flex-direction: column;"><label><%= scope.strFast %></label>',
'<label class="comment-text"><%= scope.strFastTip %></label></span>', '<label class="comment-text"><%= scope.txtFastTip %></label></span>',
'</div></td>', '</div></td>',
'</tr>', '</tr>',
'<tr class="coauth changes">', '<tr class="coauth changes">',
'<td colspan="2"><div style="display: flex;">', '<td colspan="2"><div style="display: flex;">',
'<div id="fms-rb-coauth-mode-strict"></div>', '<div id="fms-rb-coauth-mode-strict"></div>',
'<span style ="display: flex; flex-direction: column;"><label><%= scope.strStrict %></label>', '<span style ="display: flex; flex-direction: column;"><label><%= scope.strStrict %></label>',
'<label class="comment-text"><%= scope.strStrictTip %></label></span>', '<label class="comment-text"><%= scope.txtStrictTip %></label></span>',
'</div></td>', '</div></td>',
'</tr>', '</tr>',
'<tr class="edit spellcheck">', '<tr class="edit">',
'<td colspan="2" class="group-name"><label><%= scope.txtProofing %></label></td>', '<td colspan="2" class="group-name"><label><%= scope.txtProofing %></label></td>',
'</tr>', '</tr>',
'<tr class="edit spellcheck">', '<tr class="edit spellcheck">',
@ -241,7 +241,7 @@ define([
'<tr class="edit">', '<tr class="edit">',
'<td colspan="2"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtAutoCorrect %></button></div></td>', '<td colspan="2"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtAutoCorrect %></button></div></td>',
'</tr>', '</tr>',
'<tr class="edit">', '<tr>',
'<td colspan="2" class="group-name"><label><%= scope.txtWorkspace %></label></td>', '<td colspan="2" class="group-name"><label><%= scope.txtWorkspace %></label></td>',
'</tr>', '</tr>',
'<tr class="edit">', '<tr class="edit">',
@ -351,6 +351,7 @@ define([
}).on('change', function () { }).on('change', function () {
me.chAutosave.setValue(1); me.chAutosave.setValue(1);
}); });
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});
this.rbCoAuthModeStrict = new Common.UI.RadioBox({ this.rbCoAuthModeStrict = new Common.UI.RadioBox({
el : $markup.findById('#fms-rb-coauth-mode-strict'), el : $markup.findById('#fms-rb-coauth-mode-strict'),
@ -359,6 +360,7 @@ define([
dataHintDirection: 'left', dataHintDirection: 'left',
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
this.chAutosave = new Common.UI.CheckBox({ this.chAutosave = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-autosave'), el: $markup.findById('#fms-chb-autosave'),
@ -371,7 +373,6 @@ define([
me.rbCoAuthModeStrict.setValue(1); me.rbCoAuthModeStrict.setValue(1);
} }
}); });
this.lblAutosave = $markup.findById('#fms-lbl-autosave');
this.chForcesave = new Common.UI.CheckBox({ this.chForcesave = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-forcesave'), el: $markup.findById('#fms-chb-forcesave'),
@ -530,11 +531,11 @@ define([
var fast_coauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode"); var fast_coauth = Common.Utils.InternalSettings.get("pe-settings-coauthmode");
$('tr.editsave', this.el)[mode.isEdit || mode.canForcesave ?'show':'hide']();
$('tr.edit', this.el)[mode.isEdit?'show':'hide'](); $('tr.edit', this.el)[mode.isEdit?'show':'hide']();
$('tr.autosave', this.el)[mode.isEdit && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide'](); $('tr.autosave', this.el)[mode.isEdit && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide']();
if (this.mode.isDesktopApp && this.mode.isOffline) { if (this.mode.isDesktopApp && this.mode.isOffline) {
this.chAutosave.setCaption(this.strAutoRecover); this.chAutosave.setCaption(this.textAutoRecover);
this.lblAutosave.text(this.textAutoRecover);
} }
$('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide'](); $('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide']();
/** coauthoring begin **/ /** coauthoring begin **/

View file

@ -1586,7 +1586,7 @@
"PE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures", "PE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures",
"PE.Views.FileMenuPanels.Settings.okButtonText": "Apply", "PE.Views.FileMenuPanels.Settings.okButtonText": "Apply",
"del_PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides", "del_PE.Views.FileMenuPanels.Settings.strAlignGuides": "Turn on alignment guides",
"PE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover", "dwl_PE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover",
"del_PE.Views.FileMenuPanels.Settings.strAutosave": "Turn on autosave", "del_PE.Views.FileMenuPanels.Settings.strAutosave": "Turn on autosave",
"PE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode", "PE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode",
"del_PE.Views.FileMenuPanels.Settings.strCoAuthModeDescFast": "Other users will see your changes at once", "del_PE.Views.FileMenuPanels.Settings.strCoAuthModeDescFast": "Other users will see your changes at once",

View file

@ -190,7 +190,7 @@ define([
'<div>', '<div>',
'<div class="flex-settings">', '<div class="flex-settings">',
'<table class="main" style="margin: 10px 18px auto;"><tbody>', '<table class="main" style="margin: 10px 18px auto;"><tbody>',
'<tr className="autosave edit forcesave">', '<tr class="editsave">',
'<td class="group-name top" colspan="2"><label><%= scope.txtEditingSaving %></label></td>', '<td class="group-name top" colspan="2"><label><%= scope.txtEditingSaving %></label></td>',
'</tr>', '</tr>',
'<tr class="autosave">', '<tr class="autosave">',
@ -202,10 +202,10 @@ define([
'<tr class="edit">', '<tr class="edit">',
'<td colspan = "2"><div id="fms-chb-paste-settings"></div></td>', '<td colspan = "2"><div id="fms-chb-paste-settings"></div></td>',
'</tr>', '</tr>',
'<tr class="coauth changes comments" >', '<tr class="collaboration" >',
'<td class="group-name" colspan="2"><label><%= scope.txtCollaboration %></label></td>', '<td class="group-name" colspan="2"><label><%= scope.txtCollaboration %></label></td>',
'</tr>', '</tr>',
'<tr class="coauth changes">', '<tr class="collaboration">',
'<td class="subgroup-name" colspan="2"><label><%= scope.strCoAuthMode %></label></td>', '<td class="subgroup-name" colspan="2"><label><%= scope.strCoAuthMode %></label></td>',
'</tr>', '</tr>',
'<tr class="coauth changes">', '<tr class="coauth changes">',
@ -364,6 +364,8 @@ define([
}).on('change', function () { }).on('change', function () {
me.chAutosave.setValue(1); me.chAutosave.setValue(1);
}); });
this.rbCoAuthModeFast.$el.parent().on('click', function (){me.rbCoAuthModeFast.setValue(true);});
this.rbCoAuthModeStrict = new Common.UI.RadioBox({ this.rbCoAuthModeStrict = new Common.UI.RadioBox({
el : $markup.findById('#fms-rb-coauth-mode-strict'), el : $markup.findById('#fms-rb-coauth-mode-strict'),
name : 'coauth-mode', name : 'coauth-mode',
@ -371,6 +373,7 @@ define([
dataHintDirection: 'left', dataHintDirection: 'left',
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
/** coauthoring end **/ /** coauthoring end **/
this.cmbZoom = new Common.UI.ComboBox({ this.cmbZoom = new Common.UI.ComboBox({
@ -433,10 +436,8 @@ define([
}).on('change', function(field, newValue, oldValue, eOpts){ }).on('change', function(field, newValue, oldValue, eOpts){
if (field.getValue()!=='checked' && me.rbCoAuthModeFast.getValue()) { if (field.getValue()!=='checked' && me.rbCoAuthModeFast.getValue()) {
me.rbCoAuthModeStrict.setValue(true); me.rbCoAuthModeStrict.setValue(true);
//me.lblCoAuthMode.text(me.strCoAuthModeDescStrict);
} }
}); });
this.lblAutosave = $markup.findById('#fms-lbl-autosave');
this.chForcesave = new Common.UI.CheckBox({ this.chForcesave = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-forcesave'), el: $markup.findById('#fms-chb-forcesave'),
@ -716,13 +717,14 @@ define([
setMode: function(mode) { setMode: function(mode) {
this.mode = mode; this.mode = mode;
var fast_coauth = Common.Utils.InternalSettings.get("sse-settings-coauthmode"); var fast_coauth = Common.Utils.InternalSettings.get("sse-settings-coauthmode");
$('tr.editsave', this.el)[mode.isEdit || mode.canForcesave ? 'show' : 'hide']();
$('tr.collaboration', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.edit', this.el)[mode.isEdit ? 'show' : 'hide'](); $('tr.edit', this.el)[mode.isEdit ? 'show' : 'hide']();
$('tr.autosave', this.el)[mode.isEdit && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide'](); $('tr.autosave', this.el)[mode.isEdit && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide']();
if (this.mode.isDesktopApp && this.mode.isOffline) { if (this.mode.isDesktopApp && this.mode.isOffline) {
this.chAutosave.setCaption(this.strAutoRecover); this.chAutosave.setCaption(this.textAutoRecover);
this.lblAutosave.text(this.textAutoRecover);
} }
$('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide'](); $('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide']();
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
@ -1032,7 +1034,6 @@ define([
strFast: 'Fast', strFast: 'Fast',
strStrict: 'Strict', strStrict: 'Strict',
textAutoRecover: 'Autorecover', textAutoRecover: 'Autorecover',
strAutoRecover: 'Turn on autorecover',
txtInch: 'Inch', txtInch: 'Inch',
textForceSave: 'Save to Server', textForceSave: 'Save to Server',
strForcesave: 'Always save to server (otherwise save to server on document close)', strForcesave: 'Always save to server (otherwise save to server on document close)',

View file

@ -2057,7 +2057,7 @@
"SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
"SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Turn on autorecover", "del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Turn on autorecover",
"del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Turn on autosave", "del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutosave": "Turn on autosave",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strCoAuthMode": "Co-editing Mode", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strCoAuthMode": "Co-editing Mode",
"del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strCoAuthModeDescFast": "Other users will see your changes at once", "del_SSE.Views.FileMenuPanels.MainSettingsGeneral.strCoAuthModeDescFast": "Other users will see your changes at once",