From dcf80f9ba02f89f97b8a4910ff951b2aecd58d1c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 25 Oct 2017 17:36:59 +0300 Subject: [PATCH] Added trial and developer mode. --- apps/documenteditor/main/app/controller/LeftMenu.js | 4 ++-- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/documenteditor/main/app/view/LeftMenu.js | 5 +++-- apps/documenteditor/main/locale/en.json | 1 + apps/documenteditor/main/locale/ru.json | 2 ++ apps/presentationeditor/main/app/controller/LeftMenu.js | 4 ++-- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/view/LeftMenu.js | 5 +++-- apps/presentationeditor/main/locale/en.json | 1 + apps/presentationeditor/main/locale/ru.json | 2 ++ apps/spreadsheeteditor/main/app/controller/LeftMenu.js | 4 ++-- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/view/LeftMenu.js | 5 +++-- apps/spreadsheeteditor/main/locale/en.json | 1 + apps/spreadsheeteditor/main/locale/ru.json | 3 +++ 15 files changed, 28 insertions(+), 15 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 0d4153db8..a05ae62e0 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -191,7 +191,7 @@ define([ if (this.mode.canUseHistory) this.leftMenu.setOptionsPanel('history', this.getApplication().getController('Common.Controllers.History').getView('Common.Views.History')); - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); Common.util.Shortcuts.resumeEvents(); return this; @@ -203,7 +203,7 @@ define([ this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins')); } else this.leftMenu.btnPlugins.hide(); - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); }, clickMenuFileItem: function(menu, action, isopts) { diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index c407a4631..d0fe09077 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1014,7 +1014,7 @@ define([ this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); - this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.trialMode = params.asc_getLicenseMode(); if ( this.appOptions.isLightVersion ) { this.appOptions.canUseHistory = diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index 1396e18c7..9b08fbb5a 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -360,7 +360,7 @@ define([ if ( !this.$el.is(':visible') ) return; if (!this.developerHint) { - this.developerHint = $('
' + this.txtDeveloper + '
').appendTo(this.$el); + this.developerHint = $('
' + ((mode == Asc.c_oLicenseMode.Trial) ? this.txtTrial : this.txtDeveloper) + '
').appendTo(this.$el); this.devHeight = this.developerHint.outerHeight(); $(window).on('resize', _.bind(this.onWindowResize, this)); } @@ -382,6 +382,7 @@ define([ tipSupport : 'Feedback & Support', tipSearch : 'Search', tipPlugins : 'Plugins', - txtDeveloper: 'DEVELOPER MODE' + txtDeveloper: 'DEVELOPER MODE', + txtTrial: 'TRIAL MODE' }, DE.Views.LeftMenu || {})); }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 4769e02e5..630f89fa0 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1145,6 +1145,7 @@ "DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipTitles": "Titles", "DE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE", + "DE.Views.LeftMenu.txtTrial": "TRIAL MODE", "DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel", "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", "DE.Views.MailMergeEmailDlg.okButtonText": "Send", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 000b25737..ee0487045 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -994,6 +994,7 @@ "DE.Views.FileMenuPanels.Settings.strFontRender": "Хинтинг шрифтов", "DE.Views.FileMenuPanels.Settings.strForcesave": "Всегда сохранять на сервере (в противном случае сохранять на сервере при закрытии документа)", "DE.Views.FileMenuPanels.Settings.strInputMode": "Включить иероглифы", + "DE.Views.FileMenuPanels.Settings.strInputSogou": "Включить метод ввода Sogou Pinyin", "DE.Views.FileMenuPanels.Settings.strLiveComment": "Включить отображение комментариев в тексте", "DE.Views.FileMenuPanels.Settings.strResolvedComment": "Включить отображение решенных комментариев", "DE.Views.FileMenuPanels.Settings.strShowChanges": "Отображать изменения при совместной работе", @@ -1144,6 +1145,7 @@ "DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "DE.Views.LeftMenu.tipTitles": "Заголовки", "DE.Views.LeftMenu.txtDeveloper": "РЕЖИМ РАЗРАБОТЧИКА", + "DE.Views.LeftMenu.txtTrial": "ПРОБНЫЙ РЕЖИМ", "DE.Views.MailMergeEmailDlg.cancelButtonText": "Отмена", "DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF", "DE.Views.MailMergeEmailDlg.okButtonText": "Отправить", diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index 7e884ea79..45e4e9550 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -179,7 +179,7 @@ define([ this.leftMenu.btnChat.hide(); this.leftMenu.btnComments.hide(); } - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); /** coauthoring end **/ Common.util.Shortcuts.resumeEvents(); this.leftMenu.btnThumbs.toggle(true); @@ -192,7 +192,7 @@ define([ this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins')); } else this.leftMenu.btnPlugins.hide(); - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); }, clickMenuFileItem: function(menu, action, isopts) { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index ba659dcd0..bfa635fe1 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -785,7 +785,7 @@ define([ this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); - this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.trialMode = params.asc_getLicenseMode(); this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; diff --git a/apps/presentationeditor/main/app/view/LeftMenu.js b/apps/presentationeditor/main/app/view/LeftMenu.js index 24b70ed54..7c35bbedb 100644 --- a/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/apps/presentationeditor/main/app/view/LeftMenu.js @@ -358,7 +358,7 @@ define([ if ( !this.$el.is(':visible') ) return; if (!this.developerHint) { - this.developerHint = $('
' + this.txtDeveloper + '
').appendTo(this.$el); + this.developerHint = $('
' + ((mode == Asc.c_oLicenseMode.Trial) ? this.txtTrial : this.txtDeveloper) + '
').appendTo(this.$el); this.devHeight = this.developerHint.outerHeight(); $(window).on('resize', _.bind(this.onWindowResize, this)); } @@ -382,6 +382,7 @@ define([ tipSearch : 'Search', tipSlides: 'Slides', tipPlugins : 'Plugins', - txtDeveloper: 'DEVELOPER MODE' + txtDeveloper: 'DEVELOPER MODE', + txtTrial: 'TRIAL MODE' }, PE.Views.LeftMenu || {})); }); diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 21fbf502c..30ef68240 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -919,6 +919,7 @@ "PE.Views.LeftMenu.tipSupport": "Feedback & Support", "PE.Views.LeftMenu.tipTitles": "Titles", "PE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE", + "PE.Views.LeftMenu.txtTrial": "TRIAL MODE", "PE.Views.ParagraphSettings.strLineHeight": "Line Spacing", "PE.Views.ParagraphSettings.strParagraphSpacing": "Paragraph Spacing", "PE.Views.ParagraphSettings.strSpacingAfter": "After", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index 1949516bd..4deba0e4e 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -840,6 +840,7 @@ "PE.Views.FileMenuPanels.Settings.strFast": "Быстрый", "PE.Views.FileMenuPanels.Settings.strForcesave": "Всегда сохранять на сервере (в противном случае сохранять на сервере при закрытии документа)", "PE.Views.FileMenuPanels.Settings.strInputMode": "Включить иероглифы", + "PE.Views.FileMenuPanels.Settings.strInputSogou": "Включить метод ввода Sogou Pinyin", "PE.Views.FileMenuPanels.Settings.strShowChanges": "Отображать изменения при совместной работе", "PE.Views.FileMenuPanels.Settings.strSpellCheckMode": "Включить проверку орфографии", "PE.Views.FileMenuPanels.Settings.strStrict": "Строгий", @@ -918,6 +919,7 @@ "PE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "PE.Views.LeftMenu.tipTitles": "Заголовки", "PE.Views.LeftMenu.txtDeveloper": "РЕЖИМ РАЗРАБОТЧИКА", + "PE.Views.LeftMenu.txtTrial": "ПРОБНЫЙ РЕЖИМ", "PE.Views.ParagraphSettings.strLineHeight": "Междустрочный интервал", "PE.Views.ParagraphSettings.strParagraphSpacing": "Интервал между абзацами", "PE.Views.ParagraphSettings.strSpacingAfter": "После", diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index eaa552fd0..4ee7ee9a8 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -187,7 +187,7 @@ define([ this.leftMenu.btnChat.hide(); this.leftMenu.btnComments.hide(); } - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); /** coauthoring end **/ Common.util.Shortcuts.resumeEvents(); if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram) @@ -201,7 +201,7 @@ define([ this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins')); } else this.leftMenu.btnPlugins.hide(); - this.mode.isTrial && this.leftMenu.setDeveloperMode(true); + this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode); }, clickMenuFileItem: function(menu, action, isopts) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 516570c08..f92230f96 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -806,7 +806,7 @@ define([ this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canRename = !!this.permissions.rename; - this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); if (this.appOptions.canBranding) diff --git a/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/apps/spreadsheeteditor/main/app/view/LeftMenu.js index b39fa6412..76a0ac8c6 100644 --- a/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -330,7 +330,7 @@ define([ if ( !this.$el.is(':visible') ) return; if (!this.developerHint) { - this.developerHint = $('
' + this.txtDeveloper + '
').appendTo(this.$el); + this.developerHint = $('
' + ((mode == Asc.c_oLicenseMode.Trial) ? this.txtTrial : this.txtDeveloper) + '
').appendTo(this.$el); this.devHeight = this.developerHint.outerHeight(); $(window).on('resize', _.bind(this.onWindowResize, this)); } @@ -354,6 +354,7 @@ define([ tipFile : 'File', tipSearch : 'Search', tipPlugins : 'Plugins', - txtDeveloper: 'DEVELOPER MODE' + txtDeveloper: 'DEVELOPER MODE', + txtTrial: 'TRIAL MODE' }, SSE.Views.LeftMenu || {})); }); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index d6845141d..63c2602d6 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1245,6 +1245,7 @@ "SSE.Views.LeftMenu.tipSearch": "Search", "SSE.Views.LeftMenu.tipSupport": "Feedback & Support", "SSE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE", + "SSE.Views.LeftMenu.txtTrial": "TRIAL MODE", "SSE.Views.MainSettingsPrint.okButtonText": "Save", "SSE.Views.MainSettingsPrint.strBottom": "Bottom", "SSE.Views.MainSettingsPrint.strLandscape": "Landscape", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 4f7dea21e..c2db0c20c 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -1100,6 +1100,7 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.strForcesave": "Всегда сохранять на сервере (в противном случае сохранять на сервере при закрытии документа)", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocale": "Язык формул", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocaleEx": "Пример: СУММ; МИН; МАКС; СЧЁТ", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strInputSogou": "Включить метод ввода Sogou Pinyin", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strLiveComment": "Включить отображение комментариев в тексте", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettings": "Региональные параметры", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettingsEx": "Пример:", @@ -1120,6 +1121,7 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtDe": "Немецкий", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtEn": "Английский", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Дюйм", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInput": "Альтернативный ввод", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtLiveComment": "Отображение комментариев", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "как OS X", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Собственный", @@ -1243,6 +1245,7 @@ "SSE.Views.LeftMenu.tipSearch": "Поиск", "SSE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "SSE.Views.LeftMenu.txtDeveloper": "РЕЖИМ РАЗРАБОТЧИКА", + "SSE.Views.LeftMenu.txtTrial": "ПРОБНЫЙ РЕЖИМ", "SSE.Views.MainSettingsPrint.okButtonText": "Сохранить", "SSE.Views.MainSettingsPrint.strBottom": "Снизу", "SSE.Views.MainSettingsPrint.strLandscape": "Альбомная",