Merge pull request #247 from ONLYOFFICE/hotfix/v5.4.1

Hotfix/v5.4.1
This commit is contained in:
Julia Radzhabova 2019-09-18 15:54:52 +03:00 committed by GitHub
commit 0c9f29897b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 6910 additions and 469 deletions

View file

@ -36,27 +36,34 @@ if (Common === undefined) {
Common.Locale = new(function() { Common.Locale = new(function() {
"use strict"; "use strict";
var l10n = {}; var l10n = null;
var loadcallback,
apply = false;
var _applyLocalization = function() { var _applyLocalization = function(callback) {
try { try {
for (var prop in l10n) { callback && (loadcallback = callback);
var p = prop.split('.'); if (l10n) {
if (p && p.length > 2) { for (var prop in l10n) {
var p = prop.split('.');
if (p && p.length > 2) {
var obj = window; var obj = window;
for (var i = 0; i < p.length - 1; ++i) { for (var i = 0; i < p.length - 1; ++i) {
if (obj[p[i]] === undefined) { if (obj[p[i]] === undefined) {
obj[p[i]] = new Object(); obj[p[i]] = new Object();
}
obj = obj[p[i]];
} }
obj = obj[p[i]];
}
if (obj) { if (obj) {
obj[p[p.length - 1]] = l10n[prop]; obj[p[p.length - 1]] = l10n[prop];
}
} }
} }
} loadcallback && loadcallback();
} else
apply = true;
} }
catch (e) { catch (e) {
} }
@ -64,7 +71,7 @@ Common.Locale = new(function() {
var _get = function(prop, scope) { var _get = function(prop, scope) {
var res = ''; var res = '';
if (scope && scope.name) { if (l10n && scope && scope.name) {
res = l10n[scope.name + '.' + prop]; res = l10n[scope.name + '.' + prop];
} }
@ -99,10 +106,12 @@ Common.Locale = new(function() {
throw new Error('loaded'); throw new Error('loaded');
} }
}).then(function(json) { }).then(function(json) {
if ( !!json ) l10n = json; l10n = json || {};
apply && _applyLocalization();
}).catch(function(e) { }).catch(function(e) {
l10n = l10n || {};
apply && _applyLocalization();
if ( e.message == 'loaded' ) { if ( e.message == 'loaded' ) {
} else } else
console.log('fetch error: ' + e); console.log('fetch error: ' + e);
}); });
@ -110,7 +119,13 @@ Common.Locale = new(function() {
if ( !window.fetch ) { if ( !window.fetch ) {
/* use fetch polifill if native method isn't supported */ /* use fetch polifill if native method isn't supported */
require(['../vendor/fetch/fetch.umd'], _requireLang); var polyfills = ['../vendor/fetch/fetch.umd'];
if ( !window.Promise ) {
require(['../vendor/es6-promise/es6-promise.auto.min.js'],
function () {
require(polyfills, _requireLang);
});
} else require(polyfills, _requireLang);
} else _requireLang(); } else _requireLang();
return { return {

View file

@ -734,7 +734,7 @@ define([
time : date.getTime(), time : date.getTime(),
replys : [], replys : [],
groupName : (groupname && groupname.length>1) ? groupname[1] : null groupName : (groupname && groupname.length>1) ? groupname[1] : null
} };
if (comment) { if (comment) {
var replies = this.readSDKReplies(data); var replies = this.readSDKReplies(data);
if (replies.length) { if (replies.length) {
@ -821,6 +821,13 @@ define([
return 0; return 0;
}, },
stringUtcToLocalDate: function (date) {
if (typeof date === 'string')
return parseInt(date) + this.timeZoneOffsetInMs;
return 0;
},
addCommentToGroupCollection: function (comment) { addCommentToGroupCollection: function (comment) {
var groupname = comment.groupName; var groupname = comment.groupName;
if (!this.groupCollectionComments[groupname]) if (!this.groupCollectionComments[groupname])

View file

@ -190,7 +190,7 @@
<!-- debug begin --> <!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script> <script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script> <script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end --> <!-- debug end -->
<script> <script>
@ -334,6 +334,13 @@
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script> <script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script> <script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script> <script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script> <script>
window.sdk_dev_scrpipts.forEach(function(item){ window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -320,10 +320,16 @@
<!--vendor--> <!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script> <script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script> <script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk--> <!--sdk-->
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>

View file

@ -31,7 +31,8 @@
* *
*/ */
+function ($) { +function ($) {
Common.Locale.apply(); Common.Locale.apply(function() {
DE.ApplicationView.create(); DE.ApplicationView.create();
DE.ApplicationController.create(); DE.ApplicationController.create();
});
}(); }();

View file

@ -169,44 +169,46 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(
function() {
require([ require([
'documenteditor/main/app/controller/Viewport', 'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder', 'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar', 'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Statusbar', 'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/Links', 'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation', 'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/RightMenu', 'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu', 'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main', 'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels', 'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings', 'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings', 'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings', 'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings', 'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings', 'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings', 'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings', 'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils', 'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage', 'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts', 'common/main/lib/controller/Fonts',
'common/main/lib/controller/History' 'common/main/lib/controller/History'
/** coauthoring begin **/ /** coauthoring begin **/
,'common/main/lib/controller/Comments' ,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat' ,'common/main/lib/controller/Chat'
/** coauthoring end **/ /** coauthoring end **/
,'common/main/lib/controller/Plugins' ,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings' ,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor' ,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor' ,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop' ,'common/main/lib/controller/Desktop'
], function() { ], function() {
app.start(); app.start();
}); });
}
);
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError(); reqerr = window.requireTimeourError();

View file

@ -229,9 +229,11 @@ define([
}); });
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { if (!me.isModalShowed) {
if (/form-control/.test(e.target.className)) if (/form-control/.test(e.target.className))
me.inFormControl = false; me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget || if (!e.relatedTarget ||
!/area_id/.test(e.target.id) !/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -690,7 +692,7 @@ define([
var action = {id: id, type: type}; var action = {id: id, type: type};
this.stackLongActions.pop(action); this.stackLongActions.pop(action);
appHeader.setDocumentCaption(this.api.asc_getDocumentName()); appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(true); this.updateWindowTitle(true);
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
@ -1602,7 +1604,7 @@ define([
if (this._state.isDocModified !== isModified || force) { if (this._state.isDocModified !== isModified || force) {
var title = this.defaultTitleText; var title = this.defaultTitleText;
if (!_.isEmpty(appHeader.getDocumentCaption())) if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
title = appHeader.getDocumentCaption() + ' - ' + title; title = appHeader.getDocumentCaption() + ' - ' + title;
if (isModified) { if (isModified) {

View file

@ -105,7 +105,7 @@ define([
this.cmbNextStyle = new Common.UI.ComboBox({ this.cmbNextStyle = new Common.UI.ComboBox({
el : $('#id-dlg-style-next-par'), el : $('#id-dlg-style-next-par'),
style : 'width: 100%;', style : 'width: 100%;',
menuStyle : 'width: 100%; max-height: 290px;', menuStyle : 'width: 100%; max-height: 210px;',
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : this.options.formats, data : this.options.formats,

View file

@ -159,45 +159,47 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(
function() {
require([ require([
'documenteditor/main/app/controller/Viewport', 'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder', 'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar', 'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Links', 'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation', 'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/Statusbar', 'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/RightMenu', 'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu', 'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main', 'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels', 'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings', 'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings', 'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings', 'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings', 'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings', 'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings', 'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings', 'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils', 'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage', 'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts', 'common/main/lib/controller/Fonts',
'common/main/lib/controller/History' 'common/main/lib/controller/History'
/** coauthoring begin **/ /** coauthoring begin **/
,'common/main/lib/controller/Comments' ,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat' ,'common/main/lib/controller/Chat'
/** coauthoring end **/ /** coauthoring end **/
,'common/main/lib/controller/Plugins' ,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings' ,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor' ,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor' ,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop' ,'common/main/lib/controller/Desktop'
], function() { ], function() {
window.compareVersions = true; window.compareVersions = true;
app.start(); app.start();
}); });
}
);
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError(); reqerr = window.requireTimeourError();

View file

@ -155,8 +155,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -198,34 +196,36 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function() {
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'documenteditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Toolbar', 'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Search', 'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Main', 'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/DocumentHolder', 'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/Settings', 'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/edit/EditContainer', 'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditText', 'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditParagraph', 'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditHeader', 'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditTable', 'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditImage', 'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditShape', 'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditChart', 'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditHyperlink', 'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/add/AddContainer', 'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddTable', 'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddShape', 'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddImage', 'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddOther', 'documenteditor/mobile/app/controller/add/AddImage',
'common/mobile/lib/controller/Collaboration' 'documenteditor/mobile/app/controller/add/AddOther',
], function() { 'common/mobile/lib/controller/Collaboration'
window.compareVersions = true; ], function() {
app.start(); window.compareVersions = true;
app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -166,8 +166,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -209,33 +207,35 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function() {
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'documenteditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Toolbar', 'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Search', 'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Main', 'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/DocumentHolder', 'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/Settings', 'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/edit/EditContainer', 'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditText', 'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditParagraph', 'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditHeader', 'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditTable', 'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditImage', 'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditShape', 'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditChart', 'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditHyperlink', 'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/add/AddContainer', 'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddTable', 'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddShape', 'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddImage', 'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddOther', 'documenteditor/mobile/app/controller/add/AddImage',
'common/mobile/lib/controller/Collaboration' 'documenteditor/mobile/app/controller/add/AddOther',
], function() { 'common/mobile/lib/controller/Collaboration'
app.start(); ], function() {
app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -189,7 +189,7 @@
<!-- debug begin --> <!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script> <script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script> <script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end --> <!-- debug end -->
<script> <script>
@ -336,6 +336,13 @@
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script> <script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script> <script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script> <script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script> <script>
window.sdk_dev_scrpipts.forEach(function(item){ window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -324,11 +324,16 @@
<!--vendor--> <!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script> <script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script> <script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk--> <!--sdk-->
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/sdk-all-min.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/sdk-all-min.js"></script>

View file

@ -31,8 +31,8 @@
* *
*/ */
(function ($) { (function ($) {
Common.Locale.apply(); Common.Locale.apply(function() {
PE.ApplicationView.create(); PE.ApplicationView.create();
PE.ApplicationController.create(); PE.ApplicationController.create();
});
})(window.jQuery); })(window.jQuery);

View file

@ -160,39 +160,39 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(function(){
require([
require([ 'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/Viewport', 'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/DocumentHolder', 'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Toolbar', 'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/Statusbar', 'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/RightMenu', 'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/LeftMenu', 'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/controller/Main', 'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/FileMenuPanels', 'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ParagraphSettings', 'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ImageSettings', 'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/ShapeSettings', 'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/SlideSettings', 'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TableSettings', 'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/TextArtSettings', 'presentationeditor/main/app/view/SignatureSettings',
'presentationeditor/main/app/view/SignatureSettings', 'common/main/lib/util/utils',
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/main/lib/util/LocalStorage', 'common/main/lib/controller/Fonts'
'common/main/lib/controller/Fonts' /** coauthoring begin **/
/** coauthoring begin **/ ,'common/main/lib/controller/Comments',
,'common/main/lib/controller/Comments', 'common/main/lib/controller/Chat',
'common/main/lib/controller/Chat', /** coauthoring end **/
/** coauthoring end **/ 'common/main/lib/controller/Plugins',
'common/main/lib/controller/Plugins', 'presentationeditor/main/app/view/ChartSettings',
'presentationeditor/main/app/view/ChartSettings', 'common/main/lib/controller/ExternalDiagramEditor'
'common/main/lib/controller/ExternalDiagramEditor' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/Desktop' ], function() {
], function() { app.start();
app.start(); });
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -207,9 +207,11 @@ define([
}); });
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { if (!me.isModalShowed) {
if (/form-control/.test(e.target.className)) if (/form-control/.test(e.target.className))
me.inFormControl = false; me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget || if (!e.relatedTarget ||
!/area_id/.test(e.target.id) !/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -473,7 +475,7 @@ define([
var action = {id: id, type: type}; var action = {id: id, type: type};
this.stackLongActions.pop(action); this.stackLongActions.pop(action);
appHeader.setDocumentCaption(this.api.asc_getDocumentName()); appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(true); this.updateWindowTitle(true);
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
@ -1313,7 +1315,7 @@ define([
if (this._state.isDocModified !== isModified || force) { if (this._state.isDocModified !== isModified || force) {
var title = this.defaultTitleText; var title = this.defaultTitleText;
if (!_.isEmpty(appHeader.getDocumentCaption())) if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
title = appHeader.getDocumentCaption() + ' - ' + title; title = appHeader.getDocumentCaption() + ' - ' + title;
if (isModified) { if (isModified) {

View file

@ -151,40 +151,40 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(function(){
require([
require([ 'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/Viewport', 'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/DocumentHolder', 'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Toolbar', 'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/Statusbar', 'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/RightMenu', 'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/LeftMenu', 'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/controller/Main', 'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/FileMenuPanels', 'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ParagraphSettings', 'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ImageSettings', 'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/ShapeSettings', 'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/SlideSettings', 'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TableSettings', 'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/TextArtSettings', 'presentationeditor/main/app/view/SignatureSettings',
'presentationeditor/main/app/view/SignatureSettings', 'common/main/lib/util/utils',
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/main/lib/util/LocalStorage', 'common/main/lib/controller/Fonts'
'common/main/lib/controller/Fonts' /** coauthoring begin **/
/** coauthoring begin **/ ,'common/main/lib/controller/Comments',
,'common/main/lib/controller/Comments', 'common/main/lib/controller/Chat',
'common/main/lib/controller/Chat', /** coauthoring end **/
/** coauthoring end **/ 'common/main/lib/controller/Plugins',
'common/main/lib/controller/Plugins', 'presentationeditor/main/app/view/ChartSettings',
'presentationeditor/main/app/view/ChartSettings', 'common/main/lib/controller/ExternalDiagramEditor'
'common/main/lib/controller/ExternalDiagramEditor' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/Desktop' ], function() {
], function() { window.compareVersions = true;
window.compareVersions = true; app.start();
app.start(); });
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -153,8 +153,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -193,36 +191,38 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function(){
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'presentationeditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Toolbar', 'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Search', 'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Main', 'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/DocumentHolder', 'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentPreview', 'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/Settings', 'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/edit/EditContainer', 'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditText', 'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditTable', 'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditImage', 'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditShape', 'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditSlide', 'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditChart', 'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditLink', 'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/add/AddContainer', 'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddTable', 'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddShape', 'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddImage', 'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddLink', 'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddSlide', 'presentationeditor/mobile/app/controller/add/AddLink',
'common/mobile/lib/controller/Collaboration' 'presentationeditor/mobile/app/controller/add/AddSlide',
'common/mobile/lib/controller/Collaboration'
], function() { ], function() {
window.compareVersions = true; window.compareVersions = true;
app.start(); app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -164,8 +164,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -204,34 +202,36 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function(){
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'presentationeditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Toolbar', 'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Search', 'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Main', 'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/DocumentHolder', 'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentPreview', 'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/Settings', 'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/edit/EditContainer', 'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditText', 'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditTable', 'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditImage', 'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditShape', 'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditSlide', 'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditChart', 'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditLink', 'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/add/AddContainer', 'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddTable', 'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddShape', 'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddImage', 'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddLink', 'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddSlide', 'presentationeditor/mobile/app/controller/add/AddLink',
'common/mobile/lib/controller/Collaboration' 'presentationeditor/mobile/app/controller/add/AddSlide',
], function() { 'common/mobile/lib/controller/Collaboration'
app.start(); ], function() {
app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -190,7 +190,7 @@
<!-- debug begin --> <!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script> <script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script> <script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end --> <!-- debug end -->
<script> <script>
@ -337,6 +337,13 @@
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script> <script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script> <script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script> <script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script> <script>
window.sdk_dev_scrpipts.forEach(function(item){ window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -321,14 +321,19 @@
<!--vendor--> <!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script> <script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script> <script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/underscore/underscore-min.js"></script> <script type="text/javascript" src="../../../vendor/underscore/underscore-min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script> <script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script> <script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script> <script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk--> <!--sdk-->
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/> <link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>

View file

@ -33,9 +33,10 @@
(function ($) { (function ($) {
$(function(){ $(function(){
Common.Locale.apply(); Common.Locale.apply(function() {
SSE.ApplicationView.create(); SSE.ApplicationView.create();
SSE.ApplicationController.create(); SSE.ApplicationController.create();
});
}) })
})(window.jQuery); })(window.jQuery);

View file

@ -167,42 +167,42 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(function(){
require([
require([ 'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/Viewport', 'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/DocumentHolder', 'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/CellEditor', 'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Toolbar', 'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Statusbar', 'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/Spellcheck', 'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/RightMenu', 'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/LeftMenu', 'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Main', 'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/Print', 'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/PivotTable', 'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/controller/DataTab', 'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/FileMenuPanels', 'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ParagraphSettings', 'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ImageSettings', 'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ChartSettings', 'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/ShapeSettings', 'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/TextArtSettings', 'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/PivotSettings', 'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/FieldSettingsDialog', 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', 'spreadsheeteditor/main/app/view/SignatureSettings',
'spreadsheeteditor/main/app/view/SignatureSettings', 'common/main/lib/util/utils',
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/main/lib/util/LocalStorage', 'common/main/lib/controller/Fonts',
'common/main/lib/controller/Fonts', 'common/main/lib/controller/Comments',
'common/main/lib/controller/Comments', 'common/main/lib/controller/Chat',
'common/main/lib/controller/Chat', 'common/main/lib/controller/Plugins'
'common/main/lib/controller/Plugins' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/Desktop' ], function() {
], function() { app.start();
app.start(); });
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -216,9 +216,11 @@ define([
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (me.isAppDisabled === true || me.isFrameClosed) return; if (me.isAppDisabled === true || me.isFrameClosed) return;
if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible()) && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) {
if (/form-control/.test(e.target.className)) if (/form-control/.test(e.target.className))
me.inFormControl = false; me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget || if (!e.relatedTarget ||
!/area_id/.test(e.target.id) !/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -391,7 +393,7 @@ define([
docInfo.put_Token(data.doc.token); docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions); docInfo.put_Permissions(_permissions);
this.headerView.setDocumentCaption(data.doc.title); this.headerView && this.headerView.setDocumentCaption(data.doc.title);
} }
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
@ -507,7 +509,7 @@ define([
var action = {id: id, type: type}; var action = {id: id, type: type};
this.stackLongActions.pop(action); this.stackLongActions.pop(action);
this.headerView.setDocumentCaption(this.api.asc_getDocumentName()); this.headerView && this.headerView.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(this.api.asc_isDocumentModified(), true); this.updateWindowTitle(this.api.asc_isDocumentModified(), true);
if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) { if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
@ -1496,30 +1498,31 @@ define([
updateWindowTitle: function(change, force) { updateWindowTitle: function(change, force) {
if (this._state.isDocModified !== change || force) { if (this._state.isDocModified !== change || force) {
var title = this.defaultTitleText; if (this.headerView) {
var title = this.defaultTitleText;
if (!_.isEmpty(this.headerView.getDocumentCaption())) if (!_.isEmpty(this.headerView.getDocumentCaption()))
title = this.headerView.getDocumentCaption() + ' - ' + title; title = this.headerView.getDocumentCaption() + ' - ' + title;
if (change) { if (change) {
clearTimeout(this._state.timerCaption); clearTimeout(this._state.timerCaption);
if (!_.isUndefined(title)) { if (!_.isUndefined(title)) {
title = '* ' + title; title = '* ' + title;
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true); this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true);
}
} else {
if (this._state.fastCoauth && this._state.usersCount>1) {
var me = this;
this._state.timerCaption = setTimeout(function () {
me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false);
}, 500);
} else
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
} }
} else { if (window.document.title != title)
if (this._state.fastCoauth && this._state.usersCount>1) { window.document.title = title;
var me = this;
this._state.timerCaption = setTimeout(function () {
me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false);
}, 500);
} else
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
} }
if (window.document.title != title)
window.document.title = title;
Common.Gateway.setDocumentModified(change); Common.Gateway.setDocumentModified(change);
this._state.isDocModified = change; this._state.isDocModified = change;

View file

@ -838,6 +838,7 @@ define([
}, },
onInsertImageMenu: function(menu, item, e) { onInsertImageMenu: function(menu, item, e) {
var me = this;
if (item.value === 'file') { if (item.value === 'file') {
this.toolbar.fireEvent('insertimage', this.toolbar); this.toolbar.fireEvent('insertimage', this.toolbar);
@ -847,8 +848,6 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Image'); Common.component.Analytics.trackEvent('ToolBar', 'Image');
} else if (item.value === 'url') { } else if (item.value === 'url') {
var me = this;
(new Common.Views.ImageFromUrlDialog({ (new Common.Views.ImageFromUrlDialog({
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {

View file

@ -157,43 +157,43 @@ require([
] ]
}); });
Common.Locale.apply(); Common.Locale.apply(function(){
require([
require([ 'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/Viewport', 'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/DocumentHolder', 'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/CellEditor', 'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Toolbar', 'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Statusbar', 'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/Spellcheck', 'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/RightMenu', 'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/LeftMenu', 'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Main', 'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/Print', 'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/PivotTable', 'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/controller/DataTab', 'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/FileMenuPanels', 'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ParagraphSettings', 'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ImageSettings', 'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ChartSettings', 'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/ShapeSettings', 'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/TextArtSettings', 'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/PivotSettings', 'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/FieldSettingsDialog', 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', 'spreadsheeteditor/main/app/view/SignatureSettings',
'spreadsheeteditor/main/app/view/SignatureSettings', 'common/main/lib/util/utils',
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/main/lib/util/LocalStorage', 'common/main/lib/controller/Fonts',
'common/main/lib/controller/Fonts', 'common/main/lib/controller/Comments',
'common/main/lib/controller/Comments', 'common/main/lib/controller/Chat',
'common/main/lib/controller/Chat', 'common/main/lib/controller/Plugins'
'common/main/lib/controller/Plugins' ,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/ReviewChanges' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/Desktop' ], function() {
], function() { window.compareVersions = true;
window.compareVersions = true; app.start();
app.start(); });
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -139,8 +139,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -182,36 +180,38 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function(){
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'spreadsheeteditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Toolbar', 'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Search', 'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Main', 'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/DocumentHolder' 'spreadsheeteditor/mobile/app/controller/Main',
,'spreadsheeteditor/mobile/app/controller/CellEditor' 'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/Statusbar' ,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Settings' ,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' ,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell' ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditText' ,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage' ,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape' ,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart' ,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' ,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer' ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddChart' ,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction' ,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddShape' ,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddOther' ,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddLink' ,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/FilterOptions' ,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'common/mobile/lib/controller/Collaboration' ,'spreadsheeteditor/mobile/app/controller/FilterOptions'
], function() { ,'common/mobile/lib/controller/Collaboration'
window.compareVersions = true; ], function() {
app.start(); window.compareVersions = true;
app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -150,8 +150,6 @@ require([
] ]
}); });
Common.Locale.apply();
var device = Framework7.prototype.device; var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){ var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link'); var fileref = document.createElement('link');
@ -193,35 +191,37 @@ require([
//Load platform styles //Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([ Common.Locale.apply(function(){
'common/main/lib/util/LocalStorage', require([
'common/main/lib/util/utils', 'common/main/lib/util/LocalStorage',
'common/mobile/lib/controller/Plugins', 'common/main/lib/util/utils',
'spreadsheeteditor/mobile/app/controller/Editor', 'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Toolbar', 'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Search', 'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Main', 'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/DocumentHolder' 'spreadsheeteditor/mobile/app/controller/Main',
,'spreadsheeteditor/mobile/app/controller/CellEditor' 'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/Statusbar' ,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Settings' ,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' ,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell' ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditText' ,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage' ,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape' ,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart' ,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' ,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer' ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddChart' ,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction' ,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddShape' ,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddOther' ,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddLink' ,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/FilterOptions' ,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'common/mobile/lib/controller/Collaboration' ,'spreadsheeteditor/mobile/app/controller/FilterOptions'
], function() { ,'common/mobile/lib/controller/Collaboration'
app.start(); ], function() {
app.start();
});
}); });
}, function(err) { }, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -165,6 +165,7 @@ module.exports = function(grunt) {
doRegisterTask('bootstrap'); doRegisterTask('bootstrap');
doRegisterTask('iscroll'); doRegisterTask('iscroll');
doRegisterTask('fetch'); doRegisterTask('fetch');
doRegisterTask('es6-promise');
doRegisterTask('jszip'); doRegisterTask('jszip');
doRegisterTask('jsziputils'); doRegisterTask('jsziputils');
doRegisterTask('requirejs', function(defaultConfig, packageFile) { doRegisterTask('requirejs', function(defaultConfig, packageFile) {
@ -511,6 +512,7 @@ module.exports = function(grunt) {
grunt.registerTask('deploy-jszip', ['jszip-init', 'clean', 'copy']); grunt.registerTask('deploy-jszip', ['jszip-init', 'clean', 'copy']);
grunt.registerTask('deploy-jsziputils', ['jsziputils-init', 'clean', 'copy']); grunt.registerTask('deploy-jsziputils', ['jsziputils-init', 'clean', 'copy']);
grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']); grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']);
grunt.registerTask('deploy-es6-promise', ['es6-promise-init', 'clean', 'copy']);
grunt.registerTask('deploy-app-main', ['main-app-init', 'clean:prebuild', 'imagemin', 'less', 'requirejs', 'concat', grunt.registerTask('deploy-app-main', ['main-app-init', 'clean:prebuild', 'imagemin', 'less', 'requirejs', 'concat',
'copy', 'svgmin', 'inline', 'json-minify', 'copy', 'svgmin', 'inline', 'json-minify',

View file

@ -205,6 +205,17 @@
} }
} }
}, },
"es6-promise": {
"clean": [
"../deploy/web-apps/vendor/es6-promise"
],
"copy": {
"script": {
"src": "../vendor/es6-promise/es6-promise.auto.min.js",
"dest": "../deploy/web-apps/vendor/es6-promise/es6-promise.auto.min.js"
}
}
},
"requirejs": { "requirejs": {
"clean": [ "clean": [
"../deploy/web-apps/vendor/requirejs" "../deploy/web-apps/vendor/requirejs"
@ -229,7 +240,8 @@
"deploy-iscroll", "deploy-iscroll",
"deploy-fetch", "deploy-fetch",
"deploy-jszip", "deploy-jszip",
"deploy-jsziputils" "deploy-jsziputils",
"deploy-es6-promise"
] ]
} }
} }

1318
vendor/es6-promise/CHANGELOG.md vendored Normal file

File diff suppressed because it is too large Load diff

1383
vendor/es6-promise/LICENSE.htm vendored Normal file

File diff suppressed because it is too large Load diff

1303
vendor/es6-promise/README.md vendored Normal file

File diff suppressed because it is too large Load diff

1176
vendor/es6-promise/es6-promise.auto.js vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

1174
vendor/es6-promise/es6-promise.js vendored Normal file

File diff suppressed because it is too large Load diff

1
vendor/es6-promise/es6-promise.min.js vendored Normal file

File diff suppressed because one or more lines are too long