Commit dfc976bb authored by Alexander Trofimov's avatar Alexander Trofimov

Merge pull request #1 from ONLYOFFICE/feature/remove-global-variables

Feature/remove global variables
parents fa32bc72 b062f902
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script type="text/javascript" src="../../../../sdkjs/word/sdk-all.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/sdk-all.js"></script>
<div id="editor_sdk"> <div id="editor_sdk">
<script type="text/javascript"> <script type="text/javascript">
var editor = new asc_docs_api("editor_sdk"); var editor = new Asc.asc_docs_api("editor_sdk");
editor.asc_SetFontsPath("../../../../sdkjs/fonts/"); editor.asc_SetFontsPath("../../../../sdkjs/fonts/");
editor.LoadFontsFromServer(); editor.LoadFontsFromServer();
</script> </script>
......
/* /*
* *
* (c) Copyright Ascensio System Limited 2010-2016 * (c) Copyright Ascensio System Limited 2010-2016
* *
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
* *
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
* *
* You can contact Ascensio System SIA by email at sales@onlyoffice.com * You can contact Ascensio System SIA by email at sales@onlyoffice.com
* *
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
* *
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains * Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic * relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute. * in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks. * Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
* *
*/ */
/** /**
* ComboBoxFonts.js * ComboBoxFonts.js
* *
...@@ -42,7 +42,7 @@ define([ ...@@ -42,7 +42,7 @@ define([
Common.UI.ComboBoxFonts = Common.UI.ComboBox.extend((function() { Common.UI.ComboBoxFonts = Common.UI.ComboBox.extend((function() {
var iconWidth = 302, var iconWidth = 302,
iconHeight = FONT_THUMBNAIL_HEIGHT || 26, iconHeight = Asc.FONT_THUMBNAIL_HEIGHT || 26,
isRetina = window.devicePixelRatio > 1, isRetina = window.devicePixelRatio > 1,
thumbCanvas = document.createElement('canvas'), thumbCanvas = document.createElement('canvas'),
thumbContext = thumbCanvas.getContext('2d'), thumbContext = thumbCanvas.getContext('2d'),
...@@ -251,10 +251,10 @@ define([ ...@@ -251,10 +251,10 @@ define([
if (isRetina) { if (isRetina) {
thumbContext.clearRect(0, 0, iconWidth * 2, iconHeight * 2); thumbContext.clearRect(0, 0, iconWidth * 2, iconHeight * 2);
thumbContext.drawImage(this.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * 2 * opts.imgidx); thumbContext.drawImage(this.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * 2 * opts.imgidx);
} else { } else {
thumbContext.clearRect(0, 0, iconWidth, iconHeight); thumbContext.clearRect(0, 0, iconWidth, iconHeight);
thumbContext.drawImage(this.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * opts.imgidx); thumbContext.drawImage(this.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * opts.imgidx);
} }
return thumbCanvas.toDataURL(); return thumbCanvas.toDataURL();
...@@ -466,10 +466,10 @@ define([ ...@@ -466,10 +466,10 @@ define([
if (isRetina) { if (isRetina) {
context.clearRect(0, 0, iconWidth * 2, iconHeight * 2); context.clearRect(0, 0, iconWidth * 2, iconHeight * 2);
context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * 2 * index); context.drawImage(me.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * 2 * index);
} else { } else {
context.clearRect(0, 0, iconWidth, iconHeight); context.clearRect(0, 0, iconWidth, iconHeight);
context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * index); context.drawImage(me.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * index);
} }
me.tiles[j] = fontImage; me.tiles[j] = fontImage;
......
...@@ -45,8 +45,8 @@ define([ ...@@ -45,8 +45,8 @@ define([
// NOTE: временное решение // NOTE: временное решение
function buildCommentData () { function buildCommentData () {
if (typeof asc_CCommentDataWord !== 'undefined') { if (typeof Asc.asc_CCommentDataWord !== 'undefined') {
return new asc_CCommentDataWord(null); return new Asc.asc_CCommentDataWord(null);
} }
return new asc_CCommentData(null); return new asc_CCommentData(null);
......
...@@ -188,7 +188,7 @@ define([ ...@@ -188,7 +188,7 @@ define([
value = item.get_Value(), value = item.get_Value(),
settings = false; settings = false;
switch (item.get_Type()) { switch (item.get_Type()) {
case c_oAscRevisionsChangeType.TextAdd: case Asc.c_oAscRevisionsChangeType.TextAdd:
changetext = me.textInserted; changetext = me.textInserted;
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
...@@ -215,7 +215,7 @@ define([ ...@@ -215,7 +215,7 @@ define([
changetext += (' ' + value); changetext += (' ' + value);
} }
break; break;
case c_oAscRevisionsChangeType.TextRem: case Asc.c_oAscRevisionsChangeType.TextRem:
changetext = me.textDeleted; changetext = me.textDeleted;
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
...@@ -242,13 +242,13 @@ define([ ...@@ -242,13 +242,13 @@ define([
changetext += (' ' + value); changetext += (' ' + value);
} }
break; break;
case c_oAscRevisionsChangeType.ParaAdd: case Asc.c_oAscRevisionsChangeType.ParaAdd:
changetext = me.textParaInserted; changetext = me.textParaInserted;
break; break;
case c_oAscRevisionsChangeType.ParaRem: case Asc.c_oAscRevisionsChangeType.ParaRem:
changetext = me.textParaDeleted; changetext = me.textParaDeleted;
break; break;
case c_oAscRevisionsChangeType.TextPr: case Asc.c_oAscRevisionsChangeType.TextPr:
changetext = '<b>' + me.textFormatted; changetext = '<b>' + me.textFormatted;
if (value.Get_Bold() !== undefined) if (value.Get_Bold() !== undefined)
proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', '); proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', ');
...@@ -290,7 +290,7 @@ define([ ...@@ -290,7 +290,7 @@ define([
changetext += '</b>'; changetext += '</b>';
changetext += proptext; changetext += proptext;
break; break;
case c_oAscRevisionsChangeType.ParaPr: case Asc.c_oAscRevisionsChangeType.ParaPr:
changetext = '<b>' + me.textParaFormatted; changetext = '<b>' + me.textParaFormatted;
if (value.Get_ContextualSpacing()) if (value.Get_ContextualSpacing())
proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', '); proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', ');
......
...@@ -217,7 +217,7 @@ Common.Utils.ThemeColor = new(function() { ...@@ -217,7 +217,7 @@ Common.Utils.ThemeColor = new(function() {
if(color.length==3) color=color.replace(/(.)/g,'$1$1'); if(color.length==3) color=color.replace(/(.)/g,'$1$1');
color=parseInt(color,16); color=parseInt(color,16);
var c = new CAscColor(); var c = new CAscColor();
c.put_type( (typeof(clr) == 'object' && clr.effectId !== undefined)? c_oAscColor.COLOR_TYPE_SCHEME : c_oAscColor.COLOR_TYPE_SRGB); c.put_type( (typeof(clr) == 'object' && clr.effectId !== undefined)? Asc.c_oAscColor.COLOR_TYPE_SCHEME : Asc.c_oAscColor.COLOR_TYPE_SRGB);
c.put_r(color>>16); c.put_r(color>>16);
c.put_g((color&0xff00)>>8); c.put_g((color&0xff00)>>8);
c.put_b(color&0xff); c.put_b(color&0xff);
......
...@@ -103,7 +103,7 @@ define([ ...@@ -103,7 +103,7 @@ define([
render: function(el) { render: function(el) {
el = el || this.el; el = el || this.el;
$(el).html(this.template({scope: this, maxMsgLength: c_oAscMaxCellOrCommentLength})); $(el).html(this.template({scope: this, maxMsgLength: Asc.c_oAscMaxCellOrCommentLength}));
this.panelBox = $('#chat-box', this.el); this.panelBox = $('#chat-box', this.el);
this.panelUsers = $('#chat-users', this.el); this.panelUsers = $('#chat-users', this.el);
......
...@@ -253,7 +253,7 @@ define([ ...@@ -253,7 +253,7 @@ define([
textEdit: t.textEdit, textEdit: t.textEdit,
textReply: t.textReply, textReply: t.textReply,
textClose: t.textClose, textClose: t.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
}) })
) )
}); });
...@@ -829,7 +829,7 @@ define([ ...@@ -829,7 +829,7 @@ define([
textAddComment: me.textAddComment, textAddComment: me.textAddComment,
textCancel: me.textCancel, textCancel: me.textCancel,
textEnterCommentHint: me.textEnterCommentHint, textEnterCommentHint: me.textEnterCommentHint,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
})); }));
this.buttonAddCommentToDoc = new Common.UI.Button({ this.buttonAddCommentToDoc = new Common.UI.Button({
...@@ -979,7 +979,7 @@ define([ ...@@ -979,7 +979,7 @@ define([
textEdit: me.textEdit, textEdit: me.textEdit,
textReply: me.textReply, textReply: me.textReply,
textClose: me.textClose, textClose: me.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
})) }))
}); });
......
...@@ -48,12 +48,12 @@ define([ ...@@ -48,12 +48,12 @@ define([
_.extend(_options, { _.extend(_options, {
closable: false, closable: false,
width : 250, width : 250,
height : (options.type == c_oAscAdvancedOptionsID.CSV) ? 205 : 155, height : (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 205 : 155,
contentWidth : 390, contentWidth : 390,
header : true, header : true,
cls : 'open-dlg', cls : 'open-dlg',
contentTemplate : '', contentTemplate : '',
title : t.txtTitle.replace('%1', (options.type == c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT') title : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT')
}, options); }, options);
this.template = options.template || [ this.template = options.template || [
...@@ -61,7 +61,7 @@ define([ ...@@ -61,7 +61,7 @@ define([
'<div class="content-panel" >', '<div class="content-panel" >',
'<label class="header">' + t.txtEncoding + '</label>', '<label class="header">' + t.txtEncoding + '</label>',
'<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>', '<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>',
'<% if (type == c_oAscAdvancedOptionsID.CSV) { %>', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
'<label class="header">' + t.txtDelimiter + '</label>', '<label class="header">' + t.txtDelimiter + '</label>',
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>', '<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>',
'<% } %>', '<% } %>',
...@@ -279,7 +279,7 @@ define([ ...@@ -279,7 +279,7 @@ define([
}); });
this.cmbEncoding.setValue( (this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0]); this.cmbEncoding.setValue( (this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0]);
if (this.type == c_oAscAdvancedOptionsID.CSV) { if (this.type == Asc.c_oAscAdvancedOptionsID.CSV) {
this.cmbDelimiter = new Common.UI.ComboBox({ this.cmbDelimiter = new Common.UI.ComboBox({
el: $('#id-delimiters-combo', this.$window), el: $('#id-delimiters-combo', this.$window),
menuStyle: 'min-width: 110px;', menuStyle: 'min-width: 110px;',
......
...@@ -433,6 +433,7 @@ ...@@ -433,6 +433,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>
......
...@@ -208,7 +208,7 @@ var ApplicationController = new(function(){ ...@@ -208,7 +208,7 @@ var ApplicationController = new(function(){
var text = ''; var text = '';
switch (id) switch (id)
{ {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...'; text = 'Downloading document...';
break; break;
default: default:
...@@ -216,7 +216,7 @@ var ApplicationController = new(function(){ ...@@ -216,7 +216,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text); $('#id-loadmask .cmd-loader-title').html(text);
showMask(); showMask();
} }
...@@ -347,19 +347,19 @@ var ApplicationController = new(function(){ ...@@ -347,19 +347,19 @@ var ApplicationController = new(function(){
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText; message = me.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText; message = me.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText; message = me.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText; message = me.downloadErrorText;
break; break;
...@@ -368,7 +368,7 @@ var ApplicationController = new(function(){ ...@@ -368,7 +368,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, message); Common.Gateway.reportError(id, message);
...@@ -419,7 +419,7 @@ var ApplicationController = new(function(){ ...@@ -419,7 +419,7 @@ var ApplicationController = new(function(){
} }
function onDownloadAs() { function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.DOCX, true); if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
} }
// Helpers // Helpers
...@@ -696,7 +696,7 @@ var ApplicationController = new(function(){ ...@@ -696,7 +696,7 @@ var ApplicationController = new(function(){
}); });
window["flat_desine"] = true; window["flat_desine"] = true;
api = new asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api("editor_sdk");
if (api){ if (api){
api.CreateComponents(); api.CreateComponents();
......
...@@ -230,7 +230,7 @@ define([ ...@@ -230,7 +230,7 @@ define([
clickSaveAsFormat: function(menu, format) { clickSaveAsFormat: function(menu, format) {
if (menu) { if (menu) {
if (format == c_oAscFileType.TXT) { if (format == Asc.c_oAscFileType.TXT) {
Common.UI.warning({ Common.UI.warning({
closable: false, closable: false,
title: this.notcriticalErrorTitle, title: this.notcriticalErrorTitle,
...@@ -265,10 +265,10 @@ define([ ...@@ -265,10 +265,10 @@ define([
value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict"); value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
switch(value) { switch(value) {
case 'all': value = c_oAscCollaborativeMarksShowType.All; break; case 'all': value = Asc.c_oAscCollaborativeMarksShowType.All; break;
case 'none': value = c_oAscCollaborativeMarksShowType.None; break; case 'none': value = Asc.c_oAscCollaborativeMarksShowType.None; break;
case 'last': value = c_oAscCollaborativeMarksShowType.LastChanges; break; case 'last': value = Asc.c_oAscCollaborativeMarksShowType.LastChanges; break;
default: value = (fast_coauth) ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges; default: value = (fast_coauth) ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges;
} }
this.api.SetCollaborativeMarksShowType(value); this.api.SetCollaborativeMarksShowType(value);
} }
......
...@@ -117,7 +117,7 @@ define([ ...@@ -117,7 +117,7 @@ define([
{ {
var eltype = SelectedObjects[i].get_ObjectType(), var eltype = SelectedObjects[i].get_ObjectType(),
settingsType = this.getDocumentSettingsType(eltype); settingsType = this.getDocumentSettingsType(eltype);
if (eltype === c_oAscTypeSelectElement.Math) if (eltype === Asc.c_oAscTypeSelectElement.Math)
in_equation = true; in_equation = true;
if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined) if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined)
...@@ -306,7 +306,7 @@ define([ ...@@ -306,7 +306,7 @@ define([
}, },
onError: function(id, level, errData) { onError: function(id, level, errData) {
if (id==c_oAscError.ID.MailMergeLoadFile) { if (id==Asc.c_oAscError.ID.MailMergeLoadFile) {
this._settings[Common.Utils.documentSettingsType.MailMerge].hidden = 1; this._settings[Common.Utils.documentSettingsType.MailMerge].hidden = 1;
this._settings[Common.Utils.documentSettingsType.MailMerge].btn.setDisabled(true); this._settings[Common.Utils.documentSettingsType.MailMerge].btn.setDisabled(true);
var selectedElements = this.api.getSelectedElements(); var selectedElements = this.api.getSelectedElements();
...@@ -349,13 +349,13 @@ define([ ...@@ -349,13 +349,13 @@ define([
getDocumentSettingsType: function(type) { getDocumentSettingsType: function(type) {
switch (type) { switch (type) {
case c_oAscTypeSelectElement.Paragraph: case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph; return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Table: case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table; return Common.Utils.documentSettingsType.Table;
case c_oAscTypeSelectElement.Image: case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image; return Common.Utils.documentSettingsType.Image;
case c_oAscTypeSelectElement.Header: case Asc.c_oAscTypeSelectElement.Header:
return Common.Utils.documentSettingsType.Header; return Common.Utils.documentSettingsType.Header;
} }
} }
......
...@@ -239,9 +239,9 @@ define([ ...@@ -239,9 +239,9 @@ define([
me._changedProps.put_Shade(new CParagraphShd()); me._changedProps.put_Shade(new CParagraphShd());
} }
if (color=='transparent') { if (color=='transparent') {
me._changedProps.get_Shade().put_Value(shd_Nil); me._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} else { } else {
me._changedProps.get_Shade().put_Value(shd_Clear); me._changedProps.get_Shade().put_Value(Asc.c_oAscShdClear);
me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color)); me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color));
} }
} }
...@@ -334,8 +334,8 @@ define([ ...@@ -334,8 +334,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.None); me._DisableElem(Asc.c_oAscDropCap.None);
me._changedProps.put_DropCap(c_oAscDropCap.None); me._changedProps.put_DropCap(Asc.c_oAscDropCap.None);
} }
}, me)); }, me));
...@@ -349,8 +349,8 @@ define([ ...@@ -349,8 +349,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Drop); me._DisableElem(Asc.c_oAscDropCap.Drop);
me._changedProps.put_DropCap(c_oAscDropCap.Drop); me._changedProps.put_DropCap(Asc.c_oAscDropCap.Drop);
} }
}, me)); }, me));
...@@ -364,8 +364,8 @@ define([ ...@@ -364,8 +364,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Margin); me._DisableElem(Asc.c_oAscDropCap.Margin);
me._changedProps.put_DropCap(c_oAscDropCap.Margin); me._changedProps.put_DropCap(Asc.c_oAscDropCap.Margin);
} }
}, me)); }, me));
...@@ -583,9 +583,9 @@ define([ ...@@ -583,9 +583,9 @@ define([
}, me)); }, me));
this._arrHAlign = [ this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscXAlign.Left}, {displayValue: this.textLeft, value: Asc.c_oAscXAlign.Left},
{displayValue: this.textCenter, value: c_oAscXAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscXAlign.Center},
{displayValue: this.textRight, value: c_oAscXAlign.Right} {displayValue: this.textRight, value: Asc.c_oAscXAlign.Right}
]; ];
this.cmbHAlign = new Common.UI.ComboBox({ this.cmbHAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hposition'), el : $('#frame-advanced-input-hposition'),
...@@ -607,9 +607,9 @@ define([ ...@@ -607,9 +607,9 @@ define([
this.cmbHAlign.setValue(this._arrHAlign[0].value); this.cmbHAlign.setValue(this._arrHAlign[0].value);
this._arrHRelative = [ this._arrHRelative = [
{displayValue: this.textMargin, value: c_oAscHAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: c_oAscHAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscHAnchor.Page},
{displayValue: this.textColumn, value: c_oAscHAnchor.Text} {displayValue: this.textColumn, value: Asc.c_oAscHAnchor.Text}
]; ];
this.cmbHRelative = new Common.UI.ComboBox({ this.cmbHRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hrelative'), el : $('#frame-advanced-input-hrelative'),
...@@ -626,9 +626,9 @@ define([ ...@@ -626,9 +626,9 @@ define([
this.cmbHRelative.setValue(this._arrHRelative[1].value); this.cmbHRelative.setValue(this._arrHRelative[1].value);
this._arrVAlign = [ this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscYAlign.Top}, {displayValue: this.textTop, value: Asc.c_oAscYAlign.Top},
{displayValue: this.textCenter, value: c_oAscYAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscYAlign.Center},
{displayValue: this.textBottom, value: c_oAscYAlign.Bottom} {displayValue: this.textBottom, value: Asc.c_oAscYAlign.Bottom}
]; ];
this.cmbVAlign = new Common.UI.ComboBox({ this.cmbVAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vposition'), el : $('#frame-advanced-input-vposition'),
...@@ -650,9 +650,9 @@ define([ ...@@ -650,9 +650,9 @@ define([
this.cmbVAlign.setValue(this._arrVAlign[0].value); this.cmbVAlign.setValue(this._arrVAlign[0].value);
this._arrVRelative = [ this._arrVRelative = [
{displayValue: this.textMargin, value: c_oAscVAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: c_oAscVAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscVAnchor.Page},
{displayValue: this.textParagraph, value: c_oAscVAnchor.Text} {displayValue: this.textParagraph, value: Asc.c_oAscVAnchor.Text}
]; ];
this.cmbVRelative = new Common.UI.ComboBox({ this.cmbVRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vrelative'), el : $('#frame-advanced-input-vrelative'),
...@@ -664,7 +664,7 @@ define([ ...@@ -664,7 +664,7 @@ define([
.on('selected', _.bind(function(combo, record) { .on('selected', _.bind(function(combo, record) {
if (me._changedProps) { if (me._changedProps) {
me._changedProps.put_VAnchor(record.value); me._changedProps.put_VAnchor(record.value);
this.chMove.setValue(record.value == c_oAscVAnchor.Text, true); this.chMove.setValue(record.value == Asc.c_oAscVAnchor.Text, true);
} }
}, me)); }, me));
this.cmbVRelative.setValue(this._arrVRelative[2].value); this.cmbVRelative.setValue(this._arrVRelative[2].value);
...@@ -808,7 +808,7 @@ define([ ...@@ -808,7 +808,7 @@ define([
onShowDialog: function(dlg) { onShowDialog: function(dlg) {
if (!this.isFrame && this.btnNone.pressed) if (!this.isFrame && this.btnNone.pressed)
this._DisableElem(c_oAscDropCap.None); this._DisableElem(Asc.c_oAscDropCap.None);
else if (this.isFrame && this.btnFrameNone.pressed) else if (this.isFrame && this.btnFrameNone.pressed)
this._DisableElem(c_oAscFrameWrap.None); this._DisableElem(c_oAscFrameWrap.None);
}, },
...@@ -816,7 +816,7 @@ define([ ...@@ -816,7 +816,7 @@ define([
onBtnBordersClick: function(btn, eOpts){ onBtnBordersClick: function(btn, eOpts){
this.updateBordersStyle(btn.options.strId, true); this.updateBordersStyle(btn.options.strId, true);
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders); properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true); properties.put_CellSelect(true);
this.api.tblApply(properties); this.api.tblApply(properties);
...@@ -904,7 +904,7 @@ define([ ...@@ -904,7 +904,7 @@ define([
break; break;
} }
} }
this.chMove.setValue(value==c_oAscVAnchor.Text); this.chMove.setValue(value==Asc.c_oAscVAnchor.Text);
value = frame_props.get_YAlign(); value = frame_props.get_YAlign();
if (value!==undefined) { if (value!==undefined) {
...@@ -929,9 +929,9 @@ define([ ...@@ -929,9 +929,9 @@ define([
this.spnRowHeight.setValue((frame_props.get_Lines() !== null) ? frame_props.get_Lines() : ''); this.spnRowHeight.setValue((frame_props.get_Lines() !== null) ? frame_props.get_Lines() : '');
this.numDistance.setValue((frame_props.get_HSpace() !== null) ? Common.Utils.Metric.fnRecalcFromMM(frame_props.get_HSpace()) : ''); this.numDistance.setValue((frame_props.get_HSpace() !== null) ? Common.Utils.Metric.fnRecalcFromMM(frame_props.get_HSpace()) : '');
value = frame_props.get_DropCap(); value = frame_props.get_DropCap();
if (value==c_oAscDropCap.Drop) if (value==Asc.c_oAscDropCap.Drop)
this.btnInText.toggle(true, false); this.btnInText.toggle(true, false);
else if (value==c_oAscDropCap.Margin) else if (value==Asc.c_oAscDropCap.Margin)
this.btnInMargin.toggle(true, false); this.btnInMargin.toggle(true, false);
else else
this.btnNone.toggle(true, false); this.btnNone.toggle(true, false);
...@@ -964,10 +964,10 @@ define([ ...@@ -964,10 +964,10 @@ define([
} }
var shd = frame_props.get_Shade(); var shd = frame_props.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
} else { } else {
this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
...@@ -1006,7 +1006,7 @@ define([ ...@@ -1006,7 +1006,7 @@ define([
}, },
_DisableElem: function(btnId){ _DisableElem: function(btnId){
var disabled = (btnId === c_oAscDropCap.None || btnId === c_oAscFrameWrap.None); var disabled = (btnId === Asc.c_oAscDropCap.None || btnId === c_oAscFrameWrap.None);
_.each(this.btnsCategory, function(btn) { _.each(this.btnsCategory, function(btn) {
if (btn.options.contentTarget == 'id-adv-dropcap-borders' || if (btn.options.contentTarget == 'id-adv-dropcap-borders' ||
...@@ -1028,7 +1028,7 @@ define([ ...@@ -1028,7 +1028,7 @@ define([
this.spnWidth.setDisabled(disabled); this.spnWidth.setDisabled(disabled);
this.spnHeight.setDisabled(disabled); this.spnHeight.setDisabled(disabled);
} else { } else {
disabled = (btnId == c_oAscDropCap.None); disabled = (btnId == Asc.c_oAscDropCap.None);
this.spnRowHeight.setDisabled(disabled); this.spnRowHeight.setDisabled(disabled);
this.numDistance.setDisabled(disabled); this.numDistance.setDisabled(disabled);
this.cmbFonts.setDisabled(disabled); this.cmbFonts.setDisabled(disabled);
......
...@@ -44,15 +44,15 @@ define([ ...@@ -44,15 +44,15 @@ define([
menu: undefined, menu: undefined,
formats: [[ formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF}, {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'TXT', imgCls: 'txt', type: c_oAscFileType.TXT}, {name: 'TXT', imgCls: 'txt', type: Asc.c_oAscFileType.TXT},
{name: 'DOCX', imgCls: 'docx', type: c_oAscFileType.DOCX} {name: 'DOCX', imgCls: 'docx', type: Asc.c_oAscFileType.DOCX}
],[ ],[
// {name: 'DOC', imgCls: 'doc-format btn-doc', type: c_oAscFileType.DOC}, // {name: 'DOC', imgCls: 'doc-format btn-doc', type: Asc.c_oAscFileType.DOC},
{name: 'ODT', imgCls: 'odt', type: c_oAscFileType.ODT}, {name: 'ODT', imgCls: 'odt', type: Asc.c_oAscFileType.ODT},
// {name: 'RTF', imgCls: 'doc-format btn-rtf', type: c_oAscFileType.RTF}, // {name: 'RTF', imgCls: 'doc-format btn-rtf', type: Asc.c_oAscFileType.RTF},
{name: 'HTML (Zipped)', imgCls: 'html', type: c_oAscFileType.HTML} {name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
// {name: 'EPUB', imgCls: 'doc-format btn-epub', type: c_oAscFileType.EPUB} // {name: 'EPUB', imgCls: 'doc-format btn-epub', type: Asc.c_oAscFileType.EPUB}
]], ]],
......
/* /*
* *
* (c) Copyright Ascensio System Limited 2010-2016 * (c) Copyright Ascensio System Limited 2010-2016
* *
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
* *
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
* *
* You can contact Ascensio System SIA by email at sales@onlyoffice.com * You can contact Ascensio System SIA by email at sales@onlyoffice.com
* *
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
* *
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains * Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic * relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute. * in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks. * Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
* *
*/ */
/** /**
* HyperlinkSettingsDialog.js * HyperlinkSettingsDialog.js
* *
...@@ -110,7 +110,7 @@ define([ ...@@ -110,7 +110,7 @@ define([
me.inputTip = new Common.UI.InputField({ me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'), el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;', style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength maxLength : Asc.c_oAscMaxTooltipLength
}); });
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
...@@ -152,7 +152,7 @@ define([ ...@@ -152,7 +152,7 @@ define([
getSettings: function () { getSettings: function () {
var me = this, var me = this,
props = new CHyperlinkProperty(), props = new Asc.CHyperlinkProperty(),
url = $.trim(me.inputUrl.getValue()); url = $.trim(me.inputUrl.getValue());
if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) ) if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) )
......
...@@ -60,7 +60,7 @@ define([ ...@@ -60,7 +60,7 @@ define([
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
WrappingStyle: c_oAscWrapStyle2.Inline, WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true, CanBeFlow: true,
Width: 0, Width: 0,
Height: 0, Height: 0,
...@@ -76,13 +76,13 @@ define([ ...@@ -76,13 +76,13 @@ define([
this.render(); this.render();
var viewData = [ var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true }, { offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare }, { offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight }, { offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough }, { offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom }, { offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront }, { offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind } { offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
]; ];
this.btnWrapType = new Common.UI.Button({ this.btnWrapType = new Common.UI.Button({
...@@ -244,17 +244,17 @@ define([ ...@@ -244,17 +244,17 @@ define([
if (this.api) { if (this.api) {
var props = new CImgProperty(); var props = new CImgProperty();
props.put_WrappingStyle((rawData.data)); props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) { if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH()); props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false); props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
props.get_PositionH().put_Value(val); props.get_PositionH().put_Value(val);
props.put_PositionV(new CImagePositionV()); props.put_PositionV(new Asc.CImagePositionV());
props.get_PositionV().put_UseAlign(false); props.get_PositionV().put_UseAlign(false);
props.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val); props.get_PositionV().put_Value(val);
} }
...@@ -312,7 +312,7 @@ define([ ...@@ -312,7 +312,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) { if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage(); imgsizeOriginal = me.api.get_OriginalSizeImage();
......
...@@ -92,9 +92,9 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -92,9 +92,9 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
}); });
this._arrFormat = [ this._arrFormat = [
{displayValue: this.textHTML, value: c_oAscFileType.HTML}, {displayValue: this.textHTML, value: Asc.c_oAscFileType.HTML},
{displayValue: this.textAttachDocx,value: c_oAscFileType.DOCX}, {displayValue: this.textAttachDocx,value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textAttachPdf,value: c_oAscFileType.PDF} {displayValue: this.textAttachPdf,value: Asc.c_oAscFileType.PDF}
]; ];
this.cmbFormat = new Common.UI.ComboBox({ this.cmbFormat = new Common.UI.ComboBox({
el: $('#merge-email-dlg-format'), el: $('#merge-email-dlg-format'),
...@@ -103,7 +103,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -103,7 +103,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
editable: false, editable: false,
data: this._arrFormat data: this._arrFormat
}); });
this.cmbFormat.setValue(c_oAscFileType.HTML); this.cmbFormat.setValue(Asc.c_oAscFileType.HTML);
this.cmbFormat.on('selected', _.bind(this.onCmbFormatSelect, this)); this.cmbFormat.on('selected', _.bind(this.onCmbFormatSelect, this));
this.inputFileName = new Common.UI.InputField({ this.inputFileName = new Common.UI.InputField({
...@@ -175,13 +175,13 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -175,13 +175,13 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
getSettings: function() { getSettings: function() {
var filename = this.inputFileName.getValue(), var filename = this.inputFileName.getValue(),
mailformat = this.cmbFormat.getValue(); mailformat = this.cmbFormat.getValue();
if (mailformat!==c_oAscFileType.HTML) { if (mailformat!==Asc.c_oAscFileType.HTML) {
if (_.isEmpty(filename)) filename = 'attach'; if (_.isEmpty(filename)) filename = 'attach';
var idx = filename.lastIndexOf('.'), var idx = filename.lastIndexOf('.'),
ext = (idx>0) ? filename.substring(idx, filename.length).toLowerCase() : ''; ext = (idx>0) ? filename.substring(idx, filename.length).toLowerCase() : '';
if (mailformat==c_oAscFileType.PDF && ext!=='.pdf') if (mailformat==Asc.c_oAscFileType.PDF && ext!=='.pdf')
filename += '.pdf'; filename += '.pdf';
else if (mailformat==c_oAscFileType.DOCX && ext!=='.docx') else if (mailformat==Asc.c_oAscFileType.DOCX && ext!=='.docx')
filename += '.docx'; filename += '.docx';
} }
...@@ -236,7 +236,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -236,7 +236,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
}, },
onCmbFormatSelect: function(combo, record) { onCmbFormatSelect: function(combo, record) {
var attachDisable = (record.value == c_oAscFileType.HTML); var attachDisable = (record.value == Asc.c_oAscFileType.HTML);
this.inputFileName.setDisabled(attachDisable); this.inputFileName.setDisabled(attachDisable);
this.lblFileName.toggleClass('disabled', attachDisable); this.lblFileName.toggleClass('disabled', attachDisable);
(attachDisable) ? this.textareaMessage.attr('disabled', 'disabled') : this.textareaMessage.removeAttr('disabled'); (attachDisable) ? this.textareaMessage.attr('disabled', 'disabled') : this.textareaMessage.removeAttr('disabled');
......
...@@ -201,9 +201,9 @@ define([ ...@@ -201,9 +201,9 @@ define([
this.emptyDBControls.push(this.btnLast); this.emptyDBControls.push(this.btnLast);
this._arrMergeSrc = [ this._arrMergeSrc = [
{displayValue: this.textPdf, value: c_oAscFileType.PDF}, {displayValue: this.textPdf, value: Asc.c_oAscFileType.PDF},
{displayValue: this.textDocx, value: c_oAscFileType.DOCX}, {displayValue: this.textDocx, value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textEmail, value: c_oAscFileType.HTML} {displayValue: this.textEmail, value: Asc.c_oAscFileType.HTML}
]; ];
this.cmbMergeTo = new Common.UI.ComboBox({ this.cmbMergeTo = new Common.UI.ComboBox({
el: $('#mmerge-combo-merge-to', me.$el), el: $('#mmerge-combo-merge-to', me.$el),
...@@ -516,11 +516,11 @@ define([ ...@@ -516,11 +516,11 @@ define([
if (this._mailMergeDlg) return; if (this._mailMergeDlg) return;
var me = this; var me = this;
if (this.cmbMergeTo.getValue() != c_oAscFileType.HTML) { if (this.cmbMergeTo.getValue() != Asc.c_oAscFileType.HTML) {
me._mailMergeDlg = new DE.Views.MailMergeSaveDlg({ me._mailMergeDlg = new DE.Views.MailMergeSaveDlg({
mergeFolderUrl: me.mode.mergeFolderUrl, mergeFolderUrl: me.mode.mergeFolderUrl,
mergedFileUrl: url, mergedFileUrl: url,
defFileName: me.defFileName + ((this.cmbMergeTo.getValue() == c_oAscFileType.PDF) ? '.pdf' : '.docx') defFileName: me.defFileName + ((this.cmbMergeTo.getValue() == Asc.c_oAscFileType.PDF) ? '.pdf' : '.docx')
}); });
me._mailMergeDlg.on('mailmergefolder', function(obj, folder){ // save last folder me._mailMergeDlg.on('mailmergefolder', function(obj, folder){ // save last folder
}).on('mailmergeerror', function(obj, err){ // save last folder }).on('mailmergeerror', function(obj, err){ // save last folder
...@@ -651,14 +651,14 @@ define([ ...@@ -651,14 +651,14 @@ define([
from = parseInt(this.txtFieldFrom.getValue())-1; from = parseInt(this.txtFieldFrom.getValue())-1;
to = parseInt(this.txtFieldTo.getValue())-1; to = parseInt(this.txtFieldTo.getValue())-1;
} }
var mmdata = new CMailMergeSendData(); var mmdata = new Asc.CMailMergeSendData();
mmdata.put_RecordFrom(from); mmdata.put_RecordFrom(from);
mmdata.put_RecordTo(to); mmdata.put_RecordTo(to);
mmdata.put_From(this.mergeMailData.from); mmdata.put_From(this.mergeMailData.from);
mmdata.put_To(this.mergeMailData.to); mmdata.put_To(this.mergeMailData.to);
mmdata.put_Subject(this.mergeMailData.subject); mmdata.put_Subject(this.mergeMailData.subject);
mmdata.put_MailFormat(this.mergeMailData.mailFormat); mmdata.put_MailFormat(this.mergeMailData.mailFormat);
if (this.mergeMailData.mailFormat!==c_oAscFileType.HTML) { if (this.mergeMailData.mailFormat!==Asc.c_oAscFileType.HTML) {
mmdata.put_FileName(this.mergeMailData.fileName); mmdata.put_FileName(this.mergeMailData.fileName);
mmdata.put_Message(this.mergeMailData.message); mmdata.put_Message(this.mergeMailData.message);
} }
...@@ -669,7 +669,7 @@ define([ ...@@ -669,7 +669,7 @@ define([
}, },
onLongActionEnd: function(type, id) { onLongActionEnd: function(type, id) {
if (id == c_oAscAsyncAction['SendMailMerge']) { if (id == Asc.c_oAscAsyncAction['SendMailMerge']) {
Common.UI.info({ Common.UI.info({
closable: false, closable: false,
width: 500, width: 500,
...@@ -744,7 +744,7 @@ define([ ...@@ -744,7 +744,7 @@ define([
}, },
onCmbMergeToSelect: function(combo, record) { onCmbMergeToSelect: function(combo, record) {
var mergeVisible = (record.value == c_oAscFileType.HTML); var mergeVisible = (record.value == Asc.c_oAscFileType.HTML);
this.btnMerge.setVisible(mergeVisible); this.btnMerge.setVisible(mergeVisible);
this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl); this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl);
this.btnDownload.setVisible(!mergeVisible); this.btnDownload.setVisible(!mergeVisible);
......
...@@ -356,10 +356,10 @@ define([ ...@@ -356,10 +356,10 @@ define([
} }
var shd = prop.get_Shade(); var shd = prop.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BackColor = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; this.BackColor = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
this.BackColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.BackColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
...@@ -428,7 +428,7 @@ define([ ...@@ -428,7 +428,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new DE.Views.ParagraphSettingsAdvanced( (new DE.Views.ParagraphSettingsAdvanced(
{ {
tableStylerRows: 2, tableStylerRows: 2,
......
...@@ -633,10 +633,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem ...@@ -633,10 +633,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
// Borders // Borders
var shd = props.get_Shade(); var shd = props.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
} else { } else {
this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
...@@ -905,9 +905,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem ...@@ -905,9 +905,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._changedProps.put_Shade(new CParagraphShd()); this._changedProps.put_Shade(new CParagraphShd());
} }
if (this.paragraphShade=='transparent') { if (this.paragraphShade=='transparent') {
this._changedProps.get_Shade().put_Value(shd_Nil); this._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} else { } else {
this._changedProps.get_Shade().put_Value(shd_Clear); this._changedProps.get_Shade().put_Value(Asc.c_oAscShdClear);
this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade)); this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade));
} }
} }
......
...@@ -81,7 +81,7 @@ define([ ...@@ -81,7 +81,7 @@ define([
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this._originalLook = new CTablePropLook(); this._originalLook = new Asc.CTablePropLook();
var fullwidth = 218; var fullwidth = 218;
this._originalProps = null; this._originalProps = null;
...@@ -345,8 +345,8 @@ define([ ...@@ -345,8 +345,8 @@ define([
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) { onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var look = (this._originalLook) ? this._originalLook : new CTablePropLook(); var look = (this._originalLook) ? this._originalLook : new Asc.CTablePropLook();
switch (type) { switch (type) {
case 0: case 0:
look.put_FirstRow(field.getValue()=='checked'); look.put_FirstRow(field.getValue()=='checked');
...@@ -375,7 +375,7 @@ define([ ...@@ -375,7 +375,7 @@ define([
onTableTemplateSelect: function(combo, record){ onTableTemplateSelect: function(combo, record){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableStyle(record.get('templateId')); properties.put_TableStyle(record.get('templateId'));
this.api.tblApply(properties); this.api.tblApply(properties);
} }
...@@ -384,7 +384,7 @@ define([ ...@@ -384,7 +384,7 @@ define([
onBtnWrapClick: function(btn, e) { onBtnWrapClick: function(btn, e) {
if (this.api && btn.pressed && !this._noApply) { if (this.api && btn.pressed && !this._noApply) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableWrap(btn.options.posId); properties.put_TableWrap(btn.options.posId);
if (btn.options.posId == c_tableWrap.TABLE_WRAP_NONE) { if (btn.options.posId == c_tableWrap.TABLE_WRAP_NONE) {
if (this._state.TableAlignment<0) if (this._state.TableAlignment<0)
...@@ -402,7 +402,7 @@ define([ ...@@ -402,7 +402,7 @@ define([
onCheckRepeatRowChange: function(field, newValue, oldValue, eOpts) { onCheckRepeatRowChange: function(field, newValue, oldValue, eOpts) {
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_RowsInHeader((field.getValue()=='checked') ? 1 : 0 ); properties.put_RowsInHeader((field.getValue()=='checked') ? 1 : 0 );
this.api.tblApply(properties); this.api.tblApply(properties);
} }
...@@ -414,8 +414,8 @@ define([ ...@@ -414,8 +414,8 @@ define([
this.CellColor = {Value: 1, Color: color}; this.CellColor = {Value: 1, Color: color};
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var background = new CBackground(); var background = new Asc.CBackground();
properties.put_CellsBackground(background); properties.put_CellsBackground(background);
if (this.CellColor.Color=='transparent') { if (this.CellColor.Color=='transparent') {
...@@ -443,7 +443,7 @@ define([ ...@@ -443,7 +443,7 @@ define([
onBtnBordersClick: function(btn, eOpts){ onBtnBordersClick: function(btn, eOpts){
this._UpdateBordersStyle(btn.options.strId, true); this._UpdateBordersStyle(btn.options.strId, true);
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders); properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true); properties.put_CellSelect(true);
this.api.tblApply(properties); this.api.tblApply(properties);
...@@ -514,7 +514,7 @@ define([ ...@@ -514,7 +514,7 @@ define([
if (props ) if (props )
{ {
this._originalProps = new CTableProp(props); this._originalProps = new Asc.CTableProp(props);
this._originalProps.put_CellSelect(true); this._originalProps.put_CellSelect(true);
this._TblWrapStyleChanged(props.get_TableWrap()); this._TblWrapStyleChanged(props.get_TableWrap());
...@@ -600,7 +600,7 @@ define([ ...@@ -600,7 +600,7 @@ define([
if (background.get_Value()==0) { if (background.get_Value()==0) {
var color = background.get_Color(); var color = background.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
...@@ -647,7 +647,7 @@ define([ ...@@ -647,7 +647,7 @@ define([
}, },
_UpdateBordersStyle: function(border) { _UpdateBordersStyle: function(border) {
this.CellBorders = new CBorders(); this.CellBorders = new Asc.CBorders();
var updateBorders = this.CellBorders; var updateBorders = this.CellBorders;
var visible = (border != ''); var visible = (border != '');
...@@ -757,7 +757,7 @@ define([ ...@@ -757,7 +757,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new DE.Views.TableSettingsAdvanced( (new DE.Views.TableSettingsAdvanced(
{ {
tableStylerRows: (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2, tableStylerRows: (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2,
......
...@@ -369,6 +369,7 @@ ...@@ -369,6 +369,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>
......
...@@ -50,7 +50,7 @@ Ext.define('DE.controller.Main', { ...@@ -50,7 +50,7 @@ Ext.define('DE.controller.Main', {
var api = this.api, var api = this.api,
app = this.getApplication(); app = this.getApplication();
api = new asc_docs_api("id-sdkeditor"); api = new Asc.asc_docs_api("id-sdkeditor");
api.SetMobileVersion(true); api.SetMobileVersion(true);
api.CreateComponents(); api.CreateComponents();
api.asc_SetFontsPath("../../../../sdkjs/fonts/"); api.asc_SetFontsPath("../../../../sdkjs/fonts/");
...@@ -182,15 +182,15 @@ Ext.define('DE.controller.Main', { ...@@ -182,15 +182,15 @@ Ext.define('DE.controller.Main', {
var text = ''; var text = '';
switch (id) { switch (id) {
case c_oAscAsyncAction['Save']: case Asc.c_oAscAsyncAction['Save']:
text = this.saveText; text = this.saveText;
break; break;
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = this.printText; text = this.printText;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
Ext.Viewport.setMasked({ Ext.Viewport.setMasked({
xtype : 'loadmask', xtype : 'loadmask',
message : text message : text
...@@ -212,63 +212,63 @@ Ext.define('DE.controller.Main', { ...@@ -212,63 +212,63 @@ Ext.define('DE.controller.Main', {
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText; config.message = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText; config.message = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText; config.message = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText; config.message = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage; config.message = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage; config.message = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage; config.message = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.SplitCellMaxRows: case Asc.c_oAscError.ID.SplitCellMaxRows:
config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellMaxCols: case Asc.c_oAscError.ID.SplitCellMaxCols:
config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellRowsDivider: case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.message = this.splitDividerErrorText.replace('%1', errData.get_Value()); config.message = this.splitDividerErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.message = this.errorKeyEncrypt; config.message = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.message = this.errorKeyExpire; config.message = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.message = this.errorUsersExceed; config.message = this.errorUsersExceed;
break; break;
case c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.message = this.errorCoAuthoringDisconnect; config.message = this.errorCoAuthoringDisconnect;
break; break;
case c_oAscError.ID.MobileUnexpectedCharCount: case Asc.c_oAscError.ID.MobileUnexpectedCharCount:
config.message = this.errorDocTooBig; config.message = this.errorDocTooBig;
config.out = true; config.out = true;
break; break;
...@@ -280,7 +280,7 @@ Ext.define('DE.controller.Main', { ...@@ -280,7 +280,7 @@ Ext.define('DE.controller.Main', {
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.message); Common.Gateway.reportError(id, config.message);
...@@ -340,7 +340,7 @@ Ext.define('DE.controller.Main', { ...@@ -340,7 +340,7 @@ Ext.define('DE.controller.Main', {
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.DOCX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
}, },
_hideLoadSplash: function(){ _hideLoadSplash: function(){
......
...@@ -80,7 +80,7 @@ Ext.define('DE.controller.tablet.panel.Insert', { ...@@ -80,7 +80,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
imgProperty = new CImgProperty(); imgProperty = new CImgProperty();
mpImg.render(canvas, { maxWidth: 1024, maxHeight: 1024 }); mpImg.render(canvas, { maxWidth: 1024, maxHeight: 1024 });
imgProperty.put_WrappingStyle((input == inputInlineMedia) ? c_oAscWrapStyle2.Inline : c_oAscWrapStyle2.Square); imgProperty.put_WrappingStyle((input == inputInlineMedia) ? Asc.c_oAscWrapStyle2.Inline : Asc.c_oAscWrapStyle2.Square);
me.api.AddImageUrl(canvas.toDataURL(), imgProperty); me.api.AddImageUrl(canvas.toDataURL(), imgProperty);
...@@ -231,7 +231,7 @@ Ext.define('DE.controller.tablet.panel.Insert', { ...@@ -231,7 +231,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
if (selectedElements && selectedElements.length > 0) { if (selectedElements && selectedElements.length > 0) {
var elementType = selectedElements[0].get_ObjectType(); var elementType = selectedElements[0].get_ObjectType();
if (c_oAscTypeSelectElement.Table == elementType) { if (Asc.c_oAscTypeSelectElement.Table == elementType) {
type === 'row' type === 'row'
? this.api.addRowBelow() ? this.api.addRowBelow()
: type === 'column' : type === 'column'
......
...@@ -350,6 +350,7 @@ ...@@ -350,6 +350,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>
......
...@@ -413,6 +413,7 @@ ...@@ -413,6 +413,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>
......
...@@ -206,7 +206,7 @@ var ApplicationController = new(function(){ ...@@ -206,7 +206,7 @@ var ApplicationController = new(function(){
var text = ''; var text = '';
switch (id) switch (id)
{ {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...'; text = 'Downloading document...';
break; break;
default: default:
...@@ -214,7 +214,7 @@ var ApplicationController = new(function(){ ...@@ -214,7 +214,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text); $('#id-loadmask .cmd-loader-title').html(text);
showMask(); showMask();
} }
...@@ -351,19 +351,19 @@ var ApplicationController = new(function(){ ...@@ -351,19 +351,19 @@ var ApplicationController = new(function(){
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText; message = me.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText; message = me.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText; message = me.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText; message = me.downloadErrorText;
break; break;
...@@ -372,7 +372,7 @@ var ApplicationController = new(function(){ ...@@ -372,7 +372,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, message); Common.Gateway.reportError(id, message);
...@@ -423,7 +423,7 @@ var ApplicationController = new(function(){ ...@@ -423,7 +423,7 @@ var ApplicationController = new(function(){
} }
function onDownloadAs() { function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.PPTX, true); if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
} }
// Helpers // Helpers
// ------------------------- // -------------------------
...@@ -704,7 +704,7 @@ var ApplicationController = new(function(){ ...@@ -704,7 +704,7 @@ var ApplicationController = new(function(){
}, 2000); }, 2000);
}); });
api = new asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api("editor_sdk");
if (api){ if (api){
api.CreateComponents(); api.CreateComponents();
......
...@@ -45,8 +45,8 @@ define([ ...@@ -45,8 +45,8 @@ define([
menu: undefined, menu: undefined,
formats: [[ formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF}, {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'PPTX', imgCls: 'pptx', type: c_oAscFileType.PPTX} {name: 'PPTX', imgCls: 'pptx', type: Asc.c_oAscFileType.PPTX}
]], ]],
......
...@@ -199,7 +199,7 @@ define([ ...@@ -199,7 +199,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) { if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage(); imgsizeOriginal = me.api.get_OriginalSizeImage();
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment