[SSE] Add settings for copy, cut, paste
This commit is contained in:
parent
ef5fe977da
commit
2ffcc4b717
|
@ -389,6 +389,10 @@ define([
|
||||||
value = parseInt(Common.localStorage.getItem("sse-settings-autosave"));
|
value = parseInt(Common.localStorage.getItem("sse-settings-autosave"));
|
||||||
Common.Utils.InternalSettings.set("sse-settings-autosave", value);
|
Common.Utils.InternalSettings.set("sse-settings-autosave", value);
|
||||||
this.api.asc_setAutoSaveGap(value);
|
this.api.asc_setAutoSaveGap(value);
|
||||||
|
|
||||||
|
value = parseInt(Common.localStorage.getItem("sse-settings-paste-button"));
|
||||||
|
Common.Utils.InternalSettings.set("sse-settings-paste-button", value);
|
||||||
|
this.api.asc_setVisiblePasteButton(!!value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var reg = Common.localStorage.getItem("sse-settings-reg-settings"),
|
var reg = Common.localStorage.getItem("sse-settings-reg-settings"),
|
||||||
|
|
|
@ -808,6 +808,11 @@ define([
|
||||||
me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave);
|
me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = Common.localStorage.getItem("sse-settings-paste-button");
|
||||||
|
if (value===null) value = '1';
|
||||||
|
Common.Utils.InternalSettings.set("sse-settings-paste-button", parseInt(value));
|
||||||
|
me.api.asc_setVisiblePasteButton(!!parseInt(value));
|
||||||
|
|
||||||
if (me.needToUpdateVersion) {
|
if (me.needToUpdateVersion) {
|
||||||
Common.NotificationCenter.trigger('api:disconnect');
|
Common.NotificationCenter.trigger('api:disconnect');
|
||||||
toolbarController.onApiCoAuthoringDisconnect();
|
toolbarController.onApiCoAuthoringDisconnect();
|
||||||
|
|
|
@ -667,6 +667,10 @@ define([
|
||||||
'<td class="left"></td>',
|
'<td class="left"></td>',
|
||||||
'<td class="right"><div id="fms-thousands-separator"/><label class="label-separator" style="margin-left: 10px; padding-top: 4px;"><%= scope.strThousandsSeparator %></label></td>',
|
'<td class="right"><div id="fms-thousands-separator"/><label class="label-separator" style="margin-left: 10px; padding-top: 4px;"><%= scope.strThousandsSeparator %></label></td>',
|
||||||
'</tr>','<tr class="divider edit"></tr>',
|
'</tr>','<tr class="divider edit"></tr>',
|
||||||
|
'<tr class="edit">',
|
||||||
|
'<td class="left"><label><%= scope.strPaste %></label></td>',
|
||||||
|
'<td class="right"><div id="fms-chb-paste-settings"/></td>',
|
||||||
|
'</tr>','<tr class="divider edit"></tr>',
|
||||||
'<tr class="macros">',
|
'<tr class="macros">',
|
||||||
'<td class="left"><label><%= scope.strMacrosSettings %></label></td>',
|
'<td class="left"><label><%= scope.strMacrosSettings %></label></td>',
|
||||||
'<td class="right">',
|
'<td class="right">',
|
||||||
|
@ -918,6 +922,11 @@ define([
|
||||||
});
|
});
|
||||||
this.lblMacrosDesc = $markup.findById('#fms-lbl-macros');
|
this.lblMacrosDesc = $markup.findById('#fms-lbl-macros');
|
||||||
|
|
||||||
|
this.chPaste = new Common.UI.CheckBox({
|
||||||
|
el: $markup.findById('#fms-chb-paste-settings'),
|
||||||
|
labelText: this.strPasteButton
|
||||||
|
});
|
||||||
|
|
||||||
this.btnApply = new Common.UI.Button({
|
this.btnApply = new Common.UI.Button({
|
||||||
el: $markup.findById('#fms-btn-apply')
|
el: $markup.findById('#fms-btn-apply')
|
||||||
});
|
});
|
||||||
|
@ -1042,6 +1051,8 @@ define([
|
||||||
item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("sse-macros-mode")});
|
item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("sse-macros-mode")});
|
||||||
this.cmbMacros.setValue(item ? item.get('value') : 0);
|
this.cmbMacros.setValue(item ? item.get('value') : 0);
|
||||||
this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc);
|
this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc);
|
||||||
|
|
||||||
|
this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button"));
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
|
@ -1085,6 +1096,8 @@ define([
|
||||||
Common.localStorage.setItem("sse-macros-mode", this.cmbMacros.getValue());
|
Common.localStorage.setItem("sse-macros-mode", this.cmbMacros.getValue());
|
||||||
Common.Utils.InternalSettings.set("sse-macros-mode", Common.localStorage.getItem("sse-macros-mode"));
|
Common.Utils.InternalSettings.set("sse-macros-mode", Common.localStorage.getItem("sse-macros-mode"));
|
||||||
|
|
||||||
|
Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
|
||||||
|
|
||||||
Common.localStorage.save();
|
Common.localStorage.save();
|
||||||
if (this.menu) {
|
if (this.menu) {
|
||||||
this.menu.fireEvent('settings:apply', [this.menu]);
|
this.menu.fireEvent('settings:apply', [this.menu]);
|
||||||
|
@ -1186,7 +1199,9 @@ define([
|
||||||
txtStopMacros: 'Disable All',
|
txtStopMacros: 'Disable All',
|
||||||
txtWarnMacrosDesc: 'Disable all macros with notification',
|
txtWarnMacrosDesc: 'Disable all macros with notification',
|
||||||
txtRunMacrosDesc: 'Enable all macros without notification',
|
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||||
txtStopMacrosDesc: 'Disable all macros without notification'
|
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||||
|
strPaste: 'Cut, copy and paste',
|
||||||
|
strPasteButton: 'Show Paste Option button when content is pasted'
|
||||||
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
|
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
|
||||||
|
|
||||||
SSE.Views.FileMenuPanels.MainSpellCheckSettings = Common.UI.BaseView.extend(_.extend({
|
SSE.Views.FileMenuPanels.MainSpellCheckSettings = Common.UI.BaseView.extend(_.extend({
|
||||||
|
|
|
@ -1699,6 +1699,8 @@
|
||||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacrosDesc": "Disable all macros with notification",
|
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacrosDesc": "Disable all macros with notification",
|
||||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacrosDesc": "Enable all macros without notification",
|
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacrosDesc": "Enable all macros without notification",
|
||||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacrosDesc": "Disable all macros without notification",
|
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacrosDesc": "Disable all macros without notification",
|
||||||
|
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strPaste": "Cut, copy and paste",
|
||||||
|
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strPasteButton": "Show Paste Option button when content is pasted",
|
||||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.okButtonText": "Apply",
|
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.okButtonText": "Apply",
|
||||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language",
|
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language",
|
||||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE",
|
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE",
|
||||||
|
|
Loading…
Reference in a new issue