Compare commits

..

No commits in common. "master" and "v7.2.2.32" have entirely different histories.

20 changed files with 32 additions and 47 deletions

View file

@ -221,9 +221,9 @@ define([
const _onApplySettings = function (menu) {
if ( !!titlebuttons.quickprint ) {
const var_name = window.SSE ? 'sse-settings-quick-print-button' :
const var_name = window.SEE ? 'ssee-settings-quick-print-button' :
window.PE ? 'pe-settings-quick-print-button' : 'de-settings-quick-print-button';
const is_btn_visible = Common.localStorage.getBool(var_name, false);
const is_btn_visible = Common.localStorage.getBool('de-settings-quick-print-button', false);
if ( titlebuttons.quickprint.visible != is_btn_visible ) {
titlebuttons.quickprint.visible = is_btn_visible;
@ -281,18 +281,6 @@ define([
})).on('closeclick', function () {
this.close();
}).show();
native.execCommand('webapps:features', JSON.stringify(features));
api.asc_registerCallback('asc_onDocumentName', function () {
if ( features.readonly ) {
if ( api.asc_getLocalRestrictions() == Asc.c_oAscLocalRestrictionType.None ) {
features.readonly = false;
header.setDocumentReadOnly(false);
native.execCommand('webapps:features', JSON.stringify(features));
}
}
});
}
}
});
@ -352,7 +340,6 @@ define([
Common.NotificationCenter.on({
'modal:show': _onModalDialog.bind(this, 'open'),
'modal:close': _onModalDialog.bind(this, 'close'),
'modal:hide': _onModalDialog.bind(this, 'hide'),
'uitheme:changed' : function (name) {
if (Common.localStorage.getBool('ui-theme-use-system', false)) {
native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'}));

View file

@ -1495,7 +1495,7 @@ define([
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
this.appOptions.canRename = this.editorConfig.canRename;
this.appOptions.buildVersion = params.asc_getBuildVersion();

View file

@ -525,7 +525,6 @@ define([
paperOrientation: size ? (size['H'] > size['W'] ? 'portrait' : 'landscape') : null
});
this.printSettings.menu.hide();
if ( print ) {
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86);
opts.asc_setAdvancedOptions(this.adjPrintParams);
@ -535,6 +534,7 @@ define([
opts.asc_setAdvancedOptions(this.adjPrintParams);
this.api.asc_DownloadAs(opts);
}
this.printSettings.menu.hide();
},
inputPagesChanging: function (input, value) {

View file

@ -81,7 +81,8 @@ define([
if (!config.isEdit || config.customization && !!config.customization.compactHeader)
toolbar.setExtra('left', me.header.getPanel('left', config));
var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
var value = Common.localStorage.getItem("de-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -264,7 +265,7 @@ define([
},
applySettings: function () {
var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
var value = parseInt(Common.localStorage.getItem("de-settings-quick-print-button"));
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -922,7 +922,7 @@ define([
}
Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setBool("de-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.setItem("de-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.save();

View file

@ -126,9 +126,9 @@
"Common.define.chartData.textStock": "Stock",
"Common.define.chartData.textSurface": "Surface",
"Common.Translation.textMoreButton": "More",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "The file is read-only. To keep your changes, save the file with a new name or in a different location.",
"Common.Translation.warnFileLocked": "You can't edit this file because it's being edited in another app.",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "Document is read only and locked for editing. You can make changes and save its local copy later.",
"Common.Translation.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing",
"Common.UI.ButtonColored.textAutoColor": "Automatic",

View file

@ -127,7 +127,7 @@
"Common.define.chartData.textSurface": "Поверхность",
"Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.tipFileReadOnly": "Документ доступен только на просмотр и заблокирован на редактирование. Вы можете внести изменения и сохранить его локальную копию позже.",
"Common.Translation.warnFileLocked": "Вы не можете редактировать этот файл, потому что он уже редактируется в другом приложении.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",

View file

@ -4,7 +4,7 @@ const EditorUIController = () => {
};
EditorUIController.isSupportEditFeature = () => {
return true
return false
};
EditorUIController.getToolbarOptions = () => {

View file

@ -1166,7 +1166,7 @@ define([
}
this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
this.appOptions.canRename = this.editorConfig.canRename;
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);

View file

@ -81,7 +81,8 @@ define([
toolbar.setExtra('right', me.header.getPanel('right', config));
if (!config.isEdit || config.customization && !!config.customization.compactHeader)
toolbar.setExtra('left', me.header.getPanel('left', config));
var value = Common.localStorage.getBool("pe-settings-quick-print-button", true);
var value = Common.localStorage.getItem("pe-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
Common.Utils.InternalSettings.set("pe-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -320,7 +321,7 @@ define([
},
applySettings: function () {
var value = Common.localStorage.getBool("pe-settings-quick-print-button", true);
var value = parseInt(Common.localStorage.getItem("pe-settings-quick-print-button"));
Common.Utils.InternalSettings.set("pe-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -720,7 +720,7 @@ define([
Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setBool("pe-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.setItem("pe-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.save();

View file

@ -249,11 +249,11 @@
"Common.define.effectData.textZigzag": "Zigzag",
"Common.define.effectData.textZoom": "Zoom",
"Common.Translation.textMoreButton": "More",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "The file is read-only. To keep your changes, save the file with a new name or in a different location.",
"Common.Translation.warnFileLocked": "The file is being edited in another app. You can continue editing and save it as a copy.",
"Common.Translation.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "Document is read only and locked for editing. You can make changes and save its local copy later.",
"Common.UI.ButtonColored.textAutoColor": "Automatic",
"Common.UI.ButtonColored.textNewColor": "Add New Custom Color",
"Common.UI.ComboBorderSize.txtNoBorders": "No borders",
@ -415,7 +415,6 @@
"Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename",
"Common.Views.Header.tipPrintQuick": "Quick print",
"Common.Views.Header.textReadOnly": "Read only",
"Common.Views.History.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes",

View file

@ -250,7 +250,7 @@
"Common.define.effectData.textZoom": "Масштабирование",
"Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.tipFileReadOnly": "Документ доступен только на просмотр и заблокирован на редактирование. Вы можете внести изменения и сохранить его локальную копию позже.",
"Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",
@ -393,7 +393,6 @@
"Common.Views.Header.textHideLines": "Скрыть линейки",
"Common.Views.Header.textHideNotes": "Скрыть заметки",
"Common.Views.Header.textHideStatusBar": "Скрыть строку состояния",
"Common.Views.Header.textReadOnly": "Только чтение",
"Common.Views.Header.textRemoveFavorite": "Удалить из избранного",
"Common.Views.Header.textSaveBegin": "Сохранение...",
"Common.Views.Header.textSaveChanged": "Изменен",

View file

@ -1,6 +1,6 @@
const EditorUIController = () => null;
EditorUIController.isSupportEditFeature = () => true;
EditorUIController.isSupportEditFeature = () => false;
export default EditorUIController;

View file

@ -1290,8 +1290,8 @@ define([
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined
this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.permissions.edit !== false && this.editorConfig.mode !== 'view';
this.appOptions.canDownload = (this.permissions.download !== false);
this.appOptions.canPrint = (this.permissions.print !== false) && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle);
this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) &&
(typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);

View file

@ -90,7 +90,8 @@ define([
if ( me.appConfig && me.appConfig.isEdit && !(config.customization && config.customization.compactHeader) && toolbar.btnCollabChanges )
toolbar.btnCollabChanges = me.header.btnSave;
var value = Common.localStorage.getBool("sse-settings-quick-print-button", true);
var value = Common.localStorage.getItem("sse-settings-quick-print-button");
value = (value===null) ? 1 : parseInt(value);
Common.Utils.InternalSettings.set("sse-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -293,7 +294,7 @@ define([
},
applySettings: function () {
var value = Common.localStorage.getBool("sse-settings-quick-print-button", true);
var value = parseInt(Common.localStorage.getItem("sse-settings-quick-print-button"));
Common.Utils.InternalSettings.set("sse-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide']();

View file

@ -996,7 +996,7 @@ define([
Common.Utils.InternalSettings.set("sse-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setBool("sse-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.setItem("sse-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0);
Common.localStorage.save();
if (this.menu) {
@ -2736,8 +2736,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
applySettings: function() {
if (this.menu) {
this.menu.hide();
// this.menu.fireEvent('settings:apply', [this.menu]);
this.menu.fireEvent('settings:apply', [this.menu]);
}
},

View file

@ -101,11 +101,11 @@
"Common.define.conditionalData.textValue": "Value is",
"Common.define.conditionalData.textYesterday": "Yesterday",
"Common.Translation.textMoreButton": "More",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "The file is read-only. To keep your changes, save the file with a new name or in a different location.",
"Common.Translation.warnFileLocked": "The file is being edited in another app. You can continue editing and save it as a copy.",
"Common.Translation.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing",
"Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.",
"Common.Translation.tipFileReadOnly": "Document is read only and locked for editing. You can make changes and save its local copy later.",
"Common.UI.ButtonColored.textAutoColor": "Automatic",
"Common.UI.ButtonColored.textNewColor": "Add New Custom Color",
"Common.UI.ComboBorderSize.txtNoBorders": "No borders",
@ -256,7 +256,6 @@
"Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename",
"Common.Views.Header.tipPrintQuick": "Quick print",
"Common.Views.Header.textReadOnly": "Read only",
"Common.Views.History.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes",

View file

@ -102,7 +102,7 @@
"Common.define.conditionalData.textYesterday": "Вчера",
"Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.tipFileReadOnly": "Документ доступен только на просмотр и заблокирован на редактирование. Вы можете внести изменения и сохранить его локальную копию позже.",
"Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",
@ -234,7 +234,6 @@
"Common.Views.Header.textCompactView": "Скрыть панель инструментов",
"Common.Views.Header.textHideLines": "Скрыть линейки",
"Common.Views.Header.textHideStatusBar": "Объединить строки листов и состояния",
"Common.Views.Header.textReadOnly": "Только чтение",
"Common.Views.Header.textRemoveFavorite": "Удалить из избранного",
"Common.Views.Header.textSaveBegin": "Сохранение...",
"Common.Views.Header.textSaveChanged": "Изменен",

View file

@ -1,6 +1,6 @@
const EditorUIController = () => null;
EditorUIController.isSupportEditFeature = () => true;
EditorUIController.isSupportEditFeature = () => false;
export default EditorUIController;