diff --git a/apps/api/wopi/convert-and-edit-wopi.ejs b/apps/api/wopi/convert-and-edit-wopi.ejs new file mode 100644 index 000000000..5f2ab0ccd --- /dev/null +++ b/apps/api/wopi/convert-and-edit-wopi.ejs @@ -0,0 +1,174 @@ + + + + + + + + + + ONLYOFFICE + + + +
+ Converting your file so you can edit it... + + +
+ + + + diff --git a/apps/api/wopi/editor-wopi.ejs b/apps/api/wopi/editor-wopi.ejs index c27569981..9058cf82e 100644 --- a/apps/api/wopi/editor-wopi.ejs +++ b/apps/api/wopi/editor-wopi.ejs @@ -312,7 +312,7 @@ div { "events": { "onAppReady": onAppReady, "onDocumentStateChange": fileInfo.EditNotificationPostMessage ? onDocumentStateChange : undefined, - 'onRequestEditRights': fileInfo.EditModePostMessage || fileInfo.HostEditUrl ? onRequestEditRights : undefined, + 'onRequestEditRights': fileInfo.EditModePostMessage || (fileInfo.HostEditUrl && !fileInfo.UserCanNotWriteRelative) ? onRequestEditRights : undefined, "onError": onError, "onRequestClose": fileInfo.ClosePostMessage || fileInfo.CloseUrl ? onRequestClose : undefined, "onRequestRename": fileInfo.SupportsRename && fileInfo.UserCanRename ? onRequestRename : undefined, diff --git a/apps/common/embed/lib/util/utils.js b/apps/common/embed/lib/util/utils.js index 2d275b85e..955320044 100644 --- a/apps/common/embed/lib/util/utils.js +++ b/apps/common/embed/lib/util/utils.js @@ -36,6 +36,11 @@ !common.utils && (common.utils = {}); common.utils = new(function(){ + var userAgent = navigator.userAgent.toLowerCase(), + check = function(regex){ + return regex.test(userAgent); + }, + isMac = check(/macintosh|mac os x/); return { openLink: function(url) { if (url) { @@ -100,7 +105,9 @@ return prop; } } - } + }, + + isMac : isMac }; })(); }(); diff --git a/apps/common/embed/lib/view/SearchBar.js b/apps/common/embed/lib/view/SearchBar.js index 7800e132b..abb0b94da 100644 --- a/apps/common/embed/lib/view/SearchBar.js +++ b/apps/common/embed/lib/view/SearchBar.js @@ -66,9 +66,9 @@ common.view.SearchBar = new(function() { }, disableNavButtons: function (resultNumber, allResults) { - var disable = $('#search-bar-text').val() === ''; - $('#search-bar-back').attr({disabled: disable || !allResults || resultNumber === 0}); - $('#search-bar-next').attr({disabled: disable || resultNumber + 1 === allResults}); + var disable = $('#search-bar-text').val() === '' || !allResults; + $('#search-bar-back').attr({disabled: disable}); + $('#search-bar-next').attr({disabled: disable}); }, textFind: 'Find' diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index f303d3142..e7e8d8701 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -5,6 +5,7 @@ @import "../../../../common/main/resources/less/colors-table.less"; @import "../../../../common/main/resources/less/colors-table-classic.less"; @import "../../../../common/main/resources/less/colors-table-dark.less"; +@import "../../../../common/main/resources/less/colors-table-dark-contrast.less"; // Core variables and mixins //@import "../../../../../vendor/bootstrap/less/variables.less"; @@ -226,7 +227,7 @@ background: data-uri('../../../../common/main/resources/img/header/dark-logo_s.svg') no-repeat; } -.theme-dark { +.theme-type-dark { .brand-logo { background: data-uri('../../../../common/main/resources/img/header/header-logo_s.svg') no-repeat; } @@ -432,7 +433,7 @@ @icon-width: 20px; @icon-height: 20px; -.theme-dark { +.theme-type-dark { @neg-value: -@icon-height; --icon-normal-top: @neg-value; } @@ -546,15 +547,15 @@ } &.search-close { background-position: -@icon-width*18 0; - } - &.search { - background-position: -@icon-width*24 0; + background-position: -@icon-width*18 @icon-normal-top; } &.search-arrow-up { background-position: -@icon-width*27 0; + background-position: -@icon-width*27 @icon-normal-top; } &.search-arrow-down { background-position: -@icon-width*28 0; + background-position: -@icon-width*28 @icon-normal-top; } } diff --git a/apps/common/locale.js b/apps/common/locale.js index db8f29318..0c55b3ba9 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -88,6 +88,10 @@ Common.Locale = new(function() { return currentLang; }; + var _getDefaultLanguage = function() { + return defLang; + }; + var _getLoadedLanguage = function() { return loadedLang; }; @@ -170,7 +174,8 @@ Common.Locale = new(function() { return { apply: _applyLocalization, get: _get, - getCurrentLanguage: _getCurrentLanguage + getCurrentLanguage: _getCurrentLanguage, + getDefaultLanguage: _getDefaultLanguage }; })(); diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index 74bc96275..63e7a524c 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -358,6 +358,9 @@ define([ Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl); if (this.options.takeFocusOnClose) { var me = this; + (me._input && me._input.length>0 && !me.editable) && (me._input[0].selectionStart===me._input[0].selectionEnd) && setTimeout(function() { + me._input[0].selectionStart = me._input[0].selectionEnd = 0; + },1); setTimeout(function(){me.focus();}, 1); } }, diff --git a/apps/common/main/lib/component/MenuItem.js b/apps/common/main/lib/component/MenuItem.js index 96c76d36c..373ca9d99 100644 --- a/apps/common/main/lib/component/MenuItem.js +++ b/apps/common/main/lib/component/MenuItem.js @@ -301,6 +301,7 @@ define([ }, onItemMouseDown: function(e) { + Common.UI.HintManager && Common.UI.HintManager.clearHints(); if (e.which != 1) { e.preventDefault(); e.stopPropagation(); diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js index 9b452c354..c1e6c29f8 100644 --- a/apps/common/main/lib/component/Mixtbar.js +++ b/apps/common/main/lib/component/Mixtbar.js @@ -503,7 +503,8 @@ define([ setMoreButton: function(tab, panel) { var me = this; if (!btnsMore[tab]) { - var box = $('