[SSE] Fix merge with new-toolbar.
This commit is contained in:
parent
f237a48f0e
commit
9957e5d77c
|
@ -190,37 +190,8 @@ require([
|
||||||
app.start();
|
app.start();
|
||||||
});
|
});
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err.requireType == 'timeout' && !reqerr) {
|
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||||
var getUrlParams = function() {
|
reqerr = window.requireTimeourError();
|
||||||
var e,
|
|
||||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
|
||||||
r = /([^&=]+)=?([^&]*)/g,
|
|
||||||
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
|
||||||
q = window.location.search.substring(1),
|
|
||||||
urlParams = {};
|
|
||||||
|
|
||||||
while (e = r.exec(q))
|
|
||||||
urlParams[d(e[1])] = d(e[2]);
|
|
||||||
|
|
||||||
return urlParams;
|
|
||||||
};
|
|
||||||
|
|
||||||
var encodeUrlParam = function(str) {
|
|
||||||
return str.replace(/&/g, '&')
|
|
||||||
.replace(/"/g, '"')
|
|
||||||
.replace(/'/g, ''')
|
|
||||||
.replace(/</g, '<')
|
|
||||||
.replace(/>/g, '>');
|
|
||||||
};
|
|
||||||
|
|
||||||
var lang = (getUrlParams()["lang"] || 'en').split("-")[0];
|
|
||||||
|
|
||||||
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
|
||||||
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
|
||||||
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
|
||||||
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
|
||||||
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
|
||||||
|
|
||||||
window.alert(reqerr);
|
window.alert(reqerr);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ define([
|
||||||
|
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
// $(document.body).css('position', 'absolute');
|
// $(document.body).css('position', 'absolute');
|
||||||
|
var me = this;
|
||||||
|
|
||||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
|
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
|
||||||
|
|
||||||
|
@ -118,9 +119,32 @@ define([
|
||||||
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
|
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
|
||||||
|
|
||||||
// Initialize api
|
// Initialize api
|
||||||
|
var styleNames = ['Normal', 'Neutral', 'Bad', 'Good', 'Input', 'Output', 'Calculation', 'Check Cell', 'Explanatory Text', 'Note', 'Linked Cell', 'Warning Text',
|
||||||
|
'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Title', 'Total', 'Currency', 'Percent', 'Comma'],
|
||||||
|
translate = {
|
||||||
|
'Series': this.txtSeries,
|
||||||
|
'Diagram Title': this.txtDiagramTitle,
|
||||||
|
'X Axis': this.txtXAxis,
|
||||||
|
'Y Axis': this.txtYAxis,
|
||||||
|
'Your text here': this.txtArt
|
||||||
|
};
|
||||||
|
styleNames.forEach(function(item){
|
||||||
|
translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
|
||||||
|
});
|
||||||
|
translate['Currency [0]'] = me.txtStyle_Currency + ' [0]';
|
||||||
|
translate['Comma [0]'] = me.txtStyle_Comma + ' [0]';
|
||||||
|
|
||||||
|
for (var i=1; i<7; i++) {
|
||||||
|
translate['Accent'+i] = me.txtAccent + i;
|
||||||
|
translate['20% - Accent'+i] = '20% - ' + me.txtAccent + i;
|
||||||
|
translate['40% - Accent'+i] = '40% - ' + me.txtAccent + i;
|
||||||
|
translate['60% - Accent'+i] = '60% - ' + me.txtAccent + i;
|
||||||
|
}
|
||||||
|
|
||||||
this.api = new Asc.spreadsheet_api({
|
this.api = new Asc.spreadsheet_api({
|
||||||
'id-view' : 'editor_sdk',
|
'id-view' : 'editor_sdk',
|
||||||
'id-input' : 'ce-cell-content'
|
'id-input' : 'ce-cell-content',
|
||||||
|
'translate': translate
|
||||||
});
|
});
|
||||||
this.api.asc_setFontRenderingMode(parseInt(value));
|
this.api.asc_setFontRenderingMode(parseInt(value));
|
||||||
|
|
||||||
|
@ -159,7 +183,6 @@ define([
|
||||||
|
|
||||||
this.getApplication().getController('Viewport').setApi(this.api);
|
this.getApplication().getController('Viewport').setApi(this.api);
|
||||||
|
|
||||||
var me = this;
|
|
||||||
// Syncronize focus with api
|
// Syncronize focus with api
|
||||||
$(document.body).on('focus', 'input, textarea:not(#ce-cell-content)', function(e) {
|
$(document.body).on('focus', 'input, textarea:not(#ce-cell-content)', function(e) {
|
||||||
if (me.isAppDisabled === true) return;
|
if (me.isAppDisabled === true) return;
|
||||||
|
@ -851,19 +874,6 @@ define([
|
||||||
},this));
|
},this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.api) {
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(this.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(this.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(this.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(this.txtSeries);
|
|
||||||
this.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(this.txtArt);
|
|
||||||
this.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram) {
|
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram) {
|
||||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||||
|
@ -1936,6 +1946,7 @@ define([
|
||||||
isViewer: itemVar.isViewer,
|
isViewer: itemVar.isViewer,
|
||||||
EditorsSupport: itemVar.EditorsSupport,
|
EditorsSupport: itemVar.EditorsSupport,
|
||||||
isVisual: itemVar.isVisual,
|
isVisual: itemVar.isVisual,
|
||||||
|
isCustomWindow: itemVar.isCustomWindow,
|
||||||
isModal: itemVar.isModal,
|
isModal: itemVar.isModal,
|
||||||
isInsideMode: itemVar.isInsideMode,
|
isInsideMode: itemVar.isInsideMode,
|
||||||
initDataType: itemVar.initDataType,
|
initDataType: itemVar.initDataType,
|
||||||
|
@ -2105,7 +2116,29 @@ define([
|
||||||
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
||||||
titleServerVersion: 'Editor updated',
|
titleServerVersion: 'Editor updated',
|
||||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
||||||
errorLockedCellPivot: 'You cannot change data inside a pivot table.'
|
errorLockedCellPivot: 'You cannot change data inside a pivot table.',
|
||||||
|
txtAccent: 'Accent',
|
||||||
|
txtStyle_Normal: 'Normal',
|
||||||
|
txtStyle_Heading_1: 'Heading 1',
|
||||||
|
txtStyle_Heading_2: 'Heading 2',
|
||||||
|
txtStyle_Heading_3: 'Heading 3',
|
||||||
|
txtStyle_Heading_4: 'Heading 4',
|
||||||
|
txtStyle_Title: 'Title',
|
||||||
|
txtStyle_Neutral: 'Neutral',
|
||||||
|
txtStyle_Bad: 'Bad',
|
||||||
|
txtStyle_Good: 'Good',
|
||||||
|
txtStyle_Input: 'Input',
|
||||||
|
txtStyle_Output: 'Output',
|
||||||
|
txtStyle_Calculation: 'Calculation',
|
||||||
|
txtStyle_Check_Cell: 'Check Cell',
|
||||||
|
txtStyle_Explanatory_Text: 'Explanatory Text',
|
||||||
|
txtStyle_Note: 'Note',
|
||||||
|
txtStyle_Linked_Cell: 'Linked Cell',
|
||||||
|
txtStyle_Warning_Text: 'Warning Text',
|
||||||
|
txtStyle_Total: 'Total',
|
||||||
|
txtStyle_Currency: 'Currency',
|
||||||
|
txtStyle_Percent: 'Percent',
|
||||||
|
txtStyle_Comma: 'Comma'
|
||||||
}
|
}
|
||||||
})(), SSE.Controllers.Main || {}))
|
})(), SSE.Controllers.Main || {}))
|
||||||
});
|
});
|
||||||
|
|
|
@ -181,37 +181,8 @@ require([
|
||||||
app.start();
|
app.start();
|
||||||
});
|
});
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err.requireType == 'timeout' && !reqerr) {
|
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
|
||||||
var getUrlParams = function() {
|
reqerr = window.requireTimeourError();
|
||||||
var e,
|
|
||||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
|
||||||
r = /([^&=]+)=?([^&]*)/g,
|
|
||||||
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
|
||||||
q = window.location.search.substring(1),
|
|
||||||
urlParams = {};
|
|
||||||
|
|
||||||
while (e = r.exec(q))
|
|
||||||
urlParams[d(e[1])] = d(e[2]);
|
|
||||||
|
|
||||||
return urlParams;
|
|
||||||
};
|
|
||||||
|
|
||||||
var encodeUrlParam = function(str) {
|
|
||||||
return str.replace(/&/g, '&')
|
|
||||||
.replace(/"/g, '"')
|
|
||||||
.replace(/'/g, ''')
|
|
||||||
.replace(/</g, '<')
|
|
||||||
.replace(/>/g, '>');
|
|
||||||
};
|
|
||||||
|
|
||||||
var lang = (getUrlParams()["lang"] || 'en').split("-")[0];
|
|
||||||
|
|
||||||
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
|
||||||
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
|
||||||
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
|
||||||
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
|
||||||
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
|
||||||
|
|
||||||
window.alert(reqerr);
|
window.alert(reqerr);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,6 +365,28 @@
|
||||||
"SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
|
"SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
|
||||||
"SSE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
|
"SSE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
|
||||||
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||||
|
"SSE.Controllers.Main.txtAccent": "Accent",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Normal": "Normal",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Heading_1": "Heading 1",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Heading_2": "Heading 2",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Heading_3": "Heading 3",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Heading_4": "Heading 4",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Title": "Title",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Neutral": "Neutral",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Bad": "Bad",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Good": "Good",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Input": "Input",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Output": "Output",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Calculation": "Calculation",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Check_Cell": "Check Cell",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Explanatory_Text": "Explanatory Text",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Note": "Note",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Linked_Cell": "Linked Cell",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Warning_Text": "Warning Text",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Total": "Total",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Currency": "Currency",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Percent": "Percent",
|
||||||
|
"SSE.Controllers.Main.txtStyle_Comma": "Comma",
|
||||||
"SSE.Controllers.Print.strAllSheets": "All Sheets",
|
"SSE.Controllers.Print.strAllSheets": "All Sheets",
|
||||||
"SSE.Controllers.Print.textWarning": "Warning",
|
"SSE.Controllers.Print.textWarning": "Warning",
|
||||||
"SSE.Controllers.Print.warnCheckMargings": "Margins are incorrect",
|
"SSE.Controllers.Print.warnCheckMargings": "Margins are incorrect",
|
||||||
|
|
Loading…
Reference in a new issue