Commit e054f11c authored by Alexander Trofimov's avatar Alexander Trofimov

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

Feature/remove global variables
parents 201f381c a01ec32e
...@@ -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>
......
...@@ -50,7 +50,7 @@ define([ ...@@ -50,7 +50,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'),
...@@ -259,10 +259,10 @@ define([ ...@@ -259,10 +259,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();
...@@ -474,10 +474,10 @@ define([ ...@@ -474,10 +474,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;
......
...@@ -53,8 +53,8 @@ define([ ...@@ -53,8 +53,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);
......
...@@ -196,7 +196,7 @@ define([ ...@@ -196,7 +196,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) {
...@@ -223,7 +223,7 @@ define([ ...@@ -223,7 +223,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) {
...@@ -250,13 +250,13 @@ define([ ...@@ -250,13 +250,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 + ', ');
...@@ -298,7 +298,7 @@ define([ ...@@ -298,7 +298,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) + ', ');
......
...@@ -225,7 +225,7 @@ Common.Utils.ThemeColor = new(function() { ...@@ -225,7 +225,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);
......
...@@ -111,7 +111,7 @@ define([ ...@@ -111,7 +111,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);
......
...@@ -261,7 +261,7 @@ define([ ...@@ -261,7 +261,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
}) })
) )
}); });
...@@ -837,7 +837,7 @@ define([ ...@@ -837,7 +837,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({
...@@ -987,7 +987,7 @@ define([ ...@@ -987,7 +987,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
})) }))
}); });
......
...@@ -56,12 +56,12 @@ define([ ...@@ -56,12 +56,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 || [
...@@ -69,7 +69,7 @@ define([ ...@@ -69,7 +69,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>',
'<% } %>', '<% } %>',
...@@ -287,7 +287,7 @@ define([ ...@@ -287,7 +287,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>
......
...@@ -216,7 +216,7 @@ var ApplicationController = new(function(){ ...@@ -216,7 +216,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:
...@@ -224,7 +224,7 @@ var ApplicationController = new(function(){ ...@@ -224,7 +224,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();
} }
...@@ -355,19 +355,19 @@ var ApplicationController = new(function(){ ...@@ -355,19 +355,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;
...@@ -376,7 +376,7 @@ var ApplicationController = new(function(){ ...@@ -376,7 +376,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);
...@@ -427,7 +427,7 @@ var ApplicationController = new(function(){ ...@@ -427,7 +427,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
...@@ -704,7 +704,7 @@ var ApplicationController = new(function(){ ...@@ -704,7 +704,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();
......
...@@ -238,7 +238,7 @@ define([ ...@@ -238,7 +238,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,
...@@ -273,10 +273,10 @@ define([ ...@@ -273,10 +273,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);
} }
......
...@@ -125,7 +125,7 @@ define([ ...@@ -125,7 +125,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)
...@@ -314,7 +314,7 @@ define([ ...@@ -314,7 +314,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();
...@@ -357,13 +357,13 @@ define([ ...@@ -357,13 +357,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;
} }
} }
......
...@@ -73,7 +73,7 @@ define([ ...@@ -73,7 +73,7 @@ define([
}, },
prstyle: undefined, prstyle: undefined,
prcontrolsdisable:undefined, prcontrolsdisable:undefined,
dropcap: c_oAscDropCap.None, dropcap: Asc.c_oAscDropCap.None,
clrhighlight: undefined, clrhighlight: undefined,
clrtext: undefined, clrtext: undefined,
pgsize: [0, 0], pgsize: [0, 0],
...@@ -578,30 +578,30 @@ define([ ...@@ -578,30 +578,30 @@ define([
type = selectedObjects[i].get_ObjectType(); type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue(); pr = selectedObjects[i].get_ObjectValue();
if (type === c_oAscTypeSelectElement.Paragraph) { if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked(); paragraph_locked = pr.get_Locked();
can_add_table = pr.get_CanAddTable(); can_add_table = pr.get_CanAddTable();
can_add_image = pr.get_CanAddImage(); can_add_image = pr.get_CanAddImage();
frame_pr = pr; frame_pr = pr;
sh = pr.get_Shade(); sh = pr.get_Shade();
} else if (type === c_oAscTypeSelectElement.Header) { } else if (type === Asc.c_oAscTypeSelectElement.Header) {
header_locked = pr.get_Locked(); header_locked = pr.get_Locked();
in_header = true; in_header = true;
} else if (type === c_oAscTypeSelectElement.Image) { } else if (type === Asc.c_oAscTypeSelectElement.Image) {
in_image = in_header = true; in_image = in_header = true;
if (pr && pr.get_ChartProperties()) if (pr && pr.get_ChartProperties())
in_chart = true; in_chart = true;
} else if (type === c_oAscTypeSelectElement.Math) { } else if (type === Asc.c_oAscTypeSelectElement.Math) {
in_equation = true; in_equation = true;
if (c_oAscMathInterfaceType.Common === pr.get_Type()) if (Asc.c_oAscMathInterfaceType.Common === pr.get_Type())
btn_eq_state = true; btn_eq_state = true;
} }
if (type === c_oAscTypeSelectElement.Table || type === c_oAscTypeSelectElement.Header || type === c_oAscTypeSelectElement.Image) { if (type === Asc.c_oAscTypeSelectElement.Table || type === Asc.c_oAscTypeSelectElement.Header || type === Asc.c_oAscTypeSelectElement.Image) {
enable_dropcap = false; enable_dropcap = false;
} }
if (enable_dropcap!==false && type == c_oAscTypeSelectElement.Paragraph) if (enable_dropcap!==false && type == Asc.c_oAscTypeSelectElement.Paragraph)
enable_dropcap = true; enable_dropcap = true;
} }
...@@ -631,11 +631,11 @@ define([ ...@@ -631,11 +631,11 @@ define([
if (enable_dropcap && frame_pr) { if (enable_dropcap && frame_pr) {
var value = frame_pr.get_FramePr(), var value = frame_pr.get_FramePr(),
drop_value = c_oAscDropCap.None; drop_value = Asc.c_oAscDropCap.None;
if (value!==undefined) { if (value!==undefined) {
drop_value = value.get_DropCap(); drop_value = value.get_DropCap();
enable_dropcap = ( drop_value === c_oAscDropCap.Drop || drop_value === c_oAscDropCap.Margin); enable_dropcap = ( drop_value === Asc.c_oAscDropCap.Drop || drop_value === Asc.c_oAscDropCap.Margin);
disable_dropcapadv = false; disable_dropcapadv = false;
} else { } else {
enable_dropcap = frame_pr.get_CanAddDropCap(); enable_dropcap = frame_pr.get_CanAddDropCap();
...@@ -1260,7 +1260,7 @@ define([ ...@@ -1260,7 +1260,7 @@ define([
handler: handlerDlg handler: handlerDlg
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
...@@ -1269,7 +1269,7 @@ define([ ...@@ -1269,7 +1269,7 @@ define([
var selectedElements = me.api.getSelectedElements(); var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) { _.each(selectedElements, function(el, i) {
if (selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.Hyperlink) if (selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink)
props = selectedElements[i].get_ObjectValue(); props = selectedElements[i].get_ObjectValue();
}); });
} }
...@@ -1519,13 +1519,13 @@ define([ ...@@ -1519,13 +1519,13 @@ define([
this._state.dropcap = undefined; this._state.dropcap = undefined;
if (this.api && item.checked) { if (this.api && item.checked) {
if (item.value === c_oAscDropCap.None) { if (item.value === Asc.c_oAscDropCap.None) {
this.api.removeDropcap(true); this.api.removeDropcap(true);
} else { } else {
var SelectedObjects = this.api.getSelectedElements(), var SelectedObjects = this.api.getSelectedElements(),
i = -1; i = -1;
while (++i < SelectedObjects.length) { while (++i < SelectedObjects.length) {
if (SelectedObjects[i].get_ObjectType() == c_oAscTypeSelectElement.Paragraph) { if (SelectedObjects[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) {
var pr = SelectedObjects[i].get_ObjectValue(); var pr = SelectedObjects[i].get_ObjectValue();
var value = pr.get_FramePr(); var value = pr.get_FramePr();
if (!_.isUndefined(value)) { if (!_.isUndefined(value)) {
...@@ -1534,7 +1534,7 @@ define([ ...@@ -1534,7 +1534,7 @@ define([
value.put_DropCap(item.value); value.put_DropCap(item.value);
this.api.put_FramePr(value); this.api.put_FramePr(value);
} else { } else {
this.api.asc_addDropCap((item.value === c_oAscDropCap.Drop)); this.api.asc_addDropCap((item.value === Asc.c_oAscDropCap.Drop));
} }
break; break;
} }
...@@ -1552,9 +1552,9 @@ define([ ...@@ -1552,9 +1552,9 @@ define([
var index = -1; var index = -1;
switch (v) { switch (v) {
case c_oAscDropCap.None: index = 0; break; case Asc.c_oAscDropCap.None: index = 0; break;
case c_oAscDropCap.Drop: index = 1; break; case Asc.c_oAscDropCap.Drop: index = 1; break;
case c_oAscDropCap.Margin: index = 2; break; case Asc.c_oAscDropCap.Margin: index = 2; break;
} }
if (index < 0) if (index < 0)
this._clearChecked(this.toolbar.btnDropCap.menu); this._clearChecked(this.toolbar.btnDropCap.menu);
...@@ -1586,7 +1586,7 @@ define([ ...@@ -1586,7 +1586,7 @@ define([
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i < selectedElementsLenght; i++) { for (var i = 0; i < selectedElementsLenght; i++) {
if (selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.Paragraph) { if (selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) {
props = selectedElements[i].get_ObjectValue(); props = selectedElements[i].get_ObjectValue();
break; break;
} }
...@@ -1606,7 +1606,7 @@ define([ ...@@ -1606,7 +1606,7 @@ define([
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {
me.borderAdvancedProps = value.borderProps; me.borderAdvancedProps = value.borderProps;
if (value.paragraphProps && value.paragraphProps.get_DropCap() === c_oAscDropCap.None) { if (value.paragraphProps && value.paragraphProps.get_DropCap() === Asc.c_oAscDropCap.None) {
me.api.removeDropcap(true); me.api.removeDropcap(true);
} else } else
me.api.put_FramePr(value.paragraphProps); me.api.put_FramePr(value.paragraphProps);
...@@ -1625,7 +1625,7 @@ define([ ...@@ -1625,7 +1625,7 @@ define([
this._state.columns = undefined; this._state.columns = undefined;
if (this.api && item.checked) { if (this.api && item.checked) {
var props = new CDocumentColumnsProps(), var props = new Asc.CDocumentColumnsProps(),
cols = item.value, cols = item.value,
def_space = 12.5; def_space = 12.5;
props.put_EqualWidth(cols<3); props.put_EqualWidth(cols<3);
...@@ -1792,7 +1792,7 @@ define([ ...@@ -1792,7 +1792,7 @@ define([
isParagraph = false; isParagraph = false;
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i <selectedElements.length; i++) { for (var i = 0; i <selectedElements.length; i++) {
if (c_oAscTypeSelectElement.Paragraph == selectedElements[i].get_ObjectType()) { if (Asc.c_oAscTypeSelectElement.Paragraph == selectedElements[i].get_ObjectType()) {
isParagraph = true; break; isParagraph = true; break;
} }
} }
...@@ -2068,10 +2068,10 @@ define([ ...@@ -2068,10 +2068,10 @@ define([
onParagraphColor: function(shd) { onParagraphColor: function(shd) {
var picker = this.toolbar.mnuParagraphColorPicker, clr; var picker = this.toolbar.mnuParagraphColorPicker, clr;
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) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
...@@ -2118,7 +2118,7 @@ define([ ...@@ -2118,7 +2118,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker, clr; var picker = this.toolbar.mnuFontColorPicker, clr;
if (color) { if (color) {
color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME ? color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME ?
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()} : clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()} :
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
} }
......
...@@ -247,9 +247,9 @@ define([ ...@@ -247,9 +247,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));
} }
} }
...@@ -342,8 +342,8 @@ define([ ...@@ -342,8 +342,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));
...@@ -357,8 +357,8 @@ define([ ...@@ -357,8 +357,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));
...@@ -372,8 +372,8 @@ define([ ...@@ -372,8 +372,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));
...@@ -591,9 +591,9 @@ define([ ...@@ -591,9 +591,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'),
...@@ -615,9 +615,9 @@ define([ ...@@ -615,9 +615,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'),
...@@ -634,9 +634,9 @@ define([ ...@@ -634,9 +634,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'),
...@@ -658,9 +658,9 @@ define([ ...@@ -658,9 +658,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'),
...@@ -672,7 +672,7 @@ define([ ...@@ -672,7 +672,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);
...@@ -816,7 +816,7 @@ define([ ...@@ -816,7 +816,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);
}, },
...@@ -824,7 +824,7 @@ define([ ...@@ -824,7 +824,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);
...@@ -912,7 +912,7 @@ define([ ...@@ -912,7 +912,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) {
...@@ -937,9 +937,9 @@ define([ ...@@ -937,9 +937,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);
...@@ -972,10 +972,10 @@ define([ ...@@ -972,10 +972,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());
...@@ -1014,7 +1014,7 @@ define([ ...@@ -1014,7 +1014,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' ||
...@@ -1036,7 +1036,7 @@ define([ ...@@ -1036,7 +1036,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);
......
...@@ -52,15 +52,15 @@ define([ ...@@ -52,15 +52,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}
]], ]],
......
...@@ -118,7 +118,7 @@ define([ ...@@ -118,7 +118,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));
...@@ -160,7 +160,7 @@ define([ ...@@ -160,7 +160,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) )
......
...@@ -68,7 +68,7 @@ define([ ...@@ -68,7 +68,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,
...@@ -84,13 +84,13 @@ define([ ...@@ -84,13 +84,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({
...@@ -252,17 +252,17 @@ define([ ...@@ -252,17 +252,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);
} }
...@@ -320,7 +320,7 @@ define([ ...@@ -320,7 +320,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();
......
...@@ -100,9 +100,9 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -100,9 +100,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'),
...@@ -111,7 +111,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -111,7 +111,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({
...@@ -183,13 +183,13 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -183,13 +183,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';
} }
...@@ -244,7 +244,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template', ...@@ -244,7 +244,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');
......
...@@ -209,9 +209,9 @@ define([ ...@@ -209,9 +209,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),
...@@ -524,11 +524,11 @@ define([ ...@@ -524,11 +524,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
...@@ -659,14 +659,14 @@ define([ ...@@ -659,14 +659,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);
} }
...@@ -677,7 +677,7 @@ define([ ...@@ -677,7 +677,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,
...@@ -752,7 +752,7 @@ define([ ...@@ -752,7 +752,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);
......
...@@ -364,10 +364,10 @@ define([ ...@@ -364,10 +364,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());
...@@ -436,7 +436,7 @@ define([ ...@@ -436,7 +436,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,
......
...@@ -641,10 +641,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem ...@@ -641,10 +641,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());
...@@ -913,9 +913,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem ...@@ -913,9 +913,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));
} }
} }
......
...@@ -89,7 +89,7 @@ define([ ...@@ -89,7 +89,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;
...@@ -353,8 +353,8 @@ define([ ...@@ -353,8 +353,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');
...@@ -383,7 +383,7 @@ define([ ...@@ -383,7 +383,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);
} }
...@@ -392,7 +392,7 @@ define([ ...@@ -392,7 +392,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)
...@@ -410,7 +410,7 @@ define([ ...@@ -410,7 +410,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);
} }
...@@ -422,8 +422,8 @@ define([ ...@@ -422,8 +422,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') {
...@@ -451,7 +451,7 @@ define([ ...@@ -451,7 +451,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);
...@@ -522,7 +522,7 @@ define([ ...@@ -522,7 +522,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());
...@@ -608,7 +608,7 @@ define([ ...@@ -608,7 +608,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())};
...@@ -655,7 +655,7 @@ define([ ...@@ -655,7 +655,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 != '');
...@@ -765,7 +765,7 @@ define([ ...@@ -765,7 +765,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>
......
...@@ -58,7 +58,7 @@ Ext.define('DE.controller.Main', { ...@@ -58,7 +58,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/");
...@@ -190,15 +190,15 @@ Ext.define('DE.controller.Main', { ...@@ -190,15 +190,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
...@@ -220,63 +220,63 @@ Ext.define('DE.controller.Main', { ...@@ -220,63 +220,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;
...@@ -288,7 +288,7 @@ Ext.define('DE.controller.Main', { ...@@ -288,7 +288,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);
...@@ -348,7 +348,7 @@ Ext.define('DE.controller.Main', { ...@@ -348,7 +348,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(){
......
...@@ -88,7 +88,7 @@ Ext.define('DE.controller.tablet.panel.Insert', { ...@@ -88,7 +88,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);
...@@ -239,7 +239,7 @@ Ext.define('DE.controller.tablet.panel.Insert', { ...@@ -239,7 +239,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>
......
...@@ -214,7 +214,7 @@ var ApplicationController = new(function(){ ...@@ -214,7 +214,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:
...@@ -222,7 +222,7 @@ var ApplicationController = new(function(){ ...@@ -222,7 +222,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();
} }
...@@ -359,19 +359,19 @@ var ApplicationController = new(function(){ ...@@ -359,19 +359,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;
...@@ -380,7 +380,7 @@ var ApplicationController = new(function(){ ...@@ -380,7 +380,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);
...@@ -431,7 +431,7 @@ var ApplicationController = new(function(){ ...@@ -431,7 +431,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
// ------------------------- // -------------------------
...@@ -712,7 +712,7 @@ var ApplicationController = new(function(){ ...@@ -712,7 +712,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();
......
...@@ -280,17 +280,17 @@ define([ ...@@ -280,17 +280,17 @@ 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.Shape: case Asc.c_oAscTypeSelectElement.Shape:
return Common.Utils.documentSettingsType.Shape; return Common.Utils.documentSettingsType.Shape;
case c_oAscTypeSelectElement.Slide: case Asc.c_oAscTypeSelectElement.Slide:
return Common.Utils.documentSettingsType.Slide; return Common.Utils.documentSettingsType.Slide;
case c_oAscTypeSelectElement.Chart: case Asc.c_oAscTypeSelectElement.Chart:
return Common.Utils.documentSettingsType.Chart; return Common.Utils.documentSettingsType.Chart;
} }
} }
......
...@@ -461,9 +461,9 @@ define([ ...@@ -461,9 +461,9 @@ define([
btnVerticalAlign = this.toolbar.btnVerticalAlign; btnVerticalAlign = this.toolbar.btnVerticalAlign;
switch (v) { switch (v) {
case c_oAscVerticalTextAlign.TEXT_ALIGN_TOP: index = 0; align = 'btn-align-top'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP: index = 0; align = 'btn-align-top'; break;
case c_oAscVerticalTextAlign.TEXT_ALIGN_CTR: index = 1; align = 'btn-align-middle'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR: index = 1; align = 'btn-align-middle'; break;
case c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break;
default: index = -255; align = 'btn-align-middle'; break; default: index = -255; align = 'btn-align-middle'; break;
} }
...@@ -567,14 +567,14 @@ define([ ...@@ -567,14 +567,14 @@ define([
while (++i < selectedObjects.length) { while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType(); type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue(); pr = selectedObjects[i].get_ObjectValue();
if (type == c_oAscTypeSelectElement.Paragraph) { if (type == Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked(); paragraph_locked = pr.get_Locked();
no_paragraph = false; no_paragraph = false;
no_object = false; no_object = false;
} else if (type == c_oAscTypeSelectElement.Slide) { } else if (type == Asc.c_oAscTypeSelectElement.Slide) {
slide_deleted = pr.get_LockDelete(); slide_deleted = pr.get_LockDelete();
slide_layout_lock = pr.get_LockLayout(); slide_layout_lock = pr.get_LockLayout();
} else if (type == c_oAscTypeSelectElement.Image || type == c_oAscTypeSelectElement.Shape || type == c_oAscTypeSelectElement.Chart || type == c_oAscTypeSelectElement.Table) { } else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) {
shape_locked = pr.get_Locked(); shape_locked = pr.get_Locked();
no_object = false; no_object = false;
} }
...@@ -1187,7 +1187,7 @@ define([ ...@@ -1187,7 +1187,7 @@ define([
slides: _arr slides: _arr
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
...@@ -1520,7 +1520,7 @@ define([ ...@@ -1520,7 +1520,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker; var picker = this.toolbar.mnuFontColorPicker;
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else } else
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
......
...@@ -108,31 +108,31 @@ define([ ...@@ -108,31 +108,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });
...@@ -249,7 +249,7 @@ define([ ...@@ -249,7 +249,7 @@ define([
this.disableControls(this._locked); this.disableControls(this._locked);
if (props){ if (props){
this._originalProps = new CAscChartProp(props); this._originalProps = new Asc.CAscChartProp(props);
this._noApply = true; this._noApply = true;
var value = props.get_SeveralCharts() || this._locked; var value = props.get_SeveralCharts() || this._locked;
...@@ -363,7 +363,7 @@ define([ ...@@ -363,7 +363,7 @@ define([
this._state.ChartType = -1; this._state.ChartType = -1;
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.changeType(rawData.type); props.changeType(rawData.type);
this.api.ChartApply(props); this.api.ChartApply(props);
} }
...@@ -392,7 +392,7 @@ define([ ...@@ -392,7 +392,7 @@ define([
btnIconEl.css('background-image', style); btnIconEl.css('background-image', style);
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.putStyle(rawData.data); props.putStyle(rawData.data);
this.api.ChartApply(props); this.api.ChartApply(props);
} }
...@@ -450,7 +450,7 @@ define([ ...@@ -450,7 +450,7 @@ define([
this.spnHeight.setValue(h, true); this.spnHeight.setValue(h, true);
} }
if (this.api) { if (this.api) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w)); props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h)); props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props); this.api.ChartApply(props);
...@@ -471,7 +471,7 @@ define([ ...@@ -471,7 +471,7 @@ define([
this.spnWidth.setValue(w, true); this.spnWidth.setValue(w, true);
} }
if (this.api) { if (this.api) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w)); props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h)); props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props); this.api.ChartApply(props);
......
...@@ -53,8 +53,8 @@ define([ ...@@ -53,8 +53,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}
]], ]],
......
...@@ -159,7 +159,7 @@ define([ ...@@ -159,7 +159,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
}); });
me.radioNext = new Common.UI.RadioBox({ me.radioNext = new Common.UI.RadioBox({
...@@ -237,7 +237,7 @@ define([ ...@@ -237,7 +237,7 @@ define([
getSettings: function () { getSettings: function () {
var me = this, var me = this,
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
var def_display = ''; var def_display = '';
if (me.cmbLinkType.getValue() == c_oHyperlinkType.InternalLink) { if (me.cmbLinkType.getValue() == c_oHyperlinkType.InternalLink) {
var url = "ppaction://hlink"; var url = "ppaction://hlink";
......
...@@ -207,7 +207,7 @@ define([ ...@@ -207,7 +207,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();
......
...@@ -219,7 +219,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem ...@@ -219,7 +219,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
if (this.spnWidth.getValue()!=='') if (this.spnWidth.getValue()!=='')
properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
var Position = new CPosition(); var Position = new Asc.CPosition();
if (this.spnX.getValue() !== '') if (this.spnX.getValue() !== '')
Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue())); Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue()));
if (this.spnY.getValue() !== '') if (this.spnY.getValue() !== '')
......
...@@ -327,7 +327,7 @@ define([ ...@@ -327,7 +327,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 PE.Views.ParagraphSettingsAdvanced( (new PE.Views.ParagraphSettingsAdvanced(
{ {
paragraphProps: elValue, paragraphProps: elValue,
......
...@@ -354,6 +354,7 @@ ...@@ -354,6 +354,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>
......
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