diff --git a/apps/common/mobile/resources/less/icons.less b/apps/common/mobile/resources/less/icons.less index ac7a718c2..076f36865 100644 --- a/apps/common/mobile/resources/less/icons.less +++ b/apps/common/mobile/resources/less/icons.less @@ -30,4 +30,17 @@ i.icon { height: 24px; .encoded-svg-background(''); } + + // Formats + + &.icon-format-pdf { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-format-pdfa { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 5aed32a9c..793371f41 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -508,6 +508,7 @@ define([ this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); + this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); this.api.asc_enableKeyEvents(true); @@ -645,6 +646,17 @@ define([ }); }, + onLicenseChanged: function(params) { + var licType = params.asc_getLicenseType(); + if (licType !== undefined && this.appOptions.canFillForms && + (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + this._state.licenseType = licType; + + if (this._isDocReady) + this.applyLicense(); + }, + applyLicense: function() { if (this._state.licenseType) { var license = this._state.licenseType, @@ -661,6 +673,10 @@ define([ primary = 'buynow'; } + if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.canFillForms) { + this.disableEditing(true); + } + var value = Common.localStorage.getItem("de-license-warning"); value = (value!==null) ? parseInt(value) : 0; var now = (new Date).getTime(); @@ -989,6 +1005,8 @@ define([ }, onShowContentControlsActions: function(obj, x, y) { + if (this._isDisabled) return; + var me = this; switch (obj.type) { case Asc.c_oAscContentControlSpecificType.DateTime: @@ -1749,12 +1767,12 @@ define([ if (this.textMenu && !noobject) { var cancopy = this.api.can_CopyCut(), disabled = menu_props.paraProps && menu_props.paraProps.locked || menu_props.headerProps && menu_props.headerProps.locked || - menu_props.imgProps && (menu_props.imgProps.locked || menu_props.imgProps.content_locked); + menu_props.imgProps && (menu_props.imgProps.locked || menu_props.imgProps.content_locked) || this._isDisabled; this.textMenu.items[0].setDisabled(disabled || !this.api.asc_getCanUndo()); // undo this.textMenu.items[1].setDisabled(disabled || !this.api.asc_getCanRedo()); // redo - this.textMenu.items[3].setDisabled(!cancopy); // copy - this.textMenu.items[4].setDisabled(disabled || !cancopy); // cut + this.textMenu.items[3].setDisabled(disabled || !cancopy); // cut + this.textMenu.items[4].setDisabled(!cancopy); // copy this.textMenu.items[5].setDisabled(disabled) // paste; this.showPopupMenu(this.textMenu, {}, event); @@ -1788,6 +1806,11 @@ define([ } }, + disableEditing: function(state) { + this.view && this.view.btnClear && this.view.btnClear.setDisabled(state); + this._isDisabled = state; + }, + errorDefaultMessage : 'Error code: %1', unknownErrorText : 'Unknown error.', convertationTimeoutText : 'Conversion timeout exceeded.', diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 38b419858..1d2037829 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1293,7 +1293,7 @@ define([ onLicenseChanged: function(params) { var licType = params.asc_getLicenseType(); - if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' && + if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && this.editorConfig.mode !== 'view' && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; @@ -1319,7 +1319,7 @@ define([ primary = 'buynow'; } - if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) { + if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) { this.disableEditing(true); Common.NotificationCenter.trigger('api:disconnect'); } @@ -2193,7 +2193,8 @@ define([ var me = this, shapegrouparray = [], - shapeStore = this.getCollection('ShapeGroups'); + shapeStore = this.getCollection('ShapeGroups'), + name_arr = {}; shapeStore.reset(); @@ -2208,12 +2209,15 @@ define([ width = 30 * cols; _.each(shapes[index], function(shape, idx){ + var name = me['txtShape_' + shape.Type]; arr.push({ data : {shapeType: shape.Type}, - tip : me['txtShape_' + shape.Type] || (me.textShape + ' ' + (idx+1)), + tip : name || (me.textShape + ' ' + (idx+1)), allowSelected : true, selected: false }); + if (name) + name_arr[shape.Type] = name; }); store.add(arr); shapegrouparray.push({ @@ -2228,6 +2232,7 @@ define([ setTimeout(function(){ me.getApplication().getController('Toolbar').onApiAutoShapes(); }, 50); + this.api.asc_setShapeNames(name_arr); }, fillTextArt: function(shapes){ diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 1f066fe0e..170f30824 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2670,7 +2670,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.getApplication().getCollection('ShapeGroups'), parentMenu: me.toolbar.btnInsertShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null }); diff --git a/apps/documenteditor/main/app/view/ImageSettings.js b/apps/documenteditor/main/app/view/ImageSettings.js index eb9123037..75bf8e06e 100644 --- a/apps/documenteditor/main/app/view/ImageSettings.js +++ b/apps/documenteditor/main/app/view/ImageSettings.js @@ -349,7 +349,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, isFromImage: true diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 643dd0df4..b832fc750 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -1852,7 +1852,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, hideTextRect: me._state.isFromImage || me._state.isFromSmartArtInternal, diff --git a/apps/documenteditor/mobile/src/less/app.less b/apps/documenteditor/mobile/src/less/app.less index a4c192194..82a687446 100644 --- a/apps/documenteditor/mobile/src/less/app.less +++ b/apps/documenteditor/mobile/src/less/app.less @@ -37,6 +37,7 @@ @import './app-ios.less'; @import './icons-ios.less'; @import './icons-material.less'; +@import './icons-common.less'; :root { --f7-popover-width: 360px; diff --git a/apps/documenteditor/mobile/src/less/icons-common.less b/apps/documenteditor/mobile/src/less/icons-common.less new file mode 100644 index 000000000..6d834af08 --- /dev/null +++ b/apps/documenteditor/mobile/src/less/icons-common.less @@ -0,0 +1,57 @@ +// Formats + +i.icon { + &.icon-format-docx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-docxf { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-oform { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-txt { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-rtf { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-odt { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-html { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-dotx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-ott { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/less/icons-ios.less b/apps/documenteditor/mobile/src/less/icons-ios.less index 99205059b..006bd1d93 100644 --- a/apps/documenteditor/mobile/src/less/icons-ios.less +++ b/apps/documenteditor/mobile/src/less/icons-ios.less @@ -82,64 +82,8 @@ .encoded-svg-mask(''); } - // Download - - &.icon-format-docx { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-txt { - width: 24px; - height: 24px; - .encoded-svg-mask('') - } - - &.icon-format-rtf { - width: 24px; - height: 24px; - .encoded-svg-mask('') - } - - &.icon-format-odt { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-html { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-dotx { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-ott { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - - //Edit + // Edit + &.icon-text-additional { width: 22px; height: 22px; diff --git a/apps/documenteditor/mobile/src/less/icons-material.less b/apps/documenteditor/mobile/src/less/icons-material.less index bc3b9c640..2eb429078 100644 --- a/apps/documenteditor/mobile/src/less/icons-material.less +++ b/apps/documenteditor/mobile/src/less/icons-material.less @@ -137,64 +137,7 @@ .encoded-svg-mask(''); } - // Download - - &.icon-format-docx { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-txt { - width: 24px; - height: 24px; - .encoded-svg-mask('') - } - - &.icon-format-rtf { - width: 24px; - height: 24px; - .encoded-svg-mask('') - } - - &.icon-format-odt { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-html { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-dotx { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - &.icon-format-ott { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - - //Edit + // Edit &.icon-text-align-left { width: 22px; diff --git a/apps/documenteditor/mobile/src/view/settings/Download.jsx b/apps/documenteditor/mobile/src/view/settings/Download.jsx index 82d2ded93..4e822fd2e 100644 --- a/apps/documenteditor/mobile/src/view/settings/Download.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Download.jsx @@ -17,6 +17,15 @@ const Download = props => { props.onSaveFormat(Asc.c_oAscFileType.DOCX)}> + {dataDoc.fileType === 'docxf' || dataDoc.fileType === 'docx' ? [ + props.onSaveFormat(Asc.c_oAscFileType.DOCXF)}> + + , + props.onSaveFormat(Asc.c_oAscFileType.OFORM)}> + + + ] + : null} props.onSaveFormat(Asc.c_oAscFileType.PDF)}> diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 72428694d..672c06ff9 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -935,7 +935,7 @@ define([ onLicenseChanged: function(params) { var licType = params.asc_getLicenseType(); - if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' && + if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && this.editorConfig.mode !== 'view' && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; @@ -961,7 +961,7 @@ define([ primary = 'buynow'; } - if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) { + if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) { this.disableEditing(true); Common.NotificationCenter.trigger('api:disconnect'); } @@ -1905,7 +1905,8 @@ define([ return; var me = this, - shapegrouparray = []; + shapegrouparray = [], + name_arr = {}; _.each(groupNames, function(groupName, index){ var store = new Backbone.Collection([], { @@ -1918,12 +1919,15 @@ define([ width = 30 * cols; _.each(shapes[index], function(shape, idx){ + var name = me['txtShape_' + shape.Type]; arr.push({ data : {shapeType: shape.Type}, - tip : me['txtShape_' + shape.Type] || (me.textShape + ' ' + (idx+1)), + tip : name || (me.textShape + ' ' + (idx+1)), allowSelected : true, selected: false }); + if (name) + name_arr[shape.Type] = name; }); store.add(arr); shapegrouparray.push({ @@ -1935,6 +1939,7 @@ define([ }); this.getCollection('ShapeGroups').reset(shapegrouparray); + this.api.asc_setShapeNames(name_arr); }, fillLayoutsStore: function(layouts){ diff --git a/apps/presentationeditor/main/app/view/ImageSettings.js b/apps/presentationeditor/main/app/view/ImageSettings.js index cad43e7c9..551e5b743 100644 --- a/apps/presentationeditor/main/app/view/ImageSettings.js +++ b/apps/presentationeditor/main/app/view/ImageSettings.js @@ -295,7 +295,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, isFromImage: true diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 1686ac0f7..236a161b8 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -1697,7 +1697,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, hideTextRect: me._state.isFromImage || me._state.isFromSmartArtInternal, diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 87c83bc21..20090695f 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1075,7 +1075,7 @@ define([ style: 'min-width: 140px;', itemWidth: 20, itemHeight: 20, - menuMaxHeight: 640, + menuMaxHeight: 652, menuWidth: 362, enableKeyEvents: true, lock: [PE.enumLock.slideDeleted, PE.enumLock.lostConnect, PE.enumLock.noSlides, PE.enumLock.disableOnStart], @@ -1752,7 +1752,7 @@ define([ itemTemplate: _.template('
\">
'), groups: collection, parentMenu: menuShape, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents }); diff --git a/apps/presentationeditor/mobile/src/less/app.less b/apps/presentationeditor/mobile/src/less/app.less index 37ace4a3c..960129624 100644 --- a/apps/presentationeditor/mobile/src/less/app.less +++ b/apps/presentationeditor/mobile/src/less/app.less @@ -36,6 +36,7 @@ @import './app-ios.less'; @import './icons-ios.less'; @import './icons-material.less'; +@import './icons-common.less'; :root { --f7-popover-width: 360px; diff --git a/apps/presentationeditor/mobile/src/less/icons-common.less b/apps/presentationeditor/mobile/src/less/icons-common.less new file mode 100644 index 000000000..65985f829 --- /dev/null +++ b/apps/presentationeditor/mobile/src/less/icons-common.less @@ -0,0 +1,25 @@ +i.icon { + &.icon-format-pptx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-potx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-odp { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + + &.icon-format-otp { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } +} \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/less/icons-ios.less b/apps/presentationeditor/mobile/src/less/icons-ios.less index 3c7a619c5..b367b1e41 100644 --- a/apps/presentationeditor/mobile/src/less/icons-ios.less +++ b/apps/presentationeditor/mobile/src/less/icons-ios.less @@ -407,45 +407,8 @@ .encoded-svg-mask(''); } - // Formats + // Collaboration - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-pptx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-potx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-odp { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-otp { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - - // Collaboration &.icon-users { width: 24px; height: 24px; diff --git a/apps/presentationeditor/mobile/src/less/icons-material.less b/apps/presentationeditor/mobile/src/less/icons-material.less index 23488b3a3..f99c73331 100644 --- a/apps/presentationeditor/mobile/src/less/icons-material.less +++ b/apps/presentationeditor/mobile/src/less/icons-material.less @@ -377,46 +377,8 @@ .encoded-svg-mask(''); } - // Formats - - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-pptx { - width: 30px; - height: 30px; - // xml:space="preserve" - .encoded-svg-mask(''); - } - - &.icon-format-potx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-odp { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - - &.icon-format-otp { - width: 30px; - height: 30px; - .encoded-svg-mask('') - } - // Collaboration + &.icon-users { width: 24px; height: 24px; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 15e20d05f..1a13e7f58 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1031,7 +1031,7 @@ define([ if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return; var licType = params.asc_getLicenseType(); - if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' && + if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && this.editorConfig.mode !== 'view' && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; @@ -1057,7 +1057,7 @@ define([ primary = 'buynow'; } - if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) { + if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) { this.disableEditing(true); Common.NotificationCenter.trigger('api:disconnect'); } @@ -2349,7 +2349,8 @@ define([ var me = this, shapegrouparray = [], - shapeStore = this.getCollection('ShapeGroups'); + shapeStore = this.getCollection('ShapeGroups'), + name_arr = {}; shapeStore.reset(); @@ -2364,12 +2365,15 @@ define([ width = 30 * cols; _.each(shapes[index], function(shape, idx){ + var name = me['txtShape_' + shape.Type]; arr.push({ data : {shapeType: shape.Type}, - tip : me['txtShape_' + shape.Type] || (me.textShape + ' ' + (idx+1)), + tip : name || (me.textShape + ' ' + (idx+1)), allowSelected : true, selected: false }); + if (name) + name_arr[shape.Type] = name; }); store.add(arr); shapegrouparray.push({ @@ -2385,6 +2389,7 @@ define([ setTimeout(function(){ me.getApplication().getController('Toolbar').onApiAutoShapes(); }, 50); + this.api.asc_setShapeNames(name_arr); }, fillTextArt: function(shapes){ diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 9881ce9fb..b85de925e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3188,7 +3188,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.getApplication().getCollection('ShapeGroups'), parentMenu: me.toolbar.btnInsertShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null }); diff --git a/apps/spreadsheeteditor/main/app/view/ImageSettings.js b/apps/spreadsheeteditor/main/app/view/ImageSettings.js index 5fdf7fb1b..bf2f3aa9a 100644 --- a/apps/spreadsheeteditor/main/app/view/ImageSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ImageSettings.js @@ -385,7 +385,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, isFromImage: true diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index 87c9f1e7b..3cb0252cb 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -1705,7 +1705,7 @@ define([ itemTemplate: _.template('
\">
'), groups: me.application.getCollection('ShapeGroups'), parentMenu: me.btnChangeShape.menu, - restoreHeight: 640, + restoreHeight: 652, textRecentlyUsed: me.textRecentlyUsed, recentShapes: recents ? JSON.parse(recents) : null, hideTextRect: me._state.isFromImage || me._state.isFromSmartArtInternal, diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-common.less b/apps/spreadsheeteditor/mobile/src/less/icons-common.less index a1992c022..392f464ef 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-common.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-common.less @@ -77,3 +77,33 @@ background-image: url('@{app-image-path}/charts/chart-20.png'); } } + +// Formats + +i.icon { + &.icon-format-xlsx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-format-xltx { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-format-ods { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-format-ots { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } + &.icon-format-csv { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } +} diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less index 142989494..47acba9e6 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less @@ -302,44 +302,8 @@ .encoded-svg-mask(''); } - // Formats - - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-xlsx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-xltx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-ods { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-ots { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-csv { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } // Collaboration + &.icon-users { width: 24px; height: 24px; diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index 70a6e5c9d..4e393b6e2 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -286,44 +286,8 @@ .encoded-svg-mask(''); } - // Formats - - &.icon-format-pdf { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-pdfa { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-xlsx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-xltx { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-ods { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-ots { - width: 30px; - height: 30px; - .encoded-svg-mask(''); - } - &.icon-format-csv { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } // Collaboration + &.icon-users { width: 24px; height: 24px; diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 3df6b23d0..2d6b3dbde 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -555,6 +555,7 @@ module.exports = function(grunt) { webpack_app_build: { options: { cwd: '../vendor/framework7-react', + env: {...process.env, ...{addon: grunt.option('addon')}}, }, cmd: function() { const editor = packageFile.name == 'presentationeditor' ? 'slide' : diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index 64b53118d..7780894ce 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -236,8 +236,9 @@ module.exports = { }), new webpack.NormalModuleReplacementPlugin( /\.{2}\/lib\/patch/, - resource => fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ? - resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource + resource => (env == 'development' || /web-apps-mobile/.test(process.env.addon)) && + fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ? + resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource //resource => fs.existsSync(`${addonPath}/patch.jsx`) ? //resource.request = `../../../${addonPath}/patch.jsx` : resource ),