Compare commits

...

27 commits

Author SHA1 Message Date
Lea 4eebaab5e6
Enable mobile editing 2023-01-12 14:28:17 +01:00
papacarlo ddec589b37 Merge branch hotfix/v7.2.2 into master 2022-12-20 08:00:10 +00:00
Maxim Kadushkin 7b03f08adc [desktop] for bug 60014 2022-12-07 16:54:48 +03:00
Maxim Kadushkin 3208a4bdf2 [desktop] hide panel before "print" command 2022-12-07 16:48:55 +03:00
Maxim Kadushkin 9e608f168d [desktop] for bug 60014 2022-12-06 21:43:43 +03:00
Maxim Kadushkin f91bc6e50e [desktop] for bug 60025 2022-12-06 20:24:15 +03:00
maxkadushkin b5c282872d
Merge pull request #2105 from ONLYOFFICE/fix/bug-59971
For Bug 59971
2022-12-04 22:50:14 +03:00
Julia Radzhabova 37b37425af For Bug 59971 2022-12-04 16:56:12 +03:00
Maxim Kadushkin f7eccb611f [DE] fix bug 59971 2022-12-03 23:27:22 +03:00
Julia Radzhabova f453f92a32
Merge pull request #2102 from ONLYOFFICE/fix/translation
Update translation. Fix Bug 59947
2022-12-02 14:24:26 +03:00
Julia Radzhabova b6d7e60624 Update translation. Fix Bug 59947 2022-12-02 14:18:13 +03:00
Maxim Kadushkin 6b269291ae [all] hide "quick print" button for macos 2022-12-02 00:14:31 +03:00
Julia Radzhabova 9e80367822
Merge pull request #2098 from ONLYOFFICE/fix/bugfix
Fix Bug 59959
2022-11-30 22:00:24 +03:00
Julia Radzhabova 2bcb91c15c Fix Bug 59959 2022-11-30 21:53:27 +03:00
Maxim Kadushkin 215f2bf28d [desktop] debug 2022-11-30 21:18:32 +03:00
Maxim Kadushkin 6543e5bb49 [SSE PE] fix bug 59951 2022-11-30 15:36:56 +03:00
Julia Radzhabova 9940b59d38
Merge pull request #2095 from ONLYOFFICE/fix/bugfix
[SSE] Try printing in internal spreadsheet editor
2022-11-30 01:37:54 +03:00
Julia Radzhabova 2c48d5c8cb [SSE] Try printing in internal spreadsheet editor 2022-11-30 01:31:59 +03:00
Julia Radzhabova 1ef412c1ee
Merge pull request #2091 from ONLYOFFICE/fix/bugfix
[DE][PE] Fix Bug 59911
2022-11-28 14:13:07 +03:00
Julia Radzhabova 70d6ecb6dc [DE][PE] Fix Bug 59911 2022-11-28 14:06:48 +03:00
Julia Radzhabova 43617a9729
Merge pull request #2087 from ONLYOFFICE/fix/translation
Update translation. Fix Bug 59887
2022-11-25 17:37:42 +03:00
Julia Radzhabova 30d35b42eb Update translation. Fix Bug 59887 2022-11-25 17:31:35 +03:00
Maxim Kadushkin 7e7f519caf [desktop] refactoring 2022-11-22 19:28:54 +03:00
Julia Radzhabova 62d74b444c
Merge pull request #2077 from ONLYOFFICE/fix/quick-preview-warning
Show warning before first click on Quick print button
2022-11-22 01:15:13 +03:00
Julia Radzhabova 7d0ac791aa Show warning before first click on Quick print button 2022-11-22 00:56:54 +03:00
Maxim Kadushkin 8e25f9c027 [desktop] event on show 'quick print' button 2022-11-22 00:28:55 +03:00
Maxim Kadushkin 4fa78dad3a [desktop] 'file locked' message didn't open 2022-11-21 13:04:25 +03:00
21 changed files with 204 additions and 68 deletions

View file

@ -45,7 +45,8 @@ define([
version: '{{PRODUCT_VERSION}}', version: '{{PRODUCT_VERSION}}',
eventloading: true, eventloading: true,
titlebuttons: true, titlebuttons: true,
uithemes: true uithemes: true,
quickprint: true,
}; };
var native = window.desktop || window.AscDesktopEditor; var native = window.desktop || window.AscDesktopEditor;
@ -166,7 +167,8 @@ define([
action: action, action: action,
icon: config.icon || undefined, icon: config.icon || undefined,
hint: config.btn.options.hint, hint: config.btn.options.hint,
disabled: config.btn.isDisabled() disabled: config.btn.isDisabled(),
visible: config.visible,
}; };
}; };
@ -201,7 +203,7 @@ define([
if ( !!titlebuttons ) { if ( !!titlebuttons ) {
info.hints = {}; info.hints = {};
!!titlebuttons['print'] && (info.hints['print'] = titlebuttons['print'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['print'] && (info.hints['print'] = titlebuttons['print'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['printquick'] && (info.hints['printquick'] = titlebuttons['printquick'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['quickprint'] && (info.hints['quickprint'] = titlebuttons['quickprint'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['undo'] && (info.hints['undo'] = titlebuttons['undo'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['undo'] && (info.hints['undo'] = titlebuttons['undo'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['redo'] && (info.hints['redo'] = titlebuttons['redo'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['redo'] && (info.hints['redo'] = titlebuttons['redo'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['save'] && (info.hints['save'] = titlebuttons['save'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['save'] && (info.hints['save'] = titlebuttons['save'].btn.btnEl.attr('data-hint-title'));
@ -217,6 +219,24 @@ define([
} }
} }
const _onApplySettings = function (menu) {
if ( !!titlebuttons.quickprint ) {
const var_name = window.SSE ? 'sse-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);
if ( titlebuttons.quickprint.visible != is_btn_visible ) {
titlebuttons.quickprint.visible = is_btn_visible;
const obj = {
visible: {
quickprint: is_btn_visible,
}
};
native.execCommand('title:button', JSON.stringify(obj));
}
}
}
return { return {
init: function (opts) { init: function (opts) {
_.extend(config, opts); _.extend(config, opts);
@ -234,21 +254,19 @@ define([
Common.NotificationCenter.on('document:ready', function () { Common.NotificationCenter.on('document:ready', function () {
if ( config.isEdit ) { if ( config.isEdit ) {
// var maincontroller = webapp.getController('Main'); function get_locked_message (t) {
// if (maincontroller.api.asc_getLocalRestrictions && Asc.c_oAscLocalRestrictionType.None !== maincontroller.api.asc_getLocalRestrictions()) { switch (t) {
// maincontroller.warningDocumentIsLocked(); // case Asc.c_oAscLocalRestrictionType.Nosafe:
// } case Asc.c_oAscLocalRestrictionType.ReadOnly:
} return Common.Locale.get("tipFileReadOnly",{name:"Common.Translation", default: "Document is read only. You can make changes and save its local copy later."});
}); default: return Common.Locale.get("tipFileLocked",{name:"Common.Translation", default: "Document is locked for editing. You can make changes and save its local copy later."});
}
}
Common.NotificationCenter.on('app:face', function (mode) { const header = webapp.getController('Viewport').getView('Common.Views.Header');
features.viewmode = !mode.isEdit;
features.crypted = mode.isCrypted;
const header = webapp.getController('Viewport').getView('Common.Views.Header');
if ( mode.isEdit ) {
const api = webapp.getController('Main').api; const api = webapp.getController('Main').api;
if ( api.asc_getLocalRestrictions && Asc.c_oAscLocalRestrictionType.None !== api.asc_getLocalRestrictions()) { const locktype = api.asc_getLocalRestrictions ? api.asc_getLocalRestrictions() : Asc.c_oAscLocalRestrictionType.None;
if ( Asc.c_oAscLocalRestrictionType.None !== locktype ) {
features.readonly = true; features.readonly = true;
header.setDocumentReadOnly(true); header.setDocumentReadOnly(true);
@ -258,18 +276,35 @@ define([
extCls: 'no-arrow', extCls: 'no-arrow',
placement: 'bottom', placement: 'bottom',
target: $('.toolbar'), target: $('.toolbar'),
text: Common.Locale.get("tipFileLocked",{name:"Common.Translation", default: "Document is locked for editing. You can make changes and save it as local copy later."}), text: get_locked_message(locktype),
showLink: false, showLink: false,
})).on('closeclick', function () { })).on('closeclick', function () {
this.close(); this.close();
}).show(); }).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));
}
}
});
} }
} }
});
Common.NotificationCenter.on('app:face', function (mode) {
features.viewmode = !mode.isEdit;
features.crypted = mode.isCrypted;
native.execCommand('webapps:features', JSON.stringify(features)); native.execCommand('webapps:features', JSON.stringify(features));
titlebuttons = {}; titlebuttons = {};
if ( mode.isEdit ) { if ( mode.isEdit ) {
const header = webapp.getController('Viewport').getView('Common.Views.Header');
if (!!header.btnSave) { if (!!header.btnSave) {
titlebuttons['save'] = {btn: header.btnSave}; titlebuttons['save'] = {btn: header.btnSave};
@ -280,8 +315,12 @@ define([
if (!!header.btnPrint) if (!!header.btnPrint)
titlebuttons['print'] = {btn: header.btnPrint}; titlebuttons['print'] = {btn: header.btnPrint};
if (!!header.btnPrintQuick) if (!!header.btnPrintQuick) {
titlebuttons['printquick'] = {btn: header.btnPrintQuick}; titlebuttons['quickprint'] = {
btn: header.btnPrintQuick,
visible: header.btnPrintQuick.isVisible(),
};
}
if (!!header.btnUndo) if (!!header.btnUndo)
titlebuttons['undo'] = {btn: header.btnUndo}; titlebuttons['undo'] = {btn: header.btnUndo};
@ -313,6 +352,7 @@ define([
Common.NotificationCenter.on({ Common.NotificationCenter.on({
'modal:show': _onModalDialog.bind(this, 'open'), 'modal:show': _onModalDialog.bind(this, 'open'),
'modal:close': _onModalDialog.bind(this, 'close'), 'modal:close': _onModalDialog.bind(this, 'close'),
'modal:hide': _onModalDialog.bind(this, 'hide'),
'uitheme:changed' : function (name) { 'uitheme:changed' : function (name) {
if (Common.localStorage.getBool('ui-theme-use-system', false)) { if (Common.localStorage.getBool('ui-theme-use-system', false)) {
native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'})); native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'}));
@ -337,6 +377,7 @@ define([
menu.hide(); menu.hide();
} }
}, },
'settings:apply': _onApplySettings.bind(this),
}, },
}, {id: 'desktop'}); }, {id: 'desktop'});

View file

@ -579,7 +579,7 @@ define([
this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'), undefined, 'bottom', 'big'); this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'), undefined, 'bottom', 'big');
if ( config.canPrint ) if ( config.canPrint )
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print-preview', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big', 'P'); this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big', 'P');
if ( config.canQuickPrint ) if ( config.canQuickPrint )
this.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-hbtn-print-quick'), undefined, 'bottom', 'big', 'Q'); this.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-hbtn-print-quick'), undefined, 'bottom', 'big', 'Q');
@ -656,7 +656,7 @@ define([
me.setUserName(me.options.userName); me.setUserName(me.options.userName);
if ( config.canPrint && config.isEdit ) { if ( config.canPrint && config.isEdit ) {
me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print-preview', $html.findById('#slot-btn-dt-print'), true, undefined, undefined, 'P'); me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-btn-dt-print'), true, undefined, undefined, 'P');
} }
if ( config.canQuickPrint && config.isEdit ) if ( config.canQuickPrint && config.isEdit )
me.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-btn-dt-print-quick'), true, undefined, undefined, 'Q'); me.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-btn-dt-print-quick'), true, undefined, undefined, 'Q');

View file

@ -1495,7 +1495,7 @@ define([
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit; this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader); !(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.canRename = this.editorConfig.canRename;
this.appOptions.buildVersion = params.asc_getBuildVersion(); this.appOptions.buildVersion = params.asc_getBuildVersion();
@ -2466,7 +2466,7 @@ define([
this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter));
this.getApplication().getController('RightMenu').updateMetricUnit(); this.getApplication().getController('RightMenu').updateMetricUnit();
this.getApplication().getController('Toolbar').getView().updateMetricUnit(); this.getApplication().getController('Toolbar').getView().updateMetricUnit();
this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit(); this.appOptions.canPreviewPrint && this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit();
}, },
onAdvancedOptions: function(type, advOptions, mode, formatOptions) { onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
@ -2656,12 +2656,35 @@ define([
onPrintQuick: function() { onPrintQuick: function() {
if (!this.appOptions.canQuickPrint) return; if (!this.appOptions.canQuickPrint) return;
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setNativeOptions({quickPrint: true}); var value = Common.localStorage.getBool("de-hide-quick-print-warning"),
var opts = new Asc.asc_CDownloadOptions(); me = this,
opts.asc_setAdvancedOptions(printopt); handler = function () {
this.api.asc_Print(opts); var printopt = new Asc.asc_CAdjustPrint();
Common.component.Analytics.trackEvent('Print'); printopt.asc_setNativeOptions({quickPrint: true});
var opts = new Asc.asc_CDownloadOptions();
opts.asc_setAdvancedOptions(printopt);
me.api.asc_Print(opts);
Common.component.Analytics.trackEvent('Print');
};
if (value) {
handler.call(this);
} else {
Common.UI.warning({
msg: this.textTryQuickPrint,
buttons: ['yes', 'no'],
primary: 'yes',
dontshow: true,
maxwidth: 500,
callback: function(btn, dontshow){
dontshow && Common.localStorage.setBool("de-hide-quick-print-warning", true);
if (btn === 'yes') {
setTimeout(handler, 1);
}
}
});
}
}, },
onClearDummyComment: function() { onClearDummyComment: function() {
@ -3290,7 +3313,8 @@ define([
errorTextFormWrongFormat: 'The value entered does not match the format of the field.', errorTextFormWrongFormat: 'The value entered does not match the format of the field.',
confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).', confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).',
textUndo: 'Undo', textUndo: 'Undo',
textContinue: 'Continue' textContinue: 'Continue',
textTryQuickPrint: 'You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?'
} }
})(), DE.Controllers.Main || {})) })(), DE.Controllers.Main || {}))
}); });

View file

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

View file

@ -81,8 +81,7 @@ define([
if (!config.isEdit || config.customization && !!config.customization.compactHeader) if (!config.isEdit || config.customization && !!config.customization.compactHeader)
toolbar.setExtra('left', me.header.getPanel('left', config)); toolbar.setExtra('left', me.header.getPanel('left', config));
var value = Common.localStorage.getItem("de-settings-quick-print-button"); var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
value = (value===null) ? 1 : parseInt(value);
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value); Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (me.header && me.header.btnPrintQuick) if (me.header && me.header.btnPrintQuick)
me.header.btnPrintQuick[value ? 'show' : 'hide'](); me.header.btnPrintQuick[value ? 'show' : 'hide']();
@ -265,7 +264,7 @@ define([
}, },
applySettings: function () { applySettings: function () {
var value = parseInt(Common.localStorage.getItem("de-settings-quick-print-button")); var value = Common.localStorage.getBool("de-settings-quick-print-button", true);
Common.Utils.InternalSettings.set("de-settings-quick-print-button", value); Common.Utils.InternalSettings.set("de-settings-quick-print-button", value);
if (this.header && this.header.btnPrintQuick) if (this.header && this.header.btnPrintQuick)
this.header.btnPrintQuick[value ? 'show' : 'hide'](); 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.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setItem("de-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0); Common.localStorage.setBool("de-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.save(); Common.localStorage.save();
@ -2619,6 +2619,7 @@ define([
}, },
updateMetricUnit: function() { updateMetricUnit: function() {
if (!this.cmbPaperSize) return;
var store = this.cmbPaperSize.store; var store = this.cmbPaperSize.store;
for (var i=0; i<store.length-1; i++) { for (var i=0; i<store.length-1; i++) {
var item = store.at(i), var item = store.at(i),

View file

@ -126,8 +126,9 @@
"Common.define.chartData.textStock": "Stock", "Common.define.chartData.textStock": "Stock",
"Common.define.chartData.textSurface": "Surface", "Common.define.chartData.textSurface": "Surface",
"Common.Translation.textMoreButton": "More", "Common.Translation.textMoreButton": "More",
"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.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.warnFileLockedBtnEdit": "Create a copy", "Common.Translation.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing", "Common.Translation.warnFileLockedBtnView": "Open for viewing",
"Common.UI.ButtonColored.textAutoColor": "Automatic", "Common.UI.ButtonColored.textAutoColor": "Automatic",
@ -941,6 +942,7 @@
"DE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).", "DE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).",
"DE.Controllers.Main.textUndo": "Undo", "DE.Controllers.Main.textUndo": "Undo",
"DE.Controllers.Main.textContinue": "Continue", "DE.Controllers.Main.textContinue": "Continue",
"DE.Controllers.Main.textTryQuickPrint": "You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document", "DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Search.notcriticalErrorTitle": "Warning", "DE.Controllers.Search.notcriticalErrorTitle": "Warning",

View file

@ -127,6 +127,7 @@
"Common.define.chartData.textSurface": "Поверхность", "Common.define.chartData.textSurface": "Поверхность",
"Common.Translation.textMoreButton": "Ещё", "Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.", "Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.warnFileLocked": "Вы не можете редактировать этот файл, потому что он уже редактируется в другом приложении.", "Common.Translation.warnFileLocked": "Вы не можете редактировать этот файл, потому что он уже редактируется в другом приложении.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию", "Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр", "Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",
@ -669,6 +670,7 @@
"DE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?", "DE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?",
"DE.Controllers.Main.textShape": "Фигура", "DE.Controllers.Main.textShape": "Фигура",
"DE.Controllers.Main.textStrict": "Строгий режим", "DE.Controllers.Main.textStrict": "Строгий режим",
"DE.Controllers.Main.textTryQuickPrint": "Вы выбрали быструю печать: весь документ будет напечатан на последнем выбранном принтере или на принтере по умолчанию.<br>Вы хотите продолжить?",
"DE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.", "DE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
"DE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.", "DE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.",
"DE.Controllers.Main.textUndo": "Отменить", "DE.Controllers.Main.textUndo": "Отменить",
@ -945,6 +947,7 @@
"DE.Controllers.Print.textMarginsLast": "Последние настраиваемые", "DE.Controllers.Print.textMarginsLast": "Последние настраиваемые",
"DE.Controllers.Print.txtCustom": "Пользовательское", "DE.Controllers.Print.txtCustom": "Пользовательское",
"DE.Controllers.Print.txtPrintRangeInvalid": "Неправильный диапазон печати", "DE.Controllers.Print.txtPrintRangeInvalid": "Неправильный диапазон печати",
"DE.Controllers.Print.txtPrintRangeSingleRange": "Введите или один номер страницы, или один диапазон страниц (например, 5-12). Или вы можете выбрать печать в PDF.",
"DE.Controllers.Search.notcriticalErrorTitle": "Внимание", "DE.Controllers.Search.notcriticalErrorTitle": "Внимание",
"DE.Controllers.Search.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.", "DE.Controllers.Search.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.",
"DE.Controllers.Search.textReplaceSkipped": "Замена выполнена. Пропущено вхождений - {0}.", "DE.Controllers.Search.textReplaceSkipped": "Замена выполнена. Пропущено вхождений - {0}.",
@ -2083,6 +2086,7 @@
"DE.Views.LeftMenu.tipComments": "Комментарии", "DE.Views.LeftMenu.tipComments": "Комментарии",
"DE.Views.LeftMenu.tipNavigation": "Навигация", "DE.Views.LeftMenu.tipNavigation": "Навигация",
"DE.Views.LeftMenu.tipOutline": "Заголовки", "DE.Views.LeftMenu.tipOutline": "Заголовки",
"DE.Views.LeftMenu.tipPageThumbnails": "Эскизы страниц",
"DE.Views.LeftMenu.tipPlugins": "Плагины", "DE.Views.LeftMenu.tipPlugins": "Плагины",
"DE.Views.LeftMenu.tipSearch": "Поиск", "DE.Views.LeftMenu.tipSearch": "Поиск",
"DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка",

View file

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

View file

@ -1166,7 +1166,7 @@ define([
} }
this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader); !(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.canRename = this.editorConfig.canRename;
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
@ -1928,7 +1928,7 @@ define([
Common.Utils.InternalSettings.set("pe-settings-unit", value); Common.Utils.InternalSettings.set("pe-settings-unit", value);
this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter));
this.getApplication().getController('RightMenu').updateMetricUnit(); this.getApplication().getController('RightMenu').updateMetricUnit();
this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit(); this.appOptions.canPreviewPrint && this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit();
}, },
updateThemeColors: function() { updateThemeColors: function() {
@ -2217,12 +2217,35 @@ define([
onPrintQuick: function() { onPrintQuick: function() {
if (!this.appOptions.canQuickPrint) return; if (!this.appOptions.canQuickPrint) return;
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setNativeOptions({quickPrint: true}); var value = Common.localStorage.getBool("pe-hide-quick-print-warning"),
var opts = new Asc.asc_CDownloadOptions(); me = this,
opts.asc_setAdvancedOptions(printopt); handler = function () {
this.api.asc_Print(opts); var printopt = new Asc.asc_CAdjustPrint();
Common.component.Analytics.trackEvent('Print'); printopt.asc_setNativeOptions({quickPrint: true});
var opts = new Asc.asc_CDownloadOptions();
opts.asc_setAdvancedOptions(printopt);
me.api.asc_Print(opts);
Common.component.Analytics.trackEvent('Print');
};
if (value) {
handler.call(this);
} else {
Common.UI.warning({
msg: this.textTryQuickPrint,
buttons: ['yes', 'no'],
primary: 'yes',
dontshow: true,
maxwidth: 500,
callback: function(btn, dontshow){
dontshow && Common.localStorage.setBool("pe-hide-quick-print-warning", true);
if (btn === 'yes') {
setTimeout(handler, 1);
}
}
});
}
}, },
onAdvancedOptions: function(type, advOptions) { onAdvancedOptions: function(type, advOptions) {
@ -3016,7 +3039,8 @@ define([
textRememberMacros: 'Remember my choice for all macros', textRememberMacros: 'Remember my choice for all macros',
confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).', confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).',
textUndo: 'Undo', textUndo: 'Undo',
textContinue: 'Continue' textContinue: 'Continue',
textTryQuickPrint: 'You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?'
} }
})(), PE.Controllers.Main || {})) })(), PE.Controllers.Main || {}))
}); });

View file

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

View file

@ -720,7 +720,7 @@ define([
Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue()); Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue());
Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
Common.localStorage.setItem("pe-settings-quick-print-button", this.chQuickPrint.isChecked() ? 1 : 0); Common.localStorage.setBool("pe-settings-quick-print-button", this.chQuickPrint.isChecked());
Common.localStorage.save(); Common.localStorage.save();
@ -2089,6 +2089,7 @@ define([
}, },
updateMetricUnit: function() { updateMetricUnit: function() {
if (!this.cmbPaperSize) return;
var store = this.cmbPaperSize.store; var store = this.cmbPaperSize.store;
for (var i=0; i<store.length; i++) { for (var i=0; i<store.length; i++) {
var item = store.at(i), var item = store.at(i),

View file

@ -249,6 +249,8 @@
"Common.define.effectData.textZigzag": "Zigzag", "Common.define.effectData.textZigzag": "Zigzag",
"Common.define.effectData.textZoom": "Zoom", "Common.define.effectData.textZoom": "Zoom",
"Common.Translation.textMoreButton": "More", "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.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.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing", "Common.Translation.warnFileLockedBtnView": "Open for viewing",
@ -413,6 +415,7 @@
"Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename", "Common.Views.Header.txtRename": "Rename",
"Common.Views.Header.tipPrintQuick": "Quick print", "Common.Views.Header.tipPrintQuick": "Quick print",
"Common.Views.Header.textReadOnly": "Read only",
"Common.Views.History.textCloseHistory": "Close History", "Common.Views.History.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse", "Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes", "Common.Views.History.textHideAll": "Hide detailed changes",
@ -1011,6 +1014,7 @@
"PE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).", "PE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).",
"PE.Controllers.Main.textUndo": "Undo", "PE.Controllers.Main.textUndo": "Undo",
"PE.Controllers.Main.textContinue": "Continue", "PE.Controllers.Main.textContinue": "Continue",
"PE.Controllers.Main.textTryQuickPrint": "You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?",
"PE.Controllers.Print.txtPrintRangeInvalid": "Invalid print range", "PE.Controllers.Print.txtPrintRangeInvalid": "Invalid print range",
"PE.Controllers.Print.txtPrintRangeSingleRange": "Enter either a single slide number or a single slide range (for example, 5-12). Or you can Print to PDF.", "PE.Controllers.Print.txtPrintRangeSingleRange": "Enter either a single slide number or a single slide range (for example, 5-12). Or you can Print to PDF.",
"PE.Controllers.Search.notcriticalErrorTitle": "Warning", "PE.Controllers.Search.notcriticalErrorTitle": "Warning",

View file

@ -249,6 +249,8 @@
"Common.define.effectData.textZigzag": "Зигзаг", "Common.define.effectData.textZigzag": "Зигзаг",
"Common.define.effectData.textZoom": "Масштабирование", "Common.define.effectData.textZoom": "Масштабирование",
"Common.Translation.textMoreButton": "Ещё", "Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.", "Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию", "Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр", "Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",
@ -391,6 +393,7 @@
"Common.Views.Header.textHideLines": "Скрыть линейки", "Common.Views.Header.textHideLines": "Скрыть линейки",
"Common.Views.Header.textHideNotes": "Скрыть заметки", "Common.Views.Header.textHideNotes": "Скрыть заметки",
"Common.Views.Header.textHideStatusBar": "Скрыть строку состояния", "Common.Views.Header.textHideStatusBar": "Скрыть строку состояния",
"Common.Views.Header.textReadOnly": "Только чтение",
"Common.Views.Header.textRemoveFavorite": "Удалить из избранного", "Common.Views.Header.textRemoveFavorite": "Удалить из избранного",
"Common.Views.Header.textSaveBegin": "Сохранение...", "Common.Views.Header.textSaveBegin": "Сохранение...",
"Common.Views.Header.textSaveChanged": "Изменен", "Common.Views.Header.textSaveChanged": "Изменен",
@ -733,6 +736,7 @@
"PE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?", "PE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?",
"PE.Controllers.Main.textShape": "Фигура", "PE.Controllers.Main.textShape": "Фигура",
"PE.Controllers.Main.textStrict": "Строгий режим", "PE.Controllers.Main.textStrict": "Строгий режим",
"PE.Controllers.Main.textTryQuickPrint": "Вы выбрали быструю печать: весь документ будет напечатан на последнем выбранном принтере или на принтере по умолчанию.<br>Вы хотите продолжить?",
"PE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.", "PE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
"PE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.", "PE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.",
"PE.Controllers.Main.textUndo": "Отменить", "PE.Controllers.Main.textUndo": "Отменить",
@ -1011,6 +1015,7 @@
"PE.Controllers.Main.warnNoLicenseUsers": "Вы достигли лимита на одновременные подключения к редакторам %1.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.", "PE.Controllers.Main.warnNoLicenseUsers": "Вы достигли лимита на одновременные подключения к редакторам %1.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.",
"PE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.", "PE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.",
"PE.Controllers.Print.txtPrintRangeInvalid": "Неправильный диапазон печати", "PE.Controllers.Print.txtPrintRangeInvalid": "Неправильный диапазон печати",
"PE.Controllers.Print.txtPrintRangeSingleRange": "Введите или один номер слайда, или один диапазон слайдов (например, 5-12). Или вы можете выбрать печать в PDF.",
"PE.Controllers.Search.notcriticalErrorTitle": "Внимание", "PE.Controllers.Search.notcriticalErrorTitle": "Внимание",
"PE.Controllers.Search.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.", "PE.Controllers.Search.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.",
"PE.Controllers.Search.textReplaceSkipped": "Замена выполнена. Пропущено вхождений - {0}.", "PE.Controllers.Search.textReplaceSkipped": "Замена выполнена. Пропущено вхождений - {0}.",

View file

@ -1,6 +1,6 @@
const EditorUIController = () => null; const EditorUIController = () => null;
EditorUIController.isSupportEditFeature = () => false; EditorUIController.isSupportEditFeature = () => true;
export default EditorUIController; 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.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.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.canDownload = (this.permissions.download !== false);
this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPrint = (this.permissions.print !== false) && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle);
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && this.appOptions.canQuickPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp &&
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader); !(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) && 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); (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
@ -2877,12 +2877,35 @@ define([
onPrintQuick: function() { onPrintQuick: function() {
if (!this.appOptions.canQuickPrint) return; if (!this.appOptions.canQuickPrint) return;
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setNativeOptions({quickPrint: true}); var value = Common.localStorage.getBool("sse-hide-quick-print-warning"),
var opts = new Asc.asc_CDownloadOptions(); me = this,
opts.asc_setAdvancedOptions(printopt); handler = function () {
this.api.asc_Print(opts); var printopt = new Asc.asc_CAdjustPrint();
Common.component.Analytics.trackEvent('Print'); printopt.asc_setNativeOptions({quickPrint: true});
var opts = new Asc.asc_CDownloadOptions();
opts.asc_setAdvancedOptions(printopt);
me.api.asc_Print(opts);
Common.component.Analytics.trackEvent('Print');
};
if (value) {
handler.call(this);
} else {
Common.UI.warning({
msg: this.textTryQuickPrint,
buttons: ['yes', 'no'],
primary: 'yes',
dontshow: true,
maxwidth: 500,
callback: function(btn, dontshow){
dontshow && Common.localStorage.setBool("sse-hide-quick-print-warning", true);
if (btn === 'yes') {
setTimeout(handler, 1);
}
}
});
}
}, },
warningDocumentIsLocked: function() { warningDocumentIsLocked: function() {
@ -3665,7 +3688,8 @@ define([
textRememberMacros: 'Remember my choice for all macros', textRememberMacros: 'Remember my choice for all macros',
confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).', confirmMaxChangesSize: 'The size of actions exceeds the limitation set for your server.<br>Press "Undo" to cancel your last action or press "Continue" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).',
textUndo: 'Undo', textUndo: 'Undo',
textContinue: 'Continue' textContinue: 'Continue',
textTryQuickPrint: 'You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?'
} }
})(), SSE.Controllers.Main || {})) })(), SSE.Controllers.Main || {}))
}); });

View file

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

View file

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

View file

@ -101,6 +101,8 @@
"Common.define.conditionalData.textValue": "Value is", "Common.define.conditionalData.textValue": "Value is",
"Common.define.conditionalData.textYesterday": "Yesterday", "Common.define.conditionalData.textYesterday": "Yesterday",
"Common.Translation.textMoreButton": "More", "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.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.warnFileLockedBtnEdit": "Create a copy",
"Common.Translation.warnFileLockedBtnView": "Open for viewing", "Common.Translation.warnFileLockedBtnView": "Open for viewing",
@ -254,6 +256,7 @@
"Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename", "Common.Views.Header.txtRename": "Rename",
"Common.Views.Header.tipPrintQuick": "Quick print", "Common.Views.Header.tipPrintQuick": "Quick print",
"Common.Views.Header.textReadOnly": "Read only",
"Common.Views.History.textCloseHistory": "Close History", "Common.Views.History.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse", "Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes", "Common.Views.History.textHideAll": "Hide detailed changes",
@ -1124,6 +1127,7 @@
"SSE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).", "SSE.Controllers.Main.confirmMaxChangesSize": "The size of actions exceeds the limitation set for your server.<br>Press \"Undo\" to cancel your last action or press \"Continue\" to keep action locally (you need to download the file or copy its content to make sure nothing is lost).",
"SSE.Controllers.Main.textUndo": "Undo", "SSE.Controllers.Main.textUndo": "Undo",
"SSE.Controllers.Main.textContinue": "Continue", "SSE.Controllers.Main.textContinue": "Continue",
"SSE.Controllers.Main.textTryQuickPrint": "You have selected Quick print: the entire document will be printed on the last selected or default printer.<br>Do you want to continue?",
"SSE.Controllers.Print.strAllSheets": "All Sheets", "SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textFirstCol": "First column", "SSE.Controllers.Print.textFirstCol": "First column",
"SSE.Controllers.Print.textFirstRow": "First row", "SSE.Controllers.Print.textFirstRow": "First row",

View file

@ -101,6 +101,8 @@
"Common.define.conditionalData.textValue": "Значение равно", "Common.define.conditionalData.textValue": "Значение равно",
"Common.define.conditionalData.textYesterday": "Вчера", "Common.define.conditionalData.textYesterday": "Вчера",
"Common.Translation.textMoreButton": "Ещё", "Common.Translation.textMoreButton": "Ещё",
"Common.Translation.tipFileLocked": "Документ заблокирован на редактирование. Вы можете внести изменения и сохранить его как локальную копию позже.",
"Common.Translation.tipFileReadOnly": "Файл доступен только для чтения. Чтобы сохранить изменения, сохраните файл с новым названием или в другом месте.",
"Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.", "Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.",
"Common.Translation.warnFileLockedBtnEdit": "Создать копию", "Common.Translation.warnFileLockedBtnEdit": "Создать копию",
"Common.Translation.warnFileLockedBtnView": "Открыть на просмотр", "Common.Translation.warnFileLockedBtnView": "Открыть на просмотр",
@ -232,6 +234,7 @@
"Common.Views.Header.textCompactView": "Скрыть панель инструментов", "Common.Views.Header.textCompactView": "Скрыть панель инструментов",
"Common.Views.Header.textHideLines": "Скрыть линейки", "Common.Views.Header.textHideLines": "Скрыть линейки",
"Common.Views.Header.textHideStatusBar": "Объединить строки листов и состояния", "Common.Views.Header.textHideStatusBar": "Объединить строки листов и состояния",
"Common.Views.Header.textReadOnly": "Только чтение",
"Common.Views.Header.textRemoveFavorite": "Удалить из избранного", "Common.Views.Header.textRemoveFavorite": "Удалить из избранного",
"Common.Views.Header.textSaveBegin": "Сохранение...", "Common.Views.Header.textSaveBegin": "Сохранение...",
"Common.Views.Header.textSaveChanged": "Изменен", "Common.Views.Header.textSaveChanged": "Изменен",
@ -522,8 +525,8 @@
"SSE.Controllers.DocumentHolder.textChangeColumnWidth": "Ширина столбца {0} символов ({1} пикселей)", "SSE.Controllers.DocumentHolder.textChangeColumnWidth": "Ширина столбца {0} символов ({1} пикселей)",
"SSE.Controllers.DocumentHolder.textChangeRowHeight": "Высота строки {0} пунктов ({1} пикселей)", "SSE.Controllers.DocumentHolder.textChangeRowHeight": "Высота строки {0} пунктов ({1} пикселей)",
"SSE.Controllers.DocumentHolder.textCtrlClick": "Щелкните по ссылке, чтобы открыть ее, или щелкните и удерживайте кнопку мыши, чтобы выделить ячейку.", "SSE.Controllers.DocumentHolder.textCtrlClick": "Щелкните по ссылке, чтобы открыть ее, или щелкните и удерживайте кнопку мыши, чтобы выделить ячейку.",
"SSE.Controllers.DocumentHolder.textInsertLeft": "Добавить слева", "SSE.Controllers.DocumentHolder.textInsertLeft": "Добавить столбец слева",
"SSE.Controllers.DocumentHolder.textInsertTop": "Добавить сверху", "SSE.Controllers.DocumentHolder.textInsertTop": "Добавить строку сверху",
"SSE.Controllers.DocumentHolder.textPasteSpecial": "Специальная вставка", "SSE.Controllers.DocumentHolder.textPasteSpecial": "Специальная вставка",
"SSE.Controllers.DocumentHolder.textStopExpand": "Не развертывать таблицы автоматически", "SSE.Controllers.DocumentHolder.textStopExpand": "Не развертывать таблицы автоматически",
"SSE.Controllers.DocumentHolder.textSym": "симв", "SSE.Controllers.DocumentHolder.textSym": "симв",
@ -851,6 +854,7 @@
"SSE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?", "SSE.Controllers.Main.textRequestMacros": "Макрос делает запрос на URL. Вы хотите разрешить запрос на %1?",
"SSE.Controllers.Main.textShape": "Фигура", "SSE.Controllers.Main.textShape": "Фигура",
"SSE.Controllers.Main.textStrict": "Строгий режим", "SSE.Controllers.Main.textStrict": "Строгий режим",
"SSE.Controllers.Main.textTryQuickPrint": "Вы выбрали быструю печать: весь документ будет напечатан на последнем выбранном принтере или на принтере по умолчанию.<br>Вы хотите продолжить?",
"SSE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.", "SSE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
"SSE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.", "SSE.Controllers.Main.textTryUndoRedoWarn": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.",
"SSE.Controllers.Main.textUndo": "Отменить", "SSE.Controllers.Main.textUndo": "Отменить",

View file

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