diff --git a/apps/api/documents/cache-scripts.html b/apps/api/documents/cache-scripts.html index 4aca07b9a..23f210c3e 100644 --- a/apps/api/documents/cache-scripts.html +++ b/apps/api/documents/cache-scripts.html @@ -16,7 +16,7 @@
diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index 59f30b1b3..f27ee50e0 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -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; diff --git a/apps/common/main/lib/component/MetricSpinner.js b/apps/common/main/lib/component/MetricSpinner.js index 4b86614b9..e611fda32 100644 --- a/apps/common/main/lib/component/MetricSpinner.js +++ b/apps/common/main/lib/component/MetricSpinner.js @@ -58,7 +58,7 @@ * * * @property {String} defaultUnit - * Name of the unit of measurement. Can be px|em|%|en|ex|pt|in|cm|mm|pc|s|ms|см|мм|пт|сек|мс. + * Name of the unit of measurement. Can be px|em|%|en|ex|pt|"|cm|mm|pc|s|ms|см|мм|пт|сек|мс. * * defaultUnit: 'px', * @@ -262,7 +262,7 @@ define([ var units = this.options.defaultUnit; if ( typeof value.match !== 'undefined'){ - var searchUnits = value.match(/(px|em|%|en|ex|pt|in|cm|mm|pc|s|ms|см|мм|пт|сек|мс)$/i); + var searchUnits = value.match(/(px|em|%|en|ex|pt|"|cm|mm|pc|s|ms|см|мм|пт|сек|мс)$/i); if (null !== searchUnits && searchUnits[0]!=='undefined') { units = searchUnits[0].toLowerCase(); } @@ -493,7 +493,7 @@ define([ return v_out; } - if ( fromUnit.match(/(pt|in|cm|mm|pc|см|мм|пт)$/i)===null || this.options.defaultUnit.match(/(pt|in|cm|mm|pc|см|мм|пт)$/i)===null) + if ( fromUnit.match(/(pt|"|cm|mm|pc|см|мм|пт)$/i)===null || this.options.defaultUnit.match(/(pt|"|cm|mm|pc|см|мм|пт)$/i)===null) return value; var v_out = value; @@ -502,7 +502,7 @@ define([ v_out = v_out*10; else if (fromUnit=='pt' || fromUnit=='пт') v_out = v_out * 25.4 / 72.0; - else if (fromUnit=='in') + else if (fromUnit=='\"') v_out = v_out * 25.4; else if (fromUnit=='pc') v_out = v_out * 25.4 / 6.0; @@ -512,8 +512,8 @@ define([ v_out = v_out/10.; else if (this.options.defaultUnit=='pt' || this.options.defaultUnit=='пт') v_out = parseFloat((v_out * 72.0 / 25.4).toFixed(3)); - else if (this.options.defaultUnit=='in') - v_out = v_out / 25.4; + else if (this.options.defaultUnit=='\"') + v_out = parseFloat((v_out / 25.4).toFixed(3)); else if (this.options.defaultUnit=='pc') v_out = v_out * 6.0 / 25.4; diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index 938c22e54..2be360885 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -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); diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index 11b41f0b1..2efcf0de6 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -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 = '' + me.textFormatted; if (value.Get_Bold() !== undefined) proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', '); @@ -298,7 +298,7 @@ define([ changetext += ''; changetext += proptext; break; - case c_oAscRevisionsChangeType.ParaPr: + case Asc.c_oAscRevisionsChangeType.ParaPr: changetext = '' + me.textParaFormatted; if (value.Get_ContextualSpacing()) proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', '); diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index d86564770..ab8b61d95 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -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); @@ -254,16 +254,18 @@ Common.Utils.Metric = _.extend( new(function() { me.c_MetricUnits = { cm: 0, - pt: 1 + pt: 1, + inch: 2 }; me.currentMetric = me.c_MetricUnits.pt; - me.metricName = ['Cm', 'Pt']; + me.metricName = ['Cm', 'Pt', 'Inch']; return { c_MetricUnits: me.c_MetricUnits, txtCm : 'cm', txtPt : 'pt', + txtInch : '\"', setCurrentMetric: function(value) { me.currentMetric = value; @@ -282,25 +284,29 @@ Common.Utils.Metric = _.extend( new(function() { }, fnRecalcToMM: function(value) { - // value in pt/cm. need to convert to mm + // value in pt/cm/inch. need to convert to mm if (value!==null && value!==undefined) { switch (me.currentMetric) { case me.c_MetricUnits.cm: return value * 10; case me.c_MetricUnits.pt: return value * 25.4 / 72.0; + case me.c_MetricUnits.inch: + return value * 25.4; } } return value; }, fnRecalcFromMM: function(value) { - // value in mm. need to convert to pt/cm + // value in mm. need to convert to pt/cm/inch switch (me.currentMetric) { case me.c_MetricUnits.cm: return parseFloat((value/10.).toFixed(4)); case me.c_MetricUnits.pt: return parseFloat((value * 72.0 / 25.4).toFixed(3)); + case me.c_MetricUnits.inch: + return parseFloat((value / 25.4).toFixed(3)); } return value; } diff --git a/apps/common/main/lib/view/Chat.js b/apps/common/main/lib/view/Chat.js index 7e1734134..d05904497 100644 --- a/apps/common/main/lib/view/Chat.js +++ b/apps/common/main/lib/view/Chat.js @@ -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); diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index 1b6a75a33..14930e085 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -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 })) }); diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index ba89ac73c..852ffbfd7 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -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([ '
', '', '
', - '<% if (type == c_oAscAdvancedOptionsID.CSV) { %>', + '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>', '', '
', '<% } %>', @@ -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;', diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html index b4c8929af..b8258b8be 100644 --- a/apps/documenteditor/embed/index.html +++ b/apps/documenteditor/embed/index.html @@ -433,6 +433,7 @@ + diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 2b0cce204..21378a978 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -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(); diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 96ecd76da..5d47539e6 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -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); } diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d0ef62a31..85ae7ecc5 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -105,16 +105,13 @@ define([ return; } - var value = Common.localStorage.getItem('de-settings-unit'); - Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm); - - value = Common.localStorage.getItem("de-settings-fontrender"); + var value = Common.localStorage.getItem("de-settings-fontrender"); if (value === null) window.devicePixelRatio > 1 ? value = '1' : '0'; // Initialize api - this.api = new asc_docs_api("editor_sdk"); + this.api = new Asc.asc_docs_api("editor_sdk"); if (this.api){ switch (value) { @@ -327,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) { @@ -380,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); } @@ -423,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); } @@ -536,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(){ @@ -554,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); } @@ -572,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; @@ -654,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')}); @@ -677,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(){ @@ -741,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"); @@ -802,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 **/ @@ -958,7 +955,7 @@ define([ if (!this.appOptions.isEdit) { this.hidePreloader(); - this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); } }, @@ -1050,7 +1047,12 @@ define([ toolbarView.on('insertchart', _.bind(me.onInsertChart, me)); } - var value = Common.localStorage.getItem('de-hidden-rulers'); + var value = Common.localStorage.getItem('de-settings-unit'); + value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; + Common.Utils.Metric.setCurrentMetric(value); + me.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); + + value = Common.localStorage.getItem('de-hidden-rulers'); me.api.asc_SetViewRulers(value===null || parseInt(value) === 0); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); @@ -1064,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 @@ -1088,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 @@ -1096,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; @@ -1177,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; @@ -1195,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); @@ -1216,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(); @@ -1408,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, @@ -1416,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); }) } }); @@ -1585,13 +1587,16 @@ define([ unitsChanged: function(m) { var value = Common.localStorage.getItem("de-settings-unit"); - Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm); + value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; + Common.Utils.Metric.setCurrentMetric(value); + this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); this.getApplication().getController('RightMenu').updateMetricUnit(); + this.getApplication().getController('Toolbar').getView('Toolbar').updateMetricUnit(); }, 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, @@ -1608,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(); } @@ -1632,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) diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index 0f1876998..f9072dcdc 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -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; } } diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 46779d914..a5977a564 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -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
') }); @@ -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())}; diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 65c5aacd9..ae4723908 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -128,7 +128,7 @@ define([ for (var i = 0; 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(); diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js index f606a4260..ef0689046 100644 --- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js @@ -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); } } @@ -1249,7 +1249,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat for (var i=0; i0) ? 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'); diff --git a/apps/documenteditor/main/app/view/MailMergeSettings.js b/apps/documenteditor/main/app/view/MailMergeSettings.js index e3e5bad0b..2ff261def 100644 --- a/apps/documenteditor/main/app/view/MailMergeSettings.js +++ b/apps/documenteditor/main/app/view/MailMergeSettings.js @@ -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); diff --git a/apps/documenteditor/main/app/view/PageMarginsDialog.js b/apps/documenteditor/main/app/view/PageMarginsDialog.js index b59a1a2ba..f05259d11 100644 --- a/apps/documenteditor/main/app/view/PageMarginsDialog.js +++ b/apps/documenteditor/main/app/view/PageMarginsDialog.js @@ -149,7 +149,7 @@ define([ $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('input').on('keypress', _.bind(this.onKeyPress, this)); -// this.updateMetricUnit(); + this.updateMetricUnit(); }, _handleInput: function(state) { @@ -186,26 +186,26 @@ define([ setSettings: function (props) { if (props) { - this.maxMarginsH = parseFloat((props.get_H()/10. - 0.26).toFixed(4)); - this.maxMarginsW = parseFloat((props.get_W()/10. - 1.27).toFixed(4)); + this.maxMarginsH = Common.Utils.Metric.fnRecalcFromMM(props.get_H() - 2.6); + this.maxMarginsW = Common.Utils.Metric.fnRecalcFromMM(props.get_W() - 12.7); this.spnTop.setMaxValue(this.maxMarginsH); this.spnBottom.setMaxValue(this.maxMarginsH); this.spnLeft.setMaxValue(this.maxMarginsW); this.spnRight.setMaxValue(this.maxMarginsW); - this.spnTop.setValue(props.get_TopMargin()/10, true); // this.spnTop.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_TopMargin()), true); - this.spnBottom.setValue(props.get_BottomMargin()/10, true); - this.spnLeft.setValue(props.get_LeftMargin()/10, true); - this.spnRight.setValue(props.get_RightMargin()/10, true); + this.spnTop.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_TopMargin()), true); + this.spnBottom.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_BottomMargin()), true); + this.spnLeft.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_LeftMargin()), true); + this.spnRight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_RightMargin()), true); } }, getSettings: function() { var props = new CDocumentSectionProps(); - props.put_TopMargin(this.spnTop.getNumberValue()*10); // props.put_TopMargin(Common.Utils.Metric.fnRecalcToMM(this.spnTop.getNumberValue())); - props.put_BottomMargin(this.spnBottom.getNumberValue()*10); - props.put_LeftMargin(this.spnLeft.getNumberValue()*10); - props.put_RightMargin(this.spnRight.getNumberValue()*10); + props.put_TopMargin(Common.Utils.Metric.fnRecalcToMM(this.spnTop.getNumberValue())); + props.put_BottomMargin(Common.Utils.Metric.fnRecalcToMM(this.spnBottom.getNumberValue())); + props.put_LeftMargin(Common.Utils.Metric.fnRecalcToMM(this.spnLeft.getNumberValue())); + props.put_RightMargin(Common.Utils.Metric.fnRecalcToMM(this.spnRight.getNumberValue())); return props; }, @@ -214,10 +214,9 @@ define([ for (var i=0; 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, diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index a9829916b..5d9508927 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -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()); @@ -721,9 +721,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem var spinner = this.spinners[i]; spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' ) - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01); else - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1); } } @@ -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)); } } diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index b40a53d71..c860312c5 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -83,17 +83,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, @@ -104,10 +104,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; @@ -126,11 +126,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({ @@ -311,8 +311,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({ @@ -371,8 +371,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({ @@ -541,13 +541,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({ @@ -618,12 +618,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); @@ -631,19 +631,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(); @@ -661,15 +661,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); @@ -689,12 +689,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); @@ -714,10 +714,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)); } @@ -738,10 +738,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)); } @@ -758,10 +758,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)); } @@ -778,9 +778,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)); } @@ -795,10 +795,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); @@ -858,7 +858,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; @@ -868,7 +868,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; @@ -882,10 +882,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); } @@ -915,12 +915,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); @@ -943,13 +943,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); } @@ -986,13 +986,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); } @@ -1014,13 +1014,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)); } @@ -1066,9 +1066,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)); } @@ -1114,17 +1114,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); } @@ -1145,7 +1145,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); @@ -1174,7 +1174,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, @@ -1257,13 +1257,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())}; @@ -1271,23 +1271,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) { @@ -1302,7 +1302,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())}; @@ -1312,7 +1312,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())}; @@ -1320,17 +1320,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); @@ -1341,7 +1341,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; @@ -1358,7 +1358,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 { @@ -1369,7 +1369,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 { @@ -1397,7 +1397,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]}; @@ -1440,10 +1440,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 @@ -1483,8 +1483,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) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || @@ -1504,7 +1504,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); @@ -1664,9 +1664,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); @@ -1741,11 +1741,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) { diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index 2856c957a..774cf09bc 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -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, diff --git a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js index 517ba7dbe..013d1df54 100644 --- a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js @@ -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() { @@ -170,6 +170,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); }, this)); + var currmetric = Common.Utils.Metric.getCurrentMetric(); this.cmbUnit = new Common.UI.ComboBox({ el : $('#tableadv-cmb-unit'), style : 'width: 85px;', @@ -177,7 +178,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat editable : false, cls : 'input-group-nr', data : [ - { value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm }, + { value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) }, { value: 1, displayValue: this.txtPercent } ] }); @@ -234,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)); @@ -342,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); @@ -364,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(); } @@ -384,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(); } @@ -404,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(); } @@ -424,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(); } @@ -470,7 +471,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat editable : false, cls : 'input-group-nr', data : [ - { value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm }, + { value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) }, { value: 1, displayValue: this.txtPercent } ] }); @@ -684,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); @@ -708,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); @@ -720,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({ @@ -736,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({ @@ -764,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({ @@ -780,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({ @@ -1091,7 +1092,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat for (var j=0; j0.001) { this.GradLinearDirectionType=value; @@ -865,7 +865,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 { @@ -876,7 +876,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 { @@ -904,7 +904,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]}; } @@ -943,10 +943,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 @@ -985,8 +985,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) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || @@ -1006,7 +1006,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); @@ -1137,9 +1137,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) { diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 8410366cd..303c60169 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -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 }) ] @@ -686,10 +686,10 @@ define([ var pageMarginsTemplate = _.template('
<%= caption %>
' + '<% if (options.value !== null) { %>
' + - '' + - '
' + - ''+ - '
'+ + '' + + '
' + + ''+ + '
'+ '<% } %>'); this.btnPageMargins = new Common.UI.Button({ @@ -711,7 +711,10 @@ define([ }); this.toolbarControls.push(this.btnPageMargins); - var pageSizeTemplate = _.template('
<%= caption %>
<%= options.subtitle %>
'); + var pageSizeTemplate = _.template('
<%= caption %>
' + + '
<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[0]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %> x '+ + '<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %>
'); + this.btnPageSize = new Common.UI.Button({ id : 'id-toolbar-btn-pagesize', cls : 'btn-toolbar', @@ -1045,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('
') }) @@ -1374,6 +1377,29 @@ define([ this.mnuNonPrinting.items[0].setChecked(this.api.get_ShowParaMarks(), true); this.mnuNonPrinting.items[1].setChecked(this.api.get_ShowTableEmptyLine(), true); this.btnShowHidenChars.toggle(this.mnuNonPrinting.items[0].checked, true); + + this.updateMetricUnit(); + } + }, + + updateMetricUnit: function() { + var items = this.btnPageMargins.menu.items; + for (var i=0; i + diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index ba2c84852..88bde65ef 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -917,6 +917,7 @@ "DE.Views.FileMenuPanels.Settings.txtPt": "Point", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", + "DE.Views.FileMenuPanels.Settings.txtInch": "Inch", "DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom Center", "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom Left", "DE.Views.HeaderFooterSettings.textBottomRight": "Bottom Right", @@ -1361,6 +1362,7 @@ "DE.Views.TableSettingsAdvanced.txtNoBorders": "No borders", "DE.Views.TableSettingsAdvanced.txtPercent": "Percent", "DE.Views.TableSettingsAdvanced.txtPt": "Point", + "DE.Views.TableSettingsAdvanced.txtInch": "Inch", "DE.Views.TableSettingsAdvanced.textCellSize": "Cell Size", "DE.Views.TableSettingsAdvanced.textPrefWidth": "Preferred width", "DE.Views.TableSettingsAdvanced.textMeasure": "Measure in", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index a5e9344eb..615382821 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -917,6 +917,7 @@ "DE.Views.FileMenuPanels.Settings.txtPt": "Пункт", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Проверка орфографии", "DE.Views.FileMenuPanels.Settings.txtWin": "как Windows", + "DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм", "DE.Views.HeaderFooterSettings.textBottomCenter": "Снизу по центру", "DE.Views.HeaderFooterSettings.textBottomLeft": "Снизу слева", "DE.Views.HeaderFooterSettings.textBottomRight": "Снизу справа", @@ -1361,6 +1362,7 @@ "DE.Views.TableSettingsAdvanced.txtNoBorders": "Без границ", "DE.Views.TableSettingsAdvanced.txtPercent": "Процент", "DE.Views.TableSettingsAdvanced.txtPt": "Пункт", + "DE.Views.TableSettingsAdvanced.txtInch": "Дюйм", "DE.Views.TextArtSettings.strColor": "Цвет", "DE.Views.TextArtSettings.strFill": "Заливка", "DE.Views.TextArtSettings.strSize": "Толщина", diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index d70df07d2..374ce0cbc 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -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(){ diff --git a/apps/documenteditor/mobile/app/controller/tablet/panel/Insert.js b/apps/documenteditor/mobile/app/controller/tablet/panel/Insert.js index facf4dc4a..1cfcf0e78 100644 --- a/apps/documenteditor/mobile/app/controller/tablet/panel/Insert.js +++ b/apps/documenteditor/mobile/app/controller/tablet/panel/Insert.js @@ -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' diff --git a/apps/documenteditor/mobile/index.html b/apps/documenteditor/mobile/index.html index e62ec2d8d..469b75955 100644 --- a/apps/documenteditor/mobile/index.html +++ b/apps/documenteditor/mobile/index.html @@ -350,6 +350,7 @@ + diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index 040009e2d..19f7e2cae 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -413,6 +413,7 @@ + diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index e7a234f8d..ab4548e8d 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -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(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 62f3a69d0..3b4dd3f3f 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -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); } }, @@ -816,7 +816,9 @@ define([ } var value = Common.localStorage.getItem('pe-settings-unit'); - Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm); + value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; + Common.Utils.Metric.setCurrentMetric(value); + me.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); value = Common.localStorage.getItem('pe-hidden-rulers'); if (me.api.asc_SetViewRulers) me.api.asc_SetViewRulers(value===null || parseInt(value) === 0); @@ -833,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 @@ -857,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 @@ -865,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; @@ -946,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; @@ -956,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); @@ -978,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'); } @@ -1167,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); }) } }); @@ -1256,7 +1258,9 @@ define([ unitsChanged: function(m) { var value = Common.localStorage.getItem("pe-settings-unit"); - Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm); + value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; + Common.Utils.Metric.setCurrentMetric(value); + this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); this.getApplication().getController('RightMenu').updateMetricUnit(); }, diff --git a/apps/presentationeditor/main/app/controller/RightMenu.js b/apps/presentationeditor/main/app/controller/RightMenu.js index 4661ffd43..cc4919e67 100644 --- a/apps/presentationeditor/main/app/controller/RightMenu.js +++ b/apps/presentationeditor/main/app/controller/RightMenu.js @@ -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; } } diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index ce1126c15..0d4691309 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -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()); diff --git a/apps/presentationeditor/main/app/view/ChartSettings.js b/apps/presentationeditor/main/app/view/ChartSettings.js index 77dd87dfd..141c896e3 100644 --- a/apps/presentationeditor/main/app/view/ChartSettings.js +++ b/apps/presentationeditor/main/app/view/ChartSettings.js @@ -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('
') }); @@ -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; @@ -320,7 +320,7 @@ define([ for (var i=0; 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)) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 3ad109aee..34cdfd28a 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -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} ]], @@ -222,7 +222,8 @@ define([ cls : 'input-group-nr', data : [ { value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm }, - { value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt } + { value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt }, + { value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch } ] }); @@ -335,7 +336,8 @@ define([ strFast: 'Fast', strStrict: 'Strict', textAutoRecover: 'Autorecover', - strAutoRecover: 'Turn on autorecover' + strAutoRecover: 'Turn on autorecover', + txtInch: 'Inch' }, PE.Views.FileMenuPanels.Settings || {})); PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/presentationeditor/main/app/view/HyperlinkSettingsDialog.js b/apps/presentationeditor/main/app/view/HyperlinkSettingsDialog.js index b83d5889c..f3054bc89 100644 --- a/apps/presentationeditor/main/app/view/HyperlinkSettingsDialog.js +++ b/apps/presentationeditor/main/app/view/HyperlinkSettingsDialog.js @@ -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"; diff --git a/apps/presentationeditor/main/app/view/ImageSettings.js b/apps/presentationeditor/main/app/view/ImageSettings.js index 779f4b3fa..3a3e74a4c 100644 --- a/apps/presentationeditor/main/app/view/ImageSettings.js +++ b/apps/presentationeditor/main/app/view/ImageSettings.js @@ -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(); diff --git a/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js index b7631a9f9..89931a9c8 100644 --- a/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js @@ -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() !== '') @@ -234,7 +234,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem for (var i=0; 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, diff --git a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js index c7b10a8e3..ca7406017 100644 --- a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js @@ -359,9 +359,9 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced var spinner = this.spinners[i]; spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); if (spinner.el.id == 'paragraphadv-spin-spacing') - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01); else - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1); } } diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 58bad4eb0..5c58ac9eb 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -82,16 +82,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, @@ -100,10 +100,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; @@ -122,11 +122,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({ @@ -306,8 +306,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({ @@ -366,8 +366,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({ @@ -580,31 +580,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(); @@ -621,15 +621,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); @@ -649,12 +649,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); @@ -673,10 +673,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)); } @@ -696,10 +696,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)); } @@ -715,10 +715,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)); } @@ -734,9 +734,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)); } @@ -750,10 +750,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); @@ -810,7 +810,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; @@ -820,7 +820,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; @@ -834,10 +834,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); } @@ -866,12 +866,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); @@ -893,13 +893,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); } @@ -935,13 +935,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); } @@ -962,13 +962,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)); } @@ -1013,9 +1013,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)); } @@ -1036,7 +1036,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); @@ -1064,7 +1064,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, @@ -1121,13 +1121,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())}; @@ -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.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) { @@ -1166,7 +1166,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())}; @@ -1176,7 +1176,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())}; @@ -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.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); @@ -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.get_linear_angle()/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.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 { @@ -1233,7 +1233,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 { @@ -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([ 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 @@ -1347,8 +1347,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) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || @@ -1368,7 +1368,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); @@ -1528,9 +1528,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); @@ -1604,11 +1604,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) { diff --git a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js index e59a114f9..acf18c51e 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js @@ -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({ @@ -529,7 +529,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem for (var i=0; i0.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]}; diff --git a/apps/presentationeditor/main/app/view/SlideSizeSettings.js b/apps/presentationeditor/main/app/view/SlideSizeSettings.js index e99571c3d..c09639fa8 100644 --- a/apps/presentationeditor/main/app/view/SlideSizeSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSizeSettings.js @@ -202,10 +202,9 @@ define([ for (var i=0; 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, diff --git a/apps/presentationeditor/main/app/view/TableSettingsAdvanced.js b/apps/presentationeditor/main/app/view/TableSettingsAdvanced.js index 69e59975d..100f0da0c 100644 --- a/apps/presentationeditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/TableSettingsAdvanced.js @@ -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(); } }, @@ -381,7 +381,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem for (var i=0; i0.001) { this.GradLinearDirectionType=value; @@ -1222,7 +1222,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 { @@ -1233,7 +1233,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 { @@ -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.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 @@ -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.get_width(); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\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_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); @@ -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) { diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 927195875..073560792 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -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('
') }) @@ -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: '--' }, { diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index f5a1e830d..80f6fec6a 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -354,6 +354,7 @@ + diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 372e4e2e4..5feaf50fa 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -373,6 +373,7 @@ "PE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input", "PE.Views.FileMenuPanels.Settings.txtLast": "View Last", "PE.Views.FileMenuPanels.Settings.txtPt": "Point", + "PE.Views.FileMenuPanels.Settings.txtInch": "Inch", "PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel", "PE.Views.HyperlinkSettingsDialog.okButtonText": "OK", "PE.Views.HyperlinkSettingsDialog.strDisplay": "Display", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index d26169a55..8ad354d95 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -373,6 +373,7 @@ "PE.Views.FileMenuPanels.Settings.txtInput": "Альтернативный ввод", "PE.Views.FileMenuPanels.Settings.txtLast": "Последние", "PE.Views.FileMenuPanels.Settings.txtPt": "Пункт", + "PE.Views.FileMenuPanels.Settings.txtInch": "Дюйм", "PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Отмена", "PE.Views.HyperlinkSettingsDialog.okButtonText": "OK", "PE.Views.HyperlinkSettingsDialog.strDisplay": "Отображать", diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 1c47e010e..25e848424 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -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(){ diff --git a/apps/presentationeditor/mobile/index.html b/apps/presentationeditor/mobile/index.html index 3c3b1edf0..543604d83 100644 --- a/apps/presentationeditor/mobile/index.html +++ b/apps/presentationeditor/mobile/index.html @@ -328,6 +328,7 @@ + diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 72f59a30a..13fbbfe77 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -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 diff --git a/apps/spreadsheeteditor/main/app/controller/CellEditor.js b/apps/spreadsheeteditor/main/app/controller/CellEditor.js index ccc67dbae..87902fe9c 100644 --- a/apps/spreadsheeteditor/main/app/controller/CellEditor.js +++ b/apps/spreadsheeteditor/main/app/controller/CellEditor.js @@ -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); } }); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 2afd3dba3..c92a9e5de 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -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' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym, 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) + '
' + me.textCtrlClick + ''; @@ -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', diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index e61e5c222..a4354c9a0 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -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); } } }); diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index f9fc97497..efef9b4a9 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -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); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index b55e19fbf..b7a9af474 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -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, diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 4f470bdcd..8ae0b2ef6 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -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 { diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index 962059f6f..ebca0ad0d 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -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; } } diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index d061dc59f..f778544c6 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -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(); }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index eeceeffb5..6bd46234e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -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) { diff --git a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js index d26c4252a..851a7542b 100644 --- a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js @@ -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}); diff --git a/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js b/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js index 60fb8b0e5..974833e78 100644 --- a/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js +++ b/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js @@ -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) { diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index f5108e09b..01ec3e5c6 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -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('
') }); @@ -322,7 +322,7 @@ define([ for (var i=0; i') }); @@ -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); diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index 28582caa5..d28498257 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -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 }) ] }) diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 1df73f41a..bcfb917e2 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -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} // ] ], @@ -263,19 +263,19 @@ define([ editable : false, cls : 'input-group-nr', data : [ - {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)'}, - {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)'}, - {value:'210|297', displayValue:'A4 (21cm x 29,7cm)'}, - {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)'}, - {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)'}, - {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)'}, - {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)'}, - {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)'}, - {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)'}, - {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)'}, - {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)'}, - {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)'}, - {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)'} + {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)', caption: 'US Letter'}, + {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)', caption: 'US Legal'}, + {value:'210|297', displayValue:'A4 (21cm x 29,7cm)', caption: 'A4'}, + {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)', caption: 'A5'}, + {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)', caption: 'B5'}, + {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)', caption: 'Envelope #10'}, + {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)', caption: 'Envelope DL'}, + {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)', caption: 'Tabloid'}, + {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)', caption: 'A3'}, + {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)', caption: 'Tabloid Oversize'}, + {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)', caption: 'ROC 16K'}, + {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)', caption: 'Envelope Choukei 3'}, + {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)', caption: 'Super B/A3'} ] }); @@ -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 } ] }); @@ -380,9 +380,20 @@ define([ for (var i=0; i 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)}); @@ -755,7 +767,8 @@ define([ strFast: 'Fast', strStrict: 'Strict', textAutoRecover: 'Autorecover', - strAutoRecover: 'Turn on autorecover' + strAutoRecover: 'Turn on autorecover', + txtInch: 'Inch' }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js index a5c238990..84ffb3b37 100644 --- a/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js @@ -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(); diff --git a/apps/spreadsheeteditor/main/app/view/ImageSettings.js b/apps/spreadsheeteditor/main/app/view/ImageSettings.js index 26764641f..30b7148da 100644 --- a/apps/spreadsheeteditor/main/app/view/ImageSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ImageSettings.js @@ -169,7 +169,7 @@ define([ for (var i=0; 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, diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js index 8b59c33a9..d846f91b5 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -358,9 +358,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. var spinner = this.spinners[i]; spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' ) - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01); else - spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); + spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1); } } diff --git a/apps/spreadsheeteditor/main/app/view/PrintSettings.js b/apps/spreadsheeteditor/main/app/view/PrintSettings.js index bc1cd870e..f3abdd3b5 100644 --- a/apps/spreadsheeteditor/main/app/view/PrintSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PrintSettings.js @@ -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)); @@ -115,19 +115,19 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template', editable : false, cls : 'input-group-nr', data : [ - {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)'}, - {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)'}, - {value:'210|297', displayValue:'A4 (21cm x 29,7cm)'}, - {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)'}, - {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)'}, - {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)'}, - {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)'}, - {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)'}, - {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)'}, - {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)'}, - {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)'}, - {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)'}, - {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)'} + {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)', caption: 'US Letter'}, + {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)', caption: 'US Legal'}, + {value:'210|297', displayValue:'A4 (21cm x 29,7cm)', caption: 'A4'}, + {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)', caption: 'A5'}, + {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)', caption: 'B5'}, + {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)', caption: 'Envelope #10'}, + {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)', caption: 'Envelope DL'}, + {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)', caption: 'Tabloid'}, + {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)', caption: 'A3'}, + {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)', caption: 'Tabloid Oversize'}, + {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)', caption: 'ROC 16K'}, + {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)', caption: 'Envelope Choukei 3'}, + {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)', caption: 'Super B/A3'} ] }); @@ -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 } ] }); @@ -242,9 +242,20 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template', for (var i=0; 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( { @@ -1142,13 +1142,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())}; @@ -1156,23 +1156,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) { @@ -1187,7 +1187,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())}; @@ -1197,7 +1197,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())}; @@ -1205,17 +1205,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); @@ -1226,7 +1226,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; @@ -1243,7 +1243,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 { @@ -1254,7 +1254,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 { @@ -1282,7 +1282,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]}; @@ -1325,10 +1325,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 @@ -1368,8 +1368,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) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || @@ -1389,7 +1389,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); @@ -1549,9 +1549,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); @@ -1626,11 +1626,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) { diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js index 077b70f98..f577bbb34 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js @@ -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({ @@ -555,7 +555,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp for (var i=0; i= 0) { var rect = tab.$el.get(0).getBoundingClientRect(), childPos = tab.$el.offset(), diff --git a/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js b/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js index 81af133e7..fa2063f24 100644 --- a/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js @@ -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); }, diff --git a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js index 05ad9d528..d1bd732c7 100644 --- a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js @@ -82,26 +82,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; @@ -137,11 +137,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({ @@ -322,8 +322,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({ @@ -382,8 +382,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({ @@ -595,12 +595,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); @@ -608,19 +608,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(); @@ -638,15 +638,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); @@ -666,12 +666,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); @@ -691,10 +691,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)); } @@ -715,10 +715,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)); } @@ -735,10 +735,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)); } @@ -755,9 +755,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)); } @@ -772,10 +772,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); @@ -835,7 +835,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; @@ -845,7 +845,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; @@ -859,10 +859,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); } @@ -892,12 +892,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); @@ -920,13 +920,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); } @@ -963,13 +963,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); } @@ -991,13 +991,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)); } @@ -1043,9 +1043,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)); } @@ -1067,7 +1067,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); @@ -1124,13 +1124,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())}; @@ -1138,23 +1138,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) { @@ -1169,7 +1169,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())}; @@ -1179,7 +1179,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())}; @@ -1187,17 +1187,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); @@ -1208,7 +1208,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; @@ -1225,7 +1225,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 { @@ -1236,7 +1236,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 { @@ -1264,7 +1264,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]}; @@ -1307,10 +1307,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 @@ -1349,8 +1349,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) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || @@ -1370,7 +1370,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); @@ -1538,9 +1538,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); @@ -1626,11 +1626,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) { diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index e4ce0e746..b43e128bc 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -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 } ] }) diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 0badefc9a..62363c646 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -498,10 +498,11 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Inch", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows", - "SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover", - "SSE.Views.FileMenuPanels.Settings.textAutoRecover": "Autorecover", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Turn on autorecover", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.textAutoRecover": "Autorecover", "SSE.Views.FileMenuPanels.Settings.txtGeneral": "General", "del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Print", "SSE.Views.FileMenuPanels.Settings.txtPageSettings": "Page Settings", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 172c3b9f1..adb299e63 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -500,8 +500,9 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Пункт", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Русский", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "как Windows", - "SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Включить автовосстановление", - "SSE.Views.FileMenuPanels.Settings.textAutoRecover": "Автовосстановление", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Дюйм", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Включить автовосстановление", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.textAutoRecover": "Автовосстановление", "SSE.Views.FileMenuPanels.Settings.txtGeneral": "Общие", "del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Печать", "SSE.Views.FormulaDialog.cancelButtonText": "Отмена", diff --git a/apps/spreadsheeteditor/mobile/app/controller/Document.js b/apps/spreadsheeteditor/mobile/app/controller/Document.js index 476267d70..592627e3f 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Document.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Document.js @@ -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; diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 04841c0d2..1f3544bd0 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -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(){ diff --git a/apps/spreadsheeteditor/mobile/app/controller/WorksheetList.js b/apps/spreadsheeteditor/mobile/app/controller/WorksheetList.js index ce207c47c..24532a9e6 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/WorksheetList.js +++ b/apps/spreadsheeteditor/mobile/app/controller/WorksheetList.js @@ -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; }