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

Feature/remove global variables
This commit is contained in:
Alexander Trofimov 2016-04-07 13:12:16 +04:00
commit e054f11cd7
86 changed files with 2144 additions and 2138 deletions

View file

@ -16,7 +16,7 @@
<script type="text/javascript" src="../../../../sdkjs/word/sdk-all.js"></script>
<div id="editor_sdk">
<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.LoadFontsFromServer();
</script>

View file

@ -50,7 +50,7 @@ define([
Common.UI.ComboBoxFonts = Common.UI.ComboBox.extend((function() {
var iconWidth = 302,
iconHeight = FONT_THUMBNAIL_HEIGHT || 26,
iconHeight = Asc.FONT_THUMBNAIL_HEIGHT || 26,
isRetina = window.devicePixelRatio > 1,
thumbCanvas = document.createElement('canvas'),
thumbContext = thumbCanvas.getContext('2d'),
@ -259,10 +259,10 @@ define([
if (isRetina) {
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 {
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();
@ -474,10 +474,10 @@ define([
if (isRetina) {
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 {
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;

View file

@ -53,8 +53,8 @@ define([
// NOTE: временное решение
function buildCommentData () {
if (typeof asc_CCommentDataWord !== 'undefined') {
return new asc_CCommentDataWord(null);
if (typeof Asc.asc_CCommentDataWord !== 'undefined') {
return new Asc.asc_CCommentDataWord(null);
}
return new asc_CCommentData(null);

View file

@ -196,7 +196,7 @@ define([
value = item.get_Value(),
settings = false;
switch (item.get_Type()) {
case c_oAscRevisionsChangeType.TextAdd:
case Asc.c_oAscRevisionsChangeType.TextAdd:
changetext = me.textInserted;
if (typeof value == 'object') {
_.each(value, function(obj) {
@ -223,7 +223,7 @@ define([
changetext += (' ' + value);
}
break;
case c_oAscRevisionsChangeType.TextRem:
case Asc.c_oAscRevisionsChangeType.TextRem:
changetext = me.textDeleted;
if (typeof value == 'object') {
_.each(value, function(obj) {
@ -250,13 +250,13 @@ define([
changetext += (' ' + value);
}
break;
case c_oAscRevisionsChangeType.ParaAdd:
case Asc.c_oAscRevisionsChangeType.ParaAdd:
changetext = me.textParaInserted;
break;
case c_oAscRevisionsChangeType.ParaRem:
case Asc.c_oAscRevisionsChangeType.ParaRem:
changetext = me.textParaDeleted;
break;
case c_oAscRevisionsChangeType.TextPr:
case Asc.c_oAscRevisionsChangeType.TextPr:
changetext = '<b>' + me.textFormatted;
if (value.Get_Bold() !== undefined)
proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', ');
@ -298,7 +298,7 @@ define([
changetext += '</b>';
changetext += proptext;
break;
case c_oAscRevisionsChangeType.ParaPr:
case Asc.c_oAscRevisionsChangeType.ParaPr:
changetext = '<b>' + me.textParaFormatted;
if (value.Get_ContextualSpacing())
proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', ');

View file

@ -225,7 +225,7 @@ Common.Utils.ThemeColor = new(function() {
if(color.length==3) color=color.replace(/(.)/g,'$1$1');
color=parseInt(color,16);
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_g((color&0xff00)>>8);
c.put_b(color&0xff);

View file

@ -111,7 +111,7 @@ define([
render: function(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.panelUsers = $('#chat-users', this.el);

View file

@ -261,7 +261,7 @@ define([
textEdit: t.textEdit,
textReply: t.textReply,
textClose: t.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
})
)
});
@ -837,7 +837,7 @@ define([
textAddComment: me.textAddComment,
textCancel: me.textCancel,
textEnterCommentHint: me.textEnterCommentHint,
maxCommLength: c_oAscMaxCellOrCommentLength
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
}));
this.buttonAddCommentToDoc = new Common.UI.Button({
@ -987,7 +987,7 @@ define([
textEdit: me.textEdit,
textReply: me.textReply,
textClose: me.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
}))
});

View file

@ -56,12 +56,12 @@ define([
_.extend(_options, {
closable: false,
width : 250,
height : (options.type == c_oAscAdvancedOptionsID.CSV) ? 205 : 155,
height : (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 205 : 155,
contentWidth : 390,
header : true,
cls : 'open-dlg',
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);
this.template = options.template || [
@ -69,7 +69,7 @@ define([
'<div class="content-panel" >',
'<label class="header">' + t.txtEncoding + '</label>',
'<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>',
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>',
'<% } %>',
@ -287,7 +287,7 @@ define([
});
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({
el: $('#id-delimiters-combo', this.$window),
menuStyle: 'min-width: 110px;',

View file

@ -433,6 +433,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -216,7 +216,7 @@ var ApplicationController = new(function(){
var text = '';
switch (id)
{
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...';
break;
default:
@ -224,7 +224,7 @@ var ApplicationController = new(function(){
break;
}
if (type == c_oAscAsyncActionType['BlockInteraction']) {
if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text);
showMask();
}
@ -355,19 +355,19 @@ var ApplicationController = new(function(){
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText;
break;
@ -376,7 +376,7 @@ var ApplicationController = new(function(){
break;
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, message);
@ -427,7 +427,7 @@ var ApplicationController = new(function(){
}
function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.DOCX, true);
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
}
// Helpers
@ -704,7 +704,7 @@ var ApplicationController = new(function(){
});
window["flat_desine"] = true;
api = new asc_docs_api("editor_sdk");
api = new Asc.asc_docs_api("editor_sdk");
if (api){
api.CreateComponents();

View file

@ -238,7 +238,7 @@ define([
clickSaveAsFormat: function(menu, format) {
if (menu) {
if (format == c_oAscFileType.TXT) {
if (format == Asc.c_oAscFileType.TXT) {
Common.UI.warning({
closable: false,
title: this.notcriticalErrorTitle,
@ -273,10 +273,10 @@ define([
value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
switch(value) {
case 'all': value = c_oAscCollaborativeMarksShowType.All; break;
case 'none': value = c_oAscCollaborativeMarksShowType.None; break;
case 'last': value = c_oAscCollaborativeMarksShowType.LastChanges; break;
default: value = (fast_coauth) ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges;
case 'all': value = Asc.c_oAscCollaborativeMarksShowType.All; break;
case 'none': value = Asc.c_oAscCollaborativeMarksShowType.None; break;
case 'last': value = Asc.c_oAscCollaborativeMarksShowType.LastChanges; break;
default: value = (fast_coauth) ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges;
}
this.api.SetCollaborativeMarksShowType(value);
}

View file

@ -111,7 +111,7 @@ define([
// Initialize api
this.api = new asc_docs_api("editor_sdk");
this.api = new Asc.asc_docs_api("editor_sdk");
if (this.api){
switch (value) {
@ -324,7 +324,7 @@ define([
onDownloadAs: function() {
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
(type && typeof type[1] === 'string') ? this.api.asc_DownloadOrigin(true) : this.api.asc_DownloadAs(c_oAscFileType.DOCX, true);
(type && typeof type[1] === 'string') ? this.api.asc_DownloadOrigin(true) : this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
},
onProcessMouse: function(data) {
@ -377,8 +377,8 @@ define([
user = new Common.Models.User({
id : version.user.id,
username : version.user.name,
colorval : c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(c_oAscArrUserColors[usersCnt++])
colorval : Asc.c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
});
usersStore.add(user);
}
@ -420,8 +420,8 @@ define([
user = new Common.Models.User({
id : change.user.id,
username : change.user.name,
colorval : c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(c_oAscArrUserColors[usersCnt++])
colorval : Asc.c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
});
usersStore.add(user);
}
@ -533,11 +533,11 @@ define([
this.updateWindowTitle(true);
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
if (action) {
this.setLongActionView(action)
} else {
if (this._state.fastCoauth && this._state.usersCount>1 && id==c_oAscAsyncAction['Save']) {
if (this._state.fastCoauth && this._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
var me = this;
if (me._state.timerSave===undefined)
me._state.timerSave = setInterval(function(){
@ -551,15 +551,15 @@ define([
this.getApplication().getController('Statusbar').setStatusCaption('');
}
action = this.stackLongActions.get({type: c_oAscAsyncActionType.BlockInteraction});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
action ? this.setLongActionView(action) : this.loadMask && this.loadMask.hide();
if (id==c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
if (id==Asc.c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
this.synchronizeChanges();
if ( type == c_oAscAsyncActionType.BlockInteraction &&
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
!( id == c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true);
}
@ -569,73 +569,73 @@ define([
var title = '', text = '';
switch (action.id) {
case c_oAscAsyncAction['Open']:
case Asc.c_oAscAsyncAction['Open']:
title = this.openTitleText;
text = this.openTextText;
break;
case c_oAscAsyncAction['Save']:
case Asc.c_oAscAsyncAction['Save']:
this._state.isSaving = new Date();
title = this.saveTitleText;
text = this.saveTextText;
break;
case c_oAscAsyncAction['LoadDocumentFonts']:
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
title = this.loadFontsTitleText;
text = this.loadFontsTextText;
break;
case c_oAscAsyncAction['LoadDocumentImages']:
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
title = this.loadImagesTitleText;
text = this.loadImagesTextText;
break;
case c_oAscAsyncAction['LoadFont']:
case Asc.c_oAscAsyncAction['LoadFont']:
title = this.loadFontTitleText;
text = this.loadFontTextText;
break;
case c_oAscAsyncAction['LoadImage']:
case Asc.c_oAscAsyncAction['LoadImage']:
title = this.loadImageTitleText;
text = this.loadImageTextText;
break;
case c_oAscAsyncAction['DownloadAs']:
case Asc.c_oAscAsyncAction['DownloadAs']:
title = this.downloadTitleText;
text = this.downloadTextText;
break;
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
title = this.printTitleText;
text = this.printTextText;
break;
case c_oAscAsyncAction['UploadImage']:
case Asc.c_oAscAsyncAction['UploadImage']:
title = this.uploadImageTitleText;
text = this.uploadImageTextText;
break;
case c_oAscAsyncAction['ApplyChanges']:
case Asc.c_oAscAsyncAction['ApplyChanges']:
title = this.applyChangesTitleText;
text = this.applyChangesTextText;
break;
case c_oAscAsyncAction['PrepareToSave']:
case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText;
text = this.savePreparingTitle;
break;
case c_oAscAsyncAction['MailMergeLoadFile']:
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
title = this.mailMergeLoadFileText;
text = this.mailMergeLoadFileTitle;
break;
case c_oAscAsyncAction['DownloadMerge']:
case Asc.c_oAscAsyncAction['DownloadMerge']:
title = this.downloadMergeTitle;
text = this.downloadMergeText;
break;
case c_oAscAsyncAction['SendMailMerge']:
case Asc.c_oAscAsyncAction['SendMailMerge']:
title = this.sendMergeTitle;
text = this.sendMergeText;
break;
@ -651,7 +651,7 @@ define([
break;
}
if (action.type == c_oAscAsyncActionType['BlockInteraction']) {
if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
if (!this.loadMask)
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
@ -674,7 +674,7 @@ define([
data.requestrights = true;
this.appOptions.isEdit= true;
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
var me = this;
setTimeout(function(){
@ -738,7 +738,7 @@ define([
me.api.SetDrawingFreeze(false);
me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
/** coauthoring begin **/
value = Common.localStorage.getItem("de-settings-livecomment");
@ -799,14 +799,14 @@ define([
value = Common.localStorage.getItem((me._state.fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
if (value !== null)
me.api.SetCollaborativeMarksShowType(value == 'all' ? c_oAscCollaborativeMarksShowType.All :
value == 'none' ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges);
me.api.SetCollaborativeMarksShowType(value == 'all' ? Asc.c_oAscCollaborativeMarksShowType.All :
value == 'none' ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
else
me.api.SetCollaborativeMarksShowType(me._state.fastCoauth ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges);
me.api.SetCollaborativeMarksShowType(me._state.fastCoauth ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
} else {
me._state.fastCoauth = false;
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
me.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.None);
me.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None);
}
/** coauthoring end **/
@ -955,7 +955,7 @@ define([
if (!this.appOptions.isEdit) {
this.hidePreloader();
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
},
@ -1066,11 +1066,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) {
me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
// Message on window close
@ -1090,7 +1090,7 @@ define([
onError: function(id, level, errData) {
this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
var config = {
closable: false
@ -1098,79 +1098,79 @@ define([
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.SplitCellMaxRows:
case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellMaxCols:
case Asc.c_oAscError.ID.SplitCellMaxCols:
config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellRowsDivider:
case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
case c_oAscError.ID.CoAuthoringDisconnect:
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect;
break;
case c_oAscError.ID.ConvertationPassword:
case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect;
break;
case c_oAscError.ID.StockChartError:
case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart;
break;
case c_oAscError.ID.DataRangeError:
case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange;
break;
case c_oAscError.ID.Database:
case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection;
break;
case c_oAscError.ID.UserDrop:
case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) {
this._state.lostEditingRights = false;
return;
@ -1179,15 +1179,15 @@ define([
config.msg = this.errorUserDrop;
break;
case c_oAscError.ID.MailMergeLoadFile:
case Asc.c_oAscError.ID.MailMergeLoadFile:
config.msg = this.errorMailMergeLoadFile;
break;
case c_oAscError.ID.MailMergeSaveFile:
case Asc.c_oAscError.ID.MailMergeSaveFile:
config.msg = this.errorMailMergeSaveFile;
break;
case c_oAscError.ID.Warning:
case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer;
break;
@ -1197,7 +1197,7 @@ define([
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, config.msg);
@ -1218,7 +1218,7 @@ define([
config.iconCls = 'warn';
config.buttons = ['ok'];
config.callback = _.bind(function(btn){
if (id == c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) {
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) {
Common.UI.Menu.Manager.hideAll();
if (this.appOptions.isDesktopApp && this.appOptions.isOffline)
this.api.asc_DownloadAs();
@ -1410,7 +1410,7 @@ define([
onUpdateVersion: function(callback) {
var me = this;
me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.warning({
title: me.titleUpdateVersion,
msg: this.errorUpdateVersion,
@ -1418,7 +1418,7 @@ define([
_.defer(function() {
Common.Gateway.updateVersion();
if (callback) callback.call(me);
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
})
}
});
@ -1596,7 +1596,7 @@ define([
onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId();
if (type == c_oAscAdvancedOptionsID.TXT) {
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
var me = this;
var dlg = new Common.Views.OpenDialog({
type: type,
@ -1613,7 +1613,7 @@ define([
this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show();
}
@ -1637,7 +1637,7 @@ define([
this.api.asc_SetFastCollaborative(false);
this._state.fastCoauth = false;
Common.localStorage.setItem("de-settings-showchanges-strict", 'last');
this.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.LastChanges);
this.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.LastChanges);
}
this.fireEvent('editcomplete', this);
}, this)

View file

@ -125,7 +125,7 @@ define([
{
var eltype = SelectedObjects[i].get_ObjectType(),
settingsType = this.getDocumentSettingsType(eltype);
if (eltype === c_oAscTypeSelectElement.Math)
if (eltype === Asc.c_oAscTypeSelectElement.Math)
in_equation = true;
if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined)
@ -314,7 +314,7 @@ define([
},
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].btn.setDisabled(true);
var selectedElements = this.api.getSelectedElements();
@ -357,13 +357,13 @@ define([
getDocumentSettingsType: function(type) {
switch (type) {
case c_oAscTypeSelectElement.Paragraph:
case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Table:
case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table;
case c_oAscTypeSelectElement.Image:
case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image;
case c_oAscTypeSelectElement.Header:
case Asc.c_oAscTypeSelectElement.Header:
return Common.Utils.documentSettingsType.Header;
}
}

View file

@ -73,7 +73,7 @@ define([
},
prstyle: undefined,
prcontrolsdisable:undefined,
dropcap: c_oAscDropCap.None,
dropcap: Asc.c_oAscDropCap.None,
clrhighlight: undefined,
clrtext: undefined,
pgsize: [0, 0],
@ -578,30 +578,30 @@ define([
type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue();
if (type === c_oAscTypeSelectElement.Paragraph) {
if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked();
can_add_table = pr.get_CanAddTable();
can_add_image = pr.get_CanAddImage();
frame_pr = pr;
sh = pr.get_Shade();
} else if (type === c_oAscTypeSelectElement.Header) {
} else if (type === Asc.c_oAscTypeSelectElement.Header) {
header_locked = pr.get_Locked();
in_header = true;
} else if (type === c_oAscTypeSelectElement.Image) {
} else if (type === Asc.c_oAscTypeSelectElement.Image) {
in_image = in_header = true;
if (pr && pr.get_ChartProperties())
in_chart = true;
} else if (type === c_oAscTypeSelectElement.Math) {
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
in_equation = true;
if (c_oAscMathInterfaceType.Common === pr.get_Type())
if (Asc.c_oAscMathInterfaceType.Common === pr.get_Type())
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;
}
if (enable_dropcap!==false && type == c_oAscTypeSelectElement.Paragraph)
if (enable_dropcap!==false && type == Asc.c_oAscTypeSelectElement.Paragraph)
enable_dropcap = true;
}
@ -631,11 +631,11 @@ define([
if (enable_dropcap && frame_pr) {
var value = frame_pr.get_FramePr(),
drop_value = c_oAscDropCap.None;
drop_value = Asc.c_oAscDropCap.None;
if (value!==undefined) {
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;
} else {
enable_dropcap = frame_pr.get_CanAddDropCap();
@ -1260,7 +1260,7 @@ define([
handler: handlerDlg
});
props = new CHyperlinkProperty();
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
@ -1269,7 +1269,7 @@ define([
var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){
_.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();
});
}
@ -1519,13 +1519,13 @@ define([
this._state.dropcap = undefined;
if (this.api && item.checked) {
if (item.value === c_oAscDropCap.None) {
if (item.value === Asc.c_oAscDropCap.None) {
this.api.removeDropcap(true);
} else {
var SelectedObjects = this.api.getSelectedElements(),
i = -1;
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 value = pr.get_FramePr();
if (!_.isUndefined(value)) {
@ -1534,7 +1534,7 @@ define([
value.put_DropCap(item.value);
this.api.put_FramePr(value);
} else {
this.api.asc_addDropCap((item.value === c_oAscDropCap.Drop));
this.api.asc_addDropCap((item.value === Asc.c_oAscDropCap.Drop));
}
break;
}
@ -1552,9 +1552,9 @@ define([
var index = -1;
switch (v) {
case c_oAscDropCap.None: index = 0; break;
case c_oAscDropCap.Drop: index = 1; break;
case c_oAscDropCap.Margin: index = 2; break;
case Asc.c_oAscDropCap.None: index = 0; break;
case Asc.c_oAscDropCap.Drop: index = 1; break;
case Asc.c_oAscDropCap.Margin: index = 2; break;
}
if (index < 0)
this._clearChecked(this.toolbar.btnDropCap.menu);
@ -1586,7 +1586,7 @@ define([
if (selectedElements && _.isArray(selectedElements)){
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();
break;
}
@ -1606,7 +1606,7 @@ define([
handler: function(result, value) {
if (result == 'ok') {
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);
} else
me.api.put_FramePr(value.paragraphProps);
@ -1625,7 +1625,7 @@ define([
this._state.columns = undefined;
if (this.api && item.checked) {
var props = new CDocumentColumnsProps(),
var props = new Asc.CDocumentColumnsProps(),
cols = item.value,
def_space = 12.5;
props.put_EqualWidth(cols<3);
@ -1792,7 +1792,7 @@ define([
isParagraph = false;
if (selectedElements && _.isArray(selectedElements)){
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;
}
}
@ -2068,10 +2068,10 @@ define([
onParagraphColor: function(shd) {
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();
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() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -2118,7 +2118,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker, clr;
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 = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
}

View file

@ -67,7 +67,7 @@ define([
this._initSettings = true;
this._state = {
WrappingStyle: c_oAscWrapStyle2.Inline,
WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true,
Width: 0,
Height: 0,
@ -86,13 +86,13 @@ define([
this.render();
var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind }
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
@ -141,31 +141,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
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: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: 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: 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: 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: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: 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: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});
@ -370,17 +370,17 @@ define([
var props = new CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH());
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
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_RelativeFrom(c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val);
}
@ -415,7 +415,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeMax = this.api.GetSectionInfo();
imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()),
height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())};

View file

@ -128,7 +128,7 @@ define([
for (var i = 0; i <selectedElements.length; i++) {
var elType = selectedElements[i].get_ObjectType();
var elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
//image
menu_to_show = me.pictureMenu;
if (menu_props.imgProps===undefined)
@ -151,14 +151,14 @@ define([
noobject = false;
if ( (shapeprops===undefined || shapeprops===null) && (chartprops===undefined || chartprops===null) ) // not shape and chart
break;
} else if (c_oAscTypeSelectElement.Table == elType)
} else if (Asc.c_oAscTypeSelectElement.Table == elType)
{
menu_to_show = me.tableMenu;
menu_props.tableProps = {};
menu_props.tableProps.value = elValue;
menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false;
noobject = false;
} else if (c_oAscTypeSelectElement.Paragraph == elType)
} else if (Asc.c_oAscTypeSelectElement.Paragraph == elType)
{
menu_props.paraProps = {};
menu_props.paraProps.value = elValue;
@ -167,20 +167,20 @@ define([
menu_props.tableProps===undefined )
menu_to_show = me.textMenu;
noobject = false;
} else if (c_oAscTypeSelectElement.Hyperlink == elType) {
} else if (Asc.c_oAscTypeSelectElement.Hyperlink == elType) {
if (menu_props.hyperProps)
menu_props.hyperProps.isSeveralLinks = true;
else
menu_props.hyperProps = {};
menu_props.hyperProps.value = elValue;
} else if (c_oAscTypeSelectElement.Header == elType) {
} else if (Asc.c_oAscTypeSelectElement.Header == elType) {
menu_props.headerProps = {};
menu_props.headerProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.SpellCheck == elType) {
} else if (Asc.c_oAscTypeSelectElement.SpellCheck == elType) {
menu_props.spellProps = {};
menu_props.spellProps.value = elValue;
me._currentSpellObj = elValue;
} else if (c_oAscTypeSelectElement.Math == elType) {
} else if (Asc.c_oAscTypeSelectElement.Math == elType) {
menu_props.mathProps = {};
menu_props.mathProps.value = elValue;
me._currentMathObj = elValue;
@ -571,7 +571,7 @@ define([
handler: handlerDlg
});
props = new CHyperlinkProperty();
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
@ -580,7 +580,7 @@ define([
var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){
_.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();
});
}
@ -640,7 +640,7 @@ define([
var props;
if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i <selectedElements.length; i++) {
if ( selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.SpellCheck) {
if ( selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.SpellCheck) {
props = selectedElements[i].get_ObjectValue();
me._currentSpellObj = props;
break;
@ -742,7 +742,7 @@ define([
mnu, arr = [];
switch (type) {
case c_oAscMathInterfaceType.Accent:
case Asc.c_oAscMathInterfaceType.Accent:
mnu = new Common.UI.MenuItem({
caption : me.txtRemoveAccentChar,
equation : true,
@ -751,7 +751,7 @@ define([
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.BorderBox:
case Asc.c_oAscMathInterfaceType.BorderBox:
mnu = new Common.UI.MenuItem({
caption : me.txtBorderProps,
equation : true,
@ -796,7 +796,7 @@ define([
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.Bar:
case Asc.c_oAscMathInterfaceType.Bar:
mnu = new Common.UI.MenuItem({
caption : me.txtRemoveBar,
equation : true,
@ -805,116 +805,116 @@ define([
});
arr.push(mnu);
mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar,
caption : (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceBarPos.Top) ? c_oAscMathInterfaceBarPos.Bottom : c_oAscMathInterfaceBarPos.Top}
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? Asc.c_oAscMathInterfaceBarPos.Bottom : Asc.c_oAscMathInterfaceBarPos.Top}
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.Script:
case Asc.c_oAscMathInterfaceType.Script:
var scripttype = value.get_ScriptType();
if (scripttype == c_oAscMathInterfaceScript.PreSubSup) {
if (scripttype == Asc.c_oAscMathInterfaceScript.PreSubSup) {
mnu = new Common.UI.MenuItem({
caption : me.txtScriptsAfter,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.SubSup}
equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.SubSup}
});
arr.push(mnu);
mnu = new Common.UI.MenuItem({
caption : me.txtRemScripts,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.None}
equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.None}
});
arr.push(mnu);
} else {
if (scripttype == c_oAscMathInterfaceScript.SubSup) {
if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) {
mnu = new Common.UI.MenuItem({
caption : me.txtScriptsBefore,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.PreSubSup}
equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.PreSubSup}
});
arr.push(mnu);
}
if (scripttype == c_oAscMathInterfaceScript.SubSup || scripttype == c_oAscMathInterfaceScript.Sub ) {
if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sub ) {
mnu = new Common.UI.MenuItem({
caption : me.txtRemSubscript,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == c_oAscMathInterfaceScript.SubSup) ? c_oAscMathInterfaceScript.Sup : c_oAscMathInterfaceScript.None }
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sup : Asc.c_oAscMathInterfaceScript.None }
});
arr.push(mnu);
}
if (scripttype == c_oAscMathInterfaceScript.SubSup || scripttype == c_oAscMathInterfaceScript.Sup ) {
if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sup ) {
mnu = new Common.UI.MenuItem({
caption : me.txtRemSuperscript,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == c_oAscMathInterfaceScript.SubSup) ? c_oAscMathInterfaceScript.Sub : c_oAscMathInterfaceScript.None }
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sub : Asc.c_oAscMathInterfaceScript.None }
});
arr.push(mnu);
}
}
break;
case c_oAscMathInterfaceType.Fraction:
case Asc.c_oAscMathInterfaceType.Fraction:
var fraction = value.get_FractionType();
if (fraction==c_oAscMathInterfaceFraction.Skewed || fraction==c_oAscMathInterfaceFraction.Linear) {
if (fraction==Asc.c_oAscMathInterfaceFraction.Skewed || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
mnu = new Common.UI.MenuItem({
caption : me.txtFractionStacked,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Bar}
equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Bar}
});
arr.push(mnu);
}
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.Linear) {
if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
mnu = new Common.UI.MenuItem({
caption : me.txtFractionSkewed,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Skewed}
equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Skewed}
});
arr.push(mnu);
}
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.Skewed) {
if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Skewed) {
mnu = new Common.UI.MenuItem({
caption : me.txtFractionLinear,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Linear}
equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Linear}
});
arr.push(mnu);
}
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.NoBar) {
if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.NoBar) {
mnu = new Common.UI.MenuItem({
caption : (fraction==c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar,
caption : (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: (fraction==c_oAscMathInterfaceFraction.Bar) ? c_oAscMathInterfaceFraction.NoBar : c_oAscMathInterfaceFraction.Bar}
equationProps: {type: type, callback: 'put_FractionType', value: (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? Asc.c_oAscMathInterfaceFraction.NoBar : Asc.c_oAscMathInterfaceFraction.Bar}
});
arr.push(mnu);
}
break;
case c_oAscMathInterfaceType.Limit:
case Asc.c_oAscMathInterfaceType.Limit:
mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver,
caption : (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceLimitPos.Top) ? c_oAscMathInterfaceLimitPos.Bottom : c_oAscMathInterfaceLimitPos.Top}
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? Asc.c_oAscMathInterfaceLimitPos.Bottom : Asc.c_oAscMathInterfaceLimitPos.Top}
});
arr.push(mnu);
mnu = new Common.UI.MenuItem({
caption : me.txtRemLimit,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: c_oAscMathInterfaceLimitPos.None}
equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceLimitPos.None}
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.Matrix:
case Asc.c_oAscMathInterfaceType.Matrix:
mnu = new Common.UI.MenuItem({
caption : value.get_HidePlaceholder() ? me.txtShowPlaceholder : me.txtHidePlaceholder,
equation : true,
@ -978,20 +978,20 @@ define([
{
caption: me.txtTop,
checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Top),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Top}
checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top),
equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top}
},
{
caption: me.centerText,
checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Center),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Center}
checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center),
equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center}
},
{
caption: me.txtBottom,
checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Bottom),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Bottom}
checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom),
equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom}
}
]
})
@ -1007,27 +1007,27 @@ define([
{
caption: me.leftText,
checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Left),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Left}
checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Left),
equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Left}
},
{
caption: me.centerText,
checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Center),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Center}
checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Center),
equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Center}
},
{
caption: me.rightText,
checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Right),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Right}
checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Right),
equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Right}
}
]
})
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.EqArray:
case Asc.c_oAscMathInterfaceType.EqArray:
mnu = new Common.UI.MenuItem({
caption : me.txtInsertEqBefore,
equation : true,
@ -1059,32 +1059,32 @@ define([
{
caption: me.txtTop,
checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Top),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Top}
checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Top),
equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Top}
},
{
caption: me.centerText,
checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Center),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Center}
checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Center),
equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Center}
},
{
caption: me.txtBottom,
checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Bottom),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Bottom}
checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom),
equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}
}
]
})
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.LargeOperator:
case Asc.c_oAscMathInterfaceType.LargeOperator:
mnu = new Common.UI.MenuItem({
caption : me.txtLimitChange,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? c_oAscMathInterfaceNaryLimitLocation.SubSup : c_oAscMathInterfaceNaryLimitLocation.UndOvr}
equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup : Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}
});
arr.push(mnu);
if (value.get_HideUpper() !== undefined) {
@ -1106,7 +1106,7 @@ define([
arr.push(mnu);
}
break;
case c_oAscMathInterfaceType.Delimiter:
case Asc.c_oAscMathInterfaceType.Delimiter:
mnu = new Common.UI.MenuItem({
caption : me.txtInsertArgBefore,
equation : true,
@ -1170,25 +1170,25 @@ define([
});
arr.push(mnu);
break;
case c_oAscMathInterfaceType.GroupChar:
case Asc.c_oAscMathInterfaceType.GroupChar:
if (value.can_ChangePos()) {
mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver,
caption : (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceGroupCharPos.Top) ? c_oAscMathInterfaceGroupCharPos.Bottom : c_oAscMathInterfaceGroupCharPos.Top}
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? Asc.c_oAscMathInterfaceGroupCharPos.Bottom : Asc.c_oAscMathInterfaceGroupCharPos.Top}
});
arr.push(mnu);
mnu = new Common.UI.MenuItem({
caption : me.txtDeleteGroupChar,
equation : true,
disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: c_oAscMathInterfaceGroupCharPos.None}
equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceGroupCharPos.None}
});
arr.push(mnu);
}
break;
case c_oAscMathInterfaceType.Radical:
case Asc.c_oAscMathInterfaceType.Radical:
if (value.get_HideDegree() !== undefined) {
mnu = new Common.UI.MenuItem({
caption : value.get_HideDegree() ? me.txtShowDegree : me.txtHideDegree,
@ -1301,46 +1301,46 @@ define([
if (eqProps) {
var eqObj;
switch (eqProps.type) {
case c_oAscMathInterfaceType.Accent:
case Asc.c_oAscMathInterfaceType.Accent:
eqObj = new CMathMenuAccent();
break;
case c_oAscMathInterfaceType.BorderBox:
case Asc.c_oAscMathInterfaceType.BorderBox:
eqObj = new CMathMenuBorderBox();
break;
case c_oAscMathInterfaceType.Box:
case Asc.c_oAscMathInterfaceType.Box:
eqObj = new CMathMenuBox();
break;
case c_oAscMathInterfaceType.Bar:
case Asc.c_oAscMathInterfaceType.Bar:
eqObj = new CMathMenuBar();
break;
case c_oAscMathInterfaceType.Script:
case Asc.c_oAscMathInterfaceType.Script:
eqObj = new CMathMenuScript();
break;
case c_oAscMathInterfaceType.Fraction:
case Asc.c_oAscMathInterfaceType.Fraction:
eqObj = new CMathMenuFraction();
break;
case c_oAscMathInterfaceType.Limit:
case Asc.c_oAscMathInterfaceType.Limit:
eqObj = new CMathMenuLimit();
break;
case c_oAscMathInterfaceType.Matrix:
case Asc.c_oAscMathInterfaceType.Matrix:
eqObj = new CMathMenuMatrix();
break;
case c_oAscMathInterfaceType.EqArray:
case Asc.c_oAscMathInterfaceType.EqArray:
eqObj = new CMathMenuEqArray();
break;
case c_oAscMathInterfaceType.LargeOperator:
case Asc.c_oAscMathInterfaceType.LargeOperator:
eqObj = new CMathMenuNary();
break;
case c_oAscMathInterfaceType.Delimiter:
case Asc.c_oAscMathInterfaceType.Delimiter:
eqObj = new CMathMenuDelimiter();
break;
case c_oAscMathInterfaceType.GroupChar:
case Asc.c_oAscMathInterfaceType.GroupChar:
eqObj = new CMathMenuGroupCharacter();
break;
case c_oAscMathInterfaceType.Radical:
case Asc.c_oAscMathInterfaceType.Radical:
eqObj = new CMathMenuRadical();
break;
case c_oAscMathInterfaceType.Common:
case Asc.c_oAscMathInterfaceType.Common:
eqObj = new CMathMenuBase();
break;
}
@ -1450,25 +1450,25 @@ define([
onImgWrapStyleChanged: function(type){
switch (type) {
case c_oAscWrapStyle2.Inline:
case Asc.c_oAscWrapStyle2.Inline:
this.menuImageWrap.menu.items[0].setChecked(true);
break;
case c_oAscWrapStyle2.Square:
case Asc.c_oAscWrapStyle2.Square:
this.menuImageWrap.menu.items[1].setChecked(true);
break;
case c_oAscWrapStyle2.Tight:
case Asc.c_oAscWrapStyle2.Tight:
this.menuImageWrap.menu.items[2].setChecked(true);
break;
case c_oAscWrapStyle2.Through:
case Asc.c_oAscWrapStyle2.Through:
this.menuImageWrap.menu.items[3].setChecked(true);
break;
case c_oAscWrapStyle2.TopAndBottom:
case Asc.c_oAscWrapStyle2.TopAndBottom:
this.menuImageWrap.menu.items[4].setChecked(true);
break;
case c_oAscWrapStyle2.Behind:
case Asc.c_oAscWrapStyle2.Behind:
this.menuImageWrap.menu.items[6].setChecked(true);
break;
case c_oAscWrapStyle2.InFront:
case Asc.c_oAscWrapStyle2.InFront:
this.menuImageWrap.menu.items[5].setChecked(true);
break;
}
@ -1489,8 +1489,8 @@ define([
var elType, elValue;
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) {
var properties = new CTableProp();
if (Asc.c_oAscTypeSelectElement.Table == elType) {
var properties = new Asc.CTableProp();
properties.put_TableWrap(wrap);
if (wrap == c_tableWrap.TABLE_WRAP_NONE) {
properties.put_TableAlignment(align);
@ -1513,7 +1513,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
win = new DE.Views.ParagraphSettingsAdvanced({
tableStylerRows : 2,
tableStylerColumns : 1,
@ -1551,7 +1551,7 @@ define([
var elType, elValue;
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); // заменить на свойства рамки
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
win = new DE.Views.DropcapSettingsAdvanced({
tableStylerRows : 2,
tableStylerColumns : 1,
@ -1699,15 +1699,15 @@ define([
if (me.api) {
var properties = new CImgProperty();
if (!_.isUndefined(item.options.halign)) {
properties.put_PositionH(new CImagePositionH());
properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(true);
properties.get_PositionH().put_Align(item.options.halign);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Margin);
properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Margin);
} else {
properties.put_PositionV(new CImagePositionV());
properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(true);
properties.get_PositionV().put_Align(item.options.valign);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Margin);
properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Margin);
}
me.api.ImgApply(properties);
}
@ -1720,32 +1720,32 @@ define([
new Common.UI.MenuItem({
caption : me.textShapeAlignLeft,
iconCls : 'mnu-img-align-left',
halign : c_oAscAlignH.Left
halign : Asc.c_oAscAlignH.Left
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textShapeAlignCenter,
iconCls : 'mnu-img-align-center',
halign : c_oAscAlignH.Center
halign : Asc.c_oAscAlignH.Center
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textShapeAlignRight,
iconCls : 'mnu-img-align-right',
halign : c_oAscAlignH.Right
halign : Asc.c_oAscAlignH.Right
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textShapeAlignTop,
iconCls : 'mnu-img-align-top',
valign : c_oAscAlignV.Top
valign : Asc.c_oAscAlignV.Top
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textShapeAlignMiddle,
iconCls : 'mnu-img-align-middle',
valign : c_oAscAlignV.Center
valign : Asc.c_oAscAlignV.Center
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textShapeAlignBottom,
iconCls : 'mnu-img-align-bottom',
valign : c_oAscAlignV.Bottom
valign : Asc.c_oAscAlignV.Bottom
}).on('click', onItemClick)
]
})
@ -1795,22 +1795,22 @@ define([
new Common.UI.MenuItem({
caption : me.textArrangeFront,
iconCls : 'mnu-arrange-front',
valign : c_oAscChangeLevel.BringToFront
valign : Asc.c_oAscChangeLevel.BringToFront
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textArrangeBack,
iconCls : 'mnu-arrange-back',
valign : c_oAscChangeLevel.SendToBack
valign : Asc.c_oAscChangeLevel.SendToBack
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textArrangeForward,
iconCls : 'mnu-arrange-forward',
valign : c_oAscChangeLevel.BringForward
valign : Asc.c_oAscChangeLevel.BringForward
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.textArrangeBackward,
iconCls : 'mnu-arrange-backward',
valign : c_oAscChangeLevel.BringBackward
valign : Asc.c_oAscChangeLevel.BringBackward
}).on('click', onItemClick),
{ caption: '--' },
mnuGroup,
@ -1838,17 +1838,17 @@ define([
var properties = new CImgProperty();
properties.put_WrappingStyle(item.options.wrapType);
if (me.menuImageWrap._originalProps.get_WrappingStyle() === c_oAscWrapStyle2.Inline && item.wrapType !== c_oAscWrapStyle2.Inline ) {
properties.put_PositionH(new CImagePositionH());
if (me.menuImageWrap._originalProps.get_WrappingStyle() === Asc.c_oAscWrapStyle2.Inline && item.wrapType !== Asc.c_oAscWrapStyle2.Inline ) {
properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(false);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
var val = me.menuImageWrap._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = me.menuImageWrap._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
properties.get_PositionH().put_Value(val);
properties.put_PositionV(new CImagePositionV());
properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(false);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph);
val = me.menuImageWrap._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = me.menuImageWrap._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_Value(val);
}
me.api.ImgApply(properties);
@ -1864,49 +1864,49 @@ define([
caption : me.txtInline,
iconCls : 'mnu-wrap-inline',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Inline,
wrapType : Asc.c_oAscWrapStyle2.Inline,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtSquare,
iconCls : 'mnu-wrap-square',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Square,
wrapType : Asc.c_oAscWrapStyle2.Square,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtTight,
iconCls : 'mnu-wrap-tight',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Tight,
wrapType : Asc.c_oAscWrapStyle2.Tight,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtThrough,
iconCls : 'mnu-wrap-through',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Through,
wrapType : Asc.c_oAscWrapStyle2.Through,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtTopAndBottom,
iconCls : 'mnu-wrap-topAndBottom',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.TopAndBottom,
wrapType : Asc.c_oAscWrapStyle2.TopAndBottom,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtInFront,
iconCls : 'mnu-wrap-inFront',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.InFront,
wrapType : Asc.c_oAscWrapStyle2.InFront,
checkable : true
}).on('click', onItemClick),
new Common.UI.MenuItem({
caption : me.txtBehind,
iconCls : 'mnu-wrap-behind',
toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Behind,
wrapType : Asc.c_oAscWrapStyle2.Behind,
checkable : true
}).on('click', onItemClick),
{ caption: '--' },
@ -1929,7 +1929,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal;
if ( !elValue.get_ChartProperties() && !elValue.get_ShapeProperties() && !me.menuOriginalSize.isDisabled() && me.menuOriginalSize.isVisible()) {
imgsizeOriginal = me.api.get_OriginalSizeImage();
@ -2017,25 +2017,25 @@ define([
}
} else {
switch (wrapping) {
case c_oAscWrapStyle2.Inline:
case Asc.c_oAscWrapStyle2.Inline:
me.menuImageWrap.menu.items[0].setChecked(true);
break;
case c_oAscWrapStyle2.Square:
case Asc.c_oAscWrapStyle2.Square:
me.menuImageWrap.menu.items[1].setChecked(true);
break;
case c_oAscWrapStyle2.Tight:
case Asc.c_oAscWrapStyle2.Tight:
me.menuImageWrap.menu.items[2].setChecked(true);
break;
case c_oAscWrapStyle2.Through:
case Asc.c_oAscWrapStyle2.Through:
me.menuImageWrap.menu.items[3].setChecked(true);
break;
case c_oAscWrapStyle2.TopAndBottom:
case Asc.c_oAscWrapStyle2.TopAndBottom:
me.menuImageWrap.menu.items[4].setChecked(true);
break;
case c_oAscWrapStyle2.Behind:
case Asc.c_oAscWrapStyle2.Behind:
me.menuImageWrap.menu.items[6].setChecked(true);
break;
case c_oAscWrapStyle2.InFront:
case Asc.c_oAscWrapStyle2.InFront:
me.menuImageWrap.menu.items[5].setChecked(true);
break;
default:
@ -2069,8 +2069,8 @@ define([
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
menuImageAdvanced.setDisabled(islocked);
menuImageAlign.setDisabled( islocked || (wrapping == c_oAscWrapStyle2.Inline) );
menuImageArrange.setDisabled( wrapping == c_oAscWrapStyle2.Inline );
menuImageAlign.setDisabled( islocked || (wrapping == Asc.c_oAscWrapStyle2.Inline) );
menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline );
if (me.api) {
mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup());
@ -2179,7 +2179,7 @@ define([
var tableCellsVAlign = function(item, e) {
if (me.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.options.valign);
me.api.tblApply(properties);
}
@ -2195,21 +2195,21 @@ define([
toggleGroup : 'popuptablecellalign',
checkable : true,
checked : false,
valign : c_oAscVertAlignJc.Top
valign : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({
caption : me.centerCellText,
toggleGroup : 'popuptablecellalign',
checkable : true,
checked : false,
valign : c_oAscVertAlignJc.Center
valign : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({
caption : me.bottomCellText,
toggleGroup : 'popuptablecellalign',
checkable : true,
checked : false,
valign : c_oAscVertAlignJc.Bottom
valign : Asc.c_oAscVertAlignJc.Bottom
}).on('click', _.bind(tableCellsVAlign, me))
]
})
@ -2229,7 +2229,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) {
if (Asc.c_oAscTypeSelectElement.Table == elType) {
win = new DE.Views.TableSettingsAdvanced({
tableStylerRows : (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2,
tableStylerColumns : (elValue.get_CellBorders().get_InsideV()===null && elValue.get_CellSelect()==true) ? 1 : 2,
@ -2401,7 +2401,7 @@ define([
var tableDirection = function(item, e) {
if (me.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellsTextDirection(item.options.direction);
me.api.tblApply(properties);
}
@ -2419,7 +2419,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.LRTB
direction : Asc.c_oAscCellTextDirection.LRTB
}).on('click', _.bind(tableDirection, me)),
me.menuTableDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text,
@ -2427,7 +2427,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.TBRL
direction : Asc.c_oAscCellTextDirection.TBRL
}).on('click', _.bind(tableDirection, me)),
me.menuTableDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text,
@ -2435,7 +2435,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.BTLR
direction : Asc.c_oAscCellTextDirection.BTLR
}).on('click', _.bind(tableDirection, me))
]
})
@ -2454,9 +2454,9 @@ define([
}
var align = value.tableProps.value.get_CellsVAlign();
me.menuTableCellTop.setChecked(align == c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == c_oAscVertAlignJc.Bottom);
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
var flow = (value.tableProps.value.get_TableWrap() == c_tableWrap.TABLE_WRAP_PARALLEL);
(flow) ? menuTableWrapFlow.setChecked(true) : menuTableWrapInline.setChecked(true);
@ -2467,9 +2467,9 @@ define([
me.menuTableAlignRight.setChecked((flow) ? false : (align === c_tableAlign.TABLE_ALIGN_RIGHT));
var dir = value.tableProps.value.get_CellsTextDirection();
me.menuTableDirectH.setChecked(dir == c_oAscCellTextDirection.LRTB);
me.menuTableDirect90.setChecked(dir == c_oAscCellTextDirection.TBRL);
me.menuTableDirect270.setChecked(dir == c_oAscCellTextDirection.BTLR);
me.menuTableDirectH.setChecked(dir == Asc.c_oAscCellTextDirection.LRTB);
me.menuTableDirect90.setChecked(dir == Asc.c_oAscCellTextDirection.TBRL);
me.menuTableDirect270.setChecked(dir == Asc.c_oAscCellTextDirection.BTLR);
var disabled = value.tableProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
me.tableMenu.items[8].setDisabled(disabled);
@ -2505,7 +2505,7 @@ define([
if (text!==false) {
menuAddHyperlinkTable.hyperProps = {};
menuAddHyperlinkTable.hyperProps.value = new CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value.put_Text(text);
}
/** coauthoring begin **/
@ -2706,21 +2706,21 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}).on('click', _.bind(paragraphVAlign, me))
]
})
@ -2746,7 +2746,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal
direction : Asc.c_oAscVertDrawingText.normal
}).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text,
@ -2754,7 +2754,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert
direction : Asc.c_oAscVertDrawingText.vert
}).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text,
@ -2762,7 +2762,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270
direction : Asc.c_oAscVertDrawingText.vert270
}).on('click', _.bind(paragraphDirection, me))
]
})
@ -2925,14 +2925,14 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if ( isInShape || isInChart ) {
var align = value.imgProps.value.get_VerticalTextAlign();
me.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
var dir = value.imgProps.value.get_Vert();
me.menuParagraphDirectH.setChecked(dir == c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == c_oAscVertDrawingText.vert270);
me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
}
menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart);
menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation);
@ -2958,7 +2958,7 @@ define([
menuEditHyperlinkPara.hyperProps = value.hyperProps;
if (text!==false) {
menuAddHyperlinkPara.hyperProps = {};
menuAddHyperlinkPara.hyperProps.value = new CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value.put_Text(text);
}
var disabled = value.paraProps.locked || (value.headerProps!==undefined && value.headerProps.locked);

View file

@ -247,9 +247,9 @@ define([
me._changedProps.put_Shade(new CParagraphShd());
}
if (color=='transparent') {
me._changedProps.get_Shade().put_Value(shd_Nil);
me._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} 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));
}
}
@ -342,8 +342,8 @@ define([
})
.on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.None);
me._changedProps.put_DropCap(c_oAscDropCap.None);
me._DisableElem(Asc.c_oAscDropCap.None);
me._changedProps.put_DropCap(Asc.c_oAscDropCap.None);
}
}, me));
@ -357,8 +357,8 @@ define([
})
.on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Drop);
me._changedProps.put_DropCap(c_oAscDropCap.Drop);
me._DisableElem(Asc.c_oAscDropCap.Drop);
me._changedProps.put_DropCap(Asc.c_oAscDropCap.Drop);
}
}, me));
@ -372,8 +372,8 @@ define([
})
.on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Margin);
me._changedProps.put_DropCap(c_oAscDropCap.Margin);
me._DisableElem(Asc.c_oAscDropCap.Margin);
me._changedProps.put_DropCap(Asc.c_oAscDropCap.Margin);
}
}, me));
@ -591,9 +591,9 @@ define([
}, me));
this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscXAlign.Left},
{displayValue: this.textCenter, value: c_oAscXAlign.Center},
{displayValue: this.textRight, value: c_oAscXAlign.Right}
{displayValue: this.textLeft, value: Asc.c_oAscXAlign.Left},
{displayValue: this.textCenter, value: Asc.c_oAscXAlign.Center},
{displayValue: this.textRight, value: Asc.c_oAscXAlign.Right}
];
this.cmbHAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hposition'),
@ -615,9 +615,9 @@ define([
this.cmbHAlign.setValue(this._arrHAlign[0].value);
this._arrHRelative = [
{displayValue: this.textMargin, value: c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: c_oAscHAnchor.Page},
{displayValue: this.textColumn, value: c_oAscHAnchor.Text}
{displayValue: this.textMargin, value: Asc.c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: Asc.c_oAscHAnchor.Page},
{displayValue: this.textColumn, value: Asc.c_oAscHAnchor.Text}
];
this.cmbHRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hrelative'),
@ -634,9 +634,9 @@ define([
this.cmbHRelative.setValue(this._arrHRelative[1].value);
this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscYAlign.Top},
{displayValue: this.textCenter, value: c_oAscYAlign.Center},
{displayValue: this.textBottom, value: c_oAscYAlign.Bottom}
{displayValue: this.textTop, value: Asc.c_oAscYAlign.Top},
{displayValue: this.textCenter, value: Asc.c_oAscYAlign.Center},
{displayValue: this.textBottom, value: Asc.c_oAscYAlign.Bottom}
];
this.cmbVAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vposition'),
@ -658,9 +658,9 @@ define([
this.cmbVAlign.setValue(this._arrVAlign[0].value);
this._arrVRelative = [
{displayValue: this.textMargin, value: c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: c_oAscVAnchor.Page},
{displayValue: this.textParagraph, value: c_oAscVAnchor.Text}
{displayValue: this.textMargin, value: Asc.c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: Asc.c_oAscVAnchor.Page},
{displayValue: this.textParagraph, value: Asc.c_oAscVAnchor.Text}
];
this.cmbVRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vrelative'),
@ -672,7 +672,7 @@ define([
.on('selected', _.bind(function(combo, record) {
if (me._changedProps) {
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));
this.cmbVRelative.setValue(this._arrVRelative[2].value);
@ -816,7 +816,7 @@ define([
onShowDialog: function(dlg) {
if (!this.isFrame && this.btnNone.pressed)
this._DisableElem(c_oAscDropCap.None);
this._DisableElem(Asc.c_oAscDropCap.None);
else if (this.isFrame && this.btnFrameNone.pressed)
this._DisableElem(c_oAscFrameWrap.None);
},
@ -824,7 +824,7 @@ define([
onBtnBordersClick: function(btn, eOpts){
this.updateBordersStyle(btn.options.strId, true);
if (this.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true);
this.api.tblApply(properties);
@ -912,7 +912,7 @@ define([
break;
}
}
this.chMove.setValue(value==c_oAscVAnchor.Text);
this.chMove.setValue(value==Asc.c_oAscVAnchor.Text);
value = frame_props.get_YAlign();
if (value!==undefined) {
@ -937,9 +937,9 @@ define([
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()) : '');
value = frame_props.get_DropCap();
if (value==c_oAscDropCap.Drop)
if (value==Asc.c_oAscDropCap.Drop)
this.btnInText.toggle(true, false);
else if (value==c_oAscDropCap.Margin)
else if (value==Asc.c_oAscDropCap.Margin)
this.btnInMargin.toggle(true, false);
else
this.btnNone.toggle(true, false);
@ -972,10 +972,10 @@ define([
}
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();
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()};
} else {
this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1014,7 +1014,7 @@ define([
},
_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) {
if (btn.options.contentTarget == 'id-adv-dropcap-borders' ||
@ -1036,7 +1036,7 @@ define([
this.spnWidth.setDisabled(disabled);
this.spnHeight.setDisabled(disabled);
} else {
disabled = (btnId == c_oAscDropCap.None);
disabled = (btnId == Asc.c_oAscDropCap.None);
this.spnRowHeight.setDisabled(disabled);
this.numDistance.setDisabled(disabled);
this.cmbFonts.setDisabled(disabled);

View file

@ -52,15 +52,15 @@ define([
menu: undefined,
formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF},
{name: 'TXT', imgCls: 'txt', type: c_oAscFileType.TXT},
{name: 'DOCX', imgCls: 'docx', type: c_oAscFileType.DOCX}
{name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'TXT', imgCls: 'txt', type: Asc.c_oAscFileType.TXT},
{name: 'DOCX', imgCls: 'docx', type: Asc.c_oAscFileType.DOCX}
],[
// {name: 'DOC', imgCls: 'doc-format btn-doc', type: c_oAscFileType.DOC},
{name: 'ODT', imgCls: 'odt', type: c_oAscFileType.ODT},
// {name: 'RTF', imgCls: 'doc-format btn-rtf', type: c_oAscFileType.RTF},
{name: 'HTML (Zipped)', imgCls: 'html', type: c_oAscFileType.HTML}
// {name: 'EPUB', imgCls: 'doc-format btn-epub', type: c_oAscFileType.EPUB}
// {name: 'DOC', imgCls: 'doc-format btn-doc', type: Asc.c_oAscFileType.DOC},
{name: 'ODT', imgCls: 'odt', type: Asc.c_oAscFileType.ODT},
// {name: 'RTF', imgCls: 'doc-format btn-rtf', type: Asc.c_oAscFileType.RTF},
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
// {name: 'EPUB', imgCls: 'doc-format btn-epub', type: Asc.c_oAscFileType.EPUB}
]],

View file

@ -118,7 +118,7 @@ define([
me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength
maxLength : Asc.c_oAscMaxTooltipLength
});
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@ -160,7 +160,7 @@ define([
getSettings: function () {
var me = this,
props = new CHyperlinkProperty(),
props = new Asc.CHyperlinkProperty(),
url = $.trim(me.inputUrl.getValue());
if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) )

View file

@ -68,7 +68,7 @@ define([
this._initSettings = true;
this._state = {
WrappingStyle: c_oAscWrapStyle2.Inline,
WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true,
Width: 0,
Height: 0,
@ -84,13 +84,13 @@ define([
this.render();
var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
@ -252,17 +252,17 @@ define([
if (this.api) {
var props = new CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH());
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
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_RelativeFrom(c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val);
}
@ -320,7 +320,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage();

View file

@ -76,20 +76,20 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spinners = [];
this._state = {
HAlignType: c_oAscAlignH.Left,
HAlignFrom: c_oAscRelativeFromH.Character,
HPositionFrom: c_oAscRelativeFromH.Character,
HPositionPcFrom: c_oAscRelativeFromH.Page,
VAlignType: c_oAscAlignV.Top,
VAlignFrom: c_oAscRelativeFromV.Line,
VPositionFrom: c_oAscRelativeFromV.Line,
VPositionPcFrom: c_oAscRelativeFromV.Page,
HAlignType: Asc.c_oAscAlignH.Left,
HAlignFrom: Asc.c_oAscRelativeFromH.Character,
HPositionFrom: Asc.c_oAscRelativeFromH.Character,
HPositionPcFrom: Asc.c_oAscRelativeFromH.Page,
VAlignType: Asc.c_oAscAlignV.Top,
VAlignFrom: Asc.c_oAscRelativeFromV.Line,
VPositionFrom: Asc.c_oAscRelativeFromV.Line,
VPositionPcFrom: Asc.c_oAscRelativeFromV.Page,
spnXChanged: false,
spnYChanged: false,
spnXPcChanged: false,
spnYPcChanged: false
};
this._objectType = c_oAscTypeSelectElement.Image;
this._objectType = Asc.c_oAscTypeSelectElement.Image;
this.Margins = undefined;
this._nRatio = 1;
@ -191,7 +191,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapInline = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-inline',
posId: c_oAscWrapStyle2.Inline,
posId: Asc.c_oAscWrapStyle2.Inline,
hint: this.textWrapInlineTooltip,
enableToggle: true,
allowDepress: false,
@ -203,7 +203,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapSquare = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-square',
posId: c_oAscWrapStyle2.Square,
posId: Asc.c_oAscWrapStyle2.Square,
hint: this.textWrapSquareTooltip,
enableToggle: true,
allowDepress: false,
@ -215,7 +215,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTight = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-tight',
posId: c_oAscWrapStyle2.Tight,
posId: Asc.c_oAscWrapStyle2.Tight,
hint: this.textWrapTightTooltip,
enableToggle: true,
allowDepress: false,
@ -227,7 +227,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapThrough = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-through',
posId: c_oAscWrapStyle2.Through,
posId: Asc.c_oAscWrapStyle2.Through,
hint: this.textWrapThroughTooltip,
enableToggle: true,
allowDepress: false,
@ -239,7 +239,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTopBottom = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-topbottom',
posId: c_oAscWrapStyle2.TopAndBottom,
posId: Asc.c_oAscWrapStyle2.TopAndBottom,
hint: this.textWrapTopbottomTooltip,
enableToggle: true,
allowDepress: false,
@ -251,7 +251,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapBehind = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-behind',
posId: c_oAscWrapStyle2.Behind,
posId: Asc.c_oAscWrapStyle2.Behind,
hint: this.textWrapBehindTooltip,
enableToggle: true,
allowDepress: false,
@ -263,7 +263,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapInFront = new Common.UI.Button({
cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-infront',
posId: c_oAscWrapStyle2.InFront,
posId: Asc.c_oAscWrapStyle2.InFront,
hint: this.textWrapInFrontTooltip,
enableToggle: true,
allowDepress: false,
@ -364,7 +364,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_Percent(false);
@ -389,7 +389,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_Percent(false);
@ -402,9 +402,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Horizontal
this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscAlignH.Left},
{displayValue: this.textCenter, value: c_oAscAlignH.Center},
{displayValue: this.textRight, value: c_oAscAlignH.Right}
{displayValue: this.textLeft, value: Asc.c_oAscAlignH.Left},
{displayValue: this.textCenter, value: Asc.c_oAscAlignH.Center},
{displayValue: this.textRight, value: Asc.c_oAscAlignH.Right}
];
this.cmbHAlign = new Common.UI.ComboBox({
@ -418,12 +418,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this));
this._arrHRelative = [
{displayValue: this.textCharacter, value: c_oAscRelativeFromH.Character},
{displayValue: this.textColumn, value: c_oAscRelativeFromH.Column},
{displayValue: this.textLeftMargin, value: c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: c_oAscRelativeFromH.RightMargin}
{displayValue: this.textCharacter, value: Asc.c_oAscRelativeFromH.Character},
{displayValue: this.textColumn, value: Asc.c_oAscRelativeFromH.Column},
{displayValue: this.textLeftMargin, value: Asc.c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: Asc.c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: Asc.c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: Asc.c_oAscRelativeFromH.RightMargin}
];
this.cmbHRelative = new Common.UI.ComboBox({
@ -461,7 +461,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnXPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_Percent(true);
@ -472,10 +472,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this));
this._arrHRelativePc = [
{displayValue: this.textLeftMargin, value: c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: c_oAscRelativeFromH.RightMargin}
{displayValue: this.textLeftMargin, value: Asc.c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: Asc.c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: Asc.c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: Asc.c_oAscRelativeFromH.RightMargin}
];
this.cmbHPositionPc = new Common.UI.ComboBox({
@ -491,9 +491,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Vertical
this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscAlignV.Top},
{displayValue: this.textCenter, value: c_oAscAlignV.Center},
{displayValue: this.textBottom, value: c_oAscAlignV.Bottom}
{displayValue: this.textTop, value: Asc.c_oAscAlignV.Top},
{displayValue: this.textCenter, value: Asc.c_oAscAlignV.Center},
{displayValue: this.textBottom, value: Asc.c_oAscAlignV.Bottom}
];
this.cmbVAlign = new Common.UI.ComboBox({
@ -507,12 +507,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this));
this._arrVRelative = [
{displayValue: this.textLine, value: c_oAscRelativeFromV.Line},
{displayValue: this.textMargin, value: c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textParagraph, value: c_oAscRelativeFromV.Paragraph},
{displayValue: this.textPage, value: c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: c_oAscRelativeFromV.TopMargin}
{displayValue: this.textLine, value: Asc.c_oAscRelativeFromV.Line},
{displayValue: this.textMargin, value: Asc.c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: Asc.c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textParagraph, value: Asc.c_oAscRelativeFromV.Paragraph},
{displayValue: this.textPage, value: Asc.c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: Asc.c_oAscRelativeFromV.TopMargin}
];
this.cmbVRelative = new Common.UI.ComboBox({
@ -550,7 +550,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnYPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_Percent(true);
@ -561,10 +561,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this));
this._arrVRelativePc = [
{displayValue: this.textMargin, value: c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textPage, value: c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: c_oAscRelativeFromV.TopMargin}
{displayValue: this.textMargin, value: Asc.c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: Asc.c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textPage, value: Asc.c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: Asc.c_oAscRelativeFromV.TopMargin}
];
this.cmbVPositionPc = new Common.UI.ComboBox({
@ -720,9 +720,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Shape
this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square}
{displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
];
this.cmbCapType = new Common.UI.ComboBox({
@ -732,7 +732,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
editable: false,
data: this._arrCapType
});
this.cmbCapType.setValue(c_oAscLineCapType.Flat);
this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
@ -743,9 +743,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this));
this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter}
{displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
];
this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'),
@ -754,7 +754,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
editable: false,
data: this._arrJoinType
});
this.cmbJoinType.setValue(c_oAscLineJoinType.Round);
this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
@ -769,25 +769,25 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval;
_arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large;
_arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({
@ -910,30 +910,30 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
_setDefaults: function(props) {
if (props ){
this._objectType = c_oAscTypeSelectElement.Image;
this._objectType = Asc.c_oAscTypeSelectElement.Image;
var value = props.get_WrappingStyle();
if ( props.get_CanBeFlow() ) {
switch (value) {
case c_oAscWrapStyle2.Inline:
case Asc.c_oAscWrapStyle2.Inline:
this.btnWrapInline.toggle(true);
break;
case c_oAscWrapStyle2.Square:
case Asc.c_oAscWrapStyle2.Square:
this.btnWrapSquare.toggle(true);
break;
case c_oAscWrapStyle2.Tight:
case Asc.c_oAscWrapStyle2.Tight:
this.btnWrapTight.toggle(true);
break;
case c_oAscWrapStyle2.Through:
case Asc.c_oAscWrapStyle2.Through:
this.btnWrapThrough.toggle(true);
break;
case c_oAscWrapStyle2.TopAndBottom:
case Asc.c_oAscWrapStyle2.TopAndBottom:
this.btnWrapTopBottom.toggle(true);
break;
case c_oAscWrapStyle2.Behind:
case Asc.c_oAscWrapStyle2.Behind:
this.btnWrapBehind.toggle(true);
break;
case c_oAscWrapStyle2.InFront:
case Asc.c_oAscWrapStyle2.InFront:
this.btnWrapInFront.toggle(true);
break;
default:
@ -955,7 +955,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTopBottom.setDisabled(true);
this.btnWrapBehind.setDisabled(true);
this.btnWrapInFront.setDisabled(true);
this._DisableElem(c_oAscWrapStyle2.Inline);
this._DisableElem(Asc.c_oAscWrapStyle2.Inline);
}
this.spnWidth.setMaxValue(this.sizeMax.width);
@ -1067,7 +1067,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}
}
}
this.chMove.setValue((value==c_oAscRelativeFromV.Line || value==c_oAscRelativeFromV.Paragraph), true);
this.chMove.setValue((value==Asc.c_oAscRelativeFromV.Line || value==Asc.c_oAscRelativeFromV.Paragraph), true);
this.chMove.setDisabled(!Position.get_UseAlign() && Position.get_Percent());
}
@ -1086,7 +1086,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnsCategory[1].setDisabled(props.get_FromGroup()); // Wrapping
if (shapeprops) {
this._objectType = c_oAscTypeSelectElement.Shape;
this._objectType = Asc.c_oAscTypeSelectElement.Shape;
this._setShapeDefaults(shapeprops);
this.setTitle(this.textTitleShape);
value = Common.localStorage.getItem("de-settings-shaperatio");
@ -1106,7 +1106,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnsCategory[4].setDisabled(null === margins); // Margins
}
else if (chartprops) {
this._objectType = c_oAscTypeSelectElement.Chart;
this._objectType = Asc.c_oAscTypeSelectElement.Chart;
this.setTitle(this.textTitleChart);
value = Common.localStorage.getItem("de-settings-chartratio");
}
@ -1126,10 +1126,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
getSettings: function() {
var value = (this.btnRatio.pressed) ? 1 : 0;
if (this._objectType==c_oAscTypeSelectElement.Shape) {
if (this._objectType==Asc.c_oAscTypeSelectElement.Shape) {
Common.localStorage.setItem("de-settings-shaperatio", value);
}
else if (this._objectType==c_oAscTypeSelectElement.Chart) {
else if (this._objectType==Asc.c_oAscTypeSelectElement.Chart) {
Common.localStorage.setItem("de-settings-chartratio", value);
}
else {
@ -1138,7 +1138,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
var properties = this._changedProps;
if (this._objectType == c_oAscTypeSelectElement.Shape) {
if (this._objectType == Asc.c_oAscTypeSelectElement.Shape) {
properties.put_ShapeProperties(this._changedShapeProps);
if (this.Margins) {
if (properties.get_ShapeProperties()===null || properties.get_ShapeProperties()===undefined)
@ -1147,22 +1147,22 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}
}
if (this._originalProps.get_WrappingStyle()===c_oAscWrapStyle2.Inline && properties.get_WrappingStyle() !== undefined && properties.get_WrappingStyle()!==c_oAscWrapStyle2.Inline ) {
if (this._originalProps.get_WrappingStyle()===Asc.c_oAscWrapStyle2.Inline && properties.get_WrappingStyle() !== undefined && properties.get_WrappingStyle()!==Asc.c_oAscWrapStyle2.Inline ) {
if ( properties.get_PositionH()===null || properties.get_PositionH()===undefined ) {
properties.put_PositionH(new CImagePositionH());
properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(false);
properties.get_PositionH().put_Percent(false);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
properties.get_PositionH().put_Value(val);
}
if ( properties.get_PositionV()===null || properties.get_PositionV()===undefined ) {
properties.put_PositionV(new CImagePositionV());
properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(false);
properties.get_PositionV().put_Percent(false);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_Value(val);
}
}
@ -1270,22 +1270,22 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
},
_DisableElem: function(btnId){
var disabledLR = (btnId == c_oAscWrapStyle2.Inline || btnId == c_oAscWrapStyle2.Behind || btnId == c_oAscWrapStyle2.InFront || btnId == c_oAscWrapStyle2.TopAndBottom);
var disabledTB = (btnId == c_oAscWrapStyle2.Inline || btnId == c_oAscWrapStyle2.Behind || btnId == c_oAscWrapStyle2.InFront
|| btnId == c_oAscWrapStyle2.Tight || btnId == c_oAscWrapStyle2.Through);
var disabledLR = (btnId == Asc.c_oAscWrapStyle2.Inline || btnId == Asc.c_oAscWrapStyle2.Behind || btnId == Asc.c_oAscWrapStyle2.InFront || btnId == Asc.c_oAscWrapStyle2.TopAndBottom);
var disabledTB = (btnId == Asc.c_oAscWrapStyle2.Inline || btnId == Asc.c_oAscWrapStyle2.Behind || btnId == Asc.c_oAscWrapStyle2.InFront
|| btnId == Asc.c_oAscWrapStyle2.Tight || btnId == Asc.c_oAscWrapStyle2.Through);
this.spnLeft.setDisabled(disabledLR);
this.spnRight.setDisabled(disabledLR);
this.spnTop.setDisabled(disabledTB);
this.spnBottom.setDisabled(disabledTB);
this.btnsCategory[2].setDisabled(btnId == c_oAscWrapStyle2.Inline);
this.btnsCategory[2].setDisabled(btnId == Asc.c_oAscWrapStyle2.Inline);
},
onHAlignSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HAlignType = record.value;
this._changedProps.get_PositionH().put_UseAlign(true);
@ -1298,7 +1298,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHRelativeSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HAlignFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(true);
@ -1311,7 +1311,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHPositionSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HPositionFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false);
@ -1328,7 +1328,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHPositionPcSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HPositionPcFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false);
@ -1345,7 +1345,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVAlignSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VAlignType = record.value;
this._changedProps.get_PositionV().put_UseAlign(true);
@ -1358,7 +1358,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVRelativeSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VAlignFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(true);
@ -1366,14 +1366,14 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom);
this._changedProps.get_PositionV().put_Align(this._state.VAlignType);
this.chMove.setValue(this._state.VAlignFrom==c_oAscRelativeFromV.Line || this._state.VAlignFrom==c_oAscRelativeFromV.Paragraph, true);
this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Line || this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
}
},
onVPositionSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VPositionFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false);
@ -1384,7 +1384,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true);
}
this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue()));
this.chMove.setValue(this._state.VPositionFrom==c_oAscRelativeFromV.Line || this._state.VPositionFrom==c_oAscRelativeFromV.Paragraph, true);
this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Line || this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
}
},
@ -1392,7 +1392,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVPositionPcSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VPositionPcFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false);
@ -1409,7 +1409,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(newValue);
if (newValue) {
@ -1431,7 +1431,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
if (newValue) {
this._changedProps.get_PositionH().put_UseAlign(false);
@ -1453,7 +1453,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHPositionPcChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH());
this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_Percent(newValue);
if (newValue) {
@ -1475,7 +1475,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(newValue);
if (newValue) {
@ -1489,7 +1489,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVRelative.setDisabled(false);
this.spnY.setDisabled(true);
this.cmbVPosition.setDisabled(true);
this.chMove.setValue(this._state.VAlignFrom==c_oAscRelativeFromV.Line || this._state.VAlignFrom==c_oAscRelativeFromV.Paragraph, true);
this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Line || this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
this.chMove.setDisabled(false);
this.spnYPc.setDisabled(true);
this.cmbVPositionPc.setDisabled(true);
@ -1499,7 +1499,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
if (newValue) {
this._changedProps.get_PositionV().put_UseAlign(false);
@ -1513,7 +1513,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVRelative.setDisabled(true);
this.spnY.setDisabled(false);
this.cmbVPosition.setDisabled(false);
this.chMove.setValue(this._state.VPositionFrom==c_oAscRelativeFromV.Line || this._state.VPositionFrom==c_oAscRelativeFromV.Paragraph, true);
this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Line || this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
this.chMove.setDisabled(false);
this.spnYPc.setDisabled(true);
this.cmbVPositionPc.setDisabled(true);
@ -1523,7 +1523,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVPositionPcChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV());
this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_Percent(newValue);
if (newValue) {

View file

@ -100,9 +100,9 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
});
this._arrFormat = [
{displayValue: this.textHTML, value: c_oAscFileType.HTML},
{displayValue: this.textAttachDocx,value: c_oAscFileType.DOCX},
{displayValue: this.textAttachPdf,value: c_oAscFileType.PDF}
{displayValue: this.textHTML, value: Asc.c_oAscFileType.HTML},
{displayValue: this.textAttachDocx,value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textAttachPdf,value: Asc.c_oAscFileType.PDF}
];
this.cmbFormat = new Common.UI.ComboBox({
el: $('#merge-email-dlg-format'),
@ -111,7 +111,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
editable: false,
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.inputFileName = new Common.UI.InputField({
@ -183,13 +183,13 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
getSettings: function() {
var filename = this.inputFileName.getValue(),
mailformat = this.cmbFormat.getValue();
if (mailformat!==c_oAscFileType.HTML) {
if (mailformat!==Asc.c_oAscFileType.HTML) {
if (_.isEmpty(filename)) filename = 'attach';
var idx = filename.lastIndexOf('.'),
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';
else if (mailformat==c_oAscFileType.DOCX && ext!=='.docx')
else if (mailformat==Asc.c_oAscFileType.DOCX && ext!=='.docx')
filename += '.docx';
}
@ -244,7 +244,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
},
onCmbFormatSelect: function(combo, record) {
var attachDisable = (record.value == c_oAscFileType.HTML);
var attachDisable = (record.value == Asc.c_oAscFileType.HTML);
this.inputFileName.setDisabled(attachDisable);
this.lblFileName.toggleClass('disabled', attachDisable);
(attachDisable) ? this.textareaMessage.attr('disabled', 'disabled') : this.textareaMessage.removeAttr('disabled');

View file

@ -209,9 +209,9 @@ define([
this.emptyDBControls.push(this.btnLast);
this._arrMergeSrc = [
{displayValue: this.textPdf, value: c_oAscFileType.PDF},
{displayValue: this.textDocx, value: c_oAscFileType.DOCX},
{displayValue: this.textEmail, value: c_oAscFileType.HTML}
{displayValue: this.textPdf, value: Asc.c_oAscFileType.PDF},
{displayValue: this.textDocx, value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textEmail, value: Asc.c_oAscFileType.HTML}
];
this.cmbMergeTo = new Common.UI.ComboBox({
el: $('#mmerge-combo-merge-to', me.$el),
@ -524,11 +524,11 @@ define([
if (this._mailMergeDlg) return;
var me = this;
if (this.cmbMergeTo.getValue() != c_oAscFileType.HTML) {
if (this.cmbMergeTo.getValue() != Asc.c_oAscFileType.HTML) {
me._mailMergeDlg = new DE.Views.MailMergeSaveDlg({
mergeFolderUrl: me.mode.mergeFolderUrl,
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
}).on('mailmergeerror', function(obj, err){ // save last folder
@ -659,14 +659,14 @@ define([
from = parseInt(this.txtFieldFrom.getValue())-1;
to = parseInt(this.txtFieldTo.getValue())-1;
}
var mmdata = new CMailMergeSendData();
var mmdata = new Asc.CMailMergeSendData();
mmdata.put_RecordFrom(from);
mmdata.put_RecordTo(to);
mmdata.put_From(this.mergeMailData.from);
mmdata.put_To(this.mergeMailData.to);
mmdata.put_Subject(this.mergeMailData.subject);
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_Message(this.mergeMailData.message);
}
@ -677,7 +677,7 @@ define([
},
onLongActionEnd: function(type, id) {
if (id == c_oAscAsyncAction['SendMailMerge']) {
if (id == Asc.c_oAscAsyncAction['SendMailMerge']) {
Common.UI.info({
closable: false,
width: 500,
@ -752,7 +752,7 @@ define([
},
onCmbMergeToSelect: function(combo, record) {
var mergeVisible = (record.value == c_oAscFileType.HTML);
var mergeVisible = (record.value == Asc.c_oAscFileType.HTML);
this.btnMerge.setVisible(mergeVisible);
this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl);
this.btnDownload.setVisible(!mergeVisible);

View file

@ -364,10 +364,10 @@ define([
}
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();
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() };
} else {
this.BackColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -436,7 +436,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new DE.Views.ParagraphSettingsAdvanced(
{
tableStylerRows: 2,

View file

@ -641,10 +641,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
// Borders
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();
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()};
} else {
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
this._changedProps.put_Shade(new CParagraphShd());
}
if (this.paragraphShade=='transparent') {
this._changedProps.get_Shade().put_Value(shd_Nil);
this._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} 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));
}
}

View file

@ -81,17 +81,17 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
WrappingStyle: c_oAscWrapStyle2.Inline,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true,
FromGroup: false,
DisabledFillPanels: false,
@ -102,10 +102,10 @@ define([
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -124,11 +124,11 @@ define([
this.render();
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -309,8 +309,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -369,8 +369,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -539,13 +539,13 @@ define([
$(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
@ -616,12 +616,12 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill);
@ -629,19 +629,19 @@ define([
this.api.ImgApply(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -659,15 +659,15 @@ define([
this.api.ImgApply(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -687,12 +687,12 @@ define([
this.api.ImgApply(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
@ -712,10 +712,10 @@ define([
var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -736,10 +736,10 @@ define([
this.PatternFillType = record.get('type');
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -756,10 +756,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -776,9 +776,9 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -793,10 +793,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -856,7 +856,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -866,7 +866,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -880,10 +880,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -913,12 +913,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -941,13 +941,13 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -984,13 +984,13 @@ define([
if (this._sliderChanged) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -1012,13 +1012,13 @@ define([
var props = new CAscShapeProp();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1063,9 +1063,9 @@ define([
var props = new CAscShapeProp();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1111,17 +1111,17 @@ define([
var props = new CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH());
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
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_RelativeFrom(c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val);
}
@ -1142,7 +1142,7 @@ define([
if (me.BlipFillType !== null) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1171,7 +1171,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
(new DE.Views.ImageSettingsAdvanced(
{
imageProps: elValue,
@ -1254,13 +1254,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
color = fill.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1268,23 +1268,23 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1299,7 +1299,7 @@ define([
color = fill.get_color_fg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1309,7 +1309,7 @@ define([
color = fill.get_color_bg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1317,17 +1317,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1338,7 +1338,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1355,7 +1355,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1366,7 +1366,7 @@ define([
color = colors[1];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1394,7 +1394,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1437,10 +1437,10 @@ define([
var strokeType = stroke.get_type();
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
}
else
@ -1480,8 +1480,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1501,7 +1501,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1661,9 +1661,9 @@ define([
if (this.api) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE);
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
@ -1738,11 +1738,11 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -89,7 +89,7 @@ define([
};
this.lockedControls = [];
this._locked = false;
this._originalLook = new CTablePropLook();
this._originalLook = new Asc.CTablePropLook();
var fullwidth = 218;
this._originalProps = null;
@ -353,8 +353,8 @@ define([
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
if (this.api) {
var properties = new CTableProp();
var look = (this._originalLook) ? this._originalLook : new CTablePropLook();
var properties = new Asc.CTableProp();
var look = (this._originalLook) ? this._originalLook : new Asc.CTablePropLook();
switch (type) {
case 0:
look.put_FirstRow(field.getValue()=='checked');
@ -383,7 +383,7 @@ define([
onTableTemplateSelect: function(combo, record){
if (this.api && !this._noApply) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_TableStyle(record.get('templateId'));
this.api.tblApply(properties);
}
@ -392,7 +392,7 @@ define([
onBtnWrapClick: function(btn, e) {
if (this.api && btn.pressed && !this._noApply) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_TableWrap(btn.options.posId);
if (btn.options.posId == c_tableWrap.TABLE_WRAP_NONE) {
if (this._state.TableAlignment<0)
@ -410,7 +410,7 @@ define([
onCheckRepeatRowChange: function(field, newValue, oldValue, eOpts) {
if (this.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_RowsInHeader((field.getValue()=='checked') ? 1 : 0 );
this.api.tblApply(properties);
}
@ -422,8 +422,8 @@ define([
this.CellColor = {Value: 1, Color: color};
if (this.api) {
var properties = new CTableProp();
var background = new CBackground();
var properties = new Asc.CTableProp();
var background = new Asc.CBackground();
properties.put_CellsBackground(background);
if (this.CellColor.Color=='transparent') {
@ -451,7 +451,7 @@ define([
onBtnBordersClick: function(btn, eOpts){
this._UpdateBordersStyle(btn.options.strId, true);
if (this.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true);
this.api.tblApply(properties);
@ -522,7 +522,7 @@ define([
if (props )
{
this._originalProps = new CTableProp(props);
this._originalProps = new Asc.CTableProp(props);
this._originalProps.put_CellSelect(true);
this._TblWrapStyleChanged(props.get_TableWrap());
@ -608,7 +608,7 @@ define([
if (background.get_Value()==0) {
var color = background.get_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() }};
} else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -655,7 +655,7 @@ define([
},
_UpdateBordersStyle: function(border) {
this.CellBorders = new CBorders();
this.CellBorders = new Asc.CBorders();
var updateBorders = this.CellBorders;
var visible = (border != '');
@ -765,7 +765,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) {
if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new DE.Views.TableSettingsAdvanced(
{
tableStylerRows: (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2,

View file

@ -80,12 +80,12 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._cellBackground = null;
this._state = {
HAlignType: c_oAscXAlign.Left,
HAlignFrom: c_oAscHAnchor.Margin,
HPositionFrom: c_oAscHAnchor.Margin,
VAlignType: c_oAscYAlign.Top,
VAlignFrom: c_oAscVAnchor.Margin,
VPositionFrom: c_oAscVAnchor.Margin,
HAlignType: Asc.c_oAscXAlign.Left,
HAlignFrom: Asc.c_oAscHAnchor.Margin,
HPositionFrom: Asc.c_oAscHAnchor.Margin,
VAlignType: Asc.c_oAscYAlign.Top,
VAlignFrom: Asc.c_oAscVAnchor.Margin,
VPositionFrom: Asc.c_oAscVAnchor.Margin,
spnXChanged: false,
spnYChanged: false,
fromWrapInline: false,
@ -124,7 +124,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableStylerColumns = this.options.tableStylerColumns;
this.borderProps = this.options.borderProps;
this.pageWidth = (this.options.sectionProps) ? this.options.sectionProps.get_W() - this.options.sectionProps.get_LeftMargin() - this.options.sectionProps.get_RightMargin() : 210;
this._originalProps = new CTableProp(this.options.tableProps);
this._originalProps = new Asc.CTableProp(this.options.tableProps);
},
render: function() {
@ -235,7 +235,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
});
this.chAutofit.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
this._changedProps.put_TableLayout((field.getValue()=='checked') ? c_oAscTableLayout.AutoFit : c_oAscTableLayout. Fixed);
this._changedProps.put_TableLayout((field.getValue()=='checked') ? Asc.c_oAscTableLayout.AutoFit : Asc.c_oAscTableLayout. Fixed);
}
}, this));
@ -343,7 +343,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.CellMargins.Flag = field.getValue();
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
@ -365,7 +365,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
setCellFlag();
}
@ -385,7 +385,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
setCellFlag();
}
@ -405,7 +405,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
setCellFlag();
}
@ -425,7 +425,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null);
setCellFlag();
}
@ -685,7 +685,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionFrom);
@ -709,7 +709,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionFrom);
@ -721,9 +721,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
// Horizontal
this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscXAlign.Left},
{displayValue: this.textCenter, value: c_oAscXAlign.Center},
{displayValue: this.textRight, value: c_oAscXAlign.Right}
{displayValue: this.textLeft, value: Asc.c_oAscXAlign.Left},
{displayValue: this.textCenter, value: Asc.c_oAscXAlign.Center},
{displayValue: this.textRight, value: Asc.c_oAscXAlign.Right}
];
this.cmbHAlign = new Common.UI.ComboBox({
@ -737,9 +737,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this));
this._arrHRelative = [
{displayValue: this.textMargin, value: c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: c_oAscHAnchor.Page},
{displayValue: this.textAnchorText, value: c_oAscHAnchor.Text}
{displayValue: this.textMargin, value: Asc.c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: Asc.c_oAscHAnchor.Page},
{displayValue: this.textAnchorText, value: Asc.c_oAscHAnchor.Text}
];
this.cmbHRelative = new Common.UI.ComboBox({
@ -765,9 +765,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
// Vertical
this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscYAlign.Top},
{displayValue: this.textCenter, value: c_oAscYAlign.Center},
{displayValue: this.textBottom, value: c_oAscYAlign.Bottom}
{displayValue: this.textTop, value: Asc.c_oAscYAlign.Top},
{displayValue: this.textCenter, value: Asc.c_oAscYAlign.Center},
{displayValue: this.textBottom, value: Asc.c_oAscYAlign.Bottom}
];
this.cmbVAlign = new Common.UI.ComboBox({
@ -781,9 +781,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this));
this._arrVRelative = [
{displayValue: this.textMargin, value: c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: c_oAscVAnchor.Page},
{displayValue: this.textAnchorText, value: c_oAscVAnchor.Text}
{displayValue: this.textMargin, value: Asc.c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: Asc.c_oAscVAnchor.Page},
{displayValue: this.textAnchorText, value: Asc.c_oAscVAnchor.Text}
];
this.cmbVRelative = new Common.UI.ComboBox({
@ -1092,7 +1092,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
for (var j=0; j<this.tableBordersImageSpacing.columns; j++) {
this.tableBordersImageSpacing.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders();
this.ChangedCellBorders = new Asc.CBorders();
}
this._UpdateCellBordersStyle(ct, border, size, color, this.CellBorders, this.ChangedCellBorders);
}, this);
@ -1100,7 +1100,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
}
this.tableBordersImageSpacing.on('borderclick', function(ct, border, size, color){
if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders();
this.ChangedTableBorders = new Asc.CBorders();
}
this._UpdateTableBordersStyle(ct, border, size, color, this.TableBorders, this.ChangedTableBorders);
}, this);
@ -1110,11 +1110,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableBordersImage.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this._allTable) {
if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders();
this.ChangedTableBorders = new Asc.CBorders();
}
} else {
if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders();
this.ChangedCellBorders = new Asc.CBorders();
}
}
this._UpdateCellBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
@ -1124,11 +1124,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableBordersImage.on('borderclick', function(ct, border, size, color){
if (this._allTable) {
if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders();
this.ChangedTableBorders = new Asc.CBorders();
}
} else {
if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders();
this.ChangedCellBorders = new Asc.CBorders();
}
}
this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
@ -1194,7 +1194,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
var autoFit = props.get_TableLayout();
this.chAutofit.setDisabled(autoFit===undefined);
this.chAutofit.setValue(autoFit===c_oAscTableLayout.AutoFit, true);
this.chAutofit.setValue(autoFit===Asc.c_oAscTableLayout.AutoFit, true);
// margins
var margins = props.get_DefaultMargins();
@ -1319,7 +1319,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
break;
}
}
if (value==c_oAscVAnchor.Text)
if (value==Asc.c_oAscVAnchor.Text)
this.chMove.setValue(true, true);
if (Position.get_UseAlign()) {
@ -1348,9 +1348,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._state.horizontalPropChanged = false;
// borders
this.TableBorders = new CBorders(props.get_TableBorders());
this.TableBorders = new Asc.CBorders(props.get_TableBorders());
this.CellBorders = new CBorders(props.get_CellBorders());
this.CellBorders = new Asc.CBorders(props.get_CellBorders());
this._UpdateBordersNoSpacing_();
this._UpdateBordersSpacing_();
@ -1365,7 +1365,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (background && background.get_Value()==0) {
var color = background.get_Color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.TableColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.TableColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1380,7 +1380,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (background.get_Value()==0) {
var color = background.get_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() }};
} else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1423,7 +1423,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.ShowHideSpacing(this.chAllowSpacing.getValue()==='checked');
}
this._changedProps = new CTableProp();
this._changedProps = new Asc.CTableProp();
this._cellBackground = null;
this.ChangedTableBorders = undefined;
this.ChangedCellBorders = undefined;
@ -1466,11 +1466,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.ShowHideWrap(true);
if (this._changedProps && btn.pressed) {
if (this._state.alignChanged) {
if (this._state.HAlignType===c_oAscXAlign.Left)
if (this._state.HAlignType===Asc.c_oAscXAlign.Left)
this.btnAlignLeft.toggle(true, true);
else if (this._state.HAlignType==c_oAscXAlign.Center)
else if (this._state.HAlignType==Asc.c_oAscXAlign.Center)
this.btnAlignCenter.toggle(true, true);
else if (this._state.HAlignType==c_oAscXAlign.Right)
else if (this._state.HAlignType==Asc.c_oAscXAlign.Right)
this.btnAlignRight.toggle(true, true);
this._state.alignChanged = false;
}
@ -1494,13 +1494,13 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.radioVPosition.setValue(true);
}
if (this._state.alignChanged) {
if (this.btnAlignLeft.pressed) this._state.HAlignType = c_oAscXAlign.Left;
else if (this.btnAlignCenter.pressed) this._state.HAlignType = c_oAscXAlign.Center;
else this._state.HAlignType = c_oAscXAlign.Right;
if (this.btnAlignLeft.pressed) this._state.HAlignType = Asc.c_oAscXAlign.Left;
else if (this.btnAlignCenter.pressed) this._state.HAlignType = Asc.c_oAscXAlign.Center;
else this._state.HAlignType = Asc.c_oAscXAlign.Right;
this.cmbHAlign.setValue(this._state.HAlignType);
this.radioHAlign.setValue(true);
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(true);
this._changedProps.get_PositionH().put_Align(this._state.HAlignType);
@ -1516,7 +1516,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHAlignSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HAlignType = record.value;
this._changedProps.get_PositionH().put_UseAlign(true);
@ -1529,7 +1529,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHRelativeSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HAlignFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(true);
@ -1541,7 +1541,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHPositionSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HPositionFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false);
@ -1557,7 +1557,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onVAlignSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VAlignType = record.value;
this._changedProps.get_PositionV().put_UseAlign(true);
@ -1569,21 +1569,21 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onVRelativeSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VAlignFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(true);
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom);
this._changedProps.get_PositionV().put_Align(this._state.VAlignType);
this.chMove.setValue(this._state.VAlignFrom==c_oAscVAnchor.Text, true);
this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscVAnchor.Text, true);
}
},
onVPositionSelect: function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VPositionFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false);
@ -1593,14 +1593,14 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true);
}
this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue()));
this.chMove.setValue(this._state.VPositionFrom==c_oAscVAnchor.Text, true);
this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscVAnchor.Text, true);
}
},
onRadioHAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(newValue);
if (newValue) {
@ -1621,7 +1621,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onRadioHPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH());
this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(!newValue);
if (newValue) {
@ -1645,7 +1645,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onRadioVAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(newValue);
if (newValue) {
@ -1659,14 +1659,14 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVRelative.setDisabled(false);
this.spnY.setDisabled(true);
this.cmbVPosition.setDisabled(true);
this.chMove.setValue(this._state.VAlignFrom==c_oAscVAnchor.Text, true);
this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscVAnchor.Text, true);
}
},
onRadioVPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV());
this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(!newValue);
if (newValue) {
@ -1683,7 +1683,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVRelative.setDisabled(true);
this.spnY.setDisabled(false);
this.cmbVPosition.setDisabled(false);
this.chMove.setValue(this._state.VPositionFrom==c_oAscVAnchor.Text, true);
this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscVAnchor.Text, true);
}
},
@ -1709,7 +1709,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.CellColor = {Value: 1, Color: color};
if (this._cellBackground === null)
this._cellBackground = new CBackground();
this._cellBackground = new Asc.CBackground();
if (this.CellColor.Color=='transparent') {
this._cellBackground.put_Value(1);
@ -1727,7 +1727,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (this._changedProps) {
var background = this._changedProps.get_TableBackground();
if (background===undefined) {
background = new CBackground();
background = new Asc.CBackground();
this._changedProps.put_TableBackground(background);
}
if (this.TableColor.Color=='transparent') {

View file

@ -79,22 +79,22 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
StrokeType: c_oAscStrokeType.STROKE_COLOR,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
};
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -124,9 +124,9 @@ define([
this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -209,8 +209,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -415,12 +415,12 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
@ -428,19 +428,19 @@ define([
this.api.ImgApply(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -458,12 +458,12 @@ define([
this.api.ImgApply(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -483,10 +483,10 @@ define([
var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -550,7 +550,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -560,7 +560,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -574,10 +574,10 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -607,12 +607,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -635,13 +635,13 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -678,13 +678,13 @@ define([
if (this._sliderChanged) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -706,13 +706,13 @@ define([
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -757,9 +757,9 @@ define([
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -811,13 +811,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
color = fill.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -825,16 +825,16 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -845,7 +845,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -862,7 +862,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -873,7 +873,7 @@ define([
color = colors[1];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -901,7 +901,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
}
@ -940,10 +940,10 @@ define([
strokeType = (stroke) ? stroke.get_type() : null;
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
}
else
@ -982,8 +982,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1003,7 +1003,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1134,9 +1134,9 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -569,10 +569,10 @@ define([
menu: new Common.UI.Menu({
menuAlign: 'tl-tr',
items : [
{caption: this.textNextPage, value: c_oAscSectionBreakType.NextPage},
{caption: this.textContPage, value: c_oAscSectionBreakType.Continuous},
{caption: this.textEvenPage, value: c_oAscSectionBreakType.EvenPage},
{caption: this.textOddPage, value: c_oAscSectionBreakType.OddPage}
{caption: this.textNextPage, value: Asc.c_oAscSectionBreakType.NextPage},
{caption: this.textContPage, value: Asc.c_oAscSectionBreakType.Continuous},
{caption: this.textEvenPage, value: Asc.c_oAscSectionBreakType.EvenPage},
{caption: this.textOddPage, value: Asc.c_oAscSectionBreakType.OddPage}
]
})
})
@ -646,9 +646,9 @@ define([
menu : new Common.UI.Menu({
cls: 'ppm-toolbar',
items: [
{ caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.None, checked: true },
{ caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.Drop },
{ caption: this.textInMargin, iconCls: 'mnu-dropcap-inmargin', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.Margin },
{ caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.None, checked: true },
{ caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Drop },
{ caption: this.textInMargin, iconCls: 'mnu-dropcap-inmargin', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Margin },
{ caption: '--' },
this.mnuDropCapAdvanced = new Common.UI.MenuItem({ caption: this.mniEditDropCap })
]
@ -1048,31 +1048,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
})

View file

@ -369,6 +369,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -58,7 +58,7 @@ Ext.define('DE.controller.Main', {
var api = this.api,
app = this.getApplication();
api = new asc_docs_api("id-sdkeditor");
api = new Asc.asc_docs_api("id-sdkeditor");
api.SetMobileVersion(true);
api.CreateComponents();
api.asc_SetFontsPath("../../../../sdkjs/fonts/");
@ -190,15 +190,15 @@ Ext.define('DE.controller.Main', {
var text = '';
switch (id) {
case c_oAscAsyncAction['Save']:
case Asc.c_oAscAsyncAction['Save']:
text = this.saveText;
break;
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
text = this.printText;
}
if (type == c_oAscAsyncActionType['BlockInteraction']) {
if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
Ext.Viewport.setMasked({
xtype : 'loadmask',
message : text
@ -220,63 +220,63 @@ Ext.define('DE.controller.Main', {
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.SplitCellMaxRows:
case Asc.c_oAscError.ID.SplitCellMaxRows:
config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellMaxCols:
case Asc.c_oAscError.ID.SplitCellMaxCols:
config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellRowsDivider:
case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.message = this.splitDividerErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.message = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.message = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.message = this.errorUsersExceed;
break;
case c_oAscError.ID.CoAuthoringDisconnect:
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.message = this.errorCoAuthoringDisconnect;
break;
case c_oAscError.ID.MobileUnexpectedCharCount:
case Asc.c_oAscError.ID.MobileUnexpectedCharCount:
config.message = this.errorDocTooBig;
config.out = true;
break;
@ -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
Common.Gateway.reportError(id, config.message);
@ -348,7 +348,7 @@ Ext.define('DE.controller.Main', {
},
onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.DOCX, true);
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
},
_hideLoadSplash: function(){

View file

@ -88,7 +88,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
imgProperty = new CImgProperty();
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);
@ -239,7 +239,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
if (selectedElements && selectedElements.length > 0) {
var elementType = selectedElements[0].get_ObjectType();
if (c_oAscTypeSelectElement.Table == elementType) {
if (Asc.c_oAscTypeSelectElement.Table == elementType) {
type === 'row'
? this.api.addRowBelow()
: type === 'column'

View file

@ -350,6 +350,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -413,6 +413,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -214,7 +214,7 @@ var ApplicationController = new(function(){
var text = '';
switch (id)
{
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...';
break;
default:
@ -222,7 +222,7 @@ var ApplicationController = new(function(){
break;
}
if (type == c_oAscAsyncActionType['BlockInteraction']) {
if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text);
showMask();
}
@ -359,19 +359,19 @@ var ApplicationController = new(function(){
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText;
break;
@ -380,7 +380,7 @@ var ApplicationController = new(function(){
break;
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, message);
@ -431,7 +431,7 @@ var ApplicationController = new(function(){
}
function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.PPTX, true);
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
}
// Helpers
// -------------------------
@ -712,7 +712,7 @@ var ApplicationController = new(function(){
}, 2000);
});
api = new asc_docs_api("editor_sdk");
api = new Asc.asc_docs_api("editor_sdk");
if (api){
api.CreateComponents();

View file

@ -105,7 +105,7 @@ define([
// Initialize api
this.api = new asc_docs_api("editor_sdk");
this.api = new Asc.asc_docs_api("editor_sdk");
if (this.api){
window["flat_desine"] = true;
@ -303,7 +303,7 @@ define([
},
onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.PPTX, true);
this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
},
onProcessMouse: function(data) {
@ -359,11 +359,11 @@ define([
this.updateWindowTitle(true);
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
if (action) {
this.setLongActionView(action)
} else {
if (this._state.fastCoauth && this._state.usersCount>1 && id==c_oAscAsyncAction['Save']) {
if (this._state.fastCoauth && this._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
var me = this;
if (me._state.timerSave===undefined)
me._state.timerSave = setInterval(function(){
@ -377,13 +377,13 @@ define([
this.getApplication().getController('Statusbar').setStatusCaption('');
}
action = this.stackLongActions.get({type: c_oAscAsyncActionType.BlockInteraction});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
action ? this.setLongActionView(action) : this.loadMask && this.loadMask.hide();
if (id==c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
if (id==Asc.c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
this.synchronizeChanges();
if (type == c_oAscAsyncActionType.BlockInteraction && !((id == c_oAscAsyncAction['LoadDocumentFonts'] || id == c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) {
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) {
this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true);
}
@ -393,63 +393,63 @@ define([
var title = '', text = '';
switch (action.id) {
case c_oAscAsyncAction['Open']:
case Asc.c_oAscAsyncAction['Open']:
title = this.openTitleText;
text = this.openTextText;
break;
case c_oAscAsyncAction['Save']:
case Asc.c_oAscAsyncAction['Save']:
this._state.isSaving = new Date();
title = this.saveTitleText;
text = this.saveTextText;
break;
case c_oAscAsyncAction['LoadDocumentFonts']:
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
title = this.loadFontsTitleText;
text = this.loadFontsTextText;
break;
case c_oAscAsyncAction['LoadDocumentImages']:
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
title = this.loadImagesTitleText;
text = this.loadImagesTextText;
break;
case c_oAscAsyncAction['LoadFont']:
case Asc.c_oAscAsyncAction['LoadFont']:
title = this.loadFontTitleText;
text = this.loadFontTextText;
break;
case c_oAscAsyncAction['LoadImage']:
case Asc.c_oAscAsyncAction['LoadImage']:
title = this.loadImageTitleText;
text = this.loadImageTextText;
break;
case c_oAscAsyncAction['DownloadAs']:
case Asc.c_oAscAsyncAction['DownloadAs']:
title = this.downloadTitleText;
text = this.downloadTextText;
break;
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
title = this.printTitleText;
text = this.printTextText;
break;
case c_oAscAsyncAction['UploadImage']:
case Asc.c_oAscAsyncAction['UploadImage']:
title = this.uploadImageTitleText;
text = this.uploadImageTextText;
break;
case c_oAscAsyncAction['LoadTheme']:
case Asc.c_oAscAsyncAction['LoadTheme']:
title = this.loadThemeTitleText;
text = this.loadThemeTextText;
break;
case c_oAscAsyncAction['ApplyChanges']:
case Asc.c_oAscAsyncAction['ApplyChanges']:
title = this.applyChangesTitleText;
text = this.applyChangesTextText;
break;
case c_oAscAsyncAction['PrepareToSave']:
case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText;
text = this.savePreparingTitle;
break;
@ -465,7 +465,7 @@ define([
break;
}
if (action.type == c_oAscAsyncActionType['BlockInteraction']) {
if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
if (!this.loadMask)
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
@ -486,7 +486,7 @@ define([
data.requestrights = true;
this.appOptions.isEdit= true;
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
var me = this;
setTimeout(function(){
@ -554,7 +554,7 @@ define([
me.api.SetDrawingFreeze(false);
me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
value = Common.localStorage.getItem("pe-settings-zoom");
var zf = (value!==null) ? parseInt(value) : -1;
@ -727,7 +727,7 @@ define([
if (!this.appOptions.isEdit) {
this.hidePreloader();
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
},
@ -835,11 +835,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) {
me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
// Message on window close
@ -859,7 +859,7 @@ define([
onError: function(id, level, errData) {
this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
var config = {
closable: false
@ -867,79 +867,79 @@ define([
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.SplitCellMaxRows:
case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellMaxCols:
case Asc.c_oAscError.ID.SplitCellMaxCols:
config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellRowsDivider:
case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
case c_oAscError.ID.CoAuthoringDisconnect:
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect;
break;
case c_oAscError.ID.ConvertationPassword:
case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect;
break;
case c_oAscError.ID.StockChartError:
case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart;
break;
case c_oAscError.ID.DataRangeError:
case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange;
break;
case c_oAscError.ID.Database:
case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection;
break;
case c_oAscError.ID.UserDrop:
case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) {
this._state.lostEditingRights = false;
return;
@ -948,7 +948,7 @@ define([
config.msg = this.errorUserDrop;
break;
case c_oAscError.ID.Warning:
case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer;
break;
@ -958,7 +958,7 @@ define([
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, config.msg);
@ -980,7 +980,7 @@ define([
config.iconCls = 'warn';
config.buttons = ['ok'];
config.callback = _.bind(function(btn){
if (id == c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
Common.UI.Menu.Manager.hideAll();
(this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas');
}
@ -1169,14 +1169,14 @@ define([
onUpdateVersion: function(callback) {
var me = this;
me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.error({
msg: this.errorUpdateVersion,
callback: function() {
_.defer(function() {
Common.Gateway.updateVersion();
if (callback) callback.call(me);
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
})
}
});

View file

@ -280,17 +280,17 @@ define([
getDocumentSettingsType: function(type) {
switch (type) {
case c_oAscTypeSelectElement.Paragraph:
case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Table:
case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table;
case c_oAscTypeSelectElement.Image:
case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image;
case c_oAscTypeSelectElement.Shape:
case Asc.c_oAscTypeSelectElement.Shape:
return Common.Utils.documentSettingsType.Shape;
case c_oAscTypeSelectElement.Slide:
case Asc.c_oAscTypeSelectElement.Slide:
return Common.Utils.documentSettingsType.Slide;
case c_oAscTypeSelectElement.Chart:
case Asc.c_oAscTypeSelectElement.Chart:
return Common.Utils.documentSettingsType.Chart;
}
}

View file

@ -461,9 +461,9 @@ define([
btnVerticalAlign = this.toolbar.btnVerticalAlign;
switch (v) {
case 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 c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break;
case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP: index = 0; align = 'btn-align-top'; break;
case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR: index = 1; align = 'btn-align-middle'; break;
case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break;
default: index = -255; align = 'btn-align-middle'; break;
}
@ -567,14 +567,14 @@ define([
while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue();
if (type == c_oAscTypeSelectElement.Paragraph) {
if (type == Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked();
no_paragraph = false;
no_object = false;
} else if (type == c_oAscTypeSelectElement.Slide) {
} else if (type == Asc.c_oAscTypeSelectElement.Slide) {
slide_deleted = pr.get_LockDelete();
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();
no_object = false;
}
@ -1187,7 +1187,7 @@ define([
slides: _arr
});
props = new CHyperlinkProperty();
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
@ -1520,7 +1520,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker;
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() };
} else
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());

View file

@ -108,31 +108,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
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: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: 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: 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: 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: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: 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: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});
@ -249,7 +249,7 @@ define([
this.disableControls(this._locked);
if (props){
this._originalProps = new CAscChartProp(props);
this._originalProps = new Asc.CAscChartProp(props);
this._noApply = true;
var value = props.get_SeveralCharts() || this._locked;
@ -363,7 +363,7 @@ define([
this._state.ChartType = -1;
if (this.api && !this._noApply) {
var props = new CAscChartProp();
var props = new Asc.CAscChartProp();
props.changeType(rawData.type);
this.api.ChartApply(props);
}
@ -392,7 +392,7 @@ define([
btnIconEl.css('background-image', style);
if (this.api && !this._noApply) {
var props = new CAscChartProp();
var props = new Asc.CAscChartProp();
props.putStyle(rawData.data);
this.api.ChartApply(props);
}
@ -450,7 +450,7 @@ define([
this.spnHeight.setValue(h, true);
}
if (this.api) {
var props = new CAscChartProp();
var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props);
@ -471,7 +471,7 @@ define([
this.spnWidth.setValue(w, true);
}
if (this.api) {
var props = new CAscChartProp();
var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props);

View file

@ -73,7 +73,7 @@ define([
var showPoint = [event.get_X(), event.get_Y()],
menuContainer = $(me.el).find(Common.Utils.String.format('#menu-container-{0}', menu.id));
if (event.get_Type() == c_oAscContextMenuTypes.Thumbnails) {
if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
showPoint[0] -= 3;
showPoint[1] -= 3;
}
@ -120,21 +120,21 @@ define([
var elType = element.get_ObjectType(),
elValue = element.get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
menu_to_show = me.pictureMenu;
menu_props.imgProps = {};
menu_props.imgProps.value = elValue;
menu_props.imgProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.Table == elType)
} else if (Asc.c_oAscTypeSelectElement.Table == elType)
{
menu_to_show = me.tableMenu;
menu_props.tableProps = {};
menu_props.tableProps.value = elValue;
menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.Hyperlink == elType) {
} else if (Asc.c_oAscTypeSelectElement.Hyperlink == elType) {
menu_props.hyperProps = {};
menu_props.hyperProps.value = elValue;
} else if (c_oAscTypeSelectElement.Shape == elType) { // shape
} else if (Asc.c_oAscTypeSelectElement.Shape == elType) { // shape
menu_to_show = me.pictureMenu;
menu_props.shapeProps = {};
menu_props.shapeProps.value = elValue;
@ -142,17 +142,17 @@ define([
if (elValue.get_FromChart())
menu_props.shapeProps.isChart = true;
}
else if (c_oAscTypeSelectElement.Chart == elType) {
else if (Asc.c_oAscTypeSelectElement.Chart == elType) {
menu_to_show = me.pictureMenu;
menu_props.chartProps = {};
menu_props.chartProps.value = elValue;
menu_props.chartProps.locked = (elValue) ? elValue.get_Locked() : false;
}
else if (c_oAscTypeSelectElement.Slide == elType) {
else if (Asc.c_oAscTypeSelectElement.Slide == elType) {
menu_props.slideProps = {};
menu_props.slideProps.value = elValue;
menu_props.slideProps.locked = (elValue) ? elValue.get_LockDelete() : false;
} else if (c_oAscTypeSelectElement.Paragraph == elType) {
} else if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
menu_props.paraProps = {};
menu_props.paraProps.value = elValue;
menu_props.paraProps.locked = (elValue) ? elValue.get_Locked() : false;
@ -181,7 +181,7 @@ define([
var onContextMenu = function(event){
_.delay(function(){
if (event.get_Type() == c_oAscContextMenuTypes.Thumbnails) {
if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
showPopupMenu.call(me, me.slideMenu, {isSlideSelect: event.get_IsSlideSelect(), fromThumbs: true}, event);
} else {
showObjectMenu.call(me, event);
@ -552,7 +552,7 @@ define([
slides: _arr
});
props = new CHyperlinkProperty();
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
@ -561,7 +561,7 @@ define([
var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){
_.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();
});
}
@ -981,7 +981,7 @@ define([
lockedLayout = false;
if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(element, index) {
if (c_oAscTypeSelectElement.Slide == element.get_ObjectType()) {
if (Asc.c_oAscTypeSelectElement.Slide == element.get_ObjectType()) {
var elValue = element.get_ObjectValue();
locked = elValue.get_LockDelete();
lockedDeleted = elValue.get_LockRemove();
@ -1105,7 +1105,7 @@ define([
menu : (function(){
function onItemClick(item, e) {
if (me.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.value);
me.api.tblApply(properties);
}
@ -1121,19 +1121,19 @@ define([
caption : me.topCellText,
checkable : true,
toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Top
value : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(onItemClick, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({
caption : me.centerCellText,
checkable : true,
toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Center
value : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(onItemClick, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({
caption : me.bottomCellText,
checkable : true,
toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Bottom
value : Asc.c_oAscVertAlignJc.Bottom
}).on('click', _.bind(onItemClick, me))
]
})
@ -1152,7 +1152,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) {
if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new PE.Views.TableSettingsAdvanced(
{
tableProps: elValue,
@ -1185,7 +1185,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal;
if (!menuImgOriginalSize.isDisabled()) {
@ -1225,7 +1225,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Shape == elType) {
if (Asc.c_oAscTypeSelectElement.Shape == elType) {
(new PE.Views.ShapeSettingsAdvanced(
{
shapeProps: elValue,
@ -1258,7 +1258,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new PE.Views.ParagraphSettingsAdvanced(
{
paragraphProps: elValue,
@ -1446,32 +1446,32 @@ define([
new Common.UI.MenuItem({
caption : me.textShapeAlignLeft,
iconCls : 'mnu-shape-align-left',
value : c_oAscAlignShapeType.ALIGN_LEFT
value : Asc.c_oAscAlignShapeType.ALIGN_LEFT
}).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({
caption : me.textShapeAlignCenter,
iconCls : 'mnu-shape-align-center',
value : c_oAscAlignShapeType.ALIGN_CENTER
value : Asc.c_oAscAlignShapeType.ALIGN_CENTER
}).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({
caption : me.textShapeAlignRight,
iconCls : 'mnu-shape-align-right',
value : c_oAscAlignShapeType.ALIGN_RIGHT
value : Asc.c_oAscAlignShapeType.ALIGN_RIGHT
}).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({
caption : me.textShapeAlignTop,
iconCls : 'mnu-shape-align-top',
value : c_oAscAlignShapeType.ALIGN_TOP
value : Asc.c_oAscAlignShapeType.ALIGN_TOP
}).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({
caption : me.textShapeAlignMiddle,
iconCls : 'mnu-shape-align-middle',
value : c_oAscAlignShapeType.ALIGN_MIDDLE
value : Asc.c_oAscAlignShapeType.ALIGN_MIDDLE
}).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({
caption : me.textShapeAlignBottom,
iconCls : 'mnu-shape-align-bottom',
value : c_oAscAlignShapeType.ALIGN_BOTTOM
value : Asc.c_oAscAlignShapeType.ALIGN_BOTTOM
}).on('click', _.bind(onItemClick, me)),
{caption : '--'},
new Common.UI.MenuItem({
@ -1527,19 +1527,19 @@ define([
caption : me.topCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}).on('click', _.bind(onItemClick, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}).on('click', _.bind(onItemClick, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}).on('click', _.bind(onItemClick, me))
]
})
@ -1567,7 +1567,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal
direction : Asc.c_oAscVertDrawingText.normal
}).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text,
@ -1575,7 +1575,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert
direction : Asc.c_oAscVertDrawingText.vert
}).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text,
@ -1583,7 +1583,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270
direction : Asc.c_oAscVertDrawingText.vert270
}).on('click', _.bind(paragraphDirection, me))
]
})
@ -1693,14 +1693,14 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign();
me.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
var dir = value.shapeProps.value.get_Vert();
me.menuParagraphDirectH.setChecked(dir == c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == c_oAscVertDrawingText.vert270);
me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
}
menuParagraphVAlign.setDisabled(disabled);
menuParagraphDirection.setDisabled(disabled);
@ -1718,7 +1718,7 @@ define([
if (text!==false) {
menuAddHyperlinkPara.hyperProps = {};
menuAddHyperlinkPara.hyperProps.value = new CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value.put_Text(text);
}
@ -1771,9 +1771,9 @@ define([
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Bottom);
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Bottom);
if (me.api) {
mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells());
@ -1802,7 +1802,7 @@ define([
if (text!==false) {
menuAddHyperlinkTable.hyperProps = {};
menuAddHyperlinkTable.hyperProps.value = new CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value.put_Text(text);
}
if (!_.isUndefined(value.paraProps)) {

View file

@ -53,8 +53,8 @@ define([
menu: undefined,
formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF},
{name: 'PPTX', imgCls: 'pptx', type: c_oAscFileType.PPTX}
{name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'PPTX', imgCls: 'pptx', type: Asc.c_oAscFileType.PPTX}
]],

View file

@ -159,7 +159,7 @@ define([
me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength
maxLength : Asc.c_oAscMaxTooltipLength
});
me.radioNext = new Common.UI.RadioBox({
@ -237,7 +237,7 @@ define([
getSettings: function () {
var me = this,
props = new CHyperlinkProperty();
props = new Asc.CHyperlinkProperty();
var def_display = '';
if (me.cmbLinkType.getValue() == c_oHyperlinkType.InternalLink) {
var url = "ppaction://hlink";

View file

@ -207,7 +207,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage();

View file

@ -219,7 +219,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
if (this.spnWidth.getValue()!=='')
properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
var Position = new CPosition();
var Position = new Asc.CPosition();
if (this.spnX.getValue() !== '')
Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue()));
if (this.spnY.getValue() !== '')

View file

@ -327,7 +327,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new PE.Views.ParagraphSettingsAdvanced(
{
paragraphProps: elValue,

View file

@ -80,16 +80,16 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
DisabledFillPanels: false,
DisabledControls: false,
HideShapeOnlySettings: false,
@ -98,10 +98,10 @@ define([
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -120,11 +120,11 @@ define([
this.render();
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -304,8 +304,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -364,8 +364,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -578,31 +578,31 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill);
this.api.ShapeApply(props);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -619,15 +619,15 @@ define([
this.api.ShapeApply(props);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -647,12 +647,12 @@ define([
this.api.ShapeApply(props);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_fill(fill);
this.api.ShapeApply(props);
@ -671,10 +671,10 @@ define([
var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -694,10 +694,10 @@ define([
this.PatternFillType = record.get('type');
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -713,10 +713,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -732,9 +732,9 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -748,10 +748,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -808,7 +808,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -818,7 +818,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -832,10 +832,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -864,12 +864,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -891,13 +891,13 @@ define([
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -933,13 +933,13 @@ define([
if (this._sliderChanged) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -960,13 +960,13 @@ define([
var props = new CAscShapeProp();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1010,9 +1010,9 @@ define([
var props = new CAscShapeProp();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1033,7 +1033,7 @@ define([
if (me.BlipFillType !== null) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1061,7 +1061,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Shape == elType) {
if (Asc.c_oAscTypeSelectElement.Shape == elType) {
(new PE.Views.ShapeSettingsAdvanced(
{
shapeProps: elValue,
@ -1118,13 +1118,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
color = fill.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1132,23 +1132,23 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1163,7 +1163,7 @@ define([
color = fill.get_color_fg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1173,7 +1173,7 @@ define([
color = fill.get_color_bg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1181,17 +1181,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1202,7 +1202,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1219,7 +1219,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1230,7 +1230,7 @@ define([
color = colors[1];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1258,7 +1258,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1301,10 +1301,10 @@ define([
var strokeType = stroke.get_type();
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
}
else
@ -1344,8 +1344,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1365,7 +1365,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1525,9 +1525,9 @@ define([
if (this.api) {
var props = new CAscShapeProp();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE);
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill);
this.api.ShapeApply(props);
@ -1601,11 +1601,11 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -226,9 +226,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
// Shape
this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square}
{displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
];
this.cmbCapType = new Common.UI.ComboBox({
@ -238,7 +238,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
editable: false,
data: this._arrCapType
});
this.cmbCapType.setValue(c_oAscLineCapType.Flat);
this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
@ -249,9 +249,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}, this));
this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter}
{displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
];
this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'),
@ -260,7 +260,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
editable: false,
data: this._arrJoinType
});
this.cmbJoinType.setValue(c_oAscLineJoinType.Round);
this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
@ -275,25 +275,25 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval;
_arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large;
_arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({

View file

@ -84,21 +84,21 @@ define([
};
this._state = {
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
SlideColor: 'ffffff',
BlipFillType: c_oAscFillBlipType.STRETCH,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR
};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.SlideColor = {Value: 1, Color: 'ffffff'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.Effect = c_oAscSlideTransitionTypes.None;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.Effect = Asc.c_oAscSlideTransitionTypes.None;
this.EffectType = undefined;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -112,11 +112,11 @@ define([
this.render();
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -291,8 +291,8 @@ define([
this.FillItems.push(this.btnInsertFromUrl);
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -325,8 +325,8 @@ define([
this.FillItems.push(this.btnTexture);
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -445,15 +445,15 @@ define([
this.FillGradientContainer = $('#slide-panel-gradient-fill');
this._arrEffectName = [
{displayValue: this.textNone, value: c_oAscSlideTransitionTypes.None},
{displayValue: this.textFade, value: c_oAscSlideTransitionTypes.Fade},
{displayValue: this.textPush, value: c_oAscSlideTransitionTypes.Push},
{displayValue: this.textWipe, value: c_oAscSlideTransitionTypes.Wipe},
{displayValue: this.textSplit, value: c_oAscSlideTransitionTypes.Split},
{displayValue: this.textUnCover, value: c_oAscSlideTransitionTypes.UnCover},
{displayValue: this.textCover, value: c_oAscSlideTransitionTypes.Cover},
{displayValue: this.textClock, value: c_oAscSlideTransitionTypes.Clock},
{displayValue: this.textZoom, value: c_oAscSlideTransitionTypes.Zoom}
{displayValue: this.textNone, value: Asc.c_oAscSlideTransitionTypes.None},
{displayValue: this.textFade, value: Asc.c_oAscSlideTransitionTypes.Fade},
{displayValue: this.textPush, value: Asc.c_oAscSlideTransitionTypes.Push},
{displayValue: this.textWipe, value: Asc.c_oAscSlideTransitionTypes.Wipe},
{displayValue: this.textSplit, value: Asc.c_oAscSlideTransitionTypes.Split},
{displayValue: this.textUnCover, value: Asc.c_oAscSlideTransitionTypes.UnCover},
{displayValue: this.textCover, value: Asc.c_oAscSlideTransitionTypes.Cover},
{displayValue: this.textClock, value: Asc.c_oAscSlideTransitionTypes.Clock},
{displayValue: this.textZoom, value: Asc.c_oAscSlideTransitionTypes.Zoom}
];
this.cmbEffectName = new Common.UI.ComboBox({
@ -468,26 +468,26 @@ define([
this.cmbEffectName.on('selected', _.bind(this.onEffectNameSelect, this));
this._arrEffectType = [
{displayValue: this.textSmoothly, value: c_oAscSlideTransitionParams.Fade_Smoothly},
{displayValue: this.textBlack, value: c_oAscSlideTransitionParams.Fade_Through_Black},
{displayValue: this.textLeft, value: c_oAscSlideTransitionParams.Param_Left},
{displayValue: this.textTop, value: c_oAscSlideTransitionParams.Param_Top},
{displayValue: this.textRight, value: c_oAscSlideTransitionParams.Param_Right},
{displayValue: this.textBottom, value: c_oAscSlideTransitionParams.Param_Bottom},
{displayValue: this.textTopLeft, value: c_oAscSlideTransitionParams.Param_TopLeft},
{displayValue: this.textTopRight, value: c_oAscSlideTransitionParams.Param_TopRight},
{displayValue: this.textBottomLeft, value: c_oAscSlideTransitionParams.Param_BottomLeft},
{displayValue: this.textBottomRight, value: c_oAscSlideTransitionParams.Param_BottomRight},
{displayValue: this.textVerticalIn, value: c_oAscSlideTransitionParams.Split_VerticalIn},
{displayValue: this.textVerticalOut, value: c_oAscSlideTransitionParams.Split_VerticalOut},
{displayValue: this.textHorizontalIn, value: c_oAscSlideTransitionParams.Split_HorizontalIn},
{displayValue: this.textHorizontalOut, value: c_oAscSlideTransitionParams.Split_HorizontalOut},
{displayValue: this.textClockwise, value: c_oAscSlideTransitionParams.Clock_Clockwise},
{displayValue: this.textCounterclockwise, value: c_oAscSlideTransitionParams.Clock_Counterclockwise},
{displayValue: this.textWedge, value: c_oAscSlideTransitionParams.Clock_Wedge},
{displayValue: this.textZoomIn, value: c_oAscSlideTransitionParams.Zoom_In},
{displayValue: this.textZoomOut, value: c_oAscSlideTransitionParams.Zoom_Out},
{displayValue: this.textZoomRotate, value: c_oAscSlideTransitionParams.Zoom_AndRotate}
{displayValue: this.textSmoothly, value: Asc.c_oAscSlideTransitionParams.Fade_Smoothly},
{displayValue: this.textBlack, value: Asc.c_oAscSlideTransitionParams.Fade_Through_Black},
{displayValue: this.textLeft, value: Asc.c_oAscSlideTransitionParams.Param_Left},
{displayValue: this.textTop, value: Asc.c_oAscSlideTransitionParams.Param_Top},
{displayValue: this.textRight, value: Asc.c_oAscSlideTransitionParams.Param_Right},
{displayValue: this.textBottom, value: Asc.c_oAscSlideTransitionParams.Param_Bottom},
{displayValue: this.textTopLeft, value: Asc.c_oAscSlideTransitionParams.Param_TopLeft},
{displayValue: this.textTopRight, value: Asc.c_oAscSlideTransitionParams.Param_TopRight},
{displayValue: this.textBottomLeft, value: Asc.c_oAscSlideTransitionParams.Param_BottomLeft},
{displayValue: this.textBottomRight, value: Asc.c_oAscSlideTransitionParams.Param_BottomRight},
{displayValue: this.textVerticalIn, value: Asc.c_oAscSlideTransitionParams.Split_VerticalIn},
{displayValue: this.textVerticalOut, value: Asc.c_oAscSlideTransitionParams.Split_VerticalOut},
{displayValue: this.textHorizontalIn, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalIn},
{displayValue: this.textHorizontalOut, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalOut},
{displayValue: this.textClockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Clockwise},
{displayValue: this.textCounterclockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Counterclockwise},
{displayValue: this.textWedge, value: Asc.c_oAscSlideTransitionParams.Clock_Wedge},
{displayValue: this.textZoomIn, value: Asc.c_oAscSlideTransitionParams.Zoom_In},
{displayValue: this.textZoomOut, value: Asc.c_oAscSlideTransitionParams.Zoom_Out},
{displayValue: this.textZoomRotate, value: Asc.c_oAscSlideTransitionParams.Zoom_AndRotate}
];
this.cmbEffectType = new Common.UI.ComboBox({
@ -574,31 +574,31 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.SlideColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.SlideColor.Color));
props.put_background(fill);
this.api.SetSlideProps(props);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -615,15 +615,15 @@ define([
this.api.SetSlideProps(props);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -642,12 +642,12 @@ define([
this.api.SetSlideProps(props);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_background(fill);
this.api.SetSlideProps(props);
@ -666,10 +666,10 @@ define([
var fill = new CAscFill();
if (this.SlideColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color));
}
@ -689,10 +689,10 @@ define([
this.PatternFillType = record.get('type');
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -708,10 +708,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -727,9 +727,9 @@ define([
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -743,10 +743,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -760,7 +760,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -770,7 +770,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -784,10 +784,10 @@ define([
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -816,12 +816,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -843,13 +843,13 @@ define([
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -885,13 +885,13 @@ define([
if (this._sliderChanged) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -914,7 +914,7 @@ define([
if (me.BlipFillType !== null) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -998,9 +998,9 @@ define([
if (this.api) {
var props = new CAscSlideProps();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE);
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_background(fill);
this.api.SetSlideProps(props);
@ -1012,28 +1012,28 @@ define([
fillEffectTypeCombo: function (type) {
var arr = [];
switch (type) {
case c_oAscSlideTransitionTypes.Fade:
case Asc.c_oAscSlideTransitionTypes.Fade:
arr.push(this._arrEffectType[0], this._arrEffectType[1]);
break;
case c_oAscSlideTransitionTypes.Push:
case Asc.c_oAscSlideTransitionTypes.Push:
arr = this._arrEffectType.slice(2, 6);
break;
case c_oAscSlideTransitionTypes.Wipe:
case Asc.c_oAscSlideTransitionTypes.Wipe:
arr = this._arrEffectType.slice(2, 10);
break;
case c_oAscSlideTransitionTypes.Split:
case Asc.c_oAscSlideTransitionTypes.Split:
arr = this._arrEffectType.slice(10, 14);
break;
case c_oAscSlideTransitionTypes.UnCover:
case Asc.c_oAscSlideTransitionTypes.UnCover:
arr = this._arrEffectType.slice(2, 10);
break;
case c_oAscSlideTransitionTypes.Cover:
case Asc.c_oAscSlideTransitionTypes.Cover:
arr = this._arrEffectType.slice(2, 10);
break;
case c_oAscSlideTransitionTypes.Clock:
case Asc.c_oAscSlideTransitionTypes.Clock:
arr = this._arrEffectType.slice(14, 17);
break;
case c_oAscSlideTransitionTypes.Zoom:
case Asc.c_oAscSlideTransitionTypes.Zoom:
arr = this._arrEffectType.slice(17);
break;
}
@ -1052,13 +1052,13 @@ define([
onEffectNameSelect: function(combo, record) {
var type = record.value;
if (this.Effect !== type &&
!((this.Effect===c_oAscSlideTransitionTypes.Wipe || this.Effect===c_oAscSlideTransitionTypes.UnCover || this.Effect===c_oAscSlideTransitionTypes.Cover)&&
(type===c_oAscSlideTransitionTypes.Wipe || type===c_oAscSlideTransitionTypes.UnCover || type===c_oAscSlideTransitionTypes.Cover)) )
!((this.Effect===Asc.c_oAscSlideTransitionTypes.Wipe || this.Effect===Asc.c_oAscSlideTransitionTypes.UnCover || this.Effect===Asc.c_oAscSlideTransitionTypes.Cover)&&
(type===Asc.c_oAscSlideTransitionTypes.Wipe || type===Asc.c_oAscSlideTransitionTypes.UnCover || type===Asc.c_oAscSlideTransitionTypes.Cover)) )
this.fillEffectTypeCombo(type);
this.Effect = type;
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionType(type);
timing.put_TransitionOption(this.EffectType);
props.put_timing(timing);
@ -1071,7 +1071,7 @@ define([
this.EffectType = record.value;
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionType(this.Effect);
timing.put_TransitionOption(this.EffectType);
props.put_timing(timing);
@ -1083,7 +1083,7 @@ define([
onDurationChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionDuration(field.getNumberValue()*1000);
props.put_timing(timing);
this.api.SetSlideProps(props);
@ -1094,7 +1094,7 @@ define([
onDelayChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceDuration(field.getNumberValue()*1000);
props.put_timing(timing);
this.api.SetSlideProps(props);
@ -1105,7 +1105,7 @@ define([
onStartOnClickChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceOnMouseClick(field.getValue()=='checked');
props.put_timing(timing);
this.api.SetSlideProps(props);
@ -1117,7 +1117,7 @@ define([
this.numDelay.setDisabled(field.getValue()!=='checked');
if (this.api && !this._noApply) {
var props = new CAscSlideProps();
var timing = new CAscSlideTiming();
var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceAfter(field.getValue()=='checked');
props.put_timing(timing);
this.api.SetSlideProps(props);
@ -1133,10 +1133,10 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
},
ChangeSettings: function(props) {
@ -1155,13 +1155,13 @@ define([
var fill_type = fill.get_type();
var color = null;
if (fill===null || fill_type===null || fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет или не совпадает у неск. фигур
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
if (fill===null || fill_type===null || fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет или не совпадает у неск. фигур
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
color = fill.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.SlideColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1169,23 +1169,23 @@ define([
} else
this.SlideColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.SlideColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.SlideColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1200,7 +1200,7 @@ define([
color = fill.get_color_fg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1210,7 +1210,7 @@ define([
color = fill.get_color_bg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1218,17 +1218,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1239,7 +1239,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1256,7 +1256,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1267,7 +1267,7 @@ define([
color = colors[1];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1295,7 +1295,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.SlideColor = {Value: 1, Color: this.GradColor.colors[0]};

View file

@ -84,7 +84,7 @@ define([
};
this.lockedControls = [];
this._locked = false;
this._originalLook = new CTablePropLook();
this._originalLook = new Asc.CTablePropLook();
this._originalProps = null;
this.CellBorders = {};
@ -313,8 +313,8 @@ define([
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
if (this.api) {
var properties = new CTableProp();
var look = (this._originalLook) ? this._originalLook : new CTablePropLook();
var properties = new Asc.CTableProp();
var look = (this._originalLook) ? this._originalLook : new Asc.CTablePropLook();
switch (type) {
case 0:
look.put_FirstRow(field.getValue()=='checked');
@ -343,7 +343,7 @@ define([
onTableTemplateSelect: function(combo, record){
if (this.api && !this._noApply) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_TableStyle(record.get('templateId'));
this.api.tblApply(properties);
}
@ -355,8 +355,8 @@ define([
this.CellColor = {Value: 1, Color: color};
if (this.api) {
var properties = new CTableProp();
var background = new CBackground();
var properties = new Asc.CTableProp();
var background = new Asc.CBackground();
properties.put_CellsBackground(background);
if (this.CellColor.Color=='transparent') {
@ -383,7 +383,7 @@ define([
onBtnBordersClick: function(btn, eOpts){
this._UpdateBordersStyle(btn.options.strId, true);
if (this.api) {
var properties = new CTableProp();
var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true);
this.api.tblApply(properties);
@ -452,7 +452,7 @@ define([
if (props )
{
this._originalProps = new CTableProp(props);
this._originalProps = new Asc.CTableProp(props);
this._originalProps.put_CellSelect(true);
//for table-template
@ -526,7 +526,7 @@ define([
if (background.get_Value()==0) {
var color = background.get_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() }};
} else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -564,7 +564,7 @@ define([
},
_UpdateBordersStyle: function(border) {
this.CellBorders = new CBorders();
this.CellBorders = new Asc.CBorders();
var updateBorders = this.CellBorders;
var visible = (border != '');
@ -659,7 +659,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) {
if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new PE.Views.TableSettingsAdvanced(
{
tableProps: elValue,

View file

@ -89,7 +89,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
};
this._initialMarginsDefault = false; // если для всех выделенных ячеек пришло одинаковое значение Flag=0 (Use Default Margins)
this._originalProps = new CTableProp(this.options.tableProps);
this._originalProps = new Asc.CTableProp(this.options.tableProps);
},
render: function() {
@ -208,7 +208,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this.CellMargins.Flag = field.getValue();
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
@ -230,7 +230,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
setCellFlag();
}
@ -250,7 +250,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
setCellFlag();
}
@ -270,7 +270,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
setCellFlag();
}
@ -290,7 +290,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right');
if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins());
this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null);
setCellFlag();
}
@ -348,7 +348,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
}
this.fillMargins(this.CellMargins.Flag);
this._changedProps = new CTableProp();
this._changedProps = new Asc.CTableProp();
}
},

View file

@ -79,26 +79,26 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
};
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -134,11 +134,11 @@ define([
this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -319,8 +319,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -379,8 +379,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -593,12 +593,12 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
@ -606,19 +606,19 @@ define([
this.api.ShapeApply(this.shapeprops);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -636,15 +636,15 @@ define([
this.api.ShapeApply(this.shapeprops);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -664,12 +664,12 @@ define([
this.api.ShapeApply(this.shapeprops);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -689,10 +689,10 @@ define([
var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -713,10 +713,10 @@ define([
this.PatternFillType = record.get('type');
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -733,10 +733,10 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -753,9 +753,9 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -770,10 +770,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -833,7 +833,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -843,7 +843,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -857,10 +857,10 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -890,12 +890,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -918,13 +918,13 @@ define([
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -961,13 +961,13 @@ define([
if (this._sliderChanged) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true);
}
@ -989,13 +989,13 @@ define([
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1040,9 +1040,9 @@ define([
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR);
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
}
@ -1064,7 +1064,7 @@ define([
if (me.BlipFillType !== null) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1118,13 +1118,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
color = fill.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1132,23 +1132,23 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1163,7 +1163,7 @@ define([
color = fill.get_color_fg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1173,7 +1173,7 @@ define([
color = fill.get_color_bg();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1181,17 +1181,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1202,7 +1202,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1219,7 +1219,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1230,7 +1230,7 @@ define([
color = colors[1];
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1258,7 +1258,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1301,10 +1301,10 @@ define([
strokeType = (stroke) ? stroke.get_type() : null;
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color();
if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
}
else
@ -1343,8 +1343,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1364,7 +1364,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1532,9 +1532,9 @@ define([
if (this.api) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP);
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE);
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -1620,11 +1620,11 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -568,7 +568,7 @@ define([
icls : 'btn-align-top',
checkable : true,
toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
},
{
caption : me.textAlignMiddle,
@ -576,7 +576,7 @@ define([
icls : 'btn-align-middle',
checkable : true,
toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR,
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR,
checked : true
},
{
@ -585,7 +585,7 @@ define([
icls : 'btn-align-bottom',
checkable : true,
toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}
]
})
@ -696,31 +696,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
})
@ -897,32 +897,32 @@ define([
{
caption : me.textShapeAlignLeft,
iconCls : 'mnu-shape-align-left',
value : c_oAscAlignShapeType.ALIGN_LEFT
value : Asc.c_oAscAlignShapeType.ALIGN_LEFT
},
{
caption : me.textShapeAlignCenter,
iconCls : 'mnu-shape-align-center',
value : c_oAscAlignShapeType.ALIGN_CENTER
value : Asc.c_oAscAlignShapeType.ALIGN_CENTER
},
{
caption : me.textShapeAlignRight,
iconCls : 'mnu-shape-align-right',
value : c_oAscAlignShapeType.ALIGN_RIGHT
value : Asc.c_oAscAlignShapeType.ALIGN_RIGHT
},
{
caption : me.textShapeAlignTop,
iconCls : 'mnu-shape-align-top',
value : c_oAscAlignShapeType.ALIGN_TOP
value : Asc.c_oAscAlignShapeType.ALIGN_TOP
},
{
caption : me.textShapeAlignMiddle,
iconCls : 'mnu-shape-align-middle',
value : c_oAscAlignShapeType.ALIGN_MIDDLE
value : Asc.c_oAscAlignShapeType.ALIGN_MIDDLE
},
{
caption : me.textShapeAlignBottom,
iconCls : 'mnu-shape-align-bottom',
value : c_oAscAlignShapeType.ALIGN_BOTTOM
value : Asc.c_oAscAlignShapeType.ALIGN_BOTTOM
},
{caption: '--' },
{

View file

@ -354,6 +354,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -60,7 +60,7 @@ Ext.define('PE.controller.Main', {
app = this.getApplication(),
profile = app.getCurrentProfile();
api = new asc_docs_api("id-sdkeditor");
api = new Asc.asc_docs_api("id-sdkeditor");
api.SetMobileVersion(true);
api.CreateComponents();
api.asc_SetFontsPath("../../../../sdkjs/fonts/");
@ -172,11 +172,11 @@ Ext.define('PE.controller.Main', {
var text = '';
switch (id) {
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
text = this.printText;
}
if (type == c_oAscAsyncActionType['BlockInteraction']) {
if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
Ext.Viewport.setMasked({
xtype : 'loadmask',
message : text
@ -198,55 +198,55 @@ Ext.define('PE.controller.Main', {
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.SplitCellMaxRows:
case Asc.c_oAscError.ID.SplitCellMaxRows:
config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellMaxCols:
case Asc.c_oAscError.ID.SplitCellMaxCols:
config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.SplitCellRowsDivider:
case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.message = this.splitDividerErrorText.replace('%1', errData.get_Value());
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
@ -257,7 +257,7 @@ Ext.define('PE.controller.Main', {
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, config.message);
@ -305,7 +305,7 @@ Ext.define('PE.controller.Main', {
},
onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.PPTX, true);
this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
},
_hideLoadSplash: function(){

View file

@ -328,6 +328,7 @@
<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/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -316,7 +316,7 @@ var ApplicationController = new(function(){
var text = '';
switch (id)
{
case c_oAscAsyncAction['Print']:
case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...';
break;
default:
@ -324,16 +324,16 @@ var ApplicationController = new(function(){
break;
}
if (type == c_oAscAsyncActionType['BlockInteraction']) {
if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text);
showMask();
}
}
function onLongActionEnd(type, id){
if (type === c_oAscAsyncActionType.BlockInteraction) {
if (type === Asc.c_oAscAsyncActionType.BlockInteraction) {
switch (id) {
case c_oAscAsyncAction.Open:
case Asc.c_oAscAsyncAction.Open:
if (api) {
api.asc_Resize();
}
@ -354,19 +354,19 @@ var ApplicationController = new(function(){
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText;
break;
@ -375,7 +375,7 @@ var ApplicationController = new(function(){
break;
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, message);
@ -424,7 +424,7 @@ var ApplicationController = new(function(){
}
function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.XLSX, true);
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
}
// Helpers

View file

@ -121,9 +121,9 @@ define([
},
onApiEditCell: function(state) {
if (state == c_oAscCellEditorState.editStart)
if (state == Asc.c_oAscCellEditorState.editStart)
this.api.isCellEdited = true;
else if (state == c_oAscCellEditorState.editEnd) {
else if (state == Asc.c_oAscCellEditorState.editEnd) {
this.api.isCellEdited = false;
this.api.isCEditorFocused = false;
}
@ -148,7 +148,7 @@ define([
},
onCellsRange: function(status) {
var isRangeSelection = (status != c_oAscSelectionDialogType.None);
var isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
if (isRangeSelection) {
this.editor.$cellname.attr('disabled', 'disabled');
@ -244,7 +244,7 @@ define([
locked: this.namedrange_locked,
sheets: items,
sheetNames: sheetNames,
ranges: this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All),
ranges: this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All),
props : this.api.asc_getDefaultDefinedName(),
sort : this.rangeListSort
})).on('close', function(win){
@ -257,7 +257,7 @@ define([
},
onNameBeforeShow: function() {
var names = this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook),
var names = this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook),
rangesMenu = this.editor.btnNamedRanges.menu,
prev_name='';
@ -281,7 +281,7 @@ define([
},
onLockDefNameManager: function(state) {
this.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager);
this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
}
});
});

View file

@ -284,11 +284,11 @@ define([
onInsertEntire: function(item) {
if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) {
case c_oAscSelectionType.RangeRow:
this.api.asc_insertCells(c_oAscInsertOptions.InsertRows);
case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertRows);
break;
case c_oAscSelectionType.RangeCol:
this.api.asc_insertCells(c_oAscInsertOptions.InsertColumns);
case Asc.c_oAscSelectionType.RangeCol:
this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertColumns);
break;
}
@ -309,11 +309,11 @@ define([
onDeleteEntire: function(item) {
if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) {
case c_oAscSelectionType.RangeRow:
this.api.asc_deleteCells(c_oAscDeleteOptions.DeleteRows);
case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteRows);
break;
case c_oAscSelectionType.RangeCol:
this.api.asc_deleteCells(c_oAscDeleteOptions.DeleteColumns);
case Asc.c_oAscSelectionType.RangeCol:
this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteColumns);
break;
}
@ -418,7 +418,7 @@ define([
(new SSE.Views.SetValueDialog({
title: item.caption,
startvalue: item.options.action == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(),
maxvalue: item.options.action == 'row-height' ? c_oAscMaxRowHeight : c_oAscMaxColumnWidth,
maxvalue: item.options.action == 'row-height' ? Asc.c_oAscMaxRowHeight : Asc.c_oAscMaxColumnWidth,
step: item.options.action == 'row-height' ? 0.75 : 1,
defaultUnit: item.options.action == 'row-height' ? "pt" : "sym",
handler: function(dlg, result) {
@ -640,21 +640,21 @@ define([
index_column, index_row;
for (var i = dataarray.length; i > 0; i--) {
switch (dataarray[i-1].asc_getType()) {
case c_oAscMouseMoveType.Hyperlink:
case Asc.c_oAscMouseMoveType.Hyperlink:
index_hyperlink = i;
break;
/** coauthoring begin **/
case c_oAscMouseMoveType.Comment:
case Asc.c_oAscMouseMoveType.Comment:
index_comments = i;
break;
/** coauthoring end **/
case c_oAscMouseMoveType.LockedObject:
case Asc.c_oAscMouseMoveType.LockedObject:
index_locked = i;
break;
case c_oAscMouseMoveType.ResizeColumn:
case Asc.c_oAscMouseMoveType.ResizeColumn:
index_column = i;
break;
case c_oAscMouseMoveType.ResizeRow:
case Asc.c_oAscMouseMoveType.ResizeRow:
index_row = i;
break;
}
@ -692,7 +692,7 @@ define([
var data = dataarray[index_hyperlink-1],
props = data.asc_getHyperlink();
if (props.asc_getType() == c_oAscHyperlinkType.WebLink) {
if (props.asc_getType() == Asc.c_oAscHyperlinkType.WebLink) {
var linkstr = props.asc_getTooltip();
if (linkstr) {
linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>';
@ -842,8 +842,8 @@ define([
coAuthTip.y_point = data.asc_getY();
var src = $(document.createElement("div")),
is_sheet_lock = data.asc_getLockedObjectType() == c_oAscMouseMoveLockedObjectType.Sheet ||
data.asc_getLockedObjectType() == c_oAscMouseMoveLockedObjectType.TableProperties;
is_sheet_lock = data.asc_getLockedObjectType() == Asc.c_oAscMouseMoveLockedObjectType.Sheet ||
data.asc_getLockedObjectType() == Asc.c_oAscMouseMoveLockedObjectType.TableProperties;
coAuthTip.ref = src;
@ -1045,21 +1045,21 @@ define([
cansort = false;
if (this.permissions.isEditMailMerge) {
cansort = (seltype==c_oAscSelectionType.RangeCells);
cansort = (seltype==Asc.c_oAscSelectionType.RangeCells);
} else if (this.permissions.isEditDiagram) {
insfunc = (seltype==c_oAscSelectionType.RangeCells);
insfunc = (seltype==Asc.c_oAscSelectionType.RangeCells);
}
else {
switch (seltype) {
case c_oAscSelectionType.RangeCells: iscellmenu = true; break;
case c_oAscSelectionType.RangeRow: isrowmenu = true; break;
case c_oAscSelectionType.RangeCol: iscolmenu = true; break;
case c_oAscSelectionType.RangeMax: isallmenu = true; break;
case c_oAscSelectionType.RangeImage: isimagemenu = true; break;
case c_oAscSelectionType.RangeShape: isshapemenu = true; break;
case c_oAscSelectionType.RangeChart: ischartmenu = true; break;
case c_oAscSelectionType.RangeChartText:istextchartmenu = true; break;
case c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
case Asc.c_oAscSelectionType.RangeRow: isrowmenu = true; break;
case Asc.c_oAscSelectionType.RangeCol: iscolmenu = true; break;
case Asc.c_oAscSelectionType.RangeMax: isallmenu = true; break;
case Asc.c_oAscSelectionType.RangeImage: isimagemenu = true; break;
case Asc.c_oAscSelectionType.RangeShape: isshapemenu = true; break;
case Asc.c_oAscSelectionType.RangeChart: ischartmenu = true; break;
case Asc.c_oAscSelectionType.RangeChartText:istextchartmenu = true; break;
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
}
}
@ -1070,7 +1070,7 @@ define([
var has_chartprops = false;
var selectedObjects = this.api.asc_getGraphicObjectProps();
for (var i = 0; i < selectedObjects.length; i++) {
if (selectedObjects[i].asc_getObjectType() == c_oAscTypeSelectElement.Image) {
if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
var elValue = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || elValue.asc_getLocked();
var shapeprops = elValue.asc_getShapeProperties();
@ -1109,19 +1109,19 @@ define([
for (var i = 0; i < selectedObjects.length; i++) {
var elType = selectedObjects[i].asc_getObjectType();
if (elType == c_oAscTypeSelectElement.Image) {
if (elType == Asc.c_oAscTypeSelectElement.Image) {
var value = selectedObjects[i].asc_getObjectValue(),
align = value.asc_getVerticalTextAlign(),
direct = value.asc_getVert();
isObjLocked = isObjLocked || value.asc_getLocked();
documentHolder.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
documentHolder.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
documentHolder.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
documentHolder.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
documentHolder.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
documentHolder.menuParagraphDirectH.setChecked(direct == c_oAscVertDrawingText.normal);
documentHolder.menuParagraphDirect90.setChecked(direct == c_oAscVertDrawingText.vert);
documentHolder.menuParagraphDirect270.setChecked(direct == c_oAscVertDrawingText.vert270);
} else if (elType == c_oAscTypeSelectElement.Paragraph) {
documentHolder.menuParagraphDirectH.setChecked(direct == Asc.c_oAscVertDrawingText.normal);
documentHolder.menuParagraphDirect90.setChecked(direct == Asc.c_oAscVertDrawingText.vert);
documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
} else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) {
documentHolder.pmiTextAdvanced.textInfo = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || documentHolder.pmiTextAdvanced.textInfo.asc_getLocked();
}
@ -1143,8 +1143,8 @@ define([
documentHolder.textInShapeMenu.items[3].setVisible( documentHolder.menuHyperlinkShape.isVisible() ||
documentHolder.menuAddHyperlinkShape.isVisible() ||
documentHolder.menuParagraphVAlign.isVisible());
} else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== c_oAscSelectionType.RangeImage && seltype !== c_oAscSelectionType.RangeShape &&
seltype !== c_oAscSelectionType.RangeChart && seltype !== c_oAscSelectionType.RangeChartText && seltype !== c_oAscSelectionType.RangeShapeText)) {
} else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== Asc.c_oAscSelectionType.RangeImage && seltype !== Asc.c_oAscSelectionType.RangeShape &&
seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText)) {
if (!showMenu && !documentHolder.ssMenu.isVisible()) return;
var iscelledit = this.api.isCellEdited;
@ -1199,7 +1199,7 @@ define([
});
documentHolder.pmiCopy.setDisabled(false);
if (showMenu) this.showPopupMenu(documentHolder.ssMenu, {}, event);
} else if (this.permissions.isEditDiagram && seltype == c_oAscSelectionType.RangeChartText) {
} else if (this.permissions.isEditDiagram && seltype == Asc.c_oAscSelectionType.RangeChartText) {
if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return;
documentHolder.pmiTextAdvanced.textInfo = undefined;
@ -1278,7 +1278,7 @@ define([
var mnu = new Common.UI.MenuItem({
caption : menuItem
}).on('click', function(item, e) {
me.api.asc_insertFormula(item.caption, c_oAscPopUpSelectorType.None, false );
me.api.asc_insertFormula(item.caption, Asc.c_oAscPopUpSelectorType.None, false );
});
menu.addItem(mnu);
});
@ -1327,7 +1327,7 @@ define([
_.each(funcarr, function(menuItem, index) {
var type = menuItem.asc_getType(),
mnu = new Common.UI.MenuItem({
iconCls: (type==c_oAscPopUpSelectorType.Func) ? 'mnu-popup-func': ((type==c_oAscPopUpSelectorType.Table) ? 'mnu-popup-table' : 'mnu-popup-range') ,
iconCls: (type==Asc.c_oAscPopUpSelectorType.Func) ? 'mnu-popup-func': ((type==Asc.c_oAscPopUpSelectorType.Table) ? 'mnu-popup-table' : 'mnu-popup-range') ,
caption: menuItem.asc_getName()
}).on('click', function(item, e) {
setTimeout(function(){ me.api.asc_insertFormula(item.caption, type, false ); }, 10);
@ -1417,16 +1417,16 @@ define([
},
onCellsRange: function(status) {
this.rangeSelectionMode = (status != c_oAscSelectionDialogType.None);
this.rangeSelectionMode = (status != Asc.c_oAscSelectionDialogType.None);
},
onApiEditCell: function(state) {
this.isEditFormula = (state == c_oAscCellEditorState.editFormula);
this.isEditCell = (state != c_oAscCellEditorState.editEnd);
this.isEditFormula = (state == Asc.c_oAscCellEditorState.editFormula);
this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd);
},
onLockDefNameManager: function(state) {
this.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager);
this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
},
guestText : 'Guest',

View file

@ -83,7 +83,7 @@ define([
formulasGroups : this.formulasGroups,
handler : function (func) {
if (func && me.api) {
me.api.asc_insertFormula(func, c_oAscPopUpSelectorType.Func);
me.api.asc_insertFormula(func, Asc.c_oAscPopUpSelectorType.Func);
}
}
});

View file

@ -207,7 +207,7 @@ define([
},
clickSaveAsFormat: function(menu, format) {
if (format == c_oAscFileType.CSV) {
if (format == Asc.c_oAscFileType.CSV) {
Common.UI.warning({
closable: false,
title: this.textWarning,
@ -312,7 +312,7 @@ define([
options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
if (!this.api.asc_findText(options)) {
var me = this;
@ -337,7 +337,7 @@ define([
options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
options.asc_setIsReplaceAll(false);
this.api.asc_replaceText(options);
@ -355,7 +355,7 @@ define([
options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
options.asc_setIsReplaceAll(true);
this.api.asc_replaceText(options);
@ -474,7 +474,7 @@ define([
options.asc_setIsWholeCell(sett.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
if (!me.api.asc_findText(options)) {
@ -638,7 +638,7 @@ define([
},
onCellsRange: function(status) {
var isRangeSelection = (status != c_oAscSelectionDialogType.None);
var isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
this.leftMenu.btnFile.setDisabled(isRangeSelection);
this.leftMenu.btnAbout.setDisabled(isRangeSelection);
@ -647,7 +647,7 @@ define([
onApiEditCell: function(state) {
var isEditFormula = (state == c_oAscCellEditorState.editFormula);
var isEditFormula = (state == Asc.c_oAscCellEditorState.editFormula);
this.leftMenu.btnFile.setDisabled(isEditFormula);
this.leftMenu.btnAbout.setDisabled(isEditFormula);

View file

@ -132,7 +132,7 @@ define([
weakCompare : this._compareActionWeak
});
this.stackLongActions.push({id: InitApplication, type: c_oAscAsyncActionType.BlockInteraction});
this.stackLongActions.push({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
this.isShowOpenDialog = false;
@ -334,7 +334,7 @@ define([
},
onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.XLSX, true);
this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
},
onProcessMouse: function(data) {
@ -380,19 +380,19 @@ define([
this.headerView.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(this.api.asc_isDocumentModified(), true);
if (type === c_oAscAsyncActionType.BlockInteraction && id == c_oAscAsyncAction.Open) {
if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
Common.Gateway.internalMessage('documentReady', {});
this.onDocumentReady();
}
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
action && this.setLongActionView(action);
if (id == c_oAscAsyncAction.Save) {
if (id == Asc.c_oAscAsyncAction.Save) {
this.toolbarView.synchronizeChanges();
}
action = this.stackLongActions.get({type: c_oAscAsyncActionType.BlockInteraction});
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
if (action) {
this.setLongActionView(action);
} else {
@ -402,7 +402,7 @@ define([
this.loadMask.hide();
}
if (type == c_oAscAsyncActionType.BlockInteraction && !( (id == c_oAscAsyncAction['LoadDocumentFonts'] || id == c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment ))
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment ))
this.onEditComplete(this.loadMask, {restorefocus:true});
}
},
@ -411,51 +411,51 @@ define([
var title = '';
switch (action.id) {
case c_oAscAsyncAction.Open:
case Asc.c_oAscAsyncAction.Open:
title = this.openTitleText;
break;
case c_oAscAsyncAction.Save:
case Asc.c_oAscAsyncAction.Save:
title = this.saveTitleText;
break;
case c_oAscAsyncAction.LoadDocumentFonts:
case Asc.c_oAscAsyncAction.LoadDocumentFonts:
title = this.loadFontsTitleText;
break;
case c_oAscAsyncAction.LoadDocumentImages:
case Asc.c_oAscAsyncAction.LoadDocumentImages:
title = this.loadImagesTitleText;
break;
case c_oAscAsyncAction.LoadFont:
case Asc.c_oAscAsyncAction.LoadFont:
title = this.loadFontTitleText;
break;
case c_oAscAsyncAction.LoadImage:
case Asc.c_oAscAsyncAction.LoadImage:
title = this.loadImageTitleText;
break;
case c_oAscAsyncAction.DownloadAs:
case Asc.c_oAscAsyncAction.DownloadAs:
title = this.downloadTitleText;
break;
case c_oAscAsyncAction.Print:
case Asc.c_oAscAsyncAction.Print:
title = this.printTitleText;
break;
case c_oAscAsyncAction.UploadImage:
case Asc.c_oAscAsyncAction.UploadImage:
title = this.uploadImageTitleText;
break;
case c_oAscAsyncAction.Recalc:
case Asc.c_oAscAsyncAction.Recalc:
title = this.titleRecalcFormulas;
break;
case c_oAscAsyncAction.SlowOperation:
case Asc.c_oAscAsyncAction.SlowOperation:
title = this.textPleaseWait;
break;
case c_oAscAsyncAction['PrepareToSave']:
case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText;
break;
@ -468,7 +468,7 @@ define([
break;
}
if (action.type == c_oAscAsyncActionType.BlockInteraction) {
if (action.type == Asc.c_oAscAsyncActionType.BlockInteraction) {
!this.loadMask && (this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}));
this.loadMask.setTitle(title);
@ -482,7 +482,7 @@ define([
onApplyEditRights: function(data) {
if (data) {
if (data.allowed) {
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
this.appOptions.isEdit = true;
var me = this;
@ -542,7 +542,7 @@ define([
me._isDocReady = true;
me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
value = (this.appOptions.isEditMailMerge || this.appOptions.isEditDiagram) ? 100 : Common.localStorage.getItem("sse-settings-zoom");
this.api.asc_setZoom(!value?1:parseInt(value)/100);
@ -736,7 +736,7 @@ define([
if (!this.appOptions.isEdit) {
this.hidePreloader();
this.onLongActionBegin(c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
this.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
}
},
@ -883,11 +883,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) {
me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
// Message on window close
@ -907,148 +907,148 @@ define([
onError: function(id, level, errData) {
this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
var config = {closable: false};
switch (id) {
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.PastInMergeAreaError:
case Asc.c_oAscError.ID.PastInMergeAreaError:
config.msg = this.pastInMergeAreaError;
break;
case c_oAscError.ID.FrmlWrongCountParentheses:
case Asc.c_oAscError.ID.FrmlWrongCountParentheses:
config.msg = this.errorWrongBracketsCount;
break;
case c_oAscError.ID.FrmlWrongOperator:
case Asc.c_oAscError.ID.FrmlWrongOperator:
config.msg = this.errorWrongOperator;
break;
case c_oAscError.ID.FrmlWrongMaxArgument:
case Asc.c_oAscError.ID.FrmlWrongMaxArgument:
config.msg = this.errorCountArgExceed;
break;
case c_oAscError.ID.FrmlWrongCountArgument:
case Asc.c_oAscError.ID.FrmlWrongCountArgument:
config.msg = this.errorCountArg;
break;
case c_oAscError.ID.FrmlWrongFunctionName:
case Asc.c_oAscError.ID.FrmlWrongFunctionName:
config.msg = this.errorFormulaName;
break;
case c_oAscError.ID.FrmlAnotherParsingError:
case Asc.c_oAscError.ID.FrmlAnotherParsingError:
config.msg = this.errorFormulaParsing;
break;
case c_oAscError.ID.FrmlWrongArgumentRange:
case Asc.c_oAscError.ID.FrmlWrongArgumentRange:
config.msg = this.errorArgsRange;
break;
case c_oAscError.ID.UnexpectedGuid:
case Asc.c_oAscError.ID.UnexpectedGuid:
config.msg = this.errorUnexpectedGuid;
break;
case c_oAscError.ID.Database:
case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection;
break;
case c_oAscError.ID.FileRequest:
case Asc.c_oAscError.ID.FileRequest:
config.msg = this.errorFileRequest;
break;
case c_oAscError.ID.FileVKey:
case Asc.c_oAscError.ID.FileVKey:
config.msg = this.errorFileVKey;
break;
case c_oAscError.ID.StockChartError:
case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart;
break;
case c_oAscError.ID.DataRangeError:
case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange;
break;
case c_oAscError.ID.FrmlOperandExpected:
case Asc.c_oAscError.ID.FrmlOperandExpected:
config.msg = this.errorOperandExpected;
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
case c_oAscError.ID.CannotMoveRange:
case Asc.c_oAscError.ID.CannotMoveRange:
config.msg = this.errorMoveRange;
break;
case c_oAscError.ID.UplImageUrl:
case Asc.c_oAscError.ID.UplImageUrl:
config.msg = this.errorBadImageUrl;
break;
case c_oAscError.ID.CoAuthoringDisconnect:
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect;
break;
case c_oAscError.ID.ConvertationPassword:
case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect;
break;
case c_oAscError.ID.AutoFilterDataRangeError:
case Asc.c_oAscError.ID.AutoFilterDataRangeError:
config.msg = this.errorAutoFilterDataRange;
break;
case c_oAscError.ID.AutoFilterChangeFormatTableError:
case Asc.c_oAscError.ID.AutoFilterChangeFormatTableError:
config.msg = this.errorAutoFilterChangeFormatTable;
break;
case c_oAscError.ID.AutoFilterChangeError:
case Asc.c_oAscError.ID.AutoFilterChangeError:
config.msg = this.errorAutoFilterChange;
break;
case c_oAscError.ID.AutoFilterMoveToHiddenRangeError:
case Asc.c_oAscError.ID.AutoFilterMoveToHiddenRangeError:
config.msg = this.errorAutoFilterHiddenRange;
break;
case c_oAscError.ID.CannotFillRange:
case Asc.c_oAscError.ID.CannotFillRange:
config.msg = this.errorFillRange;
break;
case c_oAscError.ID.UserDrop:
case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) {
this._state.lostEditingRights = false;
return;
@ -1057,35 +1057,35 @@ define([
config.msg = this.errorUserDrop;
break;
case c_oAscError.ID.InvalidReferenceOrName:
case Asc.c_oAscError.ID.InvalidReferenceOrName:
config.msg = this.errorInvalidRef;
break;
case c_oAscError.ID.LockCreateDefName:
case Asc.c_oAscError.ID.LockCreateDefName:
config.msg = this.errorCreateDefName;
break;
case c_oAscError.ID.PasteMaxRangeError:
case Asc.c_oAscError.ID.PasteMaxRangeError:
config.msg = this.errorPasteMaxRange;
break;
case c_oAscError.ID.LockedAllError:
case Asc.c_oAscError.ID.LockedAllError:
config.msg = this.errorLockedAll;
break;
case c_oAscError.ID.Warning:
case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer;
break;
case c_oAscError.ID.LockedWorksheetRename:
case Asc.c_oAscError.ID.LockedWorksheetRename:
config.msg = this.errorLockedWorksheetRename;
break;
case c_oAscError.ID.OpenWarning:
case Asc.c_oAscError.ID.OpenWarning:
config.msg = this.errorOpenWarning;
break;
case c_oAscError.ID.FrmlWrongReferences:
case Asc.c_oAscError.ID.FrmlWrongReferences:
config.msg = this.errorFrmlWrongReferences;
break;
@ -1095,7 +1095,7 @@ define([
}
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
Common.Gateway.reportError(id, config.msg);
config.title = this.criticalErrorTitle;
@ -1114,7 +1114,7 @@ define([
config.iconCls = 'warn';
config.buttons = ['ok'];
config.callback = _.bind(function(btn){
if (id == c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
Common.UI.Menu.Manager.hideAll();
(this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas');
}
@ -1262,7 +1262,7 @@ define([
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
}
this.stackLongActions.pop({id: InitApplication, type: c_oAscAsyncActionType.BlockInteraction});
this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
Common.NotificationCenter.trigger('layout:changed', 'main');
$('#loading-mask').hide().remove();
},
@ -1278,14 +1278,14 @@ define([
onUpdateVersion: function(callback) {
var me = this;
me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.error({
msg: this.errorUpdateVersion,
callback: function() {
_.defer(function() {
Common.Gateway.updateVersion();
if (callback) callback.call(me);
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
})
}
});
@ -1293,7 +1293,7 @@ define([
onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId();
if (type == c_oAscAdvancedOptionsID.CSV) {
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
var me = this;
var dlg = new Common.Views.OpenDialog({
type: type,
@ -1310,7 +1310,7 @@ define([
this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show();
}
@ -1333,7 +1333,7 @@ define([
},
onConfirmAction: function(id, apiCallback) {
if (id == c_oAscConfirm.ConfirmReplaceRange) {
if (id == Asc.c_oAscConfirm.ConfirmReplaceRange) {
var me = this;
Common.UI.warning({
closable: false,

View file

@ -44,7 +44,7 @@ define([
initialize: function() {
var value = Common.localStorage.getItem("sse-print-settings-range");
value = (value!==null) ? parseInt(value) : c_oAscPrintType.ActiveSheets;
value = (value!==null) ? parseInt(value) : Asc.c_oAscPrintType.ActiveSheets;
this.adjPrintParams = new Asc.asc_CAdjustPrint();
this.adjPrintParams.asc_setPrintType(value);
@ -154,12 +154,12 @@ define([
onChangeRange: function() {
var printtype = this.printSettingsDlg.getRange(),
store = this.printSettingsDlg.cmbSheet.store,
item = (printtype !== c_oAscPrintType.EntireWorkbook) ? store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}) : store.at(0);
item = (printtype !== Asc.c_oAscPrintType.EntireWorkbook) ? store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}) : store.at(0);
if (item) {
this.printSettingsDlg.cmbSheet.setValue(item.get('value'));
this.comboSheetsChange(this.printSettingsDlg, this.printSettingsDlg.cmbSheet, item.toJSON());
}
this.printSettingsDlg.cmbSheet.setDisabled(printtype !== c_oAscPrintType.EntireWorkbook);
this.printSettingsDlg.cmbSheet.setDisabled(printtype !== Asc.c_oAscPrintType.EntireWorkbook);
},
getPageOptions: function(panel) {
@ -264,7 +264,7 @@ define([
},
checkMargins: function(panel) {
if (panel.cmbPaperOrientation.getValue() == c_oAscPageOrientation.PagePortrait) {
if (panel.cmbPaperOrientation.getValue() == Asc.c_oAscPageOrientation.PagePortrait) {
var pagewidth = /^\d{3}\.?\d*/.exec(panel.cmbPaperSize.getValue());
var pageheight = /\d{3}\.?\d*$/.exec(panel.cmbPaperSize.getValue());
} else {

View file

@ -105,8 +105,8 @@ define([
var SelectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType();
if (selectType == c_oAscSelectionType.RangeImage || selectType == c_oAscSelectionType.RangeShape ||
selectType == c_oAscSelectionType.RangeChart || selectType == c_oAscSelectionType.RangeChartText || selectType == c_oAscSelectionType.RangeShapeText) {
if (selectType == Asc.c_oAscSelectionType.RangeImage || selectType == Asc.c_oAscSelectionType.RangeShape ||
selectType == Asc.c_oAscSelectionType.RangeChart || selectType == Asc.c_oAscSelectionType.RangeChartText || selectType == Asc.c_oAscSelectionType.RangeShapeText) {
SelectedObjects = this.api.asc_getGraphicObjectProps();
}
@ -283,9 +283,9 @@ define([
getDocumentSettingsType: function(type) {
switch (type) {
case c_oAscTypeSelectElement.Paragraph:
case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Image:
case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image;
}
}

View file

@ -159,8 +159,8 @@ define([
/** coauthoring begin **/
onWorkbookLocked: function(locked) {
this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked');
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.FormatTable);
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i);
@ -179,7 +179,7 @@ define([
tab = this.statusbar.tabbar.getAt(i);
if (index == tab.sheetindex) {
tab[locked?'addClass':'removeClass']('coauth-locked');
tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.FormatTable);
tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
break;
}
}
@ -200,8 +200,8 @@ define([
},
onApiEditCell: function(state) {
var disableAdd = (state == c_oAscCellEditorState.editFormula),
disable = (state != c_oAscCellEditorState.editEnd),
var disableAdd = (state == Asc.c_oAscCellEditorState.editFormula),
disable = (state != Asc.c_oAscCellEditorState.editEnd),
mask = $('.statusbar-mask'),
statusbar = this.statusbar;
@ -235,15 +235,15 @@ define([
onRangeDialogMode: function (mode) {
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
currentIdx = this.api.asc_getActiveWorksheetIndex();
this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=c_oAscSelectionDialogType.None);
this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=Asc.c_oAscSelectionDialogType.None);
var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i);
if (item.sheetindex !== currentIdx) {
item.disable(mode==c_oAscSelectionDialogType.FormatTable);
item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable);
}
item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=c_oAscSelectionDialogType.None));
item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None));
}
this.statusbar.rangeSelectionMode = mode;
},
@ -550,7 +550,7 @@ define([
color = this.api.asc_getWorksheetTabColor(sindex);
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() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -630,7 +630,7 @@ define([
onError: function(id, level, errData) {
if (id == c_oAscError.ID.LockedWorksheetRename)
if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
this.statusbar.update();
},

View file

@ -490,20 +490,20 @@ define([
btnBorders.options.borderId = item.options.borderId;
if (item.options.borderId == 'inner') {
new_borders[c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId == 'all') {
new_borders[c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId == 'outer') {
new_borders[c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[Asc.c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId != 'none') {
new_borders[item.options.borderId] = new Asc.asc_CBorder(bordersWidth, bordersColor);
}
@ -733,9 +733,9 @@ define([
props : props,
text : cell.asc_getText(),
isLock : cell.asc_getFlags().asc_getLockText(),
allowInternal: (seltype!==c_oAscSelectionType.RangeImage && seltype!==c_oAscSelectionType.RangeShape &&
seltype!==c_oAscSelectionType.RangeShapeText && seltype!==c_oAscSelectionType.RangeChart &&
seltype!==c_oAscSelectionType.RangeChartText)
allowInternal: (seltype!==Asc.c_oAscSelectionType.RangeImage && seltype!==Asc.c_oAscSelectionType.RangeShape &&
seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart &&
seltype!==Asc.c_oAscSelectionType.RangeChartText)
});
}
@ -745,12 +745,12 @@ define([
onInsertChart: function(btn) {
if (!this.editMode) return;
var me = this, info = me.api.asc_getCellInfo();
if (info.asc_getFlags().asc_getSelectionType()!=c_oAscSelectionType.RangeImage) {
if (info.asc_getFlags().asc_getSelectionType()!=Asc.c_oAscSelectionType.RangeImage) {
var win, props;
if (me.api){
props = me.api.asc_getChartObject();
if (props) {
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == c_oAscSelectionType.RangeChartText);
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText);
(new SSE.Views.ChartSettingsDlg(
{
@ -817,7 +817,7 @@ define([
this._state.filter = undefined;
if (this.api){
if (this._state.tablename || state)
this.api.asc_changeAutoFilter(this._state.tablename, c_oAscChangeFilterOptions.filter, !state);
this.api.asc_changeAutoFilter(this._state.tablename, Asc.c_oAscChangeFilterOptions.filter, !state);
else
this.api.asc_addAutoFilter();
}
@ -885,7 +885,7 @@ define([
item.value = item.value || 'SUM';
this.api.asc_insertFormula(this.api.asc_getFormulaLocaleName(item.value), c_oAscPopUpSelectorType.Func, true);
this.api.asc_insertFormula(this.api.asc_getFormulaLocaleName(item.value), Asc.c_oAscPopUpSelectorType.Func, true);
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Insert formula');
@ -900,12 +900,12 @@ define([
(new SSE.Views.NamedRangePasteDlg({
handler: function(result, settings) {
if (result == 'ok' && settings) {
me.api.asc_insertFormula(settings.asc_getName(), settings.asc_getIsTable() ? c_oAscPopUpSelectorType.Table : c_oAscPopUpSelectorType.Range, false);
me.api.asc_insertFormula(settings.asc_getName(), settings.asc_getIsTable() ? Asc.c_oAscPopUpSelectorType.Table : Asc.c_oAscPopUpSelectorType.Range, false);
Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range');
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
},
ranges: me.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook) // names only for current sheet and workbook
ranges: me.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook) // names only for current sheet and workbook
})).show();
Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range');
} else {
@ -956,7 +956,7 @@ define([
locked: me._state.namedrange_locked,
sheets: items,
sheetNames: sheetNames,
ranges: me.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All),
ranges: me.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All),
props : me.api.asc_getDefaultDefinedName(),
sort : cellEditor.rangeListSort
})).on('close', function(win){
@ -969,7 +969,7 @@ define([
onNamedRangeMenuOpen: function() {
if (this.api) {
var names = this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook);
var names = this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook);
this.toolbar.btnNamedRange.menu.items[2].setDisabled(names.length<1);
}
},
@ -1195,7 +1195,7 @@ define([
me._state.filter = undefined;
if (me.editMode && me.api) {
if (me._state.tablename || state)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.filter, !state);
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.filter, !state);
else
me.api.asc_addAutoFilter();
}
@ -1413,11 +1413,11 @@ define([
onApiEditCell: function(state) {
var toolbar = this.toolbar;
if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) {
is_cell_edited = (state == c_oAscCellEditorState.editStart);
toolbar.lockToolbar(SSE.enumLock.editCell, state == c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.btnNumberFormat]});
is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.btnNumberFormat]});
} else
if (state == c_oAscCellEditorState.editStart || state == c_oAscCellEditorState.editEnd) {
toolbar.lockToolbar(SSE.enumLock.editCell, state == c_oAscCellEditorState.editStart, {
if (state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) {
toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {
array: [
toolbar.btnClearStyle.menu.items[1],
toolbar.btnClearStyle.menu.items[2],
@ -1431,7 +1431,7 @@ define([
clear: [SSE.enumLock.editFormula, SSE.enumLock.editText]
});
var is_cell_edited = (state == c_oAscCellEditorState.editStart);
var is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
(is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h') :
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h');
@ -1442,9 +1442,9 @@ define([
this._state.prstyle = undefined;
}
} else {
if (state == c_oAscCellEditorState.editText) var is_text = true, is_formula = false; else
if (state == c_oAscCellEditorState.editFormula) is_text = !(is_formula = true); else
if (state == c_oAscCellEditorState.editEmptyCell) is_text = is_formula = false;
if (state == Asc.c_oAscCellEditorState.editText) var is_text = true, is_formula = false; else
if (state == Asc.c_oAscCellEditorState.editFormula) is_text = !(is_formula = true); else
if (state == Asc.c_oAscCellEditorState.editEmptyCell) is_text = is_formula = false;
toolbar.lockToolbar(SSE.enumLock.editFormula, is_formula,
{ array: [toolbar.cmbFontName, toolbar.cmbFontSize, toolbar.btnIncFontSize, toolbar.btnDecFontSize,
@ -1525,7 +1525,7 @@ define([
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
color = fontobj.asc_getColor();
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() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1612,7 +1612,7 @@ define([
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
color = fontobj.asc_getColor();
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() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1646,7 +1646,7 @@ define([
if (!toolbar.btnBackColor.ischanged && !paragraphColorPicker.isDummy) {
color = info.asc_getFill().asc_getColor();
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() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1679,7 +1679,7 @@ define([
this._state.clrshd_asccolor = color;
}
if (selectionType == c_oAscSelectionType.RangeChart || selectionType == c_oAscSelectionType.RangeChartText)
if (selectionType == Asc.c_oAscSelectionType.RangeChart || selectionType == Asc.c_oAscSelectionType.RangeChartText)
return;
if (!toolbar.mode.isEditDiagram)
@ -1850,13 +1850,13 @@ define([
}
}
val = (selectionType==c_oAscSelectionType.RangeRow);
val = (selectionType==Asc.c_oAscSelectionType.RangeRow);
if ( this._state.controlsdisabled.rows!==val ) {
this._state.controlsdisabled.rows=val;
toolbar.btnAddCell.menu.items[3].setDisabled(val);
toolbar.btnDeleteCell.menu.items[3].setDisabled(val);
}
val = (selectionType==c_oAscSelectionType.RangeCol);
val = (selectionType==Asc.c_oAscSelectionType.RangeCol);
if ( this._state.controlsdisabled.cols!==val ) {
this._state.controlsdisabled.cols=val;
toolbar.btnAddCell.menu.items[2].setDisabled(val);
@ -2098,14 +2098,14 @@ define([
_disableEditOptions: function(seltype, coauth_disable) {
if (this.api.isCellEdited) return true;
if (this.api.isRangeSelection) return true;
if (this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===c_oAscSelectionType.RangeImage);
if (this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage);
var toolbar = this.toolbar,
is_chart_text = seltype == c_oAscSelectionType.RangeChartText,
is_chart = seltype == c_oAscSelectionType.RangeChart,
is_shape_text = seltype == c_oAscSelectionType.RangeShapeText,
is_shape = seltype == c_oAscSelectionType.RangeShape,
is_image = seltype == c_oAscSelectionType.RangeImage,
is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText,
is_chart = seltype == Asc.c_oAscSelectionType.RangeChart,
is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText,
is_shape = seltype == Asc.c_oAscSelectionType.RangeShape,
is_image = seltype == Asc.c_oAscSelectionType.RangeImage,
is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart;
if ( coauth_disable ) {
@ -2114,11 +2114,11 @@ define([
var _set = SSE.enumLock;
var type = seltype;
switch (seltype) {
case c_oAscSelectionType.RangeImage: type = _set.selImage; break;
case c_oAscSelectionType.RangeShape: type = _set.selShape; break;
case c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break;
case c_oAscSelectionType.RangeChart: type = _set.selChart; break;
case c_oAscSelectionType.RangeChartText: type = _set.selChartText; break;
case Asc.c_oAscSelectionType.RangeImage: type = _set.selImage; break;
case Asc.c_oAscSelectionType.RangeShape: type = _set.selShape; break;
case Asc.c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break;
case Asc.c_oAscSelectionType.RangeChart: type = _set.selChart; break;
case Asc.c_oAscSelectionType.RangeChartText: type = _set.selChartText; break;
}
toolbar.lockToolbar(type, type != seltype, {
@ -2173,10 +2173,10 @@ define([
var handlerDlg = function(dlg, result) {
if (result == 'ok') {
me._state.filter = undefined;
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None);
me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.style, fmtname);
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
else
me.api.asc_addAutoFilter(fmtname, dlg.getSettings());
}
@ -2195,7 +2195,7 @@ define([
} else {
me._state.filter = undefined;
if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.style, fmtname);
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
else
me.api.asc_addAutoFilter(fmtname);
}
@ -2237,8 +2237,8 @@ define([
},
onCellsRange: function(status) {
this.api.isRangeSelection = (status != c_oAscSelectionDialogType.None);
this.onApiEditCell(this.api.isRangeSelection ? c_oAscCellEditorState.editStart : c_oAscCellEditorState.editEnd);
this.api.isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
this.onApiEditCell(this.api.isRangeSelection ? Asc.c_oAscCellEditorState.editStart : Asc.c_oAscCellEditorState.editEnd);
var toolbar = this.toolbar;
toolbar.lockToolbar(SSE.enumLock.selRange, this.api.isRangeSelection);
@ -2250,7 +2250,7 @@ define([
},
onLockDefNameManager: function(state) {
this._state.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager);
this._state.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
},
DisableToolbar: function(disable) {

View file

@ -106,18 +106,18 @@ define([
Common.UI.Window.prototype.render.call(this);
var conditions = [
{value: c_oAscCustomAutoFilter.equals, displayValue: this.capCondition1},
{value: c_oAscCustomAutoFilter.doesNotEqual, displayValue: this.capCondition2},
{value: c_oAscCustomAutoFilter.isGreaterThan, displayValue: this.capCondition3},
{value: c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, displayValue: this.capCondition4},
{value: c_oAscCustomAutoFilter.isLessThan, displayValue: this.capCondition5},
{value: c_oAscCustomAutoFilter.isLessThanOrEqualTo, displayValue: this.capCondition6},
{value: c_oAscCustomAutoFilter.beginsWith, displayValue: this.capCondition7},
{value: c_oAscCustomAutoFilter.doesNotBeginWith, displayValue: this.capCondition8},
{value: c_oAscCustomAutoFilter.endsWith, displayValue: this.capCondition9},
{value: c_oAscCustomAutoFilter.doesNotEndWith, displayValue: this.capCondition10},
{value: c_oAscCustomAutoFilter.contains, displayValue: this.capCondition11},
{value: c_oAscCustomAutoFilter.doesNotContain, displayValue: this.capCondition12}
{value: Asc.c_oAscCustomAutoFilter.equals, displayValue: this.capCondition1},
{value: Asc.c_oAscCustomAutoFilter.doesNotEqual, displayValue: this.capCondition2},
{value: Asc.c_oAscCustomAutoFilter.isGreaterThan, displayValue: this.capCondition3},
{value: Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, displayValue: this.capCondition4},
{value: Asc.c_oAscCustomAutoFilter.isLessThan, displayValue: this.capCondition5},
{value: Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo, displayValue: this.capCondition6},
{value: Asc.c_oAscCustomAutoFilter.beginsWith, displayValue: this.capCondition7},
{value: Asc.c_oAscCustomAutoFilter.doesNotBeginWith, displayValue: this.capCondition8},
{value: Asc.c_oAscCustomAutoFilter.endsWith, displayValue: this.capCondition9},
{value: Asc.c_oAscCustomAutoFilter.doesNotEndWith, displayValue: this.capCondition10},
{value: Asc.c_oAscCustomAutoFilter.contains, displayValue: this.capCondition11},
{value: Asc.c_oAscCustomAutoFilter.doesNotContain, displayValue: this.capCondition12}
];
this.cmbCondition1 = new Common.UI.ComboBox({
@ -127,7 +127,7 @@ define([
data : conditions,
editable : false
});
this.cmbCondition1.setValue(c_oAscCustomAutoFilter.equals);
this.cmbCondition1.setValue(Asc.c_oAscCustomAutoFilter.equals);
conditions.splice(0, 0, {value: 0, displayValue: this.textNoFilter});
@ -227,13 +227,13 @@ define([
this.cmbCondition1 && this.cmbCondition2 && this.txtValue1 && this.txtValue2) {
var filterObj = this.properties.asc_getFilterObj();
if (filterObj.asc_getType() == c_oAscAutoFilterTypes.CustomFilters) {
if (filterObj.asc_getType() == Asc.c_oAscAutoFilterTypes.CustomFilters) {
var customFilter = filterObj.asc_getFilter(),
customFilters = customFilter.asc_getCustomFilters();
(customFilter.asc_getAnd()) ? this.rbAnd.setValue(true) : this.rbOr.setValue(true);
this.cmbCondition1.setValue(customFilters[0].asc_getOperator() || c_oAscCustomAutoFilter.equals);
this.cmbCondition1.setValue(customFilters[0].asc_getOperator() || Asc.c_oAscCustomAutoFilter.equals);
this.cmbCondition2.setValue((customFilters.length>1) ? (customFilters[1].asc_getOperator() || 0) : 0);
this.txtValue1.setValue(null === customFilters[0].asc_getVal() ? '' : customFilters[0].asc_getVal());
@ -247,7 +247,7 @@ define([
var filterObj = this.properties.asc_getFilterObj();
filterObj.asc_setFilter(new Asc.CustomFilters());
filterObj.asc_setType(c_oAscAutoFilterTypes.CustomFilters);
filterObj.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters);
var customFilter = filterObj.asc_getFilter();
customFilter.asc_setCustomFilters((this.cmbCondition2.getValue() == 0) ? [new Asc.CustomFilter()] : [new Asc.CustomFilter(), new Asc.CustomFilter()]);
@ -564,7 +564,7 @@ define([
this.btnOk.setDisabled(false);
this.chCustomFilter.setValue(false);
this.configTo.asc_getFilterObj().asc_setType(c_oAscAutoFilterTypes.Filters);
this.configTo.asc_getFilterObj().asc_setType(Asc.c_oAscAutoFilterTypes.Filters);
listView.isSuspendEvents = false;
listView.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
@ -585,7 +585,7 @@ define([
var me = this, isnumber, value, index = 0, haveUnselectedCell = false,
throughIndex = 1,
isCustomFilter = (this.configTo.asc_getFilterObj().asc_getType() === c_oAscAutoFilterTypes.CustomFilters);
isCustomFilter = (this.configTo.asc_getFilterObj().asc_getType() === Asc.c_oAscAutoFilterTypes.CustomFilters);
if (_.isUndefined(this.config)) {
return;
@ -726,7 +726,7 @@ define([
this.filterExcludeCells.reset(arrEx);
if (this.cells.length) {
this.chCustomFilter.setValue(this.configTo.asc_getFilterObj().asc_getType() === c_oAscAutoFilterTypes.CustomFilters);
this.chCustomFilter.setValue(this.configTo.asc_getFilterObj().asc_getType() === Asc.c_oAscAutoFilterTypes.CustomFilters);
}
this.cellsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});

View file

@ -112,15 +112,15 @@ define([
if (settings.api) {
me.api = settings.api;
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.Chart, settings.range ? settings.range : '');
me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.Chart, settings.range ? settings.range : '');
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.Chart);
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.Chart);
}
me.inputRange.validation = function(value) {
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
};
},
@ -140,8 +140,8 @@ define([
onClose: function(event) {
if (this.api)
this.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.None);
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
},
onKeyPress: function(event) {

View file

@ -110,31 +110,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
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: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: 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: 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: 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: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: 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: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});

View file

@ -79,7 +79,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this._state = {
ChartStyle: 1,
ChartType: c_oAscChartTypeSettings.barNormal
ChartType: Asc.c_oAscChartTypeSettings.barNormal
};
this._noApply = true;
@ -140,31 +140,31 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
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: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: 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: 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: 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: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: 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: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: 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: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});
@ -231,9 +231,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscChartTitleShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay },
{ value: c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay }
{ value: Asc.c_oAscChartTitleShowSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay },
{ value: Asc.c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay }
]
});
@ -243,13 +243,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscChartLegendShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartLegendShowSettings.bottom, displayValue: this.textLegendBottom },
{ value: c_oAscChartLegendShowSettings.top, displayValue: this.textLegendTop },
{ value: c_oAscChartLegendShowSettings.right, displayValue: this.textLegendRight },
{ value: c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft },
{ value: c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay },
{ value: c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay }
{ value: Asc.c_oAscChartLegendShowSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscChartLegendShowSettings.bottom, displayValue: this.textLegendBottom },
{ value: Asc.c_oAscChartLegendShowSettings.top, displayValue: this.textLegendTop },
{ value: Asc.c_oAscChartLegendShowSettings.right, displayValue: this.textLegendRight },
{ value: Asc.c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft },
{ value: Asc.c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay },
{ value: Asc.c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay }
]
});
@ -259,8 +259,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscChartHorAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: this.textNoOverlay }
{ value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: this.textNoOverlay }
]
}).on('selected', _.bind(function(combo, record) {
if (this.chartSettings)
@ -273,9 +273,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscChartVertAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: this.textRotated },
{ value: c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: this.textHorizontal }
{ value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: this.textRotated },
{ value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: this.textHorizontal }
]
}).on('selected', _.bind(function(combo, record) {
if (this.chartSettings)
@ -316,10 +316,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
{ value: Asc.c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
]
}).on('selected', _.bind(function(combo, record) {
if (this.chartSettings)
@ -332,10 +332,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
{ value: Asc.c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
]
}).on('selected', _.bind(function(combo, record) {
if (this.chartSettings)
@ -348,11 +348,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscChartDataLabelsPos.none, displayValue: this.textNone },
{ value: c_oAscChartDataLabelsPos.ctr, displayValue: this.textCenter },
{ value: c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom },
{ value: c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop },
{ value: c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop }
{ value: Asc.c_oAscChartDataLabelsPos.none, displayValue: this.textNone },
{ value: Asc.c_oAscChartDataLabelsPos.ctr, displayValue: this.textCenter },
{ value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom },
{ value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop },
{ value: Asc.c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop }
]
});
@ -417,13 +417,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;',
editable : false,
data : [
{displayValue: this.textAuto, value: c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: c_oAscValAxisRule.fixed}
{displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
this.currentAxisProps.putMinValRule(record.value);
if (record.value==c_oAscValAxisRule.auto) {
if (record.value==Asc.c_oAscValAxisRule.auto) {
this.spnMinValue.setValue(this._originalAxisVValues.minAuto, true);
}
}
@ -439,10 +439,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : ''
}).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbMinType.suspendEvents();
this.cmbMinType.setValue(c_oAscValAxisRule.fixed);
this.cmbMinType.setValue(Asc.c_oAscValAxisRule.fixed);
this.cmbMinType.resumeEvents();
if (this.currentAxisProps) {
this.currentAxisProps.putMinValRule(c_oAscValAxisRule.fixed);
this.currentAxisProps.putMinValRule(Asc.c_oAscValAxisRule.fixed);
this.currentAxisProps.putMinVal(field.getNumberValue());
}
}, this));
@ -453,13 +453,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;',
editable : false,
data : [
{displayValue: this.textAuto, value: c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: c_oAscValAxisRule.fixed}
{displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
this.currentAxisProps.putMaxValRule(record.value);
if (record.value==c_oAscValAxisRule.auto) {
if (record.value==Asc.c_oAscValAxisRule.auto) {
this.spnMaxValue.setValue(this._originalAxisVValues.maxAuto, true);
}
}
@ -475,10 +475,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : ''
}).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbMaxType.suspendEvents();
this.cmbMaxType.setValue(c_oAscValAxisRule.fixed);
this.cmbMaxType.setValue(Asc.c_oAscValAxisRule.fixed);
this.cmbMaxType.resumeEvents();
if (this.currentAxisProps) {
this.currentAxisProps.putMaxValRule(c_oAscValAxisRule.fixed);
this.currentAxisProps.putMaxValRule(Asc.c_oAscValAxisRule.fixed);
this.currentAxisProps.putMaxVal(field.getNumberValue());
}
}, this));
@ -489,23 +489,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;',
editable : false,
data : [
{displayValue: this.textAuto, value: c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: c_oAscCrossesRule.maxValue}
{displayValue: this.textAuto, value: Asc.c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(record.value);
var value;
switch (record.value) {
case c_oAscCrossesRule.minValue:
case Asc.c_oAscCrossesRule.minValue:
this.spnVAxisCrosses.setValue(this.spnMinValue.getNumberValue(), true);
break;
case c_oAscCrossesRule.maxValue:
case Asc.c_oAscCrossesRule.maxValue:
this.spnVAxisCrosses.setValue(this.spnMaxValue.getNumberValue(), true);
break;
case c_oAscCrossesRule.auto:
case Asc.c_oAscCrossesRule.auto:
this.spnVAxisCrosses.setValue(this._originalAxisVValues.crossesAuto, true);
break;
}
@ -522,10 +522,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : ''
}).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbVCrossType.suspendEvents();
this.cmbVCrossType.setValue(c_oAscCrossesRule.value);
this.cmbVCrossType.setValue(Asc.c_oAscCrossesRule.value);
this.cmbVCrossType.resumeEvents();
if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(c_oAscCrossesRule.value);
this.currentAxisProps.putCrossesRule(Asc.c_oAscCrossesRule.value);
this.currentAxisProps.putCrosses(field.getNumberValue());
}
}, this));
@ -536,16 +536,16 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscValAxUnits.none},
{displayValue: this.textHundreds, value: c_oAscValAxUnits.HUNDREDS},
{displayValue: this.textThousands, value: c_oAscValAxUnits.THOUSANDS},
{displayValue: this.textTenThousands, value: c_oAscValAxUnits.TEN_THOUSANDS},
{displayValue: this.textHundredThousands, value: c_oAscValAxUnits.HUNDRED_THOUSANDS},
{displayValue: this.textMillions, value: c_oAscValAxUnits.MILLIONS},
{displayValue: this.textTenMillions, value: c_oAscValAxUnits.TEN_MILLIONS},
{displayValue: this.textHundredMil, value: c_oAscValAxUnits.HUNDRED_MILLIONS},
{displayValue: this.textBillions, value: c_oAscValAxUnits.BILLIONS},
{displayValue: this.textTrillions, value: c_oAscValAxUnits.TRILLIONS}
{displayValue: this.textNone, value: Asc.c_oAscValAxUnits.none},
{displayValue: this.textHundreds, value: Asc.c_oAscValAxUnits.HUNDREDS},
{displayValue: this.textThousands, value: Asc.c_oAscValAxUnits.THOUSANDS},
{displayValue: this.textTenThousands, value: Asc.c_oAscValAxUnits.TEN_THOUSANDS},
{displayValue: this.textHundredThousands, value: Asc.c_oAscValAxUnits.HUNDRED_THOUSANDS},
{displayValue: this.textMillions, value: Asc.c_oAscValAxUnits.MILLIONS},
{displayValue: this.textTenMillions, value: Asc.c_oAscValAxUnits.TEN_MILLIONS},
{displayValue: this.textHundredMil, value: Asc.c_oAscValAxUnits.HUNDRED_MILLIONS},
{displayValue: this.textBillions, value: Asc.c_oAscValAxUnits.BILLIONS},
{displayValue: this.textTrillions, value: Asc.c_oAscValAxUnits.TRILLIONS}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -568,10 +568,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT}
{displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -585,10 +585,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT}
{displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -602,10 +602,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
{displayValue: this.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -621,19 +621,19 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;',
editable : false,
data : [
{displayValue: this.textAuto, value: c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: c_oAscCrossesRule.maxValue}
{displayValue: this.textAuto, value: Asc.c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(record.value);
if (record.value==c_oAscCrossesRule.auto) {
if (record.value==Asc.c_oAscCrossesRule.auto) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.crossesAuto, true);
} else if (record.value==c_oAscCrossesRule.minValue) {
} else if (record.value==Asc.c_oAscCrossesRule.minValue) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.minAuto, true);
} else if (record.value==c_oAscCrossesRule.maxValue) {
} else if (record.value==Asc.c_oAscCrossesRule.maxValue) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.maxAuto, true);
}
}
@ -649,10 +649,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : ''
}).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbHCrossType.suspendEvents();
this.cmbHCrossType.setValue(c_oAscCrossesRule.value);
this.cmbHCrossType.setValue(Asc.c_oAscCrossesRule.value);
this.cmbHCrossType.resumeEvents();
if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(c_oAscCrossesRule.value);
this.currentAxisProps.putCrossesRule(Asc.c_oAscCrossesRule.value);
this.currentAxisProps.putCrosses(field.getNumberValue());
}
}, this));
@ -663,8 +663,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textOnTickMarks, value: c_oAscLabelsPosition.byDivisions},
{displayValue: this.textBetweenTickMarks, value: c_oAscLabelsPosition.betweenDivisions}
{displayValue: this.textOnTickMarks, value: Asc.c_oAscLabelsPosition.byDivisions},
{displayValue: this.textBetweenTickMarks, value: Asc.c_oAscLabelsPosition.betweenDivisions}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -687,10 +687,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT}
{displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -704,10 +704,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT}
{displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -735,10 +735,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textNone, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
{displayValue: this.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
@ -770,10 +770,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : ''
}).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbLabelInterval.suspendEvents();
this.cmbLabelInterval.setValue(c_oAscBetweenLabelsRule.manual);
this.cmbLabelInterval.setValue(Asc.c_oAscBetweenLabelsRule.manual);
this.cmbLabelInterval.resumeEvents();
if (this.currentAxisProps) {
this.currentAxisProps.putIntervalBetweenLabelsRule(c_oAscBetweenLabelsRule.manual);
this.currentAxisProps.putIntervalBetweenLabelsRule(Asc.c_oAscBetweenLabelsRule.manual);
this.currentAxisProps.putIntervalBetweenLabels(field.getNumberValue());
}
}, this));
@ -784,13 +784,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;',
editable : false,
data : [
{displayValue: this.textAuto, value: c_oAscBetweenLabelsRule.auto},
{displayValue: this.textManual, value: c_oAscBetweenLabelsRule.manual}
{displayValue: this.textAuto, value: Asc.c_oAscBetweenLabelsRule.auto},
{displayValue: this.textManual, value: Asc.c_oAscBetweenLabelsRule.manual}
]
}).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) {
this.currentAxisProps.putIntervalBetweenLabelsRule(record.value);
if (record.value==c_oAscBetweenLabelsRule.auto)
if (record.value==Asc.c_oAscBetweenLabelsRule.auto)
this.spnLabelInterval.setValue(1, true);
}
}, this));
@ -834,8 +834,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
},
updateAxisProps: function(type, isDefault) {
var value = (type == c_oAscChartTypeSettings.lineNormal || type == c_oAscChartTypeSettings.lineStacked ||
type == c_oAscChartTypeSettings.lineStackedPer || type == c_oAscChartTypeSettings.scatter);
var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter);
this.chMarkers.setVisible(value);
this.cmbLines.setVisible(value);
this.lblLines.toggleClass('hidden', !value);
@ -845,7 +845,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.cmbLines.setValue(this.chartSettings.getLine() ? (this.chartSettings.getSmooth() ? 2 : 1) : 0);
}
value = (type == c_oAscChartTypeSettings.pie || type == c_oAscChartTypeSettings.doughnut || type == c_oAscChartTypeSettings.pie3d);
value = (type == Asc.c_oAscChartTypeSettings.pie || type == Asc.c_oAscChartTypeSettings.doughnut || type == Asc.c_oAscChartTypeSettings.pie3d);
this.btnsCategory[2].setDisabled(value);
this.btnsCategory[3].setDisabled(value);
this.cmbHorShow.setDisabled(value);
@ -862,22 +862,22 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.cmbHorGrid.setValue(this.chartSettings.getHorGridLines());
this.cmbVertGrid.setValue(this.chartSettings.getVertGridLines());
value = (type == c_oAscChartTypeSettings.hBarNormal || type == c_oAscChartTypeSettings.hBarStacked || type == c_oAscChartTypeSettings.hBarStackedPer ||
type == c_oAscChartTypeSettings.hBarNormal3d || type == c_oAscChartTypeSettings.hBarStacked3d || type == c_oAscChartTypeSettings.hBarStackedPer3d);
value = (type == Asc.c_oAscChartTypeSettings.hBarNormal || type == Asc.c_oAscChartTypeSettings.hBarStacked || type == Asc.c_oAscChartTypeSettings.hBarStackedPer ||
type == Asc.c_oAscChartTypeSettings.hBarNormal3d || type == Asc.c_oAscChartTypeSettings.hBarStacked3d || type == Asc.c_oAscChartTypeSettings.hBarStackedPer3d);
this.btnsCategory[2].options.contentTarget = (value) ? 'id-chart-settings-dlg-hor' : 'id-chart-settings-dlg-vert';
this.btnsCategory[3].options.contentTarget = (value || type == c_oAscChartTypeSettings.scatter) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor';
this.btnsCategory[3].options.contentTarget = (value || type == Asc.c_oAscChartTypeSettings.scatter) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor';
},
onVCategoryClick: function() {
(this.vertAxisProps.getAxisType()==c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps) : this.fillHProps(this.vertAxisProps);
(this.vertAxisProps.getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps) : this.fillHProps(this.vertAxisProps);
},
onHCategoryClick: function() {
(this.horAxisProps.getAxisType()==c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps) : this.fillHProps(this.horAxisProps);
(this.horAxisProps.getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps) : this.fillHProps(this.horAxisProps);
},
fillVProps: function(props) {
if (props.getAxisType() !== c_oAscAxisType.val) return;
if (props.getAxisType() !== Asc.c_oAscAxisType.val) return;
if (this._originalAxisVValues==undefined) {
this._originalAxisVValues = {
minAuto: (props.getMinVal()==null) ? 0 : props.getMinVal(),
@ -887,23 +887,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
}
this.cmbMinType.setValue(props.getMinValRule());
var value = (props.getMinValRule()==c_oAscValAxisRule.auto) ? this._originalAxisVValues.minAuto : props.getMinVal();
var value = (props.getMinValRule()==Asc.c_oAscValAxisRule.auto) ? this._originalAxisVValues.minAuto : props.getMinVal();
this.spnMinValue.setValue((value==null) ? '' : value, true);
this.cmbMaxType.setValue(props.getMaxValRule());
value = (props.getMaxValRule()==c_oAscValAxisRule.auto) ? this._originalAxisVValues.maxAuto : props.getMaxVal();
value = (props.getMaxValRule()==Asc.c_oAscValAxisRule.auto) ? this._originalAxisVValues.maxAuto : props.getMaxVal();
this.spnMaxValue.setValue((value==null) ? '' : value, true);
value = props.getCrossesRule();
this.cmbVCrossType.setValue(value);
switch (value) {
case c_oAscCrossesRule.minValue:
case Asc.c_oAscCrossesRule.minValue:
value = this.spnMinValue.getNumberValue();
break;
case c_oAscCrossesRule.maxValue:
case Asc.c_oAscCrossesRule.maxValue:
value = this.spnMaxValue.getNumberValue();
break;
case c_oAscCrossesRule.auto:
case Asc.c_oAscCrossesRule.auto:
value = this._originalAxisVValues.crossesAuto;
break;
default:
@ -922,7 +922,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
},
fillHProps: function(props) {
if (props.getAxisType() !== c_oAscAxisType.cat) return;
if (props.getAxisType() !== Asc.c_oAscAxisType.cat) return;
if (this._originalAxisHValues==undefined) {
this._originalAxisHValues = {
minAuto: (props.getCrossMinVal()==null) ? 0 : props.getCrossMinVal(),
@ -934,13 +934,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
var value = props.getCrossesRule();
this.cmbHCrossType.setValue(value);
switch (value) {
case c_oAscCrossesRule.minValue:
case Asc.c_oAscCrossesRule.minValue:
value = this._originalAxisHValues.minAuto;
break;
case c_oAscCrossesRule.maxValue:
case Asc.c_oAscCrossesRule.maxValue:
value = this._originalAxisHValues.maxAuto;
break;
case c_oAscCrossesRule.auto:
case Asc.c_oAscCrossesRule.auto:
value = this._originalAxisHValues.crossesAuto;
break;
default:
@ -959,7 +959,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value = props.getIntervalBetweenLabelsRule();
this.cmbLabelInterval.setValue(value);
this.spnLabelInterval.setValue((value===c_oAscBetweenLabelsRule.manual) ? props.getIntervalBetweenLabels(): 1, true);
this.spnLabelInterval.setValue((value===Asc.c_oAscBetweenLabelsRule.manual) ? props.getIntervalBetweenLabels(): 1, true);
this.currentAxisProps = props;
},
@ -1060,8 +1060,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
if (me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(false);
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
};
this.cmbDataDirect.setDisabled(value===null);
@ -1124,8 +1124,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked');
value = (type == c_oAscChartTypeSettings.lineNormal || type == c_oAscChartTypeSettings.lineStacked ||
type == c_oAscChartTypeSettings.lineStackedPer || type == c_oAscChartTypeSettings.scatter);
value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter);
if (value) {
value = this.cmbLines.getValue();
this.chartSettings.putLine(value!==0);
@ -1142,17 +1142,17 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
isRangeValid: function() {
var isvalid;
if (!_.isEmpty(this.txtDataRange.getValue())) {
isvalid = this.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, this.mnuChartTypePicker.getSelectedRec()[0].get('type'));
if (isvalid == c_oAscError.ID.No)
isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, this.mnuChartTypePicker.getSelectedRec()[0].get('type'));
if (isvalid == Asc.c_oAscError.ID.No)
return true;
} else
this.txtDataRange.showError([this.txtEmpty]);
this.btnsCategory[0].toggle(true);
this.onCategoryClick(this.btnsCategory[0]);
if (isvalid == c_oAscError.ID.StockChartError) {
if (isvalid == Asc.c_oAscError.ID.StockChartError) {
Common.UI.warning({msg: this.errorStockChart});
} else if (isvalid == c_oAscError.ID.MaxDataSeriesError) {
} else if (isvalid == Asc.c_oAscError.ID.MaxDataSeriesError) {
Common.UI.warning({msg: this.errorMaxRows});
} else
this.txtDataRange.cmpEl.find('input').focus();
@ -1188,7 +1188,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
},
onSelectDataLabels: function(obj, rec, e) {
var disable = rec.value == c_oAscChartDataLabelsPos.none;
var disable = rec.value == Asc.c_oAscChartDataLabelsPos.none;
this.chSeriesName.setDisabled(disable);
this.chCategoryName.setDisabled(disable);
this.chValue.setDisabled(disable);

View file

@ -115,16 +115,16 @@ define([
items: [
{
caption : me.txtShiftRight,
value : c_oAscInsertOptions.InsertCellsAndShiftRight
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftRight
},{
caption : me.txtShiftDown,
value : c_oAscInsertOptions.InsertCellsAndShiftDown
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftDown
},{
caption : me.txtRow,
value : c_oAscInsertOptions.InsertRows
value : Asc.c_oAscInsertOptions.InsertRows
},{
caption : me.txtColumn,
value : c_oAscInsertOptions.InsertColumns
value : Asc.c_oAscInsertOptions.InsertColumns
}
]
})
@ -141,16 +141,16 @@ define([
items: [
{
caption : me.txtShiftLeft,
value : c_oAscDeleteOptions.DeleteCellsAndShiftLeft
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftLeft
},{
caption : me.txtShiftUp,
value : c_oAscDeleteOptions.DeleteCellsAndShiftTop
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftTop
},{
caption : me.txtRow,
value : c_oAscDeleteOptions.DeleteRows
value : Asc.c_oAscDeleteOptions.DeleteRows
},{
caption : me.txtColumn,
value : c_oAscDeleteOptions.DeleteColumns
value : Asc.c_oAscDeleteOptions.DeleteColumns
}
]
})
@ -163,23 +163,23 @@ define([
items: [
{
caption : me.txtClearAll,
value : c_oAscCleanOptions.All
value : Asc.c_oAscCleanOptions.All
},
{
caption : me.txtClearText,
value : c_oAscCleanOptions.Text
value : Asc.c_oAscCleanOptions.Text
},
{
caption : me.txtClearFormat,
value : c_oAscCleanOptions.Format
value : Asc.c_oAscCleanOptions.Format
},
{
caption : me.txtClearComments,
value : c_oAscCleanOptions.Comments
value : Asc.c_oAscCleanOptions.Comments
},
{
caption : me.txtClearHyper,
value : c_oAscCleanOptions.Hyperlinks
value : Asc.c_oAscCleanOptions.Hyperlinks
}
]
})
@ -345,22 +345,22 @@ define([
caption : this.textArrangeFront,
iconCls : 'mnu-arrange-front',
type : 'arrange',
value : c_oAscDrawingLayerType.BringToFront
value : Asc.c_oAscDrawingLayerType.BringToFront
},{
caption : this.textArrangeBack,
iconCls : 'mnu-arrange-back',
type : 'arrange',
value : c_oAscDrawingLayerType.SendToBack
value : Asc.c_oAscDrawingLayerType.SendToBack
},{
caption : this.textArrangeForward,
iconCls : 'mnu-arrange-forward',
type : 'arrange',
value : c_oAscDrawingLayerType.BringForward
value : Asc.c_oAscDrawingLayerType.BringForward
},{
caption: this.textArrangeBackward,
iconCls : 'mnu-arrange-backward',
type : 'arrange',
value : c_oAscDrawingLayerType.SendBackward
value : Asc.c_oAscDrawingLayerType.SendBackward
},
{caption: '--'},
me.mnuGroupImg,
@ -380,19 +380,19 @@ define([
caption : me.topCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}),
this.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText,
checkable : true,
toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
})
]
})
@ -409,7 +409,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal
direction : Asc.c_oAscVertDrawingText.normal
}),
me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text,
@ -417,7 +417,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert
direction : Asc.c_oAscVertDrawingText.vert
}),
me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text,
@ -425,7 +425,7 @@ define([
checkable : true,
checked : false,
toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270
direction : Asc.c_oAscVertDrawingText.vert270
})
]
})

View file

@ -42,13 +42,13 @@ define([
menu: undefined,
formats: [[
{name: 'XLSX', imgCls: 'xlsx', type: c_oAscFileType.XLSX},
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF},
{name: 'ODS', imgCls: 'ods', type: c_oAscFileType.ODS},
{name: 'CSV', imgCls: 'csv', type: c_oAscFileType.CSV}
{name: 'XLSX', imgCls: 'xlsx', type: Asc.c_oAscFileType.XLSX},
{name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'ODS', imgCls: 'ods', type: Asc.c_oAscFileType.ODS},
{name: 'CSV', imgCls: 'csv', type: Asc.c_oAscFileType.CSV}
]
// ,[
// {name: 'HTML', imgCls: 'html', type: c_oAscFileType.HTML}
// {name: 'HTML', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
// ]
],
@ -286,8 +286,8 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
{ value: Asc.c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: Asc.c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
]
});
@ -533,9 +533,9 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscFontRenderingModeType.hintingAndSubpixeling, displayValue: this.txtWin },
{ value: c_oAscFontRenderingModeType.noHinting, displayValue: this.txtMac },
{ value: c_oAscFontRenderingModeType.hinting, displayValue: this.txtNative }
{ value: Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling, displayValue: this.txtWin },
{ value: Asc.c_oAscFontRenderingModeType.noHinting, displayValue: this.txtMac },
{ value: Asc.c_oAscFontRenderingModeType.hinting, displayValue: this.txtNative }
]
});
@ -646,7 +646,7 @@ define([
value = Common.localStorage.getItem("sse-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? c_oAscFontRenderingModeType.noHinting : c_oAscFontRenderingModeType.hintingAndSubpixeling));
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling));
value = Common.localStorage.getItem("sse-settings-unit");
item = this.cmbUnit.store.findWhere({value: parseInt(value)});

View file

@ -117,14 +117,14 @@ define([
editable: false,
menuStyle: 'min-width: 100%;',
data : [
{displayValue: this.textInternalLink, value: c_oAscHyperlinkType.RangeLink},
{displayValue: this.textExternalLink, value: c_oAscHyperlinkType.WebLink}
{displayValue: this.textInternalLink, value: Asc.c_oAscHyperlinkType.RangeLink},
{displayValue: this.textExternalLink, value: Asc.c_oAscHyperlinkType.WebLink}
]
}).on('selected', function(combo, record) {
$('#id-dlg-hyperlink-external')[record.value == c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
$('#id-dlg-hyperlink-internal')[record.value != c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
$('#id-dlg-hyperlink-external')[record.value == Asc.c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
$('#id-dlg-hyperlink-internal')[record.value != Asc.c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
});
me.cmbLinkType.setValue(c_oAscHyperlinkType.WebLink);
me.cmbLinkType.setValue(Asc.c_oAscHyperlinkType.WebLink);
me.cmbSheets = new Common.UI.ComboBox({
el : $('#id-dlg-hyperlink-sheet'),
@ -177,7 +177,7 @@ define([
me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength
maxLength : Asc.c_oAscMaxTooltipLength
});
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@ -199,7 +199,7 @@ define([
this.cmbSheets.setData(settings.sheets);
if (!settings.props) {
this.cmbLinkType.setValue(c_oAscHyperlinkType.WebLink);
this.cmbLinkType.setValue(Asc.c_oAscHyperlinkType.WebLink);
this.cmbLinkType.setDisabled(!settings.allowInternal);
this.inputDisplay.setValue(settings.isLock ? this.textDefault : settings.text);
this.focusedInput = this.inputUrl.cmpEl.find('input');
@ -208,7 +208,7 @@ define([
this.cmbLinkType.setValue(settings.props.asc_getType());
this.cmbLinkType.setDisabled(!settings.allowInternal);
if (settings.props.asc_getType() == c_oAscHyperlinkType.RangeLink) {
if (settings.props.asc_getType() == Asc.c_oAscHyperlinkType.RangeLink) {
$('#id-dlg-hyperlink-external').hide();
$('#id-dlg-hyperlink-internal').show();
@ -233,7 +233,7 @@ define([
def_display = "";
props.asc_setType(this.cmbLinkType.getValue());
if (this.cmbLinkType.getValue() == c_oAscHyperlinkType.RangeLink) {
if (this.cmbLinkType.getValue() == Asc.c_oAscHyperlinkType.RangeLink) {
props.asc_setSheet(this.cmbSheets.getValue());
props.asc_setRange(this.inputRange.getValue());
def_display = this.cmbSheets.getValue() + '!' + this.inputRange.getValue();
@ -273,8 +273,8 @@ define([
_handleInput: function(state) {
if (this.options.handler) {
if (state == 'ok') {
var checkurl = (this.cmbLinkType.getValue() === c_oAscHyperlinkType.WebLink) ? this.inputUrl.checkValidate() : true,
checkrange = (this.cmbLinkType.getValue() === c_oAscHyperlinkType.RangeLink) ? this.inputRange.checkValidate() : true,
var checkurl = (this.cmbLinkType.getValue() === Asc.c_oAscHyperlinkType.WebLink) ? this.inputUrl.checkValidate() : true,
checkrange = (this.cmbLinkType.getValue() === Asc.c_oAscHyperlinkType.RangeLink) ? this.inputRange.checkValidate() : true,
checkdisp = this.inputDisplay.checkValidate();
if (checkurl !== true) {
this.inputUrl.cmpEl.find('input').focus();

View file

@ -179,7 +179,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
},
onRefreshDefNameList: function() {
this.refreshRangeList(this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All), this.currentNamedRange);
this.refreshRangeList(this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All), this.currentNamedRange);
},
refreshRangeList: function(ranges, selectedItem) {
@ -400,7 +400,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
},
onLockDefNameManager: function(state) {
this.locked = (state == c_oAscDefinedNameReason.LockDefNameManager);
this.locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
},
txtTitle: 'Name Manager',

View file

@ -133,12 +133,12 @@ define([
if (isvalid.asc_getStatus() === true) return true;
else {
switch (isvalid.asc_getReason()) {
case c_oAscDefinedNameReason.IsLocked:
case Asc.c_oAscDefinedNameReason.IsLocked:
return me.textIsLocked;
break;
case c_oAscDefinedNameReason.Existed:
case Asc.c_oAscDefinedNameReason.Existed:
return (me.isEdit && me.props.asc_getName().toLowerCase() == value.toLowerCase()) ? true : me.textExistName;
case c_oAscDefinedNameReason.NameReserved:
case Asc.c_oAscDefinedNameReason.NameReserved:
return (me.isEdit) ? me.textReservedName : true;
default:
return me.textInvalidName;
@ -172,8 +172,8 @@ define([
if (_.isEmpty(value)) {
return true;
}
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false);
return (isvalid!==c_oAscError.ID.DataRangeError || (me.isEdit && me.props.asc_getRef().toLowerCase() == value.toLowerCase())) ? true : me.textInvalidRange;
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid!==Asc.c_oAscError.ID.DataRangeError || (me.isEdit && me.props.asc_getRef().toLowerCase() == value.toLowerCase())) ? true : me.textInvalidRange;
}
}).on('keypress:after', function(input, e) {
if (e.keyCode === Common.UI.Keys.RETURN) {
@ -298,7 +298,7 @@ define([
},
onLockDefNameManager: function(state) {
this.locked = (state == c_oAscDefinedNameReason.LockDefNameManager);
this.locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
},
onRefreshDefNameList: function(name) {

View file

@ -333,7 +333,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].asc_getObjectType();
elValue = selectedElements[i].asc_getObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) {
if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new SSE.Views.ParagraphSettingsAdvanced(
{
paragraphProps: elValue,

View file

@ -92,9 +92,9 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscPrintType.ActiveSheets, displayValue: this.textCurrentSheet },
{ value: c_oAscPrintType.EntireWorkbook, displayValue: this.textAllSheets },
{ value: c_oAscPrintType.Selection, displayValue: this.textSelection }
{ value: Asc.c_oAscPrintType.ActiveSheets, displayValue: this.textCurrentSheet },
{ value: Asc.c_oAscPrintType.EntireWorkbook, displayValue: this.textAllSheets },
{ value: Asc.c_oAscPrintType.Selection, displayValue: this.textSelection }
]
});
this.cmbRange.on('selected', _.bind(this.comboRangeChange, this));
@ -138,8 +138,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
editable : false,
cls : 'input-group-nr',
data : [
{ value: c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
{ value: Asc.c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: Asc.c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
]
});

View file

@ -81,16 +81,16 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
DisabledFillPanels: false,
DisabledControls: false,
HideShapeOnlySettings: false,
@ -99,10 +99,10 @@ define([
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -121,11 +121,11 @@ define([
this.render();
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -305,8 +305,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -365,8 +365,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -577,12 +577,12 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
@ -590,19 +590,19 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -620,15 +620,15 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
@ -649,12 +649,12 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null);
props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props);
@ -674,10 +674,10 @@ define([
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null);
} else {
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -698,10 +698,10 @@ define([
this.PatternFillType = record.get('type');
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -718,10 +718,10 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -738,9 +738,9 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -755,10 +755,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(this.BlipFillType);
@ -818,7 +818,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -828,7 +828,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -842,10 +842,10 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -875,12 +875,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000);
@ -903,13 +903,13 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -946,13 +946,13 @@ define([
if (this._sliderChanged) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -974,13 +974,13 @@ define([
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putWidth(this._pt2mm(this.BorderSize));
}
@ -1025,9 +1025,9 @@ define([
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.asc_putWidth(this._pt2mm(this.BorderSize));
}
@ -1049,7 +1049,7 @@ define([
if (me.BlipFillType !== null) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(me.BlipFillType);
fill.asc_getFill().asc_putUrl(checkUrl);
@ -1077,7 +1077,7 @@ define([
var elType, elValue;
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].asc_getObjectType();
if (c_oAscTypeSelectElement.Image == elType) {
if (Asc.c_oAscTypeSelectElement.Image == elType) {
elValue = selectedElements[i].asc_getObjectValue();
(new SSE.Views.ShapeSettingsAdvanced(
{
@ -1139,13 +1139,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.asc_getFill();
color = fill.asc_getColor();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1153,23 +1153,23 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.asc_getFill();
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.asc_getFill();
this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1184,7 +1184,7 @@ define([
color = fill.asc_getColorFg();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1194,7 +1194,7 @@ define([
color = fill.asc_getColorBg();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1202,17 +1202,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.asc_getFill();
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1223,7 +1223,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.asc_getLinearAngle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1240,7 +1240,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1251,7 +1251,7 @@ define([
color = colors[1];
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1279,7 +1279,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1322,10 +1322,10 @@ define([
var strokeType = stroke.asc_getType();
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.asc_getColor();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
}
else
@ -1365,8 +1365,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1386,7 +1386,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1546,9 +1546,9 @@ define([
if (this.api) {
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(record.get('type'));
props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props);
@ -1623,11 +1623,11 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -242,9 +242,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
// Shape
this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square}
{displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
];
this.cmbCapType = new Common.UI.ComboBox({
@ -254,7 +254,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
editable: false,
data: this._arrCapType
});
this.cmbCapType.setValue(c_oAscLineCapType.Flat);
this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
@ -267,9 +267,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
}, this));
this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter}
{displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
];
this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'),
@ -278,7 +278,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
editable: false,
data: this._arrJoinType
});
this.cmbJoinType.setValue(c_oAscLineJoinType.Round);
this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
@ -295,25 +295,25 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval;
_arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large;
_arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({

View file

@ -223,8 +223,8 @@ define([
//'tab:manual' : _.bind(this.onAddTabClick, this),
'tab:contextmenu' : _.bind(this.onTabMenu, this),
'tab:dblclick' : _.bind(function () {
if (me.editMode && (me.rangeSelectionMode !== c_oAscSelectionDialogType.Chart) &&
(me.rangeSelectionMode !== c_oAscSelectionDialogType.FormatTable)) {
if (me.editMode && (me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
(me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)) {
me.fireEvent('sheet:changename');
}
}, this),
@ -518,8 +518,8 @@ define([
},
onTabMenu: function (o, index, tab) {
if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== c_oAscSelectionDialogType.Chart) &&
(this.rangeSelectionMode !== c_oAscSelectionDialogType.FormatTable)) {
if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
(this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)) {
if (tab && tab.sheetindex >= 0) {
var rect = tab.$el.get(0).getBoundingClientRect(),
childPos = tab.$el.offset(),

View file

@ -119,15 +119,15 @@ define([
this.inputRange.setValue(options.asc_getRange());
this.cbTitle.setValue(options.asc_getIsTitle());
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.FormatTable, options.asc_getRange());
me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.FormatTable, options.asc_getRange());
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.FormatTable);
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
}
me.inputRange.validation = function(value) {
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.FormatTable, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.FormatTable, value, false);
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
};
},
@ -147,11 +147,11 @@ define([
},
isRangeValid: function() {
var isvalid = this.api.asc_checkDataRange(c_oAscSelectionDialogType.FormatTable, this.inputRange.getValue(), true);
if (isvalid == c_oAscError.ID.No)
var isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.FormatTable, this.inputRange.getValue(), true);
if (isvalid == Asc.c_oAscError.ID.No)
return true;
else {
if (isvalid == c_oAscError.ID.AutoFilterDataRangeError) {
if (isvalid == Asc.c_oAscError.ID.AutoFilterDataRangeError) {
Common.UI.warning({msg: this.errorAutoFilterDataRange});
}
}
@ -164,9 +164,9 @@ define([
onClose: function(event) {
if (this.api)
this.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None);
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('edit:complete', this);
},

View file

@ -80,26 +80,26 @@ define([
this._state = {
Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID,
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR,
BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1),
StrokeColor: '000000',
FGColor: '000000',
BGColor: 'ffffff',
GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null,
DisabledControls: false
};
this.lockedControls = [];
this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR;
this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0;
@ -135,11 +135,11 @@ define([
this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL}
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
@ -320,8 +320,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE}
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
@ -380,8 +380,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH}
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
@ -593,12 +593,12 @@ define([
onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value);
switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID;
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
@ -606,19 +606,19 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -636,15 +636,15 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break;
case c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
@ -664,12 +664,12 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -689,10 +689,10 @@ define([
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null);
} else {
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -713,10 +713,10 @@ define([
this.PatternFillType = record.get('type');
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -733,10 +733,10 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
@ -753,9 +753,9 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
}
@ -770,10 +770,10 @@ define([
onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) {
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(this.BlipFillType);
@ -833,7 +833,7 @@ define([
onGradTypeSelect: function(combo, record){
this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
@ -843,7 +843,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
@ -857,10 +857,10 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -890,12 +890,12 @@ define([
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000);
@ -918,13 +918,13 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -961,13 +961,13 @@ define([
if (this._sliderChanged) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) {
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true);
}
@ -989,13 +989,13 @@ define([
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putWidth(this._pt2mm(this.BorderSize));
}
@ -1040,9 +1040,9 @@ define([
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.asc_putWidth(this._pt2mm(this.BorderSize));
}
@ -1064,7 +1064,7 @@ define([
if (me.BlipFillType !== null) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(me.BlipFillType);
fill.asc_getFill().asc_putUrl(checkUrl);
@ -1121,13 +1121,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.asc_getFill();
color = fill.asc_getColor();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1135,23 +1135,23 @@ define([
} else
this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.asc_getFill();
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) {
if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType);
} else
this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType;
}
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.asc_getFill();
this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) {
@ -1166,7 +1166,7 @@ define([
color = fill.asc_getColorFg();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1176,7 +1176,7 @@ define([
color = fill.asc_getColorBg();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1184,17 +1184,17 @@ define([
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) {
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.asc_getFill();
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype;
rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1205,7 +1205,7 @@ define([
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.asc_getLinearAngle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
@ -1222,7 +1222,7 @@ define([
if (colors && colors.length>0) {
color = colors[0];
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else {
@ -1233,7 +1233,7 @@ define([
color = colors[1];
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else {
@ -1261,7 +1261,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD;
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1304,10 +1304,10 @@ define([
strokeType = (stroke) ? stroke.asc_getType() : null;
if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.asc_getColor();
if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
}
else
@ -1346,8 +1346,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color;
}
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) {
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !(/pt\s*$/.test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1367,7 +1367,7 @@ define([
}
this.BorderSize = w;
}
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) {
} else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
@ -1535,9 +1535,9 @@ define([
if (this.api) {
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(record.get('type'));
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -1623,11 +1623,11 @@ define([
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null));
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
},
setLocked: function (locked) {

View file

@ -122,18 +122,18 @@ define([
};
me.numFormatTypes = {};
me.numFormatTypes[c_oAscNumFormatType.General] = me.txtGeneral;
me.numFormatTypes[c_oAscNumFormatType.Custom] = me.txtCustom;
me.numFormatTypes[c_oAscNumFormatType.Text] = me.txtText;
me.numFormatTypes[c_oAscNumFormatType.Number] = me.txtNumber;
me.numFormatTypes[c_oAscNumFormatType.Integer] = me.txtInteger;
me.numFormatTypes[c_oAscNumFormatType.Scientific] = me.txtScientific;
me.numFormatTypes[c_oAscNumFormatType.Currency] = me.txtCurrency;
me.numFormatTypes[c_oAscNumFormatType.Accounting] = me.txtAccounting;
me.numFormatTypes[c_oAscNumFormatType.Date] = me.txtDate;
me.numFormatTypes[c_oAscNumFormatType.Time] = me.txtTime;
me.numFormatTypes[c_oAscNumFormatType.Percent] = me.txtPercentage;
me.numFormatTypes[c_oAscNumFormatType.Fraction] = me.txtFraction;
me.numFormatTypes[Asc.c_oAscNumFormatType.General] = me.txtGeneral;
me.numFormatTypes[Asc.c_oAscNumFormatType.Custom] = me.txtCustom;
me.numFormatTypes[Asc.c_oAscNumFormatType.Text] = me.txtText;
me.numFormatTypes[Asc.c_oAscNumFormatType.Number] = me.txtNumber;
me.numFormatTypes[Asc.c_oAscNumFormatType.Integer] = me.txtInteger;
me.numFormatTypes[Asc.c_oAscNumFormatType.Scientific] = me.txtScientific;
me.numFormatTypes[Asc.c_oAscNumFormatType.Currency] = me.txtCurrency;
me.numFormatTypes[Asc.c_oAscNumFormatType.Accounting] = me.txtAccounting;
me.numFormatTypes[Asc.c_oAscNumFormatType.Date] = me.txtDate;
me.numFormatTypes[Asc.c_oAscNumFormatType.Time] = me.txtTime;
me.numFormatTypes[Asc.c_oAscNumFormatType.Percent] = me.txtPercentage;
me.numFormatTypes[Asc.c_oAscNumFormatType.Fraction] = me.txtFraction;
function dummyCmp() {
return {
@ -399,25 +399,25 @@ define([
caption : me.textTopBorders,
iconCls : 'mnu-border-top',
icls : 'btn-border-top',
borderId : c_oAscBorderOptions.Top
borderId : Asc.c_oAscBorderOptions.Top
},
{
caption : me.textBottomBorders,
iconCls : 'mnu-border-bottom',
icls : 'btn-border-bottom',
borderId : c_oAscBorderOptions.Bottom
borderId : Asc.c_oAscBorderOptions.Bottom
},
{
caption : me.textLeftBorders,
iconCls : 'mnu-border-left',
icls : 'btn-border-left',
borderId : c_oAscBorderOptions.Left
borderId : Asc.c_oAscBorderOptions.Left
},
{
caption : me.textRightBorders,
iconCls : 'mnu-border-right',
icls : 'btn-border-right',
borderId : c_oAscBorderOptions.Right
borderId : Asc.c_oAscBorderOptions.Right
},
{
caption : me.textNoBorders,
@ -436,25 +436,25 @@ define([
caption : me.textCenterBorders,
iconCls : 'mnu-border-vmiddle',
icls : 'btn-border-vmiddle',
borderId : c_oAscBorderOptions.InnerV
borderId : Asc.c_oAscBorderOptions.InnerV
},
{
caption : me.textMiddleBorders,
iconCls : 'mnu-border-hmiddle',
icls : 'btn-border-hmiddle',
borderId : c_oAscBorderOptions.InnerH
borderId : Asc.c_oAscBorderOptions.InnerH
},
{
caption : me.textDiagUpBorder,
iconCls : 'mnu-border-diagup',
icls : 'btn-border-diagup',
borderId : c_oAscBorderOptions.DiagU
borderId : Asc.c_oAscBorderOptions.DiagU
},
{
caption : me.textDiagDownBorder,
iconCls : 'mnu-border-diagdown',
icls : 'btn-border-diagdown',
borderId : c_oAscBorderOptions.DiagD
borderId : Asc.c_oAscBorderOptions.DiagD
},
{caption: '--'},
{
@ -576,19 +576,19 @@ define([
items: [
{
caption : me.txtMergeCenter,
value : c_oAscMergeOptions.MergeCenter
value : Asc.c_oAscMergeOptions.MergeCenter
},
{
caption : me.txtMergeAcross,
value : c_oAscMergeOptions.MergeAcross
value : Asc.c_oAscMergeOptions.MergeAcross
},
{
caption : me.txtMergeCells,
value : c_oAscMergeOptions.Merge
value : Asc.c_oAscMergeOptions.Merge
},
{
caption : me.txtUnmerge,
value : c_oAscMergeOptions.Unmerge
value : Asc.c_oAscMergeOptions.Unmerge
}
]
})
@ -1150,27 +1150,27 @@ define([
items : [
{
caption : me.txtClearAll,
value : c_oAscCleanOptions.All
value : Asc.c_oAscCleanOptions.All
},
{
caption : me.txtClearText,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Text
value : Asc.c_oAscCleanOptions.Text
},
{
caption : me.txtClearFormat,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Format
value : Asc.c_oAscCleanOptions.Format
},
{
caption : me.txtClearComments,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Comments
value : Asc.c_oAscCleanOptions.Comments
},
{
caption : me.txtClearHyper,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Hyperlinks
value : Asc.c_oAscCleanOptions.Hyperlinks
}
]
})
@ -1195,19 +1195,19 @@ define([
items : [
{
caption : me.textInsRight,
value : c_oAscInsertOptions.InsertCellsAndShiftRight
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftRight
},
{
caption : me.textInsDown,
value : c_oAscInsertOptions.InsertCellsAndShiftDown
value : Asc.c_oAscInsertOptions.InsertCellsAndShiftDown
},
{
caption : me.textEntireRow,
value : c_oAscInsertOptions.InsertRows
value : Asc.c_oAscInsertOptions.InsertRows
},
{
caption : me.textEntireCol,
value : c_oAscInsertOptions.InsertColumns
value : Asc.c_oAscInsertOptions.InsertColumns
}
]
})
@ -1223,19 +1223,19 @@ define([
items : [
{
caption : me.textDelLeft,
value : c_oAscDeleteOptions.DeleteCellsAndShiftLeft
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftLeft
},
{
caption : me.textDelUp,
value : c_oAscDeleteOptions.DeleteCellsAndShiftTop
value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftTop
},
{
caption : me.textEntireRow,
value : c_oAscDeleteOptions.DeleteRows
value : Asc.c_oAscDeleteOptions.DeleteRows
},
{
caption : me.textEntireCol,
value : c_oAscDeleteOptions.DeleteColumns
value : Asc.c_oAscDeleteOptions.DeleteColumns
}
]
})

View file

@ -76,9 +76,9 @@ Ext.define('SSE.controller.Document', {
},
_onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']) {
if (type === Asc.c_oAscAsyncActionType['BlockInteraction']) {
switch (id) {
case c_oAscAsyncAction['Open']:
case Asc.c_oAscAsyncAction['Open']:
var i = this.api.asc_getActiveWorksheetIndex();
this.api.asc_showWorksheet(i);
break;

View file

@ -150,43 +150,43 @@ Ext.define('SSE.controller.Main', {
switch (id)
{
case c_oAscError.ID.Unknown:
case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText;
break;
case c_oAscError.ID.ConvertationTimeout:
case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText;
break;
case c_oAscError.ID.ConvertationError:
case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText;
break;
case c_oAscError.ID.DownloadError:
case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText;
break;
case c_oAscError.ID.UplImageSize:
case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage;
break;
case c_oAscError.ID.UplImageExt:
case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage;
break;
case c_oAscError.ID.UplImageFileCount:
case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage;
break;
case c_oAscError.ID.VKeyEncrypt:
case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
case c_oAscError.ID.KeyExpire:
case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
case c_oAscError.ID.UserCountExceed:
case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
@ -197,7 +197,7 @@ Ext.define('SSE.controller.Main', {
if (level == c_oAscError.Level.Critical) {
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, config.message);
@ -243,7 +243,7 @@ Ext.define('SSE.controller.Main', {
},
onAdvancedOptions: function(advOptions) {
if (advOptions.asc_getOptionId() == c_oAscAdvancedOptionsID['CSV']){
if (advOptions.asc_getOptionId() == Asc.c_oAscAdvancedOptionsID['CSV']){
var preloader = Ext.get('loading-mask'),
me = this;
@ -287,7 +287,7 @@ Ext.define('SSE.controller.Main', {
after : function(){
Ext.Viewport.remove(viewAdvOptionsCsv);
if (me.api) {
me.api.asc_setAdvancedOptions(c_oAscAdvancedOptionsID['CSV'], new Asc.asc_CCSVAdvancedOptions(result.encoding, result.delimiter));
me.api.asc_setAdvancedOptions(Asc.c_oAscAdvancedOptionsID['CSV'], new Asc.asc_CCSVAdvancedOptions(result.encoding, result.delimiter));
}
}
});
@ -313,9 +313,9 @@ Ext.define('SSE.controller.Main', {
},
onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']){
if (type === Asc.c_oAscAsyncActionType['BlockInteraction']){
switch (id) {
case c_oAscAsyncAction['Open']:
case Asc.c_oAscAsyncAction['Open']:
this.onOpenDocument();
break;
}
@ -323,7 +323,7 @@ Ext.define('SSE.controller.Main', {
},
onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.XLSX, true);
this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
},
_hideLoadSplash: function(){

View file

@ -96,9 +96,9 @@ Ext.define('SSE.controller.WorksheetList', {
},
onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']){
if (type === Asc.c_oAscAsyncActionType['BlockInteraction']){
switch (id) {
case c_oAscAsyncAction['Open']:
case Asc.c_oAscAsyncAction['Open']:
this._loadWorksheets();
break;
}