v5.4.1
This commit is contained in:
commit
9f0f3e7396
|
@ -36,10 +36,14 @@ if (Common === undefined) {
|
|||
|
||||
Common.Locale = new(function() {
|
||||
"use strict";
|
||||
var l10n = {};
|
||||
var l10n = null;
|
||||
var loadcallback,
|
||||
apply = false;
|
||||
|
||||
var _applyLocalization = function() {
|
||||
var _applyLocalization = function(callback) {
|
||||
try {
|
||||
callback && (loadcallback = callback);
|
||||
if (l10n) {
|
||||
for (var prop in l10n) {
|
||||
var p = prop.split('.');
|
||||
if (p && p.length > 2) {
|
||||
|
@ -57,6 +61,9 @@ Common.Locale = new(function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
loadcallback && loadcallback();
|
||||
} else
|
||||
apply = true;
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
@ -64,7 +71,7 @@ Common.Locale = new(function() {
|
|||
|
||||
var _get = function(prop, scope) {
|
||||
var res = '';
|
||||
if (scope && scope.name) {
|
||||
if (l10n && scope && scope.name) {
|
||||
res = l10n[scope.name + '.' + prop];
|
||||
}
|
||||
|
||||
|
@ -99,10 +106,12 @@ Common.Locale = new(function() {
|
|||
throw new Error('loaded');
|
||||
}
|
||||
}).then(function(json) {
|
||||
if ( !!json ) l10n = json;
|
||||
l10n = json || {};
|
||||
apply && _applyLocalization();
|
||||
}).catch(function(e) {
|
||||
l10n = l10n || {};
|
||||
apply && _applyLocalization();
|
||||
if ( e.message == 'loaded' ) {
|
||||
|
||||
} else
|
||||
console.log('fetch error: ' + e);
|
||||
});
|
||||
|
@ -110,7 +119,13 @@ Common.Locale = new(function() {
|
|||
|
||||
if ( !window.fetch ) {
|
||||
/* 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();
|
||||
|
||||
return {
|
||||
|
|
|
@ -190,7 +190,7 @@ define([
|
|||
item.setDisabled(disable);
|
||||
});
|
||||
|
||||
this.pluginsMask.css('display', disable ? 'block' : 'none');
|
||||
this.pluginsMask && this.pluginsMask.css('display', disable ? 'block' : 'none');
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -187,6 +187,10 @@
|
|||
&.user-select {
|
||||
cursor: text;
|
||||
}
|
||||
&.user-select::selection {
|
||||
background: #3494fb;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.user-reply {
|
||||
|
|
|
@ -80,3 +80,8 @@ input.error {
|
|||
input[type="password"] {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
input[type="text"]::selection, textarea::selection {
|
||||
background: #3494fb;
|
||||
color: white;
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@
|
|||
.button-normal-icon(btn-watermark, 63, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-color-schema, 64, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-ins-formula, 65, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-autosumm, 66, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-autosum, 66, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-recent, 67, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-finance, 68, @toolbar-big-icon-size);
|
||||
.button-normal-icon(btn-logic, 69, @toolbar-big-icon-size);
|
||||
|
|
|
@ -734,7 +734,7 @@ define([
|
|||
time : date.getTime(),
|
||||
replys : [],
|
||||
groupName : (groupname && groupname.length>1) ? groupname[1] : null
|
||||
}
|
||||
};
|
||||
if (comment) {
|
||||
var replies = this.readSDKReplies(data);
|
||||
if (replies.length) {
|
||||
|
@ -821,6 +821,13 @@ define([
|
|||
return 0;
|
||||
},
|
||||
|
||||
stringUtcToLocalDate: function (date) {
|
||||
if (typeof date === 'string')
|
||||
return parseInt(date) + this.timeZoneOffsetInMs;
|
||||
|
||||
return 0;
|
||||
},
|
||||
|
||||
addCommentToGroupCollection: function (comment) {
|
||||
var groupname = comment.groupName;
|
||||
if (!this.groupCollectionComments[groupname])
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
<!-- debug begin -->
|
||||
<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 -->
|
||||
|
||||
<script>
|
||||
|
@ -334,6 +334,13 @@
|
|||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.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>
|
||||
window.sdk_dev_scrpipts.forEach(function(item){
|
||||
|
|
|
@ -320,10 +320,16 @@
|
|||
|
||||
<!--vendor-->
|
||||
<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/sockjs/sockjs.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-->
|
||||
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
*
|
||||
*/
|
||||
+function ($) {
|
||||
Common.Locale.apply();
|
||||
Common.Locale.apply(function() {
|
||||
DE.ApplicationView.create();
|
||||
DE.ApplicationController.create();
|
||||
});
|
||||
}();
|
||||
|
|
|
@ -169,8 +169,8 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(
|
||||
function() {
|
||||
require([
|
||||
'documenteditor/main/app/controller/Viewport',
|
||||
'documenteditor/main/app/controller/DocumentHolder',
|
||||
|
@ -207,6 +207,8 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
}
|
||||
);
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -229,13 +229,15 @@ define([
|
|||
});
|
||||
|
||||
$(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))
|
||||
me.inFormControl = false;
|
||||
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
|
||||
return;
|
||||
if (!e.relatedTarget ||
|
||||
!/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 == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
|
||||
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
|
||||
if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement))
|
||||
|
@ -690,7 +692,7 @@ define([
|
|||
var action = {id: id, type: type};
|
||||
this.stackLongActions.pop(action);
|
||||
|
||||
appHeader.setDocumentCaption(this.api.asc_getDocumentName());
|
||||
appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
|
||||
this.updateWindowTitle(true);
|
||||
|
||||
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
|
||||
|
@ -1598,7 +1600,7 @@ define([
|
|||
if (this._state.isDocModified !== isModified || force) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(appHeader.getDocumentCaption()))
|
||||
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
|
||||
title = appHeader.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
|
|
|
@ -105,7 +105,7 @@ define([
|
|||
this.cmbNextStyle = new Common.UI.ComboBox({
|
||||
el : $('#id-dlg-style-next-par'),
|
||||
style : 'width: 100%;',
|
||||
menuStyle : 'width: 100%; max-height: 290px;',
|
||||
menuStyle : 'width: 100%; max-height: 210px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : this.options.formats,
|
||||
|
|
|
@ -159,8 +159,8 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(
|
||||
function() {
|
||||
require([
|
||||
'documenteditor/main/app/controller/Viewport',
|
||||
'documenteditor/main/app/controller/DocumentHolder',
|
||||
|
@ -198,6 +198,8 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
}
|
||||
);
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -155,8 +155,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -198,6 +196,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function() {
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -227,6 +226,7 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -166,8 +166,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -209,6 +207,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function() {
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -237,6 +236,7 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
|
||||
<!-- debug begin -->
|
||||
<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 -->
|
||||
|
||||
<script>
|
||||
|
@ -336,6 +336,13 @@
|
|||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.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>
|
||||
window.sdk_dev_scrpipts.forEach(function(item){
|
||||
|
|
|
@ -324,11 +324,16 @@
|
|||
|
||||
<!--vendor-->
|
||||
<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/sockjs/sockjs.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-->
|
||||
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>
|
||||
<script type="text/javascript" src="../../../../sdkjs/slide/sdk-all-min.js"></script>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
*
|
||||
*/
|
||||
(function ($) {
|
||||
Common.Locale.apply();
|
||||
Common.Locale.apply(function() {
|
||||
PE.ApplicationView.create();
|
||||
PE.ApplicationController.create();
|
||||
|
||||
});
|
||||
})(window.jQuery);
|
||||
|
|
|
@ -160,8 +160,7 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'presentationeditor/main/app/controller/Viewport',
|
||||
'presentationeditor/main/app/controller/DocumentHolder',
|
||||
|
@ -194,6 +193,7 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -207,13 +207,15 @@ define([
|
|||
});
|
||||
|
||||
$(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))
|
||||
me.inFormControl = false;
|
||||
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
|
||||
return;
|
||||
if (!e.relatedTarget ||
|
||||
!/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 == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
|
||||
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
|
||||
if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement))
|
||||
|
@ -473,7 +475,7 @@ define([
|
|||
var action = {id: id, type: type};
|
||||
this.stackLongActions.pop(action);
|
||||
|
||||
appHeader.setDocumentCaption(this.api.asc_getDocumentName());
|
||||
appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
|
||||
this.updateWindowTitle(true);
|
||||
|
||||
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
|
||||
|
@ -1309,7 +1311,7 @@ define([
|
|||
if (this._state.isDocModified !== isModified || force) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(appHeader.getDocumentCaption()))
|
||||
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
|
||||
title = appHeader.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
|
|
|
@ -151,8 +151,7 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'presentationeditor/main/app/controller/Viewport',
|
||||
'presentationeditor/main/app/controller/DocumentHolder',
|
||||
|
@ -186,6 +185,7 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -153,8 +153,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -193,6 +191,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -224,6 +223,7 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -164,8 +164,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -204,6 +202,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -233,6 +232,7 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
<!-- debug begin -->
|
||||
<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 -->
|
||||
|
||||
<script>
|
||||
|
@ -337,6 +337,13 @@
|
|||
<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 src="../../../vendor/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
baseUrl: '../../'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../sdk_dev_scripts.js"></script>
|
||||
<script>
|
||||
window.sdk_dev_scrpipts.forEach(function(item){
|
||||
|
|
|
@ -321,14 +321,19 @@
|
|||
|
||||
<!--vendor-->
|
||||
<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/sockjs/sockjs.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/jszip/jszip.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-->
|
||||
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
|
||||
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>
|
||||
|
|
|
@ -33,9 +33,10 @@
|
|||
(function ($) {
|
||||
|
||||
$(function(){
|
||||
Common.Locale.apply();
|
||||
Common.Locale.apply(function() {
|
||||
SSE.ApplicationView.create();
|
||||
SSE.ApplicationController.create();
|
||||
});
|
||||
})
|
||||
|
||||
})(window.jQuery);
|
||||
|
|
|
@ -167,8 +167,7 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'spreadsheeteditor/main/app/controller/Viewport',
|
||||
'spreadsheeteditor/main/app/controller/DocumentHolder',
|
||||
|
@ -204,6 +203,7 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -216,13 +216,15 @@ define([
|
|||
$(document.body).on('blur', 'input, textarea', function(e) {
|
||||
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))
|
||||
me.inFormControl = false;
|
||||
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
|
||||
return;
|
||||
if (!e.relatedTarget ||
|
||||
!/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 == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
|
||||
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
|
||||
if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement))
|
||||
|
@ -391,7 +393,7 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
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));
|
||||
|
@ -507,7 +509,7 @@ define([
|
|||
var action = {id: id, type: type};
|
||||
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);
|
||||
|
||||
if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
|
||||
|
@ -1492,6 +1494,7 @@ define([
|
|||
|
||||
updateWindowTitle: function(change, force) {
|
||||
if (this._state.isDocModified !== change || force) {
|
||||
if (this.headerView) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(this.headerView.getDocumentCaption()))
|
||||
|
@ -1512,9 +1515,9 @@ define([
|
|||
} else
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
|
||||
}
|
||||
|
||||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
|
||||
|
|
|
@ -831,6 +831,7 @@ define([
|
|||
},
|
||||
|
||||
onInsertImageMenu: function(menu, item, e) {
|
||||
var me = this;
|
||||
if (item.value === 'file') {
|
||||
this.toolbar.fireEvent('insertimage', this.toolbar);
|
||||
|
||||
|
@ -840,8 +841,6 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Image');
|
||||
} else if (item.value === 'url') {
|
||||
var me = this;
|
||||
|
||||
(new Common.Views.ImageFromUrlDialog({
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
|
|
|
@ -157,8 +157,7 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'spreadsheeteditor/main/app/controller/Viewport',
|
||||
'spreadsheeteditor/main/app/controller/DocumentHolder',
|
||||
|
@ -195,6 +194,7 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
button.notify .btn-menu-chat {background-position: -0*@toolbar-icon-size -63*@toolbar-icon-size;}
|
||||
button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60*@toolbar-icon-size;}
|
||||
button.notify .btn-menu-chat {background-position: -0*@toolbar-icon-size -60*@toolbar-icon-size;}
|
||||
button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -2*@toolbar-icon-size;}
|
||||
|
||||
.button-normal-icon(btn-menu-file, 61, @toolbar-icon-size);
|
||||
.button-normal-icon(btn-menu-search, 62, @toolbar-icon-size);
|
||||
|
|
|
@ -139,8 +139,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -182,6 +180,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -213,6 +212,7 @@ require([
|
|||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -150,8 +150,6 @@ require([
|
|||
]
|
||||
});
|
||||
|
||||
Common.Locale.apply();
|
||||
|
||||
var device = Framework7.prototype.device;
|
||||
var loadPlatformCss = function (filename, opt){
|
||||
var fileref = document.createElement('link');
|
||||
|
@ -193,6 +191,7 @@ require([
|
|||
//Load platform styles
|
||||
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
|
||||
|
||||
Common.Locale.apply(function(){
|
||||
require([
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/utils',
|
||||
|
@ -223,6 +222,7 @@ require([
|
|||
], function() {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||
reqerr = window.requireTimeourError();
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = function(grunt) {
|
|||
doRegisterTask('bootstrap');
|
||||
doRegisterTask('iscroll');
|
||||
doRegisterTask('fetch');
|
||||
doRegisterTask('es6-promise');
|
||||
doRegisterTask('jszip');
|
||||
doRegisterTask('jsziputils');
|
||||
doRegisterTask('requirejs', function(defaultConfig, packageFile) {
|
||||
|
@ -511,6 +512,7 @@ module.exports = function(grunt) {
|
|||
grunt.registerTask('deploy-jszip', ['jszip-init', 'clean', 'copy']);
|
||||
grunt.registerTask('deploy-jsziputils', ['jsziputils-init', 'clean', 'copy']);
|
||||
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',
|
||||
'copy', 'svgmin', 'inline', 'json-minify',
|
||||
|
|
|
@ -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": {
|
||||
"clean": [
|
||||
"../deploy/web-apps/vendor/requirejs"
|
||||
|
@ -229,7 +240,8 @@
|
|||
"deploy-iscroll",
|
||||
"deploy-fetch",
|
||||
"deploy-jszip",
|
||||
"deploy-jsziputils"
|
||||
"deploy-jsziputils",
|
||||
"deploy-es6-promise"
|
||||
]
|
||||
}
|
||||
}
|
1318
vendor/es6-promise/CHANGELOG.md
vendored
Normal file
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
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
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
1176
vendor/es6-promise/es6-promise.auto.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
vendor/es6-promise/es6-promise.auto.min.js
vendored
Normal file
1
vendor/es6-promise/es6-promise.auto.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1174
vendor/es6-promise/es6-promise.js
vendored
Normal file
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
1
vendor/es6-promise/es6-promise.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue