diff --git a/apps/common/locale.js b/apps/common/locale.js
index 7990b2c8d..abed04e94 100644
--- a/apps/common/locale.js
+++ b/apps/common/locale.js
@@ -39,7 +39,8 @@ Common.Locale = new(function() {
var l10n = null;
var loadcallback,
apply = false,
- currentLang = 'en';
+ defLang = '{{DEFAULT_LANG}}',
+ currentLang = defLang;
var _applyLocalization = function(callback) {
try {
@@ -83,7 +84,11 @@ Common.Locale = new(function() {
};
var _getCurrentLanguage = function() {
- return (currentLang || 'en');
+ return currentLang;
+ };
+
+ var _getLoadedLanguage = function() {
+ return loadedLang;
};
var _getUrlParameterByName = function(name) {
@@ -94,23 +99,26 @@ Common.Locale = new(function() {
};
var _requireLang = function () {
- var lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0];
+ var lang = (_getUrlParameterByName('lang') || defLang).split(/[\-_]/)[0];
currentLang = lang;
fetch('locale/' + lang + '.json')
.then(function(response) {
if (!response.ok) {
- currentLang = 'en';
- if (lang != 'en')
+ currentLang = defLang;
+ if (lang != defLang)
/* load default lang if fetch failed */
- return fetch('locale/en.json');
+ return fetch('locale/' + defLang + '.json');
throw new Error('server error');
}
return response.json();
}).then(function(response) {
- if ( response.then )
+ if ( response.json ) {
+ if (!response.ok)
+ throw new Error('server error');
+
return response.json();
- else {
+ } else {
l10n = response;
/* to break promises chain */
throw new Error('loaded');
@@ -122,8 +130,10 @@ Common.Locale = new(function() {
l10n = l10n || {};
apply && _applyLocalization();
if ( e.message == 'loaded' ) {
- } else
+ } else {
+ currentLang = null;
console.log('fetch error: ' + e);
+ }
});
};
diff --git a/apps/common/main/lib/component/SynchronizeTip.js b/apps/common/main/lib/component/SynchronizeTip.js
index b048d94e3..139c00ae0 100644
--- a/apps/common/main/lib/component/SynchronizeTip.js
+++ b/apps/common/main/lib/component/SynchronizeTip.js
@@ -128,6 +128,9 @@ define([
bottom = Common.Utils.innerHeight() - showxy.top - this.target.height()/2;
} else if (pos == 'bottom') {
top = showxy.top + this.target.height()/2;
+ var height = this.cmpEl.height();
+ if (top+height>Common.Utils.innerHeight())
+ top = Common.Utils.innerHeight() - height - 10;
} else if (pos == 'left') {
right = Common.Utils.innerWidth() - showxy.left - this.target.width()/2;
} else if (pos == 'right') {
diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index 3b8aa6c14..cb6ac13b4 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -632,7 +632,7 @@ define([
this.$window = $('#' + this.initConfig.id);
- if (Common.Locale.getCurrentLanguage() !== 'en')
+ if (Common.Locale.getCurrentLanguage() && Common.Locale.getCurrentLanguage() !== 'en')
this.$window.attr('applang', Common.Locale.getCurrentLanguage());
this.binding.keydown = _.bind(_keydown,this);
diff --git a/apps/common/main/lib/controller/ExternalDiagramEditor.js b/apps/common/main/lib/controller/ExternalDiagramEditor.js
index 5c8641012..35f403ad2 100644
--- a/apps/common/main/lib/controller/ExternalDiagramEditor.js
+++ b/apps/common/main/lib/controller/ExternalDiagramEditor.js
@@ -48,7 +48,7 @@ define([
'common/main/lib/view/ExternalDiagramEditor'
], function () { 'use strict';
Common.Controllers.ExternalDiagramEditor = Backbone.Controller.extend(_.extend((function() {
- var appLang = 'en',
+ var appLang = '{{DEFAULT_LANG}}',
customization = undefined,
targetApp = '',
externalEditor = null,
diff --git a/apps/common/main/lib/controller/ExternalMergeEditor.js b/apps/common/main/lib/controller/ExternalMergeEditor.js
index 69e659c22..89017051a 100644
--- a/apps/common/main/lib/controller/ExternalMergeEditor.js
+++ b/apps/common/main/lib/controller/ExternalMergeEditor.js
@@ -48,7 +48,7 @@ define([
'common/main/lib/view/ExternalMergeEditor'
], function () { 'use strict';
Common.Controllers.ExternalMergeEditor = Backbone.Controller.extend(_.extend((function() {
- var appLang = 'en',
+ var appLang = '{{DEFAULT_LANG}}',
customization = undefined,
targetApp = '',
externalEditor = null;
diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js
index 64330b04a..56cb728f9 100644
--- a/apps/common/main/lib/controller/Themes.js
+++ b/apps/common/main/lib/controller/Themes.js
@@ -7,6 +7,8 @@ define([
], function () {
'use strict';
+ !Common.UI && (Common.UI = {});
+
Common.UI.Themes = new (function(locale) {
!locale && (locale = {});
var themes_map = {
@@ -217,7 +219,7 @@ define([
$(window).on('storage', function (e) {
if ( e.key == 'ui-theme' || e.key == 'ui-theme-id' ) {
- me.setTheme(e.originalEvent.newValue);
+ me.setTheme(e.originalEvent.newValue, true);
}
})
@@ -230,6 +232,10 @@ define([
$('body').addClass(theme_name);
}
+ if ( !document.body.className.match(/theme-type-/) ) {
+ document.body.classList.add('theme-type-' + themes_map[theme_name].type);
+ }
+
var obj = get_current_theme_colors(name_colors);
obj.type = themes_map[theme_name].type;
obj.name = theme_name;
@@ -243,7 +249,7 @@ define([
},
setAvailable: function (value) {
- this.locked = value;
+ this.locked = !value;
},
map: function () {
@@ -274,16 +280,16 @@ define([
setTheme: function (obj, force) {
var id = get_ui_theme_name(obj);
if ( (this.currentThemeId() != id || force) && !!themes_map[id] ) {
- var classname = document.body.className.replace(/theme-\w+\s?/, '');
- document.body.className = classname;
+ document.body.className = document.body.className.replace(/theme-[\w-]+\s?/gi, '').trim();
+ document.body.classList.add(id, 'theme-type-' + themes_map[id].type);
- $('body').addClass(id);
+ if ( this.api ) {
+ var obj = get_current_theme_colors(name_colors);
+ obj.type = themes_map[id].type;
+ obj.name = id;
- var obj = get_current_theme_colors(name_colors);
- obj.type = themes_map[id].type;
- obj.name = id;
-
- this.api.asc_setSkin(obj);
+ this.api.asc_setSkin(obj);
+ }
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) ) {
var theme_obj = {
diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js
index 1e193310e..26cb4c3da 100644
--- a/apps/common/main/lib/view/Header.js
+++ b/apps/common/main/lib/view/Header.js
@@ -103,7 +103,7 @@ define([
'' +
'
' +
'
' +
- '
' +
+ '' +
'
' +
diff --git a/apps/common/main/lib/view/SignDialog.js b/apps/common/main/lib/view/SignDialog.js
index 261496c9c..b1f994fa5 100644
--- a/apps/common/main/lib/view/SignDialog.js
+++ b/apps/common/main/lib/view/SignDialog.js
@@ -105,15 +105,15 @@ define([
'
',
'',
'' + this.textCertificate + ' ' +
- '' + this.textSelect + ' ',
+ '' + this.textSelect + ' ',
' ',
- '
',
+ '
',
'
',
'
'
].join('');
this.templateCertificate = _.template([
- '<%= Common.Utils.String.htmlEncode(name) %> ',
+ '<%= Common.Utils.String.htmlEncode(name) %> ',
'<%= Common.Utils.String.htmlEncode(valid) %> '
].join(''));
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index 8622e9525..fab2c637b 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -332,7 +332,7 @@
.border-radius(1px);
background-color: transparent;
- .masked & {
+ .masked:not(.statusbar) & {
&:disabled {
opacity: 1;
}
@@ -985,6 +985,18 @@
&.disabled {
opacity: @component-disabled-opacity;
}
+
+ &:not(:disabled) {
+ .icon {
+ opacity: 1;
+ }
+
+ &:hover {
+ .icon {
+ .icon();
+ }
+ }
+ }
}
.cnt-lang {
diff --git a/apps/common/main/resources/less/colors-table-classic.less b/apps/common/main/resources/less/colors-table-classic.less
index 33f7e75bc..efa5c9a63 100644
--- a/apps/common/main/resources/less/colors-table-classic.less
+++ b/apps/common/main/resources/less/colors-table-classic.less
@@ -47,7 +47,7 @@
--text-contrast-background: #fff;
--icon-normal: #444;
- --icon-normal-pressed: #fff;
+ --icon-normal-pressed: #444;
--icon-inverse: #444;
--icon-toolbar-header: fade(#fff, 80%);
--icon-notification-badge: #000;
diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less
index f7571b713..008d01c72 100644
--- a/apps/common/main/resources/less/toolbar.less
+++ b/apps/common/main/resources/less/toolbar.less
@@ -392,11 +392,13 @@
}
}
- .extra {
- #header-logo {
- i {
- background-image: ~"url('@{common-image-const-path}/header/dark-logo_s.svg')";
- background-repeat: no-repeat;
+ .theme-type-light & {
+ .extra {
+ #header-logo {
+ i {
+ background-image: ~"url('@{common-image-const-path}/header/dark-logo_s.svg')";
+ background-repeat: no-repeat;
+ }
}
}
}
diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less
index 89ad03f21..65294ef4d 100644
--- a/apps/common/main/resources/less/window.less
+++ b/apps/common/main/resources/less/window.less
@@ -85,10 +85,8 @@
&.close {
position: relative;
opacity: 0.7;
- transition: transform .3s;
&:hover {
- transform: scale(1.1);
opacity: 1;
}
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 307d0a51f..ee3f7c6ad 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -1264,7 +1264,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
this._state.licenseType = licType;
- if ( this.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded()) return;
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
@@ -2551,6 +2551,18 @@ define([
this.getApplication().getController('DocumentHolder').getView().focus();
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ Common.UI.warning({
+ msg: this.errorLang,
+ buttons: [],
+ closable: false
+ });
+ return false;
+ }
+ return true;
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -2922,7 +2934,8 @@ define([
txtNoTableOfFigures: "No table of figures entries found.",
txtTableOfFigures: 'Table of figures',
txtStyle_endnote_text: 'Endnote Text',
- txtTOCHeading: 'TOC Heading'
+ txtTOCHeading: 'TOC Heading',
+ errorLang: 'The interface language is not loaded. Please contact your Document Server administrator.'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
index e8f46a37b..b73fe420b 100644
--- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
+++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template
@@ -174,7 +174,7 @@
-
+
<%= scope.textTabPosition %>
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index 953950816..388c39c85 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -1524,7 +1524,7 @@ define([
Common.UI.BaseView.prototype.initialize.call(this,arguments);
this.menu = options.menu;
- this.urlPref = 'resources/help/en/';
+ this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
this.openUrl = null;
this.en_data = [
@@ -1642,12 +1642,12 @@ define([
var config = {
dataType: 'json',
error: function () {
- if ( me.urlPref.indexOf('resources/help/en/')<0 ) {
- me.urlPref = 'resources/help/en/';
- store.url = 'resources/help/en/Contents.json';
+ if ( me.urlPref.indexOf('resources/help/{{DEFAULT_LANG}}/')<0 ) {
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
+ store.url = 'resources/help/{{DEFAULT_LANG}}/Contents.json';
store.fetch(config);
} else {
- me.urlPref = 'resources/help/en/';
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
}
},
diff --git a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js
index fba5d8685..0df32d36a 100644
--- a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js
+++ b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js
@@ -152,7 +152,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbUnit.setDisabled(!value);
if (this._changedProps) {
if (value && this.nfWidth.getNumberValue()>0)
- this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(this.nfWidth.getNumberValue()));
+ this._changedProps.put_Width(this.cmbUnit.getValue() ? -this.nfWidth.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(this.nfWidth.getNumberValue()));
else
this._changedProps.put_Width(null);
}
@@ -447,7 +447,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbPrefWidthUnit.setDisabled(!value);
if (this._changedProps) {
if (value && this.nfPrefWidth.getNumberValue()>0)
- this._changedProps.put_CellsWidth(this.cmbPrefWidthUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(this.nfPrefWidth.getNumberValue()));
+ this._changedProps.put_CellsWidth(this.cmbPrefWidthUnit.getValue() ? -this.nfPrefWidth.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(this.nfPrefWidth.getNumberValue()));
else
this._changedProps.put_CellsWidth(null);
}
diff --git a/apps/documenteditor/main/resources/help/de/UsageInstructions/SavePrintDownload.htm b/apps/documenteditor/main/resources/help/de/UsageInstructions/SavePrintDownload.htm
index a4d850dbe..90fb854b6 100644
--- a/apps/documenteditor/main/resources/help/de/UsageInstructions/SavePrintDownload.htm
+++ b/apps/documenteditor/main/resources/help/de/UsageInstructions/SavePrintDownload.htm
@@ -28,7 +28,7 @@
Klicken Sie in der oberen Menüleiste auf die Registerkarte Datei .
Wählen Sie die Option Speichern als... .
- Wählen Sie das gewünschte Format aus: DOCX, ODT, RTF, TXT, PDF, PDFA. Sie können die Option Dokumentenvorlage (DOTX oder OTT) auswählen.
+ Wählen Sie das gewünschte Format aus: DOCX, ODT, RTF, TXT, PDF, PDF/A. Sie können die Option Dokumentenvorlage (DOTX oder OTT) auswählen.
diff --git a/apps/documenteditor/main/resources/help/de/editor.css b/apps/documenteditor/main/resources/help/de/editor.css
index 4e3f9d697..e191efd9b 100644
--- a/apps/documenteditor/main/resources/help/de/editor.css
+++ b/apps/documenteditor/main/resources/help/de/editor.css
@@ -1,6 +1,6 @@
body
{
-font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+font-family: Arial, Helvetica, "Helvetica Neue", sans-serif;
font-size: 12px;
color: #444;
background: #fff;
@@ -180,7 +180,7 @@ text-decoration: none;
font-style: italic;
}
#search-results a {
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+ font-family: Arial, Helvetica, "Helvetica Neue", sans-serif;
font-size: 1em;
font-weight: bold;
color: #444;
diff --git a/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm b/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
index c2391dbdd..add7415bd 100644
--- a/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
+++ b/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
@@ -18,7 +18,7 @@
and edit documents
directly in your browser .
Using the Document Editor , you can perform various editing operations like in any desktop editor,
print the edited documents keeping all the formatting details or download them onto your computer hard disk drive of your computer as DOCX, PDF, ODT, TXT, DOTX, PDF/A, OTT, RTF, HTML, FB2, EPUB files.
-
To view the current software version and licensor details in the online version , click the icon on the left sidebar. To view the current software version and licensor details in the desktop version , select the About menu item on the left sidebar of the main program window.
+
To view the current software version and licensor details in the online version , click the icon on the left sidebar. To view the current software version and licensor details in the desktop version for Windows, select the About menu item on the left sidebar of the main program window. In the desktop version for Mac OS, open the ONLYOFFICE menu at the top of the screen and select the About ONLYOFFICE menu item.