From 9a04516194fb2db8d4a50f89050c61021ed660c9 Mon Sep 17 00:00:00 2001 From: "Alexey.Golubev" Date: Mon, 11 Apr 2016 19:59:52 +0300 Subject: [PATCH 1/6] Get the version and build number from env vars. --- build/Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.js b/build/Gruntfile.js index b3ef700c0..1f680c020 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -173,7 +173,7 @@ module.exports = function(grunt) { ' *\n' + ' * <%= pkg.homepage %> \n' + ' *\n' + - ' * Version: <%= pkg.version %> (build:<%= pkg.build %>, rev:' + (process.env['GIT_COMMIT'] || 'local') + ')\n' + + ' * Version: ' + process.env['PRODUCT_VERSION'] + ' (build:' + process.env['BUILD_NUMBER'] + ')\n' + ' */\n' }, dist: { From 434ef607ea7e9c12230dded693c4edc33f49bd96 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 13 Apr 2016 15:38:25 +0300 Subject: [PATCH 2/6] =?UTF-8?q?[Common]=20Window:=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=BE=D0=B7=D0=BC?= =?UTF-8?q?=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B7=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=B8=D1=85=20=D0=BA=D0=B0=D1=81=D1=82=D0=BE=D0=BC?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B2=20=D0=B0=D0=BB=D0=B5=D1=80=D1=82=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/main/lib/component/Window.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 5f6bf40f5..5b2a20195 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -301,9 +301,14 @@ define([ options.primary = 'ok'; var newBtns = {}; _.each(options.buttons, function(b){ - newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b) ? 'primary' : ''}; - if (b=='custom') - newBtns[b].cls += ' custom'; + if (typeof(b) == 'object') { + if (b.value !== undefined) + newBtns[b.value] = {text: b.caption, cls: 'custom' + ((b.primary || options.primary==b.value) ? ' primary' : '')}; + } else { + newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b) ? 'primary' : ''}; + if (b=='custom') + newBtns[b].cls += ' custom'; + } }); options.buttons = newBtns; From ebddb529df780703f4b3a45b75535887a8f2ebb6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 13 Apr 2016 15:40:58 +0300 Subject: [PATCH 3/6] =?UTF-8?q?=D0=9F=D0=BE=20=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D1=8C=D0=B1=D0=B5=20=D0=BE=D1=82=D0=B4.=20=D1=82=D0=B5=D1=85?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D0=B8=20=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BE=D0=B1=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81?= =?UTF-8?q?=D1=82=D0=B2=D0=B8=D0=B8=20=D0=BB=D0=B8=D1=86=D0=B5=D0=BD=D0=B7?= =?UTF-8?q?=D0=B8=D0=B8=20(=D0=B4=D0=BB=D1=8F=20=D0=B8=D1=81=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2?= =?UTF-8?q?=20Enterprise=20Edition=20=D0=B8=20Integration=20Edition).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../documenteditor/main/app/controller/Main.js | 18 ++++++++++++------ apps/documenteditor/main/locale/en.json | 5 +++-- .../main/app/controller/Main.js | 18 ++++++++++++------ apps/presentationeditor/main/locale/en.json | 5 +++-- .../main/app/controller/Main.js | 18 ++++++++++++------ apps/spreadsheeteditor/main/locale/en.json | 5 +++-- 6 files changed, 45 insertions(+), 24 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 19af3ca78..7389ea1aa 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -892,14 +892,19 @@ define([ if (now - value > 86400000) { Common.localStorage.setItem("de-license-warning", now); Common.UI.info({ + width: 400, title: this.textNoLicenseTitle, msg : this.warnNoLicense, - buttons: ['custom'], - primary: 'custom', - customButtonText: this.textBuyNow, + buttons: [ + {value: 'buynow', caption: this.textBuyNow}, + {value: 'contact', caption: this.textContactUs} + ], + primary: 'buynow', callback: function(btn) { - if (btn == 'custom') + if (btn == 'buynow') window.open('http://www.onlyoffice.com/enterprise-edition.aspx', "_blank"); + else if (btn == 'contact') + window.open('mailto:sales@onlyoffice.com', "_blank"); } }); } @@ -1791,8 +1796,9 @@ define([ textStrict: 'Strict mode', txtErrorLoadHistory: 'Loading history failed', textBuyNow: 'Buy now', - textNoLicenseTitle: 'License expired', - warnNoLicense: 'The license expired. You cannot create or edit files.
Click the \'Buy now\' button to prolong the license.' + textNoLicenseTitle: 'License expired or not found', + warnNoLicense: 'The license could not be found or expired. You cannot edit files.
Click \'Buy now\' to purchase Enterprise Edition license or \'Contact us\' if you use Integration Edition.', + textContactUs: 'Contact us' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 294bebe27..e71bd8338 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -234,7 +234,7 @@ "DE.Controllers.Main.textBuyNow": "Buy now", "DE.Controllers.Main.textCloseTip": "\nClick to close the tip", "DE.Controllers.Main.textLoadingDocument": "Loading document", - "DE.Controllers.Main.textNoLicenseTitle": "License expired", + "DE.Controllers.Main.textNoLicenseTitle": "License expired or not found", "DE.Controllers.Main.textStrict": "Strict mode", "DE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.
Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "DE.Controllers.Main.titleUpdateVersion": "Version changed", @@ -264,8 +264,9 @@ "DE.Controllers.Main.uploadImageTitleText": "Uploading Image", "DE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher", "DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", - "DE.Controllers.Main.warnNoLicense": "The license expired. You cannot create or edit files.
Click the 'Buy now' button to prolong the license.", + "DE.Controllers.Main.warnNoLicense": "The license could not be found or expired. You cannot edit files.
Click 'Buy now' to purchase Enterprise Edition license or 'Contact us' if you use Integration Edition.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "DE.Controllers.Main.textContactUs": "Contact us", "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked", "DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%", diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index fab35c4bb..7f951eae4 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -683,14 +683,19 @@ define([ if (now - value > 86400000) { Common.localStorage.setItem("de-license-warning", now); Common.UI.info({ + width: 400, title: this.textNoLicenseTitle, msg : this.warnNoLicense, - buttons: ['custom'], - primary: 'custom', - customButtonText: this.textBuyNow, + buttons: [ + {value: 'buynow', caption: this.textBuyNow}, + {value: 'contact', caption: this.textContactUs} + ], + primary: 'buynow', callback: function(btn) { - if (btn == 'custom') + if (btn == 'buynow') window.open('http://www.onlyoffice.com/enterprise-edition.aspx', "_blank"); + else if (btn == 'contact') + window.open('mailto:sales@onlyoffice.com', "_blank"); } }); } @@ -1605,8 +1610,9 @@ define([ textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.
Click the \'Strict mode\' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.', textStrict: 'Strict mode', textBuyNow: 'Buy now', - textNoLicenseTitle: 'License expired', - warnNoLicense: 'The license expired. You cannot create or edit files.
Click the \'Buy now\' button to prolong the license.' + textNoLicenseTitle: 'License expired or not found', + warnNoLicense: 'The license could not be found or expired. You cannot edit files.
Click \'Buy now\' to purchase Enterprise Edition license or \'Contact us\' if you use Integration Edition.', + textContactUs: 'Contact us' } })(), PE.Controllers.Main || {})) }); diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index c883f0a14..c7f5cffa4 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -147,7 +147,7 @@ "PE.Controllers.Main.textBuyNow": "Buy now", "PE.Controllers.Main.textCloseTip": "\nClick to close the tip", "PE.Controllers.Main.textLoadingDocument": "Loading presentation", - "PE.Controllers.Main.textNoLicenseTitle": "License expired", + "PE.Controllers.Main.textNoLicenseTitle": "License expired or not found", "PE.Controllers.Main.textShape": "Shape", "PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.
Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", @@ -212,8 +212,9 @@ "PE.Controllers.Main.uploadImageTitleText": "Uploading Image", "PE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher", "PE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", - "PE.Controllers.Main.warnNoLicense": "The license expired. You cannot create or edit files.
Click the 'Buy now' button to prolong the license.", + "PE.Controllers.Main.warnNoLicense": "The license could not be found or expired. You cannot edit files.
Click 'Buy now' to purchase Enterprise Edition license or 'Contact us' if you use Integration Edition.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "PE.Controllers.Main.textContactUs": "Contact us", "PE.Controllers.Statusbar.zoomText": "Zoom {0}%", "PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
The text style will be displayed using one of the system fonts, the saved font will be used when it is available.
Do you want to continue?", "PE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.", diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index a55214701..d1ee96efa 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -689,14 +689,19 @@ define([ if (now - value > 86400000) { Common.localStorage.setItem("de-license-warning", now); Common.UI.info({ + width: 400, title: this.textNoLicenseTitle, msg : this.warnNoLicense, - buttons: ['custom'], - primary: 'custom', - customButtonText: this.textBuyNow, + buttons: [ + {value: 'buynow', caption: this.textBuyNow}, + {value: 'contact', caption: this.textContactUs} + ], + primary: 'buynow', callback: function(btn) { - if (btn == 'custom') + if (btn == 'buynow') window.open('http://www.onlyoffice.com/enterprise-edition.aspx', "_blank"); + else if (btn == 'contact') + window.open('mailto:sales@onlyoffice.com', "_blank"); } }); } @@ -1778,8 +1783,9 @@ define([ errorOpenWarning: 'The length of one of the formulas in the file exceeded
the allowed number of characters and it was removed.', errorFrmlWrongReferences: 'The function refers to a sheet that does not exist.
Please check the data and try again.', textBuyNow: 'Buy now', - textNoLicenseTitle: 'License expired', - warnNoLicense: 'The license expired. You cannot create or edit files.
Click the \'Buy now\' button to prolong the license.' + textNoLicenseTitle: 'License expired or not found', + warnNoLicense: 'The license could not be found or expired. You cannot edit files.
Click \'Buy now\' to purchase Enterprise Edition license or \'Contact us\' if you use Integration Edition.', + textContactUs: 'Contact us' } })(), SSE.Controllers.Main || {})) }); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index b9058c2cc..036951ab7 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -184,7 +184,7 @@ "SSE.Controllers.Main.textConfirm": "Confirmation", "SSE.Controllers.Main.textLoadingDocument": "Loading spreadsheet", "SSE.Controllers.Main.textNo": "No", - "SSE.Controllers.Main.textNoLicenseTitle": "License expired", + "SSE.Controllers.Main.textNoLicenseTitle": "License expired or not found", "SSE.Controllers.Main.textPleaseWait": "The operation might take more time than expected. Please wait...", "SSE.Controllers.Main.textRecalcFormulas": "Calculating formulas...", "SSE.Controllers.Main.textShape": "Shape", @@ -216,8 +216,9 @@ "SSE.Controllers.Main.uploadImageTitleText": "Uploading Image", "SSE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher", "SSE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", - "SSE.Controllers.Main.warnNoLicense": "The license expired. You cannot create or edit files.
Click the 'Buy now' button to prolong the license.", + "SSE.Controllers.Main.warnNoLicense": "The license could not be found or expired. You cannot edit files.
Click 'Buy now' to purchase Enterprise Edition license or 'Contact us' if you use Integration Edition.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "SSE.Controllers.Main.textContactUs": "Contact us", "SSE.Controllers.Print.strAllSheets": "All Sheets", "SSE.Controllers.Print.textWarning": "Warning", "SSE.Controllers.Print.warnCheckMargings": "Margins are incorrect", From d0fe598571aa1c03510cfd4b3ed2993816c3276a Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Wed, 13 Apr 2016 18:09:18 +0300 Subject: [PATCH 4/6] update files order --- apps/spreadsheeteditor/main/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index f12cc9fed..d9025efe3 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -247,13 +247,15 @@ + + + - @@ -269,8 +271,6 @@ - - @@ -297,6 +297,7 @@ + @@ -304,7 +305,6 @@ - From 73c9c6a1e1d36923854bfa51ec03156dec905108 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Wed, 13 Apr 2016 19:27:41 +0300 Subject: [PATCH 5/6] update files order --- apps/documenteditor/main/index.html | 2 +- apps/presentationeditor/main/index.html | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 16e806136..65307eb1d 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -251,6 +251,7 @@ + @@ -364,7 +365,6 @@ - diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index 8a3f42d7b..0923ba11d 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -235,21 +235,30 @@ + + + + + + + + + + + + + - - - - @@ -340,12 +349,8 @@ - - - - - - + + From fdc816271984665a344bda863be8ba426dbc9d8e Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 14 Apr 2016 12:25:48 +0300 Subject: [PATCH 6/6] bug 31994 --- apps/documenteditor/main/app/view/FileMenuPanels.js | 4 ++-- apps/presentationeditor/main/app/view/FileMenuPanels.js | 4 ++-- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 1ae7915c0..f34003d4f 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -329,7 +329,7 @@ define([ this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0)); value = Common.localStorage.getItem("de-settings-coauthmode"); - var fast_coauth = (value===null || parseInt(value) == 1); + var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline); item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)}); this.cmbCoAuthMode.setValue(item ? item.get('value') : 1); @@ -352,7 +352,7 @@ define([ this._oldUnits = this.cmbUnit.getValue(); value = Common.localStorage.getItem("de-settings-autosave"); - this.chAutosave.setValue(fast_coauth); + this.chAutosave.setValue(fast_coauth || (value===null || parseInt(value) == 1)); value = Common.localStorage.getItem("de-settings-spellcheck"); this.chSpell.setValue(value===null || parseInt(value) == 1); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index f6657bc13..02e377579 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -273,7 +273,7 @@ define([ /** coauthoring begin **/ value = Common.localStorage.getItem("pe-settings-coauthmode"); - var fast_coauth = (value===null || parseInt(value) == 1); + var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline); item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)}); this.cmbCoAuthMode.setValue(item ? item.get('value') : 1); @@ -286,7 +286,7 @@ define([ this._oldUnits = this.cmbUnit.getValue(); value = Common.localStorage.getItem("pe-settings-autosave"); - this.chAutosave.setValue(fast_coauth); + this.chAutosave.setValue(fast_coauth || (value===null || parseInt(value) == 1)); value = Common.localStorage.getItem("pe-settings-showsnaplines"); this.chAlignGuides.setValue(value===null || parseInt(value) == 1); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 3fa2daa31..58fe403ad 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -648,7 +648,7 @@ define([ this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0)); value = Common.localStorage.getItem("sse-settings-coauthmode"); - var fast_coauth = (value===null || parseInt(value) == 1); + var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline); item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)}); this.cmbCoAuthMode.setValue(item ? item.get('value') : 1); @@ -665,7 +665,7 @@ define([ this._oldUnits = this.cmbUnit.getValue(); value = Common.localStorage.getItem("sse-settings-autosave"); - this.chAutosave.setValue(fast_coauth); + this.chAutosave.setValue(fast_coauth || (value===null || parseInt(value) == 1)); value = Common.localStorage.getItem("sse-settings-func-locale"); if (value===null)