Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into develop
  • Loading branch information
maxkadushkin committed Nov 27, 2024
2 parents 2d4c909 + 0306583 commit 50637ed
Show file tree
Hide file tree
Showing 190 changed files with 575 additions and 292 deletions.
13 changes: 0 additions & 13 deletions apps/api/documents/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,6 @@
};

var _onAppReady = function() {
if (_config.type === 'mobile') {
document.body.onfocus = function(e) {
setTimeout(function(){
iframe.contentWindow.focus();

_sendCommand({
command: 'resetFocus',
data: {}
})
}, 10);
};
}

_attachMouseEvents();

if (_config.editorConfig) {
Expand Down
5 changes: 5 additions & 0 deletions apps/common/forms/resources/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
@import "../../../../common/main/resources/mods/less/utilities.less";
@import "../../../../common/main/resources/mods/less/responsive-utilities.less";

//
// Perfect scrollbar
// --------------------------------------------------
@import (inline) "../../../../../vendor/perfect-scrollbar/src/perfect-scrollbar.css";

@import "../../../../common/main/resources/less/buttons.less";
@import "../../../../common/main/resources/less/dropdown-menu.less";
@import "../../../../common/main/resources/less/dropdown-submenu.less";
Expand Down
10 changes: 10 additions & 0 deletions apps/common/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Common.Locale = new(function() {
_4letterLangs = ['pt-pt', 'zh-tw', 'sr-cyrl'];

var _applyLocalization = function(callback) {
_clearRtl();
try {
callback && (loadcallback = callback);
if (l10n) {
Expand Down Expand Up @@ -160,6 +161,15 @@ Common.Locale = new(function() {
});
};

var _clearRtl = function() {
if (!_isCurrentRtl() && document.body.classList.contains('rtl')) {
document.body.removeAttribute('dir');
document.body.classList.remove('rtl');
document.body.classList.remove('rtl-font');
document.body.setAttribute('applang', currentLang);
}
};

if ( !window.fetch ) {
/* use fetch polifill if native method isn't supported */
var polyfills = ['../vendor/fetch/fetch.umd'];
Expand Down
5 changes: 5 additions & 0 deletions apps/common/main/lib/controller/Desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,11 @@ define([
native.execCommand('editor:event', JSON.stringify({action:'file:close', url: config.customization.goback.url}));
}
},
removeRecent: function () {
if ( config.isDesktopApp && !!native ) {
native.execCommand('recent:forget');
}
},
isActive: function () {
return !!native;
},
Expand Down
Binary file modified apps/common/main/resources/img/doc-formats/formats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/img/doc-formats/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/img/doc-formats/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/img/doc-formats/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/img/doc-formats/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/common/main/resources/img/doc-formats/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/common/main/resources/img/doc-formats/numbers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/common/main/resources/img/doc-formats/pages.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 3 additions & 89 deletions apps/documenteditor/forms/app/controller/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,9 @@ define([
return;
}
me.api.asc_SendForm();
Common.Controllers.Desktop.removeRecent();
Common.Controllers.Desktop.process('goback');
Common.Controllers.Desktop.requestClose();
});
me.view.btnDownload.on('click', function(){
if (me.appOptions.canDownload) {
Expand Down Expand Up @@ -2126,93 +2129,4 @@ define([
savingText: 'Saving'

}, DE.Controllers.ApplicationController));

/* var Desktop = function () {
var features = {
version: '{{PRODUCT_VERSION}}',
// eventloading: true,
uitype: 'fillform',
uithemes: true
};
var api, nativevars;
var native = window.desktop || window.AscDesktopEditor;
!!native && native.execCommand('webapps:features', JSON.stringify(features));
if ( !!native ) {
$('#header-logo, .brand-logo').hide();
nativevars = window.RendererProcessVariable;
window.on_native_message = function (cmd, param) {
if (/theme:changed/.test(cmd)) {
if ( Common.UI.Themes && !!Common.UI.Themes.setTheme )
Common.UI.Themes.setTheme(param);
} else
if (/window:features/.test(cmd)) {
var obj = JSON.parse(param);
if ( obj.singlewindow !== undefined ) {
native.features.singlewindow = obj.singlewindow;
$("#title-doc-name")[obj.singlewindow ? 'hide' : 'show']();
}
}
};
if ( !!window.native_message_cmd ) {
for ( var c in window.native_message_cmd ) {
window.on_native_message(c, window.native_message_cmd[c]);
}
}
Common.NotificationCenter.on({
'uitheme:changed' : function (name) {
if (Common.localStorage.getBool('ui-theme-use-system', false)) {
native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'}));
} else {
const theme = Common.UI.Themes.get(name);
if ( theme )
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
}
},
});
Common.Gateway.on('opendocument', function () {
api = DE.getController('ApplicationController').api;
$("#title-doc-name")[native.features.singlewindow ? 'hide' : 'show']();
var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp';
Common.UI.Themes.setAvailable(!is_win_xp);
});
}
return {
isActive: function () {
return !!native;
},
isOffline: function () {
return api && api.asc_isOffline();
},
process: function (opts) {
if ( !!native && !!api ) {
if ( opts == 'goback' ) {
var config = DE.getController('ApplicationController').editorConfig;
native.execCommand('go:folder',
api.asc_isOffline() ? 'offline' : config.customization.goback.url);
return true;
}
}
return false;
},
systemThemeType: function () {
return nativevars.theme && !!nativevars.theme.system ? nativevars.theme.system :
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
},
}
};
*/
// DE.Controllers.Desktop = new Desktop();
// Common.Controllers = Common.Controllers || {};
// Common.Controllers.Desktop = DE.Controllers.Desktop;
});
6 changes: 3 additions & 3 deletions apps/documenteditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ define([], function () {

events: function() {
return {
'click .blank-document-btn':_.bind(this._onBlankDocument, this),
'click .blank-document':_.bind(this._onBlankDocument, this),
'click .thumb-list .thumb-wrap': _.bind(this._onDocumentTemplate, this)
};
},
Expand All @@ -1218,8 +1218,8 @@ define([], function () {
'<div class="header"><%= scope.txtCreateNew %></div>',
'<div class="thumb-list">',
'<% if (blank) { %> ',
'<div class="blank-document">',
'<div class="blank-document-btn" data-hint="2" data-hint-direction="left-top" data-hint-offset="2, 10">',
'<div class="blank-document" data-hint="2" data-hint-direction="left-top" data-hint-offset="14, 22">',
'<div class="blank-document-btn">',
'<div class="btn-blank-format"><div class ="svg-format-blank"></div></div>',
'</div>',
'<div class="title"><%= scope.txtBlank %></div>',
Expand Down
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/hy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
4 changes: 3 additions & 1 deletion apps/documenteditor/main/locale/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,5 +3682,7 @@
"Common.Views.MacrosDialog.tipMacrosAdd": "Add macros",
"Common.Views.MacrosDialog.tipMacrosRun": "Run",
"DE.Views.ViewTab.textMacros": "Macros",
"DE.Views.ViewTab.tipMacros": "Macros"
"DE.Views.ViewTab.tipMacros": "Macros",
"DE.Views.DocumentHolder.textResetCrop": "Reset crop",
"DE.Views.ImageSettings.textResetCrop": "Reset crop"
}
Loading

0 comments on commit 50637ed

Please sign in to comment.