diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 0f8d84ec8..57fab51b9 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -134,7 +134,10 @@ spellcheck: true, compatibleFeatures: false, unit: 'cm' // cm, pt, inch, - mentionShare : true // customize tooltip for mention + mentionShare : true // customize tooltip for mention, + macros: true // can run macros in document + plugins: true // can run plugins in document + macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn' }, plugins: { autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'], diff --git a/apps/common/main/lib/component/LoadMask.js b/apps/common/main/lib/component/LoadMask.js index d7922f81b..e0792ec67 100644 --- a/apps/common/main/lib/component/LoadMask.js +++ b/apps/common/main/lib/component/LoadMask.js @@ -167,7 +167,7 @@ define([ }, isVisible: function() { - return !_.isEmpty(loaderEl); + return !!ownerEl.ismasked; }, updatePosition: function() { diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index b2d1a18a3..8a0a84a0f 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -225,7 +225,7 @@ define([ } } } - !tab.disabled && Common.NotificationCenter.trigger('edit:complete', this.bar); + !tab.disabled && Common.NotificationCenter.trigger('edit:complete', 'tab'); }, this), dblclick: $.proxy(function() { this.trigger('tab:dblclick', this, this.tabs.indexOf(tab), tab); diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 5345ddaab..9405cc200 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -136,7 +136,8 @@ var Common = {}; define([ - 'common/main/lib/component/BaseView' + 'common/main/lib/component/BaseView', + 'common/main/lib/component/CheckBox' ], function () { 'use strict'; diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index a5cd5bae3..3c82eaa27 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -276,7 +276,7 @@ define([ } else if ( opts == 'create:new' ) { if (config.createUrl == 'desktop://create.new') { - native.LocalFileCreate(!!window.SSE ? 2 : !!window.PE ? 1 : 0); + native.execCommand("create:new", !!window.SSE ? 'cell' : !!window.PE ? 'slide' : 'word'); return true; } } diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 457d49081..8bf8ff38a 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -151,15 +151,17 @@ define([ setApi: function(api) { this.api = api; - this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this)); - this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this)); - this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this)); - this.api.asc_registerCallback("asc_onPluginMouseUp", _.bind(this.onPluginMouseUp, this)); - this.api.asc_registerCallback("asc_onPluginMouseMove", _.bind(this.onPluginMouseMove, this)); - this.api.asc_registerCallback('asc_onPluginsReset', _.bind(this.resetPluginsList, this)); - this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.onPluginsInit, this)); + if (!this.appOptions.customization || (this.appOptions.customization.plugins!==false)) { + this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this)); + this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this)); + this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this)); + this.api.asc_registerCallback("asc_onPluginMouseUp", _.bind(this.onPluginMouseUp, this)); + this.api.asc_registerCallback("asc_onPluginMouseMove", _.bind(this.onPluginMouseMove, this)); + this.api.asc_registerCallback('asc_onPluginsReset', _.bind(this.resetPluginsList, this)); + this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.onPluginsInit, this)); - this.loadPlugins(); + this.loadPlugins(); + } return this; }, diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 85f625e78..0c32fc416 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -105,7 +105,8 @@ Common.Utils = _.extend(new(function() { MailMerge : 8, Signature : 9, Pivot : 10, - Cell : 11 + Cell : 11, + Slicer : 12 }, importTextType = { DRM: 0, diff --git a/apps/common/main/resources/img/doc-formats/jpg.svg b/apps/common/main/resources/img/doc-formats/jpg.svg new file mode 100644 index 000000000..b04feaf76 --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/jpg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/apps/common/main/resources/img/doc-formats/png.svg b/apps/common/main/resources/img/doc-formats/png.svg new file mode 100644 index 000000000..58aef71e3 --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/png.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/apps/common/main/resources/img/doc-formats/svg.svg b/apps/common/main/resources/img/doc-formats/svg.svg new file mode 100644 index 000000000..3f2562f15 --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/svg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/apps/common/main/resources/img/toolbar/1.75x/advanced-btn-ratio.png b/apps/common/main/resources/img/toolbar/1.75x/advanced-btn-ratio.png index 1b17925dd..7a9c8954e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/advanced-btn-ratio.png and b/apps/common/main/resources/img/toolbar/1.75x/advanced-btn-ratio.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/arrange-back.png b/apps/common/main/resources/img/toolbar/1.75x/arrange-back.png index ce3d4fd08..8e54ecb9b 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/arrange-back.png and b/apps/common/main/resources/img/toolbar/1.75x/arrange-back.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/arrange-backward.png b/apps/common/main/resources/img/toolbar/1.75x/arrange-backward.png index 3f2431e34..e9ed1193b 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/arrange-backward.png and b/apps/common/main/resources/img/toolbar/1.75x/arrange-backward.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/arrange-forward.png b/apps/common/main/resources/img/toolbar/1.75x/arrange-forward.png index fbef3680b..4d49ea053 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/arrange-forward.png and b/apps/common/main/resources/img/toolbar/1.75x/arrange-forward.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/arrange-front.png b/apps/common/main/resources/img/toolbar/1.75x/arrange-front.png index c78a0bef4..82d8c1346 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/arrange-front.png and b/apps/common/main/resources/img/toolbar/1.75x/arrange-front.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-bottom.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-bottom.png index 6a2d121fb..ffedd7c7c 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-bottom.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-bottom.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-center.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-center.png index 266554228..da520ca20 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-center.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-center.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-just.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-just.png index 334ddde32..220ac8ed7 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-just.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-just.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-left.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-left.png index 5b72cf6f9..63577d490 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-left.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-left.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-middle.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-middle.png index f9fad6d0e..9af72cb79 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-middle.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-middle.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-right.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-right.png index 0211531fa..58e47c3a8 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-right.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-right.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-align-top.png b/apps/common/main/resources/img/toolbar/1.75x/btn-align-top.png index 3d8e585e3..440f8176f 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-align-top.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-align-top.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-bold(ru).png b/apps/common/main/resources/img/toolbar/1.75x/btn-bold(ru).png index 52d17ac72..c2ced39c2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-bold(ru).png and b/apps/common/main/resources/img/toolbar/1.75x/btn-bold(ru).png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-bold.png b/apps/common/main/resources/img/toolbar/1.75x/btn-bold.png index 0ebdffa89..9d9c64ca2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-bold.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-bold.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-all.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-all.png index 9d656b32e..5977025f8 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-all.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-all.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-bottom.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-bottom.png index eefee51b7..59b851d5e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-bottom.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-bottom.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagdown.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagdown.png index f0aab415d..8d07c3746 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagdown.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagdown.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagup.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagup.png index b6c3faf30..d9e50555e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagup.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-diagup.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-inside.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-inside.png index 8d9720aef..bac1fd119 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-inside.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-inside.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidehor.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidehor.png index 0eb0382a8..cec8b5985 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidehor.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidehor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidevert.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidevert.png index 4fbc1f9d2..8f68c9929 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidevert.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-insidevert.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-left.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-left.png index a5f4c364f..52829ff17 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-left.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-left.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-no.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-no.png index 0866c7bfc..821535b20 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-no.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-no.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-out.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-out.png index 1993baafc..b0208113b 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-out.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-out.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-right.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-right.png index f245eea27..a848a448a 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-right.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-right.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-border-top.png b/apps/common/main/resources/img/toolbar/1.75x/btn-border-top.png index 424671cd8..f134568fe 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-border-top.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-border-top.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-clearstyle.png b/apps/common/main/resources/img/toolbar/1.75x/btn-clearstyle.png index 38f7d79cb..d42ee39f1 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-clearstyle.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-clearstyle.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-close.png b/apps/common/main/resources/img/toolbar/1.75x/btn-close.png index 753322ed6..76fde5791 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-close.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-close.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-colorschemas.png b/apps/common/main/resources/img/toolbar/1.75x/btn-colorschemas.png index 52916b87b..b8b95eda4 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-colorschemas.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-colorschemas.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-copy.png b/apps/common/main/resources/img/toolbar/1.75x/btn-copy.png index ba63f5b3f..80701fcb2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-copy.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-copy.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-copystyle.png b/apps/common/main/resources/img/toolbar/1.75x/btn-copystyle.png index 7febe8cab..87a7d6f49 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-copystyle.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-copystyle.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-decfont.png b/apps/common/main/resources/img/toolbar/1.75x/btn-decfont.png index 8a0c07d3a..875a89717 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-decfont.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-decfont.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-decoffset.png b/apps/common/main/resources/img/toolbar/1.75x/btn-decoffset.png index 6cbeef0f9..bcb5fb3cd 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-decoffset.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-decoffset.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-download.png b/apps/common/main/resources/img/toolbar/1.75x/btn-download.png index b205efe8c..a2ca73944 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-download.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-download.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-edit.png b/apps/common/main/resources/img/toolbar/1.75x/btn-edit.png index 270027d34..d454d37e9 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-edit.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-edit.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-firstitem.png b/apps/common/main/resources/img/toolbar/1.75x/btn-firstitem.png index adf3e006e..0fd640a4e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-firstitem.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-firstitem.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-flip-hor.png b/apps/common/main/resources/img/toolbar/1.75x/btn-flip-hor.png index f2ec28c1a..0f12ab0b2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-flip-hor.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-flip-hor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-flip-vert.png b/apps/common/main/resources/img/toolbar/1.75x/btn-flip-vert.png index a93be70a5..b85f16e05 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-flip-vert.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-flip-vert.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-fontcolor.png b/apps/common/main/resources/img/toolbar/1.75x/btn-fontcolor.png index a89329bd7..4ec007a39 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-fontcolor.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-fontcolor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-goback.png b/apps/common/main/resources/img/toolbar/1.75x/btn-goback.png index 52525a0b3..7e849cb17 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-goback.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-goback.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-doclang.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-doclang.png index 3e18820bc..ca2453a93 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-doclang.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-doclang.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell(ru).png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell(ru).png index 25854800f..551fc3a75 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell(ru).png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell(ru).png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell.png index 2b63dd2de..c35f91c02 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-docspell.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-options.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-options.png index d5f9e38af..293f5818e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-options.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-options.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-review.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-review.png index 5c3986820..a86b9c9d4 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-review.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-review.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtopage.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtopage.png index bb63fb64f..f107ef031 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtopage.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtopage.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtowidth.png b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtowidth.png index 9e742c5ea..f674abd22 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtowidth.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-ic-zoomtowidth.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-incfont.png b/apps/common/main/resources/img/toolbar/1.75x/btn-incfont.png index af393ac92..1fd8376cd 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-incfont.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-incfont.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-incoffset.png b/apps/common/main/resources/img/toolbar/1.75x/btn-incoffset.png index d0aa987b7..043b5ed33 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-incoffset.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-incoffset.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-italic(ru).png b/apps/common/main/resources/img/toolbar/1.75x/btn-italic(ru).png index a865eb090..6728241a0 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-italic(ru).png and b/apps/common/main/resources/img/toolbar/1.75x/btn-italic(ru).png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-italic.png b/apps/common/main/resources/img/toolbar/1.75x/btn-italic.png index 3967d656a..52b2fb98e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-italic.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-italic.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-lastitem.png b/apps/common/main/resources/img/toolbar/1.75x/btn-lastitem.png index cab5157d6..c5349f980 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-lastitem.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-lastitem.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-linespace.png b/apps/common/main/resources/img/toolbar/1.75x/btn-linespace.png index f139ae59c..12008880c 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-linespace.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-linespace.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-about.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-about.png index 37ce7cc67..77cb5fbd1 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-about.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-about.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chart.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chart.png index 4ecf1108d..0012a609e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chart.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chart.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chat.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chat.png index 5dba7db15..7564ad87c 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chat.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-chat.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-comments.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-comments.png index 58c96b887..f17c680a7 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-comments.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-comments.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-image.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-image.png index 956cb3bd7..9dd9e753d 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-image.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-image.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-navigation.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-navigation.png index 28bf6dbb8..d7f758409 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-navigation.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-navigation.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-search.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-search.png index ce9fbadcc..29f22ef20 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-search.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-search.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-shape.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-shape.png index 7ec53523d..fbc106a5d 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-shape.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-shape.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-signature.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-signature.png index 6cfea1323..5b4b9b900 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-signature.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-signature.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-support.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-support.png index eb1b3122f..57bb334f4 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-support.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-support.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-table.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-table.png index 4951e8deb..baa4971c5 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-table.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-table.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-textart.png b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-textart.png index 77c689c77..1ce5eccdb 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-menu-textart.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-menu-textart.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-nextitem.png b/apps/common/main/resources/img/toolbar/1.75x/btn-nextitem.png index b8e47ebdd..23af10915 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-nextitem.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-nextitem.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-numbering.png b/apps/common/main/resources/img/toolbar/1.75x/btn-numbering.png index 7ea4bcdfd..2808ccda9 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-numbering.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-numbering.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-paracolor.png b/apps/common/main/resources/img/toolbar/1.75x/btn-paracolor.png index 908e1aea2..5317a6aba 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-paracolor.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-paracolor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-paragraph.png b/apps/common/main/resources/img/toolbar/1.75x/btn-paragraph.png index 24e734b3c..847c2dac3 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-paragraph.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-paragraph.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-paste.png b/apps/common/main/resources/img/toolbar/1.75x/btn-paste.png index c49d2abab..8fc092134 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-paste.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-paste.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-previtem.png b/apps/common/main/resources/img/toolbar/1.75x/btn-previtem.png index ff5f55985..68c0851a7 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-previtem.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-previtem.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-print.png b/apps/common/main/resources/img/toolbar/1.75x/btn-print.png index 8170138d7..e0eea027e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-print.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-print.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-redo.png b/apps/common/main/resources/img/toolbar/1.75x/btn-redo.png index e0d5c7f6d..6b95f09cb 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-redo.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-redo.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-270.png b/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-270.png index 04b849e39..6b7d2ea0c 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-270.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-270.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-90.png b/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-90.png index a27e1f43f..2f3621bc2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-90.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-90.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-save-coauth.png b/apps/common/main/resources/img/toolbar/1.75x/btn-save-coauth.png index 6900618f1..b551750f0 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-save-coauth.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-save-coauth.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-save.png b/apps/common/main/resources/img/toolbar/1.75x/btn-save.png index 3155616f9..acb1a2beb 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-save.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-save.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-select-range.png b/apps/common/main/resources/img/toolbar/1.75x/btn-select-range.png index 599b7acb7..896020d13 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-select-range.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-select-range.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-setmarkers.png b/apps/common/main/resources/img/toolbar/1.75x/btn-setmarkers.png index 1390d946d..ae8bd60ed 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-setmarkers.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-setmarkers.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-settings.png b/apps/common/main/resources/img/toolbar/1.75x/btn-settings.png index cc2e4d186..959cfe832 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-settings.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-settings.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout(ru).png b/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout(ru).png index 1f8e57800..f3e77ea28 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout(ru).png and b/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout(ru).png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout.png b/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout.png index 48707ffca..3de4ed7be 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-strikeout.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-subscript.png b/apps/common/main/resources/img/toolbar/1.75x/btn-subscript.png index 4ecba84ac..69d08731e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-subscript.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-subscript.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-superscript.png b/apps/common/main/resources/img/toolbar/1.75x/btn-superscript.png index 78066ce69..721a32ce0 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-superscript.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-superscript.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-underline(ru).png b/apps/common/main/resources/img/toolbar/1.75x/btn-underline(ru).png index 6733f1f24..f7b8869a6 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-underline(ru).png and b/apps/common/main/resources/img/toolbar/1.75x/btn-underline(ru).png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-underline.png b/apps/common/main/resources/img/toolbar/1.75x/btn-underline.png index 9c3533c3e..c21055e1f 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-underline.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-underline.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-undo.png b/apps/common/main/resources/img/toolbar/1.75x/btn-undo.png index 8bb259a56..f43d173c5 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-undo.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-undo.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-users.png b/apps/common/main/resources/img/toolbar/1.75x/btn-users.png index 851986b8d..f502e2cd2 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-users.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-users.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-zoomdown.png b/apps/common/main/resources/img/toolbar/1.75x/btn-zoomdown.png index 65d50a914..3294ab426 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-zoomdown.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-zoomdown.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-zoomup.png b/apps/common/main/resources/img/toolbar/1.75x/btn-zoomup.png index 02d9738e7..1efde10bf 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/btn-zoomup.png and b/apps/common/main/resources/img/toolbar/1.75x/btn-zoomup.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/page-landscape.png b/apps/common/main/resources/img/toolbar/1.75x/page-landscape.png index 503839408..cc75afc8c 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/page-landscape.png and b/apps/common/main/resources/img/toolbar/1.75x/page-landscape.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/page-portrait.png b/apps/common/main/resources/img/toolbar/1.75x/page-portrait.png index 688296bac..73c7ba77f 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/page-portrait.png and b/apps/common/main/resources/img/toolbar/1.75x/page-portrait.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-bottom.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-bottom.png index 1855cc38d..046d12d2b 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-bottom.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-bottom.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-center.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-center.png index c0f004fe3..b1e1a0307 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-center.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-center.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-left.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-left.png index 25bce1494..1012da796 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-left.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-left.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-middle.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-middle.png index c9b78207c..5aebf45f3 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-middle.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-middle.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-right.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-right.png index 65613c73b..10273a8f9 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-right.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-right.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-align-top.png b/apps/common/main/resources/img/toolbar/1.75x/shape-align-top.png index 0e1c2c9b0..7aae0fd2a 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-align-top.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-align-top.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-hor.png b/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-hor.png index 81db561b2..745367295 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-hor.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-hor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-vert.png b/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-vert.png index 55e873fa5..cef16a652 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-vert.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-distribute-vert.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-group.png b/apps/common/main/resources/img/toolbar/1.75x/shape-group.png index dc61609c8..b7714f030 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-group.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-group.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/shape-ungroup.png b/apps/common/main/resources/img/toolbar/1.75x/shape-ungroup.png index c4507d2f6..c311aaf9d 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/shape-ungroup.png and b/apps/common/main/resources/img/toolbar/1.75x/shape-ungroup.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/text-orient-hor.png b/apps/common/main/resources/img/toolbar/1.75x/text-orient-hor.png index c06cff0aa..8f302925e 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/text-orient-hor.png and b/apps/common/main/resources/img/toolbar/1.75x/text-orient-hor.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/text-orient-rdown.png b/apps/common/main/resources/img/toolbar/1.75x/text-orient-rdown.png index 1d5829fe7..b1170eaf6 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/text-orient-rdown.png and b/apps/common/main/resources/img/toolbar/1.75x/text-orient-rdown.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/text-orient-rup.png b/apps/common/main/resources/img/toolbar/1.75x/text-orient-rup.png index dea8d25ff..97a34e729 100644 Binary files a/apps/common/main/resources/img/toolbar/1.75x/text-orient-rup.png and b/apps/common/main/resources/img/toolbar/1.75x/text-orient-rup.png differ diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 160ccb572..a0e6c8a3f 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -784,6 +784,13 @@ height: 54px; } + .icon-template-slicer.icon { + min-width: 36px; + height: 55px; + line-height: 53px; + border: none; + } + .icon { display: inline-block; .btn.btnsize(52px); diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js index b46a24420..38b3d352b 100644 --- a/apps/common/mobile/lib/controller/Collaboration.js +++ b/apps/common/mobile/lib/controller/Collaboration.js @@ -1046,7 +1046,7 @@ define([ onDoneAddNewReply: function(uid) { var phone = Common.SharedSettings.get('phone'); - var reply = $('.reply-textarea')[0].value; + var reply = $('.reply-textarea')[0].value.trim(); if ($('.container-view-comment').length > 0) { var $viewComment = $('.container-view-comment'); if (reply && reply.length > 0) { @@ -1282,8 +1282,8 @@ define([ me.disabledViewComments(true); if ($('.comment-textarea').length === 0) { var $viewComment = $('.container-view-comment'); - var oldComment = $viewComment.find('.comment-text span').text(); - $viewComment.find('.comment-text span').css('display', 'none'); + var oldComment = $viewComment.find('.comment-text pre').text(); + $viewComment.find('.comment-text pre').css('display', 'none'); var template = _.template(''); $viewComment.find('.comment-text').append(template); $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'none'); @@ -1308,7 +1308,7 @@ define([ }, onEditComment: function(comment) { - var value = $('#comment-text')[0].value; + var value = $('#comment-text')[0].value.trim(); if (value && value.length > 0) { if (!_.isUndefined(this.onChangeComment)) { comment.comment = value; @@ -1323,7 +1323,7 @@ define([ $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'flex'); if ($viewComment.find('.comment-textarea').length > 0) { $viewComment.find('.comment-textarea').remove(); - $viewComment.find('.comment-text span').css('display', 'block'); + $viewComment.find('.comment-text pre').css('display', 'block'); } } this.disabledViewComments(false); @@ -1336,7 +1336,7 @@ define([ onCancelEditComment: function() { var $viewComment = $('.container-view-comment'); $viewComment.find('a.done-edit-comment, a.cancel-edit-comment, .comment-textarea').remove(); - $viewComment.find('.comment-text span').css('display', 'block'); + $viewComment.find('.comment-text pre').css('display', 'block'); $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'flex'); this.disabledViewComments(false); }, @@ -1388,7 +1388,7 @@ define([ }, onEditReply: function(comment, indReply) { - var value = $('.edit-reply-textarea')[0].value; + var value = $('.edit-reply-textarea')[0].value.trim(); if (value && value.length > 0) { if ($('.container-view-comment').length > 0) { if (!_.isUndefined(this.onChangeComment)) { diff --git a/apps/common/mobile/lib/controller/Plugins.js b/apps/common/mobile/lib/controller/Plugins.js index f4159b109..be083ed4e 100644 --- a/apps/common/mobile/lib/controller/Plugins.js +++ b/apps/common/mobile/lib/controller/Plugins.js @@ -82,7 +82,8 @@ define([ setMode: function(mode) { this.appConfig = mode; - this.loadPlugins(); + if (!this.appConfig.customization || (this.appConfig.customization.plugins!==false)) + this.loadPlugins(); }, diff --git a/apps/common/mobile/lib/view/Collaboration.js b/apps/common/mobile/lib/view/Collaboration.js index aa9ebb472..9a90b9cc4 100644 --- a/apps/common/mobile/lib/view/Collaboration.js +++ b/apps/common/mobile/lib/view/Collaboration.js @@ -177,8 +177,8 @@ define([ if (isAndroid) { template += '
' + comment.userInitials + '
'; } - template += '

' + comment.username + '

' + - '

' + comment.date + '

'; + template += '
' + comment.username + '
' + + '
' + comment.date + '
'; if (isAndroid) { template += '
'; } @@ -191,8 +191,8 @@ define([ } template += ''; - if (comment.quote) template += '

' + me.sliceQuote(comment.quote) + '

'; - template += '
' + comment.comment + '
'; + if (comment.quote) template += '
' + me.sliceQuote(comment.quote) + '
'; + template += '
' + comment.comment + '
'; if (comment.replys.length > 0) { template += '' @@ -249,8 +249,8 @@ define([ '
', '
', '<% if (android) { %>
<%= item.userInitials %>
<% } %>', - '

<%= item.username %>

', - '

<%= item.date %>

', + '
<%= item.username %>
', + '
<%= item.date %>
', '<% if (android) { %>
<% } %>', '
', '<% if (item.editable && !viewmode) { %>', @@ -261,9 +261,9 @@ define([ '<% } %>', '
', '<% if(item.quote) {%>', - '

<%= quote %>

', + '
<%= quote %>
', '<% } %>', - '

<%= item.comment %>

', + '
<%= item.comment %>
', '<% if(replys > 0) {%>', '', diff --git a/apps/common/mobile/resources/less/ios/_collaboration.less b/apps/common/mobile/resources/less/ios/_collaboration.less index 919c94f6a..d958e12f4 100644 --- a/apps/common/mobile/resources/less/ios/_collaboration.less +++ b/apps/common/mobile/resources/less/ios/_collaboration.less @@ -145,10 +145,7 @@ padding: 16px 0; word-wrap: break-word; } - p { - margin: 0; - word-break: break-word; - } + .list-reply { padding-left: 26px; } @@ -176,6 +173,9 @@ margin: 0; max-width: 100%; padding-right: 15px; + pre { + white-space: pre-wrap; + } } .reply-item { margin-top: 15px; diff --git a/apps/common/mobile/resources/less/material/_collaboration.less b/apps/common/mobile/resources/less/material/_collaboration.less index a7439c97f..6889d1806 100644 --- a/apps/common/mobile/resources/less/material/_collaboration.less +++ b/apps/common/mobile/resources/less/material/_collaboration.less @@ -143,10 +143,6 @@ } } } - p { - margin: 0; - word-break: break-word; - } .list-reply { padding-left: 26px; } @@ -173,6 +169,9 @@ margin: 0; max-width: 100%; padding-right: 15px; + pre { + white-space: pre-wrap; + } } .reply-item { padding-right: 16px; diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index dffc44187..8eef26616 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -99,6 +99,12 @@ DE.ApplicationController = new(function(){ docInfo.put_VKey(docConfig.vkey); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + + var enable = !config.customization || (config.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !config.customization || (config.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); var type = /^(?:(pdf|djvu|xps))$/.exec(docConfig.fileType); if (type && typeof type[1] === 'string') { @@ -107,6 +113,7 @@ DE.ApplicationController = new(function(){ if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); api.asc_setDocInfo(docInfo); api.asc_getEditorPermissions(config.licenseUrl, config.customerId); api.asc_enableKeyEvents(true); @@ -481,6 +488,11 @@ DE.ApplicationController = new(function(){ if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true)); } + function onRunAutostartMacroses() { + if (!config.customization || (config.customization.macros!==false)) + if (api) api.asc_runAutostartMacroses(); + } + // Helpers // ------------------------- diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index e0d5c80d9..fd840b070 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -490,6 +490,10 @@ define([ value = Common.localStorage.getBool("de-settings-spellcheck", true); Common.Utils.InternalSettings.set("de-settings-spellcheck", value); this.api.asc_setSpellCheck(value); + + value = parseInt(Common.localStorage.getItem("de-settings-paste-button")); + Common.Utils.InternalSettings.set("de-settings-paste-button", value); + this.api.asc_setVisiblePasteButton(!!value); } this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines")); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 4a093b4c0..a84ba6fcb 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -384,6 +384,14 @@ define([ $('#editor-container').append('
' + '
'.repeat(20) + '
'); } + var value = Common.localStorage.getItem("de-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("de-macros-mode", value); + Common.Controllers.Desktop.init(this.appOptions); }, @@ -415,6 +423,11 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); // docInfo.put_Review(this.permissions.review); var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType); @@ -425,6 +438,7 @@ define([ this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); @@ -1034,6 +1048,11 @@ define([ me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave); } + value = Common.localStorage.getItem("de-settings-paste-button"); + if (value===null) value = '1'; + Common.Utils.InternalSettings.set("de-settings-paste-button", parseInt(value)); + me.api.asc_setVisiblePasteButton(!!parseInt(value)); + if (me.needToUpdateVersion) Common.NotificationCenter.trigger('api:disconnect'); var timer_sl = setInterval(function(){ @@ -2236,6 +2255,36 @@ define([ Common.Utils.warningDocumentIsLocked({disablefunc: _disable_ui}); }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("de-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + Common.UI.warning({ + msg: this.textHasMacros + '
', + buttons: ['yes', 'no'], + primary: 'yes', + dontshow: true, + textDontShow: this.textRemember, + callback: function(btn, dontshow){ + if (dontshow) { + Common.Utils.InternalSettings.set("de-macros-mode", (btn == 'yes') ? 1 : 2); + Common.localStorage.setItem("de-macros-mode", (btn == 'yes') ? 1 : 2); + } + if (btn == 'yes') { + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + } + }); + } + } + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -2587,7 +2636,9 @@ define([ textApplyAll: 'Apply to all equations', textLearnMore: 'Learn More', txtEnterDate: 'Enter a date.', - txtTypeEquation: 'Type equation here.' + txtTypeEquation: 'Type equation here.', + textHasMacros: 'The file contains automatic macros.
Do you want to run macros?', + textRemember: 'Remember my choice' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 90b6083f3..030daccc6 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -234,6 +234,16 @@ define([ '', '', '','', + '', + '', + '
', + '','', + '', + '', + '', + '
', + '
', + '','', '', '', '', @@ -388,6 +398,26 @@ define([ ] }); + this.cmbMacros = new Common.UI.ComboBox({ + el : $markup.findById('#fms-cmb-macros'), + style : 'width: 160px;', + editable : false, + cls : 'input-group-nr', + data : [ + { value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc }, + { value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc }, + { value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc } + ] + }).on('selected', function(combo, record) { + me.lblMacrosDesc.text(record.descValue); + }); + this.lblMacrosDesc = $markup.findById('#fms-lbl-macros'); + + this.chPaste = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-paste-settings'), + labelText: this.strPasteButton + }); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-btn-apply') }); @@ -425,6 +455,8 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ + + $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); }, updateSettings: function() { @@ -475,6 +507,12 @@ define([ this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck")); this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines")); this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible")); + + item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("de-macros-mode")}); + this.cmbMacros.setValue(item ? item.get('value') : 0); + this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc); + + this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button")); }, applySettings: function() { @@ -501,6 +539,12 @@ define([ Common.localStorage.setItem("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked()); + + Common.localStorage.setItem("de-macros-mode", this.cmbMacros.getValue()); + Common.Utils.InternalSettings.set("de-macros-mode", this.cmbMacros.getValue()); + + Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); + Common.localStorage.save(); if (this.menu) { @@ -575,7 +619,16 @@ define([ strResolvedComment: 'Turn on display of the resolved comments', textCompatible: 'Compatibility', textOldVersions: 'Make the files compatible with older MS Word versions when saved as DOCX', - txtCacheMode: 'Default cache mode' + txtCacheMode: 'Default cache mode', + strMacrosSettings: 'Macros Settings', + txtWarnMacros: 'Show Notification', + txtRunMacros: 'Enable All', + txtStopMacros: 'Disable All', + txtWarnMacrosDesc: 'Disable all macros with notification', + txtRunMacrosDesc: 'Enable all macros without notification', + txtStopMacrosDesc: 'Disable all macros without notification', + strPaste: 'Cut, copy and paste', + strPasteButton: 'Show Paste Options button when content is pasted' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index e52505a4d..68b4b9770 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -750,6 +750,9 @@ "DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "DE.Controllers.Main.textHasMacros": "The file contains automatic macros.
Do you want to run macros?", + "DE.Controllers.Main.textRemember": "Remember my choice", + "DE.Controllers.Main.errorPasteSlicerError": "Table slicers cannot be copied from one workbook to another.
Try again by selecting the entire table and the slicers.", "DE.Controllers.Navigation.txtBeginning": "Beginning of document", "DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked", @@ -1569,6 +1572,15 @@ "DE.Views.FileMenuPanels.Settings.txtPt": "Point", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", + "DE.Views.FileMenuPanels.Settings.strMacrosSettings": "Macros Settings", + "DE.Views.FileMenuPanels.Settings.txtWarnMacros": "Show Notification", + "DE.Views.FileMenuPanels.Settings.txtRunMacros": "Enable All", + "DE.Views.FileMenuPanels.Settings.txtStopMacros": "Disable All", + "DE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with notification", + "DE.Views.FileMenuPanels.Settings.txtRunMacrosDesc": "Enable all macros without notification", + "DE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification", + "DE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste", + "DE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted", "DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center", "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left", "DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page", diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png index 120f35613..3150a56b0 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png index d7c8c847f..5756b4966 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png index 2099b1d31..755824efd 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png index 3ef428059..0fdf99822 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png index a06586d6f..19d241035 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png index a01ae131e..25ff8e812 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png index 0e2b571a8..90efc38fb 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png index 3349221ec..718d59b0b 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png index 334ddde32..3e6d9519a 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png index 4b1d7c9d4..e83695c3a 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png index 94141dbeb..887ec8a11 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png index daf2a1161..bf355e754 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png index 90b34b2f6..2b8716c10 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png index c0c17b5f4..2887f8879 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png index 003c08c56..928b7e6ca 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png index 8f05371c0..08b6c50ec 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png index 188880bc1..f56e4d559 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png index 03d1c6d0f..be6828378 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png index 91a175042..f252026f4 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png index 034f82d43..4ce614615 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png differ diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png index 4ee37e9c5..65477dfc3 100644 Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png differ diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 7de2d59fe..1a0faebbc 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -224,6 +224,14 @@ define([ if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo)) $('#editor-container').append('
'); + var value = Common.localStorage.getItem("de-mobile-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("de-mobile-macros-mode", value); + // if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') // Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); }, @@ -255,6 +263,11 @@ define([ docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); + var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType); if (type && typeof type[1] === 'string') { this.permissions.edit = this.permissions.review = false; @@ -263,6 +276,7 @@ define([ this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); @@ -1369,6 +1383,51 @@ define([ return false; }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("de-mobile-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + uiApp.modal({ + title: this.notcriticalErrorTitle, + text: this.textHasMacros, + afterText: '', + buttons: [{ + text: this.textYes, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("de-mobile-macros-mode", 1); + Common.localStorage.setItem("de-mobile-macros-mode", 1); + } + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + }, + { + text: this.textNo, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("de-mobile-macros-mode", 2); + Common.localStorage.setItem("de-mobile-macros-mode", 2); + } + } + }] + }); + } + } + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -1496,7 +1555,11 @@ define([ waitText: 'Please, wait...', errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.', errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', - errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.' + errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.', + textHasMacros: 'The file contains automatic macros.
Do you want to run macros?', + textRemember: 'Remember my choice', + textYes: 'Yes', + textNo: 'No' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index c058d65bd..3b59d6245 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -254,6 +254,9 @@ define([ } else if ('#margins-view' == pageId) { me.initPageMargin(); Common.Utils.addScrollIfNeed('.page[data-page=margin-view]', '.page[data-page=margin-view] .page-content'); + } else if ('#macros-settings-view' == pageId) { + me.initPageMacrosSettings(); + Common.Utils.addScrollIfNeed('.page[data-page=macros-settings-view]', '.page[data-page=macros-settings-view] .page-content'); } else { $('#settings-readermode input:checkbox').attr('checked', Common.SharedSettings.get('readerMode')); $('#settings-search').single('click', _.bind(me.onSearch, me)); @@ -273,6 +276,20 @@ define([ } }, + initPageMacrosSettings: function() { + var me = this, + $pageMacrosSettings = $('.page[data-page="macros-settings-view"] input:radio[name=macros-settings]'), + value = Common.Utils.InternalSettings.get("de-mobile-macros-mode") || 0; + $pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me)); + $pageMacrosSettings.val([value]); + }, + + onChangeMacrosSettings: function(e) { + var value = parseInt($(e.currentTarget).val()); + Common.Utils.InternalSettings.set("de-mobile-macros-mode", value); + Common.localStorage.setItem("de-mobile-macros-mode", value); + }, + onChangeDisplayComments: function(e) { var displayComments = $(e.currentTarget).is(':checked'); if (!displayComments) { diff --git a/apps/documenteditor/mobile/app/controller/add/AddOther.js b/apps/documenteditor/mobile/app/controller/add/AddOther.js index 24f9b2553..1eaa9c01d 100644 --- a/apps/documenteditor/mobile/app/controller/add/AddOther.js +++ b/apps/documenteditor/mobile/app/controller/add/AddOther.js @@ -91,10 +91,13 @@ define([ }, initEvents: function () { - this.view.hideInsertComments = this.isHideInsertComment(); + this.setDisableMenuItem(); }, - isHideInsertComment: function() { + setDisableMenuItem: function() { + var isDisableComment = true, + isDisableBreak = false, + isDisableFootnote = false; var stack = this.api.getSelectedElements(); var isText = false, isTable = false, @@ -133,9 +136,14 @@ define([ }); if (stack.length > 0) { var isObject = isShape || isChart || isImage || isTable; - return (this.api.can_AddQuotedComment() === false || lockedText || lockedTable || lockedImage || lockedHeader || (!isText && isObject)); + isDisableComment = (this.api.can_AddQuotedComment() === false || lockedText || lockedTable || lockedImage || lockedHeader || (!isText && isObject)); + if (isShape && isText) { + isDisableBreak = isDisableFootnote = true; + } } - return true; + this.view.isDisableComment = isDisableComment; + this.view.isDisableBreak = isDisableBreak; + this.view.isDisableFootnote = isDisableFootnote; }, onPageShow: function (view, pageId) { @@ -194,7 +202,7 @@ define([ }, onDoneComment: function(documentFlag) { - var value = $('#comment-text').val(); + var value = $('#comment-text').val().trim(); if (value.length > 0) { DE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag); DE.getController('AddContainer').hideModal(); diff --git a/apps/documenteditor/mobile/app/template/AddOther.template b/apps/documenteditor/mobile/app/template/AddOther.template index b67fdcf51..773bdfd58 100644 --- a/apps/documenteditor/mobile/app/template/AddOther.template +++ b/apps/documenteditor/mobile/app/template/AddOther.template @@ -38,7 +38,7 @@
-
  • +
  • -
  • +
  • @@ -872,4 +886,55 @@ + + + +
    + +
    +
    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index 4d34d2997..9f665b35f 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -59,7 +59,8 @@ define([ _canHelp = true, _canPrint = false, _canReview = false, - _isReviewOnly = false; + _isReviewOnly = false, + _isShowMacros = true; return { // el: '.view-main', @@ -120,6 +121,7 @@ define([ if (mode.customization) { _canHelp = (mode.customization.help!==false); + _isShowMacros = (mode.customization.macros!==false); } }, @@ -149,6 +151,7 @@ define([ if (!_canPrint) $layour.find('#settings-print').hide(); if (!_canReview) $layour.find('#settings-review').hide(); if (_isReviewOnly) $layour.find('#settings-review').addClass('disabled'); + if (!_isShowMacros) $layour.find('#settings-macros').hide(); return $layour.html(); } @@ -332,7 +335,14 @@ define([ textUploaded: 'Uploaded', textLastModified: 'Last Modified', textLastModifiedBy: 'Last Modified By', - textCreated: 'Created' + textCreated: 'Created', + textMacrosSettings: 'Macros Settings', + textDisableAll: 'Disable All', + textDisableAllMacrosWithoutNotification: 'Disable all macros without notification', + textShowNotification: 'Show Notification', + textDisableAllMacrosWithNotification: 'Disable all macros with notification', + textEnableAll: 'Enable All', + textEnableAllMacrosWithoutNotification: 'Enable all macros without notification' } diff --git a/apps/documenteditor/mobile/app/view/add/AddOther.js b/apps/documenteditor/mobile/app/view/add/AddOther.js index 61947bff8..28547d3c9 100644 --- a/apps/documenteditor/mobile/app/view/add/AddOther.js +++ b/apps/documenteditor/mobile/app/view/add/AddOther.js @@ -68,14 +68,24 @@ define([ $('#add-other-link').single('click', _.bind(me.showLink, me)); $('#add-other-pagenumber').single('click', _.bind(me.showPagePosition, me)); - $('#add-other-footnote').single('click', _.bind(me.showPageFootnote, me)); - $('#add-other-break').single('click', _.bind(me.showPageBreak, me)); - if (this.hideInsertComments) { - $('#item-comment').hide(); + if (this.isDisableComment) { + $('#item-comment').addClass('disabled'); } else { - $('#item-comment').show(); + $('#item-comment').removeClass('disabled'); $('#add-other-comment').single('click', _.bind(me.showPageComment, me)); } + if (this.isDisableBreak) { + $('#item-break').addClass('disabled'); + } else { + $('#item-break').removeClass('disabled'); + $('#add-other-break').single('click', _.bind(me.showPageBreak, me)); + } + if (this.isDisableFootnote) { + $('#item-footnote').addClass('disabled'); + } else { + $('#item-footnote').removeClass('disabled'); + $('#add-other-footnote').single('click', _.bind(me.showPageFootnote, me)); + } me.initControls(); }, diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 91156dc42..1d6e5134d 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -282,6 +282,10 @@ "DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
    If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
    If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "DE.Controllers.Main.textHasMacros": "The file contains automatic macros.
    Do you want to run macros?", + "DE.Controllers.Main.textRemember": "Remember my choice", + "DE.Controllers.Main.textYes": "Yes", + "DE.Controllers.Main.textNo": "No", "DE.Controllers.Search.textNoTextFound": "Text not Found", "DE.Controllers.Search.textReplaceAll": "Replace All", "DE.Controllers.Settings.notcriticalErrorTitle": "Warning", @@ -570,5 +574,12 @@ "DE.Views.Settings.textVersion": "Version", "DE.Views.Settings.textWords": "Words", "DE.Views.Settings.unknownText": "Unknown", + "DE.Views.Settings.textMacrosSettings": "Macros Settings", + "DE.Views.Settings.textDisableAll": "Disable All", + "DE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification", + "DE.Views.Settings.textShowNotification": "Show Notification", + "DE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification", + "DE.Views.Settings.textEnableAll": "Enable All", + "DE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification", "DE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index fbc571974..45c50e170 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6559,17 +6559,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after padding: 16px 0; word-wrap: break-word; } -.page-comments p, -.add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .add-comment .list-reply, .page-view-comments .list-reply, @@ -6665,6 +6654,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .add-comment .reply-item, .page-view-comments .reply-item, @@ -7778,3 +7785,10 @@ html.pixel-ratio-3 .numbers li { -o-animation: flickerAnimation 2s infinite ease-in-out; animation: flickerAnimation 2s infinite ease-in-out; } +.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #8e8e93; +} diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index 65118842b..5579331dc 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -6129,17 +6129,6 @@ html.phone .document-menu .list-block .item-link { .page-edit-reply .list-block .item-inner:after { content: none; } -.page-comments p, -.page-add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .page-add-comment .list-reply, .page-view-comments .list-reply, @@ -6234,6 +6223,24 @@ html.phone .document-menu .list-block .item-link { max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.page-add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.page-add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .page-add-comment .reply-item, .page-view-comments .reply-item, @@ -7639,3 +7646,10 @@ html.pixel-ratio-3 .numbers li { -o-animation: flickerAnimation 2s infinite ease-in-out; animation: flickerAnimation 2s infinite ease-in-out; } +.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #9e9e9e; +} diff --git a/apps/documenteditor/mobile/resources/less/app-ios.less b/apps/documenteditor/mobile/resources/less/app-ios.less index 379577dd0..7afcfe9cb 100644 --- a/apps/documenteditor/mobile/resources/less/app-ios.less +++ b/apps/documenteditor/mobile/resources/less/app-ios.less @@ -276,3 +276,18 @@ input, textarea { animation: flickerAnimation 2s infinite ease-in-out; } } + +// Macros settings +.page-macros-settings[data-page="macros-settings-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } +} diff --git a/apps/documenteditor/mobile/resources/less/app-material.less b/apps/documenteditor/mobile/resources/less/app-material.less index 351b81974..b74cd4923 100644 --- a/apps/documenteditor/mobile/resources/less/app-material.less +++ b/apps/documenteditor/mobile/resources/less/app-material.less @@ -275,3 +275,18 @@ input, textarea { animation: flickerAnimation 2s infinite ease-in-out; } } + +// Macros settings +.page-macros-settings[data-page="macros-settings-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } +} diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index ffaf30b11..244aa0e0e 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -100,9 +100,16 @@ PE.ApplicationController = new(function(){ docInfo.put_VKey(docConfig.vkey); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + + var enable = !config.customization || (config.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !config.customization || (config.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); api.asc_setDocInfo(docInfo); api.asc_getEditorPermissions(config.licenseUrl, config.customerId); api.asc_enableKeyEvents(true); @@ -580,6 +587,12 @@ PE.ApplicationController = new(function(){ } if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true)); } + + function onRunAutostartMacroses() { + if (!config.customization || (config.customization.macros!==false)) + if (api) api.asc_runAutostartMacroses(); + } + // Helpers // ------------------------- diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index b01c7b60d..40321834a 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -326,6 +326,10 @@ define([ value = Common.localStorage.getBool("pe-settings-spellcheck", true); Common.Utils.InternalSettings.set("pe-settings-spellcheck", value); this.api.asc_setSpellCheck(value); + + value = parseInt(Common.localStorage.getItem("pe-settings-paste-button")); + Common.Utils.InternalSettings.set("pe-settings-paste-button", value); + this.api.asc_setVisiblePasteButton(!!value); } this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("pe-settings-showsnaplines")); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index ca3c069e6..f254d7e78 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -342,6 +342,14 @@ define([ $('#editor-container').append('
    '); } + var value = Common.localStorage.getItem("pe-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("pe-macros-mode", value); + Common.Controllers.Desktop.init(this.appOptions); }, @@ -373,10 +381,16 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); @@ -760,6 +774,11 @@ define([ me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave); } + value = Common.localStorage.getItem("pe-settings-paste-button"); + if (value===null) value = '1'; + Common.Utils.InternalSettings.set("pe-settings-paste-button", parseInt(value)); + me.api.asc_setVisiblePasteButton(!!parseInt(value)); + if (me.needToUpdateVersion) Common.NotificationCenter.trigger('api:disconnect'); var timer_sl = setInterval(function(){ @@ -1883,6 +1902,36 @@ define([ }}); }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("pe-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + Common.UI.warning({ + msg: this.textHasMacros + '
    ', + buttons: ['yes', 'no'], + primary: 'yes', + dontshow: true, + textDontShow: this.textRemember, + callback: function(btn, dontshow){ + if (dontshow) { + Common.Utils.InternalSettings.set("pe-macros-mode", (btn == 'yes') ? 1 : 2); + Common.localStorage.setItem("pe-macros-mode", (btn == 'yes') ? 1 : 2); + } + if (btn == 'yes') { + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + } + }); + } + } + }, + // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', @@ -2234,7 +2283,9 @@ define([ textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.
    Please contact our Sales Department to get a quote.', waitText: 'Please, wait...', errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
    Please contact your Document Server administrator for details.', - errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.' + errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', + textHasMacros: 'The file contains automatic macros.
    Do you want to run macros?', + textRemember: 'Remember my choice' } })(), PE.Controllers.Main || {})) }); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 5e2f96a2c..c57964e0b 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -208,6 +208,16 @@ define([ '', '', '','', + '', + '', + '
    ', + '','', + '', + '', + '', + '
    ', + '
    ', + '','', '', '', '', @@ -331,6 +341,26 @@ define([ ] }); + this.cmbMacros = new Common.UI.ComboBox({ + el : $markup.findById('#fms-cmb-macros'), + style : 'width: 160px;', + editable : false, + cls : 'input-group-nr', + data : [ + { value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc }, + { value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc }, + { value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc } + ] + }).on('selected', function(combo, record) { + me.lblMacrosDesc.text(record.descValue); + }); + this.lblMacrosDesc = $markup.findById('#fms-lbl-macros'); + + this.chPaste = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-paste-settings'), + labelText: this.strPasteButton + }); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-btn-apply') }); @@ -367,6 +397,7 @@ define([ /** coauthoring begin **/ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ + $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); }, updateSettings: function() { @@ -409,6 +440,12 @@ define([ } this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("pe-settings-showsnaplines")); + + item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("pe-macros-mode")}); + this.cmbMacros.setValue(item ? item.get('value') : 0); + this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc); + + this.chPaste.setValue(Common.Utils.InternalSettings.get("pe-settings-paste-button")); }, applySettings: function() { @@ -430,6 +467,11 @@ define([ Common.localStorage.setItem("pe-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("pe-settings-showsnaplines", this.chAlignGuides.isChecked()); + Common.localStorage.setItem("pe-macros-mode", this.cmbMacros.getValue()); + Common.Utils.InternalSettings.set("pe-macros-mode", this.cmbMacros.getValue()); + + Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); + Common.localStorage.save(); if (this.menu) { @@ -484,7 +526,16 @@ define([ strForcesave: 'Always save to server (otherwise save to server on document close)', txtSpellCheck: 'Spell Checking', strSpellCheckMode: 'Turn on spell checking option', - txtCacheMode: 'Default cache mode' + txtCacheMode: 'Default cache mode', + strMacrosSettings: 'Macros Settings', + txtWarnMacros: 'Show Notification', + txtRunMacros: 'Enable All', + txtStopMacros: 'Disable All', + txtWarnMacrosDesc: 'Disable all macros with notification', + txtRunMacrosDesc: 'Enable all macros without notification', + txtStopMacrosDesc: 'Disable all macros without notification', + strPaste: 'Cut, copy and paste', + strPasteButton: 'Show Paste Options button when content is pasted' }, PE.Views.FileMenuPanels.Settings || {})); PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 05c8e526d..cd66ef7f1 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -625,6 +625,8 @@ "PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
    If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
    If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "PE.Controllers.Main.textHasMacros": "The file contains automatic macros.
    Do you want to run macros?", + "PE.Controllers.Main.textRemember": "Remember my choice", "PE.Controllers.Statusbar.zoomText": "Zoom {0}%", "PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
    The text style will be displayed using one of the system fonts, the saved font will be used when it is available.
    Do you want to continue?", "PE.Controllers.Toolbar.textAccent": "Accents", @@ -1259,6 +1261,15 @@ "PE.Views.FileMenuPanels.Settings.txtPt": "Point", "PE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking", "PE.Views.FileMenuPanels.Settings.txtWin": "as Windows", + "PE.Views.FileMenuPanels.Settings.strMacrosSettings": "Macros Settings", + "PE.Views.FileMenuPanels.Settings.txtWarnMacros": "Show Notification", + "PE.Views.FileMenuPanels.Settings.txtRunMacros": "Enable All", + "PE.Views.FileMenuPanels.Settings.txtStopMacros": "Disable All", + "PE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with notification", + "PE.Views.FileMenuPanels.Settings.txtRunMacrosDesc": "Enable all macros without notification", + "PE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification", + "PE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste", + "PE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted", "PE.Views.HeaderFooterDialog.applyAllText": "Apply to all", "PE.Views.HeaderFooterDialog.applyText": "Apply", "PE.Views.HeaderFooterDialog.diffLanguage": "You can’t use a date format in a different language than the slide master.
    To change the master, click 'Apply to all' instead of 'Apply'", diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png index 982b2b1dc..acdcc6fe6 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png index afaad7999..2026ad226 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png index 484c844a4..3004ea3ae 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png index 011fab989..67136e3d7 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png index b1a5c4f15..2ce1bb2aa 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png index a16b87683..c84bb8308 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png index 90f29a8bf..569de1241 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png index 7d242b17e..e9c8abd51 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png index 8f152d01e..78d36feba 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png index 1734c9b9a..44730da76 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png differ diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png index 7cb166b8a..8f0bf6074 100644 Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png differ diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 6cb144489..9ebdba405 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -227,6 +227,14 @@ define([ if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo)) $('#editor_sdk').append('
    '); + var value = Common.localStorage.getItem("pe-mobile-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("pe-mobile-macros-mode", value); + // if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') // Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); }, @@ -257,10 +265,16 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); @@ -1278,6 +1292,51 @@ define([ return false; }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("pe-mobile-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + uiApp.modal({ + title: this.notcriticalErrorTitle, + text: this.textHasMacros, + afterText: '', + buttons: [{ + text: this.textYes, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("pe-mobile-macros-mode", 1); + Common.localStorage.setItem("pe-mobile-macros-mode", 1); + } + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + }, + { + text: this.textNo, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("pe-mobile-macros-mode", 2); + Common.localStorage.setItem("pe-mobile-macros-mode", 2); + } + } + }] + }); + } + } + }, + // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', @@ -1442,7 +1501,11 @@ define([ waitText: 'Please, wait...', errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
    Please contact your Document Server administrator for details.', errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', - errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.' + errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.', + textHasMacros: 'The file contains automatic macros.
    Do you want to run macros?', + textRemember: 'Remember my choice', + textYes: 'Yes', + textNo: 'No' } })(), PE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index d902cdc49..c939fd041 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -176,6 +176,7 @@ define([ Common.Utils.addScrollIfNeed('.page[data-page=settings-info-view]', '.page[data-page=settings-info-view] .page-content'); Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content'); Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view]', '.page[data-page=color-schemes-view] .page-content'); + Common.Utils.addScrollIfNeed('.page[data-page=settings-macros-view]', '.page[data-page=settings-macros-view] .page-content'); me.initSettings(pageId); }, @@ -193,9 +194,25 @@ define([ me.initPageColorSchemes(); } else if ('#settings-info-view' == pageId) { me.initPageInfo(); + } else if ('#settings-macros-view' == pageId) { + me.initPageMacrosSettings(); } }, + initPageMacrosSettings: function() { + var me = this, + $pageMacrosSettings = $('.page[data-page="settings-macros-view"] input:radio[name=macros-settings]'), + value = Common.Utils.InternalSettings.get("pe-mobile-macros-mode") || 0; + $pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me)); + $pageMacrosSettings.val([value]); + }, + + onChangeMacrosSettings: function(e) { + var value = parseInt($(e.currentTarget).val()); + Common.Utils.InternalSettings.set("pe-mobile-macros-mode", value); + Common.localStorage.setItem("pe-mobile-macros-mode", value); + }, + initPageInfo: function() { var document = Common.SharedSettings.get('document') || {}, info = document.info || {}; diff --git a/apps/presentationeditor/mobile/app/controller/add/AddOther.js b/apps/presentationeditor/mobile/app/controller/add/AddOther.js index 77308a714..675a89dd0 100644 --- a/apps/presentationeditor/mobile/app/controller/add/AddOther.js +++ b/apps/presentationeditor/mobile/app/controller/add/AddOther.js @@ -168,7 +168,7 @@ define([ }, onDoneComment: function(documentFlag) { - var value = $('#comment-text').val(); + var value = $('#comment-text').val().trim(); if (value.length > 0) { PE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag); PE.getController('AddContainer').hideModal(); diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template index aa13a05ab..20012e9a2 100644 --- a/apps/presentationeditor/mobile/app/template/Settings.template +++ b/apps/presentationeditor/mobile/app/template/Settings.template @@ -476,7 +476,6 @@
    <%= scope.textUnitOfMeasurement %>
    -
    +
    @@ -544,4 +556,55 @@ + + + +
    + +
    +
    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index a4b486ec5..b324f2dd8 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -55,7 +55,8 @@ define([ canDownload = false, canAbout = true, canHelp = true, - canPrint = false; + canPrint = false, + isShowMacros = true; return { // el: '.view-main', @@ -117,6 +118,7 @@ define([ if (mode.customization) { canHelp = (mode.customization.help!==false); + isShowMacros = (mode.customization.macros!==false); } }, @@ -129,7 +131,6 @@ define([ $layour.find('#settings-readermode').hide(); $layour.find('#settings-search .item-title').text(this.textFindAndReplace) } else { - $layour.find('#settings-application').hide(); $layour.find('#settings-spellcheck').hide(); $layour.find('#settings-presentation-setup').hide(); $layour.find('#settings-readermode input:checkbox') @@ -140,6 +141,7 @@ define([ if (!canAbout) $layour.find('#settings-about').hide(); if (!canHelp) $layour.find('#settings-help').hide(); if (!canPrint) $layour.find('#settings-print').hide(); + if (!isShowMacros) $layour.find('#settings-macros').hide(); return $layour.html(); } @@ -186,6 +188,10 @@ define([ this.showPage('#settings-history-view'); }, + showMacros: function () { + this.showPage('#settings-macros-view'); + }, + showHelp: function () { var url = '{{HELP_URL}}'; if (url.charAt(url.length-1) !== '/') { @@ -213,6 +219,10 @@ define([ showSetApp: function () { this.showPage('#settings-application-view'); + $('.page[data-page=settings-application-view] .page-content > :not(.display-view)').hide(); + if (isShowMacros) { + $('#settings-macros').single('click', _.bind(this.showMacros, this)); + } }, loadDocument: function (data) { @@ -295,7 +305,14 @@ define([ textLastModified: 'Last Modified', textLastModifiedBy: 'Last Modified By', textUploaded: 'Uploaded', - textLocation: 'Location' + textLocation: 'Location', + textMacrosSettings: 'Macros Settings', + textDisableAll: 'Disable All', + textDisableAllMacrosWithoutNotification: 'Disable all macros without notification', + textShowNotification: 'Show Notification', + textDisableAllMacrosWithNotification: 'Disable all macros with notification', + textEnableAll: 'Enable All', + textEnableAllMacrosWithoutNotification: 'Enable all macros without notification' } })(), PE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 34c369cf3..ab969b93e 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -252,6 +252,10 @@ "PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
    If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
    If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "PE.Controllers.Main.textHasMacros": "The file contains automatic macros.
    Do you want to run macros?", + "PE.Controllers.Main.textRemember": "Remember my choice", + "PE.Controllers.Main.textYes": "Yes", + "PE.Controllers.Main.textNo": "No", "PE.Controllers.Search.textNoTextFound": "Text not Found", "PE.Controllers.Search.textReplaceAll": "Replace All", "PE.Controllers.Settings.notcriticalErrorTitle": "Warning", @@ -547,5 +551,12 @@ "PE.Views.Settings.textUploaded": "Uploaded", "PE.Views.Settings.textVersion": "Version", "PE.Views.Settings.unknownText": "Unknown", + "PE.Views.Settings.textMacrosSettings": "Macros Settings", + "PE.Views.Settings.textDisableAll": "Disable All", + "PE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification", + "PE.Views.Settings.textShowNotification": "Show Notification", + "PE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification", + "PE.Views.Settings.textEnableAll": "Enable All", + "PE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification", "PE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/resources/css/app-ios.css b/apps/presentationeditor/mobile/resources/css/app-ios.css index dc6164810..15b182f75 100644 --- a/apps/presentationeditor/mobile/resources/css/app-ios.css +++ b/apps/presentationeditor/mobile/resources/css/app-ios.css @@ -6559,17 +6559,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after padding: 16px 0; word-wrap: break-word; } -.page-comments p, -.add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .add-comment .list-reply, .page-view-comments .list-reply, @@ -6665,6 +6654,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .add-comment .reply-item, .page-view-comments .reply-item, @@ -7745,3 +7752,10 @@ html.pixel-ratio-3 .numbers li { .doc-placeholder .slide-container > .line.empty { background: transparent; } +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #8e8e93; +} diff --git a/apps/presentationeditor/mobile/resources/css/app-material.css b/apps/presentationeditor/mobile/resources/css/app-material.css index 74a21da49..c94c80a01 100644 --- a/apps/presentationeditor/mobile/resources/css/app-material.css +++ b/apps/presentationeditor/mobile/resources/css/app-material.css @@ -6129,17 +6129,6 @@ html.phone .document-menu .list-block .item-link { .page-edit-reply .list-block .item-inner:after { content: none; } -.page-comments p, -.page-add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .page-add-comment .list-reply, .page-view-comments .list-reply, @@ -6234,6 +6223,24 @@ html.phone .document-menu .list-block .item-link { max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.page-add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.page-add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .page-add-comment .reply-item, .page-view-comments .reply-item, @@ -7655,3 +7662,10 @@ html.pixel-ratio-3 .numbers li { .doc-placeholder .slide-container > .line.empty { background: transparent; } +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #9e9e9e; +} diff --git a/apps/presentationeditor/mobile/resources/less/app-ios.less b/apps/presentationeditor/mobile/resources/less/app-ios.less index fb92b38f0..a2ce76091 100644 --- a/apps/presentationeditor/mobile/resources/less/app-ios.less +++ b/apps/presentationeditor/mobile/resources/less/app-ios.less @@ -322,3 +322,18 @@ input, textarea { } } } + +// Macros settings +.page-macros-settings[data-page="settings-macros-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } +} diff --git a/apps/presentationeditor/mobile/resources/less/app-material.less b/apps/presentationeditor/mobile/resources/less/app-material.less index 6ac442771..71d2221e3 100644 --- a/apps/presentationeditor/mobile/resources/less/app-material.less +++ b/apps/presentationeditor/mobile/resources/less/app-material.less @@ -321,3 +321,18 @@ input, textarea { } } } + +// Macros settings +.page-macros-settings[data-page="settings-macros-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 722ed7a11..6b9a0bc31 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -98,9 +98,16 @@ SSE.ApplicationController = new(function(){ docInfo.put_VKey(docConfig.vkey); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + + var enable = !config.customization || (config.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !config.customization || (config.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); api.asc_setDocInfo(docInfo); api.asc_getEditorPermissions(config.licenseUrl, config.customerId); api.asc_enableKeyEvents(true); @@ -531,6 +538,11 @@ SSE.ApplicationController = new(function(){ } } + function onRunAutostartMacroses() { + if (!config.customization || (config.customization.macros!==false)) + if (api) api.asc_runAutostartMacroses(); + } + // Helpers // ------------------------- diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 9cc423981..07b5ad7cd 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -71,7 +71,8 @@ define([ 'spreadsheeteditor/main/app/view/ImageSettingsAdvanced', 'spreadsheeteditor/main/app/view/SetValueDialog', 'spreadsheeteditor/main/app/view/AutoFilterDialog', - 'spreadsheeteditor/main/app/view/SpecialPasteDialog' + 'spreadsheeteditor/main/app/view/SpecialPasteDialog', + 'spreadsheeteditor/main/app/view/SlicerSettingsAdvanced' ], function () { 'use strict'; @@ -96,6 +97,9 @@ define([ row_column: { ttHeight: 20 }, + slicer: { + ttHeight: 20 + }, filter: {ttHeight: 40}, func_arg: {}, input_msg: {} @@ -224,6 +228,7 @@ define([ view.mnuShapeAdvanced.on('click', _.bind(me.onShapeAdvanced, me)); view.mnuChartEdit.on('click', _.bind(me.onChartEdit, me)); view.mnuImgAdvanced.on('click', _.bind(me.onImgAdvanced, me)); + view.mnuSlicerAdvanced.on('click', _.bind(me.onSlicerAdvanced, me)); view.textInShapeMenu.on('render:after', _.bind(me.onTextInShapeAfterRender, me)); view.menuSignatureEditSign.on('click', _.bind(me.onSignatureClick, me)); view.menuSignatureEditSetup.on('click', _.bind(me.onSignatureClick, me)); @@ -258,7 +263,7 @@ define([ click: function(e) { if (me.api) { me.api.isTextAreaBlur = false; - if (e.target.localName == 'canvas' && !me.isEditFormula) { + if (e.target.localName == 'canvas' && (!me.isEditFormula || me.rangeSelectionMode)) { if (me._preventClick) me._preventClick = false; else @@ -878,6 +883,26 @@ define([ })).show(); }, + onSlicerAdvanced: function(item) { + var me = this; + + (new SSE.Views.SlicerSettingsAdvanced({ + imageProps: item.imageInfo, + api : me.api, + styles : item.imageInfo.asc_getSlicerProperties().asc_getStylesPictures(), + handler : function(result, value) { + if (result == 'ok') { + if (me.api) { + me.api.asc_setGraphicObjectProps(value.imageProps); + + Common.component.Analytics.trackEvent('DocumentHolder', 'Apply slicer settings'); + } + } + Common.NotificationCenter.trigger('edit:complete', me); + } + })).show(); + }, + onChartEdit: function(item) { var me = this; var win, props; @@ -935,7 +960,8 @@ define([ /** coauthoring end **/ index_locked, index_column, index_row, - index_filter; + index_filter, + index_slicer; for (var i = dataarray.length; i > 0; i--) { switch (dataarray[i-1].asc_getType()) { case Asc.c_oAscMouseMoveType.Hyperlink: @@ -958,6 +984,9 @@ define([ case Asc.c_oAscMouseMoveType.Filter: index_filter = i; break; + case Asc.c_oAscMouseMoveType.Tooltip: + index_slicer = i; + break; } } @@ -970,6 +999,7 @@ define([ hyperlinkTip = me.tooltips.hyperlink, row_columnTip = me.tooltips.row_column, filterTip = me.tooltips.filter, + slicerTip = me.tooltips.slicer, pos = [ me.documentHolder.cmpEl.offset().left - $(window).scrollLeft(), me.documentHolder.cmpEl.offset().top - $(window).scrollTop() @@ -1007,6 +1037,14 @@ define([ if (!index_locked) { me.hideCoAuthTips(); } + if (index_slicer===undefined) { + if (!slicerTip.isHidden && slicerTip.ref) { + slicerTip.ref.hide(); + slicerTip.ref = undefined; + slicerTip.text = ''; + slicerTip.isHidden = true; + } + } } if (index_filter===undefined || (me.dlgFilter && me.dlgFilter.isVisible()) || (me.currentMenu && me.currentMenu.isVisible())) { if (!filterTip.isHidden && filterTip.ref) { @@ -1016,7 +1054,6 @@ define([ filterTip.isHidden = true; } } - // show tooltips /** coauthoring begin **/ var getUserName = function(id){ @@ -1259,6 +1296,48 @@ define([ }); } } + + if (index_slicer!==undefined && me.permissions.isEdit) { + if (!slicerTip.parentEl) { + slicerTip.parentEl = $('
    '); + me.documentHolder.cmpEl.append(slicerTip.parentEl); + } + + var data = dataarray[index_slicer-1], + str = data.asc_getTooltip(); + if (slicerTip.ref && slicerTip.ref.isVisible()) { + if (slicerTip.text != str) { + slicerTip.text = str; + slicerTip.ref.setTitle(str); + slicerTip.ref.updateTitle(); + } + } + + if (!slicerTip.ref || !slicerTip.ref.isVisible()) { + slicerTip.text = str; + slicerTip.ref = new Common.UI.Tooltip({ + owner : slicerTip.parentEl, + html : true, + title : str + }); + + slicerTip.ref.show([-10000, -10000]); + slicerTip.isHidden = false; + + showPoint = [data.asc_getX(), data.asc_getY()]; + showPoint[0] += (pos[0] + 6); + showPoint[1] += (pos[1] - 20 - slicerTip.ttHeight); + + var tipwidth = slicerTip.ref.getBSTip().$tip.width(); + if (showPoint[0] + tipwidth > me.tooltips.coauth.bodyWidth ) + showPoint[0] = me.tooltips.coauth.bodyWidth - tipwidth - 20; + + slicerTip.ref.getBSTip().$tip.css({ + top : showPoint[1] + 'px', + left: showPoint[0] + 'px' + }); + } + } } }, @@ -1565,7 +1644,7 @@ define([ }, fillMenuProps: function(cellinfo, showMenu, event){ - var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, + var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, isslicermenu, documentHolder = this.documentHolder, seltype = cellinfo.asc_getSelectionType(), isCellLocked = cellinfo.asc_getLocked(), @@ -1593,7 +1672,7 @@ define([ } else if (isimagemenu || isshapemenu || ischartmenu) { if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return; - isimagemenu = isshapemenu = ischartmenu = false; + isimagemenu = isshapemenu = ischartmenu = isslicermenu = false; documentHolder.mnuImgAdvanced.imageInfo = undefined; var has_chartprops = false, @@ -1617,6 +1696,9 @@ define([ documentHolder.mnuChartEdit.chartInfo = elValue; ischartmenu = true; has_chartprops = true; + } if ( elValue.asc_getSlicerProperties() ) { + documentHolder.mnuSlicerAdvanced.imageInfo = elValue; + isslicermenu = true; } else { documentHolder.mnuImgAdvanced.imageInfo = elValue; isimagemenu = true; @@ -1647,13 +1729,16 @@ define([ if (documentHolder.mnuImgAdvanced.imageInfo) documentHolder.menuImgOriginalSize.setDisabled(isObjLocked || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===null || documentHolder.mnuImgAdvanced.imageInfo.get_ImageUrl()===undefined); + documentHolder.mnuSlicerAdvanced.setVisible(isslicermenu); + documentHolder.mnuSlicerAdvanced.setDisabled(isObjLocked); + var pluginGuid = (documentHolder.mnuImgAdvanced.imageInfo) ? documentHolder.mnuImgAdvanced.imageInfo.asc_getPluginGuid() : null; documentHolder.menuImgReplace.setVisible(isimageonly && (pluginGuid===null || pluginGuid===undefined)); documentHolder.menuImgReplace.setDisabled(isObjLocked || pluginGuid===null); documentHolder.menuImgReplace.menu.items[2].setVisible(this.permissions.canRequestInsertImage || this.permissions.fileChoiceUrl && this.permissions.fileChoiceUrl.indexOf("{documentType}")>-1); documentHolder.menuImageArrange.setDisabled(isObjLocked); - documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined)); + documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined) && !isslicermenu); documentHolder.menuImgRotate.setDisabled(isObjLocked); documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop()); @@ -1671,6 +1756,7 @@ define([ if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event); documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible()); + documentHolder.mnuSlicerSeparator.setVisible(documentHolder.mnuSlicerAdvanced.isVisible()); } else if (istextshapemenu || istextchartmenu) { if (!documentHolder.textInShapeMenu || !showMenu && !documentHolder.textInShapeMenu.isVisible()) return; @@ -1987,7 +2073,7 @@ define([ value : addarr ? addarr[index] : menuItem, style: (typeof menuItem == 'string' && _.isEmpty(menuItem.trim())) ? 'min-height: 25px;' : '' }).on('click', function(item, e) { - me.api.asc_insertFormula(item.value, Asc.c_oAscPopUpSelectorType.None, false ); + me.api.asc_insertInCell(item.value, Asc.c_oAscPopUpSelectorType.None, false ); }); menu.addItem(mnu); }); @@ -2032,7 +2118,7 @@ define([ }, onFormulaCompleteMenu: function(funcarr) { - if (!this.documentHolder.funcMenu) return; + if (!this.documentHolder.funcMenu || Common.Utils.ModalWindow.isVisible() || this.rangeSelectionMode) return; if (funcarr) { var me = this, @@ -2064,7 +2150,7 @@ define([ caption: name, hint : (funcdesc && funcdesc[origname]) ? funcdesc[origname].d : '' }).on('click', function(item, e) { - setTimeout(function(){ me.api.asc_insertFormula(item.caption, type, false ); }, 10); + setTimeout(function(){ me.api.asc_insertInCell(item.caption, type, false ); }, 10); }); menu.addItem(mnu); }); diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index 45a977803..25cb50b7c 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -44,7 +44,8 @@ define([ 'core', 'spreadsheeteditor/main/app/collection/FormulaGroups', 'spreadsheeteditor/main/app/view/FormulaDialog', - 'spreadsheeteditor/main/app/view/FormulaTab' + 'spreadsheeteditor/main/app/view/FormulaTab', + 'spreadsheeteditor/main/app/view/FormulaWizard' ], function () { 'use strict'; @@ -95,7 +96,10 @@ define([ if (func.origin === 'more') { this.showDialog(group); } else { - this.api.asc_insertFormula(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete); + if (autocomplete) + this.api.asc_insertInCell(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete); + else + this.api.asc_startWizard(func.name); !autocomplete && this.updateLast10Formulas(func.origin); } } @@ -112,6 +116,7 @@ define([ setApi: function (api) { this.api = api; + this.api.asc_registerCallback('asc_onSendFunctionWizardInfo', _.bind(this.onSendFunctionWizardInfo, this)); if (this.formulasGroups && this.api) { Common.Utils.InternalSettings.set("sse-settings-func-last", Common.localStorage.getItem("sse-settings-func-last")); @@ -216,9 +221,39 @@ define([ this.formulas.fillFormulasGroups(); } } - this.formulas.show(group); + this._formulagroup = group; + this.api.asc_startWizard(); } }, + + onSendFunctionWizardInfo: function(props) { + if (props) { + // show formula settings + var me = this; + var name = props.asc_getName(), + descrarr = this.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")), + funcprops = { + name: this.api.asc_getFormulaLocaleName(name), + origin: name, + args: ((descrarr && descrarr[name]) ? descrarr[name].a : '').replace(/[,;]/g, this.api.asc_getFunctionArgumentSeparator()), + desc: (descrarr && descrarr[name]) ? descrarr[name].d : '' + }; + + (new SSE.Views.FormulaWizard({ + api : this.api, + lang : this.appOptions.lang, + funcprops: funcprops, + props : props, + handler : function(dlg, result, settings) { + if (result == 'ok') { + } + } + })).show(); + } else + this.formulas.show(this._formulagroup); + this._formulagroup = undefined; + }, + hideDialog: function () { if (this.formulas && this.formulas.isVisible()) { this.formulas.hide(); diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index cb30a47fd..523c0001a 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -389,6 +389,10 @@ define([ value = parseInt(Common.localStorage.getItem("sse-settings-autosave")); Common.Utils.InternalSettings.set("sse-settings-autosave", value); this.api.asc_setAutoSaveGap(value); + + value = parseInt(Common.localStorage.getItem("sse-settings-paste-button")); + Common.Utils.InternalSettings.set("sse-settings-paste-button", value); + this.api.asc_setVisiblePasteButton(!!value); } var reg = Common.localStorage.getItem("sse-settings-reg-settings"), diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 2d716ff0b..f2b109f73 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -127,7 +127,10 @@ define([ 'Values': this.txtValues, 'Grand Total': this.txtGrandTotal, 'Row Labels': this.txtRowLbls, - 'Column Labels': this.txtColLbls + 'Column Labels': this.txtColLbls, + 'Multi-Select (Alt+S)': this.txtMultiSelect, + 'Clear Filter (Alt+C)': this.txtClearFilter, + '(blank)': this.txtBlank }; styleNames.forEach(function(item){ translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; @@ -390,6 +393,14 @@ define([ $('#editor_sdk').append('
    ' + '
    '.repeat(2) + '
    '); } + var value = Common.localStorage.getItem("sse-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("sse-macros-mode", value); + this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); Common.Controllers.Desktop.init(this.appOptions); }, @@ -422,6 +433,11 @@ define([ docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); + this.headerView && this.headerView.setDocumentCaption(data.doc.title); Common.Utils.InternalSettings.set("sse-doc-info-key", data.doc.key); @@ -429,6 +445,7 @@ define([ this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); }, @@ -794,6 +811,11 @@ define([ me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave); } + value = Common.localStorage.getItem("sse-settings-paste-button"); + if (value===null) value = '1'; + Common.Utils.InternalSettings.set("sse-settings-paste-button", parseInt(value)); + me.api.asc_setVisiblePasteButton(!!parseInt(value)); + if (me.needToUpdateVersion) { Common.NotificationCenter.trigger('api:disconnect'); toolbarController.onApiCoAuthoringDisconnect(); @@ -1477,6 +1499,9 @@ define([ config.msg = this.errorFTRangeIncludedOtherTables; break; + case Asc.c_oAscError.ID.PasteSlicerError: + config.msg = this.errorPasteSlicerError; + break; case Asc.c_oAscError.ID.RemoveDuplicates: config.iconCls = 'info'; @@ -2183,6 +2208,36 @@ define([ }}); }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("sse-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + Common.UI.warning({ + msg: this.textHasMacros + '
    ', + buttons: ['yes', 'no'], + primary: 'yes', + dontshow: true, + textDontShow: this.textRemember, + callback: function(btn, dontshow){ + if (dontshow) { + Common.Utils.InternalSettings.set("sse-macros-mode", (btn == 'yes') ? 1 : 2); + Common.localStorage.setItem("sse-macros-mode", (btn == 'yes') ? 1 : 2); + } + if (btn == 'yes') { + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + } + }); + } + } + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -2548,7 +2603,13 @@ define([ txtRowLbls: 'Row Labels', txtColLbls: 'Column Labels', errNoDuplicates: 'No duplicate values found.', - errRemDuplicates: 'Duplicate values found and deleted: {0}, unique values left: {1}.' + errRemDuplicates: 'Duplicate values found and deleted: {0}, unique values left: {1}.', + txtMultiSelect: 'Multi-Select (Alt+S)', + txtClearFilter: 'Clear Filter (Alt+C)', + txtBlank: '(blank)', + textHasMacros: 'The file contains automatic macros.
    Do you want to run macros?', + textRemember: 'Remember my choice', + errorPasteSlicerError: 'Table slicers cannot be copied from one workbook to another.
    Try again by selecting the entire table and the slicers.' } })(), SSE.Controllers.Main || {})) }); diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index 4048a750a..d93ae91aa 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -92,6 +92,7 @@ define([ this._settings[Common.Utils.documentSettingsType.Pivot] = {panelId: "id-pivot-settings", panel: rightMenu.pivotSettings, btn: rightMenu.btnPivot, hidden: 1, locked: false}; this._settings[Common.Utils.documentSettingsType.Signature] = {panelId: "id-signature-settings", panel: rightMenu.signatureSettings, btn: rightMenu.btnSignature, hidden: 1, props: {}, locked: false}; this._settings[Common.Utils.documentSettingsType.Cell] = {panelId: "id-cell-settings", panel: rightMenu.cellSettings, btn: rightMenu.btnCell, hidden: 1, locked: false}; + this._settings[Common.Utils.documentSettingsType.Slicer] = {panelId: "id-slicer-settings", panel: rightMenu.slicerSettings, btn: rightMenu.btnSlicer, hidden: 1, locked: false}; }, setApi: function(api) { @@ -190,6 +191,8 @@ define([ this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0; this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.asc_getLocked(); } + } else if (value.asc_getSlicerProperties() !== null) { + settingsType = Common.Utils.documentSettingsType.Slicer; } } @@ -326,6 +329,7 @@ define([ this.rightmenu.paragraphSettings.updateMetricUnit(); this.rightmenu.chartSettings.updateMetricUnit(); this.rightmenu.imageSettings.updateMetricUnit(); + this.rightmenu.slicerSettings.updateMetricUnit(); }, createDelayedElements: function() { @@ -392,6 +396,7 @@ define([ this.rightmenu.tableSettings.disableControls(disabled); this.rightmenu.pivotSettings.disableControls(disabled); this.rightmenu.cellSettings.disableControls(disabled); + this.rightmenu.slicerSettings.disableControls(disabled); if (!allowSignature && this.rightmenu.signatureSettings) { this.rightmenu.btnSignature.setDisabled(disabled); @@ -410,6 +415,7 @@ define([ this.rightmenu.btnChart.setDisabled(disabled); this.rightmenu.btnPivot.setDisabled(disabled); this.rightmenu.btnCell.setDisabled(disabled); + this.rightmenu.btnSlicer.setDisabled(disabled); } else { this.onSelectionChanged(this.api.asc_getCellInfo()); } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index b9dc6e1dc..41c22c738 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -59,6 +59,7 @@ define([ 'spreadsheeteditor/main/app/view/HeaderFooterDialog', 'spreadsheeteditor/main/app/view/PrintTitlesDialog', 'spreadsheeteditor/main/app/view/ScaleDialog', + 'spreadsheeteditor/main/app/view/SlicerAddDialog', 'spreadsheeteditor/main/app/view/CellsAddDialog' ], function () { 'use strict'; @@ -329,6 +330,7 @@ define([ toolbar.btnInsertShape.menu.on('hide:after', _.bind(this.onInsertShapeHide, this)); toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this)); toolbar.btnInsertSymbol.on('click', _.bind(this.onInsertSymbolClick, this)); + toolbar.btnInsertSlicer.on('click', _.bind(this.onInsertSlicerClick, this)); toolbar.btnTableTemplate.menu.on('show:after', _.bind(this.onTableTplMenuOpen, this)); toolbar.btnPercentStyle.on('click', _.bind(this.onNumberFormat, this)); toolbar.btnCurrencyStyle.on('click', _.bind(this.onNumberFormat, this)); @@ -785,22 +787,12 @@ define([ }, onTextOrientationMenu: function(menu, item) { - if (this.api.asc_getCellInfo().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeShapeText) { - var angle = Asc.c_oAscVertDrawingText.normal; - switch (item.value) { - case 'rotateup': angle = Asc.c_oAscVertDrawingText.vert270; break; - case 'rotatedown': angle = Asc.c_oAscVertDrawingText.vert; break; - } - - var properties = new Asc.asc_CImgProperty(); - properties.asc_putVert(angle); - this.api.asc_setGraphicObjectProps(properties); - } else { var angle = 0; switch (item.value) { case 'countcw': angle = 45; break; case 'clockwise': angle = -45; break; + case 'vertical': angle = 255; break; case 'rotateup': angle = 90; break; case 'rotatedown': angle = -90; break; } @@ -808,7 +800,6 @@ define([ this._state.angle = undefined; if (this.api) this.api.asc_setCellAngle(angle); - } Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Text orientation'); @@ -1237,7 +1228,7 @@ define([ (new SSE.Views.NamedRangePasteDlg({ handler: function(result, settings) { if (result == 'ok' && settings) { - me.api.asc_insertFormula(settings.asc_getName(true), settings.asc_getIsTable() ? Asc.c_oAscPopUpSelectorType.Table : Asc.c_oAscPopUpSelectorType.Range, false); + me.api.asc_insertInCell(settings.asc_getName(true), 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); @@ -2289,6 +2280,7 @@ define([ need_disable = (fontparam == AscCommon.align_Justify || selectionType == Asc.c_oAscSelectionType.RangeShapeText || selectionType == Asc.c_oAscSelectionType.RangeShape); toolbar.btnTextOrient.menu.items[1].setDisabled(need_disable); toolbar.btnTextOrient.menu.items[2].setDisabled(need_disable); + toolbar.btnTextOrient.menu.items[3].setDisabled(need_disable); /* read cell vertical align */ fontparam = xfs.asc_getVertAlign(); @@ -2367,6 +2359,7 @@ define([ this._state.inpivot = !!info.asc_getPivotTableInfo(); toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsClearAutofilter, toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates)}); + toolbar.lockToolbar(SSE.enumLock.noSlicerSource, !(this._state.inpivot || formatTableInfo), { array: [toolbar.btnInsertSlicer]}); need_disable = !this.appConfig.canModifyFilter; toolbar.lockToolbar(SSE.enumLock.cantModifyFilter, need_disable, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnTableTemplate, @@ -2391,8 +2384,9 @@ define([ switch(val) { case 45: toolbar.btnTextOrient.menu.items[1].setChecked(true, true); break; case -45: toolbar.btnTextOrient.menu.items[2].setChecked(true, true); break; - case 90: toolbar.btnTextOrient.menu.items[3].setChecked(true, true); break; - case -90: toolbar.btnTextOrient.menu.items[4].setChecked(true, true); break; + case 255: toolbar.btnTextOrient.menu.items[3].setChecked(true, true); break; + case 90: toolbar.btnTextOrient.menu.items[4].setChecked(true, true); break; + case -90: toolbar.btnTextOrient.menu.items[5].setChecked(true, true); break; case 0: toolbar.btnTextOrient.menu.items[0].setChecked(true, true); break; } this._state.angle = val; @@ -2814,6 +2808,22 @@ define([ } }, + onInsertSlicerClick: function() { + var me = this, + props = me.api.asc_beforeInsertSlicer(); + if (props) { + (new SSE.Views.SlicerAddDialog({ + props: props, + handler: function (result, settings) { + if (me && me.api && result == 'ok') { + me.api.asc_insertSlicer(settings); + } + Common.NotificationCenter.trigger('edit:complete', me.toolbar); + } + })).show(); + } + }, + onApiMathTypes: function(equation) { this._equationTemp = equation; var me = this; @@ -3117,8 +3127,8 @@ define([ var me = this; Common.NotificationCenter.on({ - 'edit:complete': function () { - if (me.api && me.modeAlwaysSetStyle) { + 'edit:complete': function (cmp) { + if (me.api && me.modeAlwaysSetStyle && cmp!=='tab') { me.api.asc_formatPainter(AscCommon.c_oAscFormatPainterState.kOff); me.toolbar.btnCopyStyle.toggle(false, true); me.modeAlwaysSetStyle = false; diff --git a/apps/spreadsheeteditor/main/app/template/CellSettings.template b/apps/spreadsheeteditor/main/app/template/CellSettings.template index c9bbb14b0..0168b2dec 100644 --- a/apps/spreadsheeteditor/main/app/template/CellSettings.template +++ b/apps/spreadsheeteditor/main/app/template/CellSettings.template @@ -100,10 +100,25 @@ - +
    + + + + + + + +
    + + + + +
    + + \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/template/RightMenu.template b/apps/spreadsheeteditor/main/app/template/RightMenu.template index 33a2af169..bcba6cfa2 100644 --- a/apps/spreadsheeteditor/main/app/template/RightMenu.template +++ b/apps/spreadsheeteditor/main/app/template/RightMenu.template @@ -18,6 +18,8 @@
    +
    +
    @@ -29,6 +31,7 @@ +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettings.template b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template new file mode 100644 index 000000000..db9953804 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template @@ -0,0 +1,129 @@ + + + + + + +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template new file mode 100644 index 000000000..d61f2be90 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template @@ -0,0 +1,119 @@ +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + +
    + +
    +
    + + +
    + +
    +
    +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/template/TableSettings.template b/apps/spreadsheeteditor/main/app/template/TableSettings.template index 8f369fddc..5f980d0ce 100644 --- a/apps/spreadsheeteditor/main/app/template/TableSettings.template +++ b/apps/spreadsheeteditor/main/app/template/TableSettings.template @@ -83,6 +83,11 @@ + + + + +
    diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index 958f2d26d..cb7050e5f 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -144,6 +144,10 @@ +
    +
    + +
    diff --git a/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js b/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js index 19c89d13b..de07e7116 100644 --- a/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js +++ b/apps/spreadsheeteditor/main/app/view/CellRangeDialog.js @@ -81,7 +81,7 @@ define([ el : $('#id-dlg-cell-range'), name : 'range', style : 'width: 100%;', - allowBlank : false, + allowBlank : this.options.allowBlank || false, blankError : this.txtEmpty, validateOnChange: true }); @@ -103,6 +103,7 @@ define([ setSettings: function(settings) { var me = this; + this.settings = settings; this.inputRange.setValue(settings.range ? settings.range : ''); if (settings.type===undefined) @@ -121,18 +122,52 @@ define([ if (settings.validation) { return settings.validation.call(me, value); } else { - var isvalid = me.api.asc_checkDataRange(settings.type, value, false); + if (settings.type === Asc.c_oAscSelectionDialogType.Function) { + settings.argvalues[settings.argindex] = value; + me.api.asc_insertArgumentsInFormula(settings.argvalues); + } + var isvalid = (settings.type === Asc.c_oAscSelectionDialogType.Function) || me.api.asc_checkDataRange(settings.type, value, false); return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true; } }; + + if (settings.type == Asc.c_oAscSelectionDialogType.Function) { + _.delay(function(){ + me.inputRange._input.focus(); + if (settings.selection) { + me.inputRange._input[0].selectionStart = settings.selection.start; + me.inputRange._input[0].selectionEnd = settings.selection.end; + } + },10); + me.inputRange._input.on('focus', function() { + me._addedTextLength=0; + me.api.asc_cleanSelectRange(); + }); + } }, getSettings: function () { return this.inputRange.getValue(); }, - onApiRangeChanged: function(info) { - this.inputRange.setValue(info.asc_getName()); + onApiRangeChanged: function(name) { + if (this.settings.type == Asc.c_oAscSelectionDialogType.Function) { + var oldlen = this._addedTextLength || 0, + val = this.inputRange.getValue(), + input = this.inputRange._input[0], + start = input.selectionStart - oldlen, + end = input.selectionEnd, + add = (start>0 && oldlen==0) && !this.api.asc_canEnterWizardRange(val.charAt(start-1)) ? '+' : ''; + this._addedTextLength = name.length; + + val = val.substring(0, start) + add + name + val.substring(end, val.length); + this.inputRange.setValue(val); + input.selectionStart = input.selectionEnd = start + add.length + this._addedTextLength; + + this.settings.argvalues[this.settings.argindex] = val; + this.api.asc_insertArgumentsInFormula(this.settings.argvalues); + } else + this.inputRange.setValue(name); if (this.inputRange.cmpEl.hasClass('error')) this.inputRange.cmpEl.removeClass('error'); }, diff --git a/apps/spreadsheeteditor/main/app/view/CellSettings.js b/apps/spreadsheeteditor/main/app/view/CellSettings.js index 4e32a0ee9..d23b4cc0d 100644 --- a/apps/spreadsheeteditor/main/app/view/CellSettings.js +++ b/apps/spreadsheeteditor/main/app/view/CellSettings.js @@ -429,6 +429,22 @@ define([ this.lockedControls.push(this.spnAngle); this.spnAngle.on('change', _.bind(this.onAngleChange, this)); this.spnAngle.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.chWrap = new Common.UI.CheckBox({ + el: $('#cell-checkbox-wrap'), + labelText: this.strWrap, + disabled: this._locked + }); + this.lockedControls.push(this.chWrap); + this.chWrap.on('change', this.onWrapChange.bind(this)); + + this.chShrink = new Common.UI.CheckBox({ + el: $('#cell-checkbox-shrink'), + labelText: this.strShrink, + disabled: this._locked + }); + this.lockedControls.push(this.chShrink); + this.chShrink.on('change', this.onShrinkChange.bind(this)); }, createDelayedElements: function() { @@ -449,9 +465,24 @@ define([ var xfs = props.asc_getXfs(), value = xfs.asc_getAngle(); if (Math.abs(this._state.CellAngle - value) > 0.1 || (this._state.CellAngle === undefined) && (this._state.CellAngle !== value)) { - this.spnAngle.setValue((value !== null) ? value : '', true); + this.spnAngle.setValue((value !== null) ? (value==255 ? 0 : value) : '', true); this._state.CellAngle = value; } + + value = xfs.asc_getWrapText(); + if ( this._state.Wrap!==value ) { + this.chWrap.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true); + this._state.Wrap=value; + } + this.chWrap.setDisabled(xfs.asc_getHorAlign() == AscCommon.align_Justify || this._locked); + + value = xfs.asc_getShrinkToFit(); + if ( this._state.Shrink!==value ) { + this.chShrink.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true); + this._state.Shrink=value; + } + this.chShrink.setDisabled((this.chWrap.getValue()=='checked') || this._locked); + this.fill = xfs.asc_getFill(); if (this.fill) { this.pattern = this.fill.asc_getPatternFill(); @@ -1127,6 +1158,19 @@ define([ Common.NotificationCenter.trigger('edit:complete', this); }, + onWrapChange: function(field, newValue, oldValue, eOpts){ + if (this.api && !this._noApply) + this.api.asc_setCellTextWrap((field.getValue()=='checked')); + this.chShrink.setDisabled((field.getValue()=='checked') || this._locked); + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onShrinkChange: function(field, newValue, oldValue, eOpts){ + if (this.api && !this._noApply) + this.api.asc_setCellTextShrink((field.getValue()=='checked')); + Common.NotificationCenter.trigger('edit:complete', this); + }, + textBorders: 'Border\'s Style', textBorderColor: 'Color', textBackColor: 'Background color', @@ -1156,7 +1200,10 @@ define([ textPattern: 'Pattern', textForeground: 'Foreground color', textBackground: 'Background color', - textGradient: 'Gradient' + textGradient: 'Gradient', + textControl: 'Text Control', + strWrap: 'Wrap text', + strShrink: 'Shrink to fit' }, SSE.Views.CellSettings || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index 621715714..426965d04 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -567,6 +567,14 @@ define([ caption : me.advancedImgText }); + me.mnuSlicerSeparator = new Common.UI.MenuItem({ + caption : '--' + }); + + me.mnuSlicerAdvanced = new Common.UI.MenuItem({ + caption : me.advancedSlicerText + }); + me.mnuChartEdit = new Common.UI.MenuItem({ caption : me.chartText }); @@ -761,7 +769,9 @@ define([ me.mnuShapeAdvanced, me.menuImgOriginalSize, me.menuImgReplace, - me.mnuImgAdvanced + me.mnuImgAdvanced, + me.mnuSlicerSeparator, + me.mnuSlicerAdvanced ] }); @@ -1100,7 +1110,8 @@ define([ textCropFill: 'Fill', textCropFit: 'Fit', textListSettings: 'List Settings', - textFromStorage: 'From Storage' + textFromStorage: 'From Storage', + advancedSlicerText: 'Slicer Advanced Settings' }, SSE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 2cec39b08..80c186932 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -667,6 +667,16 @@ define([ '', '
    ', '','', + '', + '', + '
    ', + '','', + '', + '', + '', + '
    ', + '
    ', + '','', '', '', '', @@ -897,6 +907,26 @@ define([ var $thousandsSeparatorInput = this.inputThousandsSeparator.$el.find('input'); $thousandsSeparatorInput.on('keydown', keyDown); + this.cmbMacros = new Common.UI.ComboBox({ + el : $markup.findById('#fms-cmb-macros'), + style : 'width: 160px;', + editable : false, + cls : 'input-group-nr', + data : [ + { value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc }, + { value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc }, + { value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc } + ] + }).on('selected', function(combo, record) { + me.lblMacrosDesc.text(record.descValue); + }); + this.lblMacrosDesc = $markup.findById('#fms-lbl-macros'); + + this.chPaste = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-paste-settings'), + labelText: this.strPasteButton + }); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-btn-apply') }); @@ -932,6 +962,7 @@ define([ $('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring? 'show' : 'hide'](); + $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); }, setApi: function(api) { @@ -1016,6 +1047,12 @@ define([ } else { this.$el.find('.label-separator').removeClass('disabled'); } + + item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("sse-macros-mode")}); + this.cmbMacros.setValue(item ? item.get('value') : 0); + this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc); + + this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button")); }, applySettings: function() { @@ -1056,6 +1093,11 @@ define([ Common.localStorage.setBool("sse-settings-use-base-separator", isChecked); Common.Utils.InternalSettings.set("sse-settings-use-base-separator", isChecked); + Common.localStorage.setItem("sse-macros-mode", this.cmbMacros.getValue()); + Common.Utils.InternalSettings.set("sse-macros-mode", this.cmbMacros.getValue()); + + Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); + Common.localStorage.save(); if (this.menu) { this.menu.fireEvent('settings:apply', [this.menu]); @@ -1150,7 +1192,16 @@ define([ strUseSeparatorsBasedOnRegionalSettings: 'Use separators based on regional settings', strDecimalSeparator: 'Decimal separator', strThousandsSeparator: 'Thousands separator', - txtCacheMode: 'Default cache mode' + txtCacheMode: 'Default cache mode', + strMacrosSettings: 'Macros Settings', + txtWarnMacros: 'Show Notification', + txtRunMacros: 'Enable All', + txtStopMacros: 'Disable All', + txtWarnMacrosDesc: 'Disable all macros with notification', + txtRunMacrosDesc: 'Enable all macros without notification', + txtStopMacrosDesc: 'Disable all macros without notification', + strPaste: 'Cut, copy and paste', + strPasteButton: 'Show Paste Options button when content is pasted' }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); SSE.Views.FileMenuPanels.MainSpellCheckSettings = Common.UI.BaseView.extend(_.extend({ diff --git a/apps/spreadsheeteditor/main/app/view/FormulaDialog.js b/apps/spreadsheeteditor/main/app/view/FormulaDialog.js index 194bdd489..3cf3f4dee 100644 --- a/apps/spreadsheeteditor/main/app/view/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/view/FormulaDialog.js @@ -153,6 +153,7 @@ define([ me.inputSearch.$el.find('input').focus(); }, 100, this); } + this._preventCloseCellEditor = false; }, hide: function () { @@ -166,6 +167,8 @@ define([ this.recommended = this.filter = undefined; Common.UI.Window.prototype.hide.call(this); + + !this._preventCloseCellEditor && this.api.asc_closeCellEditor(true); }, onBtnClick: function (event) { @@ -198,6 +201,7 @@ define([ if (this.handler && state == 'ok') { if (this.btnOk.isDisabled()) return; + this._preventCloseCellEditor = true; this.handler.call(this, this.applyFunction); } diff --git a/apps/spreadsheeteditor/main/app/view/FormulaWizard.js b/apps/spreadsheeteditor/main/app/view/FormulaWizard.js new file mode 100644 index 000000000..bb8c346d7 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/FormulaWizard.js @@ -0,0 +1,440 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2020 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * FormulaWizard.js + * + * Created by Julia Radzhabova on 17.04.20 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ + +define([ + 'common/main/lib/view/AdvancedSettingsWindow', + 'common/main/lib/component/MetricSpinner' +], function () { 'use strict'; + + SSE.Views.FormulaWizard = Common.Views.AdvancedSettingsWindow.extend(_.extend({ + options: { + contentWidth: 580, + height: 397 + }, + + initialize : function(options) { + var me = this; + _.extend(this.options, { + title: this.textTitle, + template: [ + '
    ', + '
    ', + '
    ', + '', + '', + '', + '', + '
    ', + '', + '
    ', + '
    ', + '', + '
    ', + '
    ', + '
    ', + '', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + // '', + '', + '', + '', + '', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ' + ].join('') + }, options); + + this.props = this.options.props; + this.funcprops = this.options.funcprops; + this.api = this.options.api; + this.lang = this.options.lang; + + this._noApply = false; + this.args = []; + this.repeatedArg = undefined; + this.helpUrl = undefined; + this.minArgCount = 1; + this.maxArgCount = 1; + this.minArgWidth = 50; + + Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); + }, + + render: function() { + Common.Views.AdvancedSettingsWindow.prototype.render.call(this); + + var $window = this.getChild(); + $window.find('input').on('keypress', _.bind(this.onKeyPress, this)); + + this.contentPanel = $window.find('.content-panel'); + this.innerPanel = $window.find('.inner-content'); + + this.panelArgs = $window.find('#formula-wizard-panel-args'); + this.tableArgs = $window.find('#formula-wizard-tbl-args'); + this.panelDesc = $window.find('#formula-wizard-panel-desc'); + this.lblArgDesc = $window.find('#formula-wizard-arg-desc'); + this.lblFormulaResult = $window.find('#formula-wizard-value'); + this.lblFunctionResult = $window.find('#formula-wizard-lbl-val-func'); + + this._preventCloseCellEditor = false; + + this.afterRender(); + }, + + afterRender: function() { + this._setDefaults(); + }, + + _handleInput: function(state) { + if (this.options.handler) + this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined); + this._preventCloseCellEditor = (state == 'ok'); + this.close(); + }, + + onDlgBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + onKeyPress: function(event) { + if (event.keyCode == Common.UI.Keys.RETURN) { + this._handleInput('ok'); + } + }, + + onPrimary: function() { + this._handleInput('ok'); + return false; + }, + + _setDefaults: function () { + var me = this; + if (this.funcprops) { + var props = this.funcprops; + props.args ? $('#formula-wizard-args').html('' + props.name + '' + props.args) : $('#formula-wizard-args').addClass('hidden'); + props.desc ? $('#formula-wizard-desc').text(props.desc) : $('#formula-wizard-desc').addClass('hidden'); + props.name ? $('#formula-wizard-name').html(this.textFunction + ': ' + props.name) : $('#formula-wizard-name').addClass('hidden'); + + this.$window.find('#formula-wizard-help').on('click', function (e) { + me.showHelp(); + }) + } + this.recalcArgTableSize(); + this.minArgWidth = this.$window.find('#formula-wizard-lbl-func-res').width(); + + if (this.props) { + // fill arguments + var props = this.props; + this.minArgCount = props.asc_getArgumentMin(); + this.maxArgCount = props.asc_getArgumentMax(); + + var result = props.asc_getFunctionResult(); + this.lblFunctionResult.html('= ' + ((result!==undefined && result!==null) ? result : '')); + result = props.asc_getFormulaResult(); + this.lblFormulaResult.html('' + this.textValue + ': ' + ((result!==undefined && result!==null)? result : '')); + + var argres = props.asc_getArgumentsResult(), + argtype = props.asc_getArgumentsType(), + argval = props.asc_getArgumentsValue(); + + if (argtype) { + for (var i=0; i
    ' + + '
    ' + + '
    ', + div = $(Common.Utils.String.format(argtpl, argcount)); + this.tableArgs.append(div); + + var txt = new Common.UI.InputFieldBtn({ + el: div.find('#formula-wizard-txt-arg'+argcount), + index: argcount, + validateOnChange: true, + validateOnBlur: false + }).on('changed:after', function(input, newValue, oldValue, e) { + }).on('changing', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + me.onInputChanging(input, newValue, oldValue); + }).on('button:click', _.bind(this.onSelectData, this)); + txt.setValue((argval!==undefined && argval!==null) ? argval : ''); + txt._input.on('focus', _.bind(this.onSelectArgument, this, txt)); + + me.args.push({ + index: argcount, + lblName: div.find('#formula-wizard-lbl-name-arg'+argcount), + lblValue: div.find('#formula-wizard-lbl-val-arg'+argcount), + argInput: txt, + argName: 'Argument ' + (argcount+1), + // argDesc: 'some argument description', + argType: argtype, + argTypeName: me.getArgType(argtype) + }); + if (argcount' + me.args[argcount].argName + ''); + else + me.args[argcount].lblName.html(me.args[argcount].argName); + me.args[argcount].lblValue.html('= '+ ( argres!==null && argres!==undefined ? argres : '' + me.args[argcount].argTypeName + '')); + }, + + onInputChanging: function(input, newValue, oldValue, e) { + var me = this, + index = input.options.index, + arg = me.args[index]; + var res = me.api.asc_insertArgumentsInFormula(me.getArgumentsValue(), index, arg.argType, this.funcprops ? this.funcprops.origin : undefined), + argres = res ? res.asc_getArgumentsResult() : undefined; + argres = argres ? argres[index] : undefined; + arg.lblValue.html('= '+ (argres!==null && argres !==undefined ? argres : '' + arg.argTypeName + '' )); + + var result = res ? res.asc_getFunctionResult() : undefined; + me.lblFunctionResult.html('= ' + ((result!==undefined && result!==null)? result : '')); + result = res ? res.asc_getFormulaResult() : undefined; + me.lblFormulaResult.html('' + me.textValue + ': ' + ((result!==undefined && result!==null)? result : '')); + }, + + getArgumentsValue: function() { + var res = [], + len = this.args.length, + empty = true; + for (var i=len-1; i>=0; i--) { + var val = this.args[i].argInput.getValue(); + empty && (empty = !val); + (!empty) && (res[i] = val); + } + return res; + }, + + getArgType: function(type) { + var str = ''; + switch (type) { + case Asc.c_oAscFormulaArgumentType.number: + str = 'number'; + break; + case Asc.c_oAscFormulaArgumentType.text: + str = 'text'; + break; + case Asc.c_oAscFormulaArgumentType.reference: + str = 'reference'; + break; + case Asc.c_oAscFormulaArgumentType.any: + str = 'any'; + break; + case Asc.c_oAscFormulaArgumentType.logical: + str = 'logical'; + break; + } + return str; + }, + + onSelectArgument: function(input) { + var index = input.options.index, + arg = this.args[index]; + arg.argDesc ? this.lblArgDesc.html('' + arg.argName + ': ' + arg.argDesc) : this.lblArgDesc.addClass('hidden'); + if (!this._noApply && index==this.args.length-1 && this.repeatedArg && index+this.repeatedArg.length', + '
    ', + '', + '
    ', + '
    ', + '
    ' + ].join(''); + + this.options.tpl = _.template(this.template)(this.options); + this.props = this.options.props; + this.handler = this.options.handler; + + Common.UI.Window.prototype.initialize.call(this, this.options); + }, + render: function () { + Common.UI.Window.prototype.render.call(this); + + this.columnsList = new Common.UI.ListView({ + el: $('#add-slicers-dlg-columns', this.$window), + store: new Common.UI.DataViewStore(), + simpleAddMode: true, + scrollAlwaysVisible: true, + template: _.template(['
    '].join('')), + itemTemplate: _.template([ + '
    ', + '
    ' + ].join('')) + }); + this.columnsList.on({ + 'item:change': this.onItemChanged.bind(this), + 'item:add': this.onItemChanged.bind(this), + 'item:select': this.onCellCheck.bind(this) + }); + this.columnsList.onKeyDown = _.bind(this.onListKeyDown, this); + + this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); + this.afterRender(); + }, + + updateColumnsList: function(props) { + var arr = []; + if (props && props.length>0) { + this.props.forEach(function (item, index) { + arr.push(new Common.UI.DataViewModel({ + id : index, + selected : false, + allowSelected : true, + value : item, + check : false + })); + }); + + this.columnsList.store.reset(arr); + this.columnsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true}); + } + }, + + onItemChanged: function (view, record) { + var state = record.model.get('check'); + if ( state == 'indeterminate' ) + $('input[type=checkbox]', record.$el).prop('indeterminate', true); + else $('input[type=checkbox]', record.$el).prop({checked: state, indeterminate: false}); + }, + + onCellCheck: function (listView, itemView, record) { + if (this.checkCellTrigerBlock) + return; + + var target = '', isLabel = false, bound = null; + + var event = window.event ? window.event : window._event; + if (event) { + target = $(event.currentTarget).find('.list-item'); + + if (target.length) { + bound = target.get(0).getBoundingClientRect(); + var _clientX = event.clientX*Common.Utils.zoom(), + _clientY = event.clientY*Common.Utils.zoom(); + if (bound.left < _clientX && _clientX < bound.right && + bound.top < _clientY && _clientY < bound.bottom) { + isLabel = true; + } + } + + if (isLabel || event.target.className.match('checkbox')) { + this.updateCellCheck(listView, record); + + _.delay(function () { + listView.$el.find('.listview').focus(); + }, 100, this); + } + } + }, + + onListKeyDown: function (e, data) { + var record = null, listView = this.columnsList; + + if (listView.disabled) return; + if (_.isUndefined(undefined)) data = e; + + if (data.keyCode == Common.UI.Keys.SPACE) { + data.preventDefault(); + data.stopPropagation(); + + this.updateCellCheck(listView, listView.getSelectedRec()); + + } else { + Common.UI.DataView.prototype.onKeyDown.call(this.columnsList, e, data); + } + }, + + updateCellCheck: function (listView, record) { + if (record && listView) { + record.set('check', !record.get('check')); + // listView.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true}); + } + }, + + afterRender: function() { + this._setDefaults(this.props); + }, + + _setDefaults: function (props) { + if (props) { + this.updateColumnsList(props); + } + }, + + getSettings: function () { + var store = this.columnsList.store, + props = []; + store.each(function(item, index) { + item.get('check') && (props.push(item.get('value'))); + }); + return props; + }, + + onBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + onDblClickFormat: function () { + this._handleInput('ok'); + }, + + onPrimary: function(event) { + this._handleInput('ok'); + return false; + }, + + _handleInput: function(state) { + if (this.options.handler) { + this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : this.props); + } + + this.close(); + }, + + // + txtTitle: 'Insert Slicers', + textColumns: 'Columns' + + }, SSE.Views.SlicerAddDialog || {})); +}); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/SlicerSettings.js b/apps/spreadsheeteditor/main/app/view/SlicerSettings.js new file mode 100644 index 000000000..2614c95b2 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/SlicerSettings.js @@ -0,0 +1,761 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2020 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * SlicerSettings.js + * + * Created by Julia Radzhabova on 5/26/20 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ +define([ + 'text!spreadsheeteditor/main/app/template/SlicerSettings.template', + 'jquery', + 'underscore', + 'backbone', + 'common/main/lib/component/Button', + 'common/main/lib/component/MetricSpinner', + 'spreadsheeteditor/main/app/view/SlicerSettingsAdvanced' +], function (menuTemplate, $, _, Backbone) { + 'use strict'; + + SSE.Views.SlicerSettings = Backbone.View.extend(_.extend({ + el: '#id-slicer-settings', + + // Compile our stats template + template: _.template(menuTemplate), + + // Delegated events for creating new items, and clearing completed ones. + events: { + }, + + options: { + alias: 'SlicerSettings' + }, + + initialize: function () { + this._initSettings = true; + + this._nRatio = 1; + this._state = { + Width: 0, + Height: 0, + DisabledControls: false, + keepRatio: false, + ColCount: 0, + ColWidth: 0, + ColHeight: 0, + PosVert: 0, + PosHor: 0, + PosLocked: false, + SortOrder: undefined, + IndNoData: false, + ShowNoData: false, + HideNoData: false, + DisabledSizeControls: false + }; + this.spinners = []; + this.lockedControls = []; + this.sizeControls = []; + this._locked = false; + + this._noApply = false; + this._originalProps = null; + this.styles = null; + + this.render(); + }, + + render: function () { + var el = $(this.el); + el.html(this.template({ + scope: this + })); + + this.linkAdvanced = $('#slicer-advanced-link'); + }, + + setApi: function(api) { + if ( api == undefined ) return; + this.api = api; + this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this)); + return this; + }, + + setMode: function(mode) { + this.mode = mode; + }, + + updateMetricUnit: function() { + if (this.spinners) { + for (var i=0; i0) { + this._nRatio = this.spnWidth.getNumberValue()/this.spnHeight.getNumberValue(); + } + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_putLockAspect(btn.pressed); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, this)); + + this.spnWidth.on('change', _.bind(this.onWidthChange, this)); + this.spnHeight.on('change', _.bind(this.onHeightChange, this)); + this.spnWidth.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + this.spnHeight.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.spnHor = new Common.UI.MetricSpinner({ + el: $('#slicer-spin-hor'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.spinners.push(this.spnHor); + this.sizeControls.push(this.spnHor); + + this.spnVert = new Common.UI.MetricSpinner({ + el: $('#slicer-spin-vert'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.spinners.push(this.spnVert); + this.sizeControls.push(this.spnVert); + + this.spnHor.on('change', _.bind(this.onHorChange, this)); + this.spnVert.on('change', _.bind(this.onVertChange, this)); + this.spnHor.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + this.spnVert.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.chLock = new Common.UI.CheckBox({ + el: $('#slicer-checkbox-disable-resize'), + labelText: this.textLock, + disabled: this._locked + }); + this.lockedControls.push(this.chLock); + this.chLock.on('change', this.onLockSlicerChange.bind(this)); + + this.spnColWidth = new Common.UI.MetricSpinner({ + el: $('#slicer-spin-col-width'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.spinners.push(this.spnColWidth); + this.sizeControls.push(this.spnColWidth); + + this.spnColHeight = new Common.UI.MetricSpinner({ + el: $('#slicer-spin-col-height'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.spinners.push(this.spnColHeight); + this.sizeControls.push(this.spnColHeight); + + this.numCols = new Common.UI.MetricSpinner({ + el: $('#slicer-spin-cols'), + step: 1, + width: 50, + defaultUnit : "", + defaultValue : 1, + value: '1', + allowDecimal: false, + maxValue: 20000, + minValue: 1 + }); + this.sizeControls.push(this.numCols); + + this.spnColWidth.on('change', _.bind(this.onColWidthChange, this)); + this.spnColHeight.on('change', _.bind(this.onColHeightChange, this)); + this.numCols.on('change', _.bind(this.onColChange, this)); + this.spnColWidth.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + this.spnColHeight.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + this.numCols.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + // Sorting & Filtering + + this.radioAsc = new Common.UI.RadioBox({ + el: $('#slicer-radio-asc'), + name: 'asc-radio-sliceradv-sort', + labelText: this.textAsc + ' (' + this.textAZ + ')', + checked: true + }); + this.radioAsc.on('change', _.bind(function(field, newValue, eOpts) { + if (newValue && this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setSortOrder(Asc.ST_tabularSlicerCacheSortOrder.Ascending); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + } + }, this)); + this.lockedControls.push(this.radioAsc); + + this.radioDesc = new Common.UI.RadioBox({ + el: $('#slicer-radio-desc'), + name: 'asc-radio-sliceradv-sort', + labelText: this.textDesc + ' (' + this.textZA + ')', + checked: false + }); + this.radioDesc.on('change', _.bind(function(field, newValue, eOpts) { + if (newValue && this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setSortOrder(Asc.ST_tabularSlicerCacheSortOrder.Descending); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + } + }, this)); + this.lockedControls.push(this.radioDesc); + + this.chHideNoData = new Common.UI.CheckBox({ + el: $('#slicer-check-hide-nodata'), + labelText: this.strHideNoData + }); + this.chHideNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + if (this._originalProps && this.api) { + this._originalProps.asc_getSlicerProperties().asc_setHideItemsWithNoData(checked); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + }, this)); + this.lockedControls.push(this.chHideNoData); + + this.chIndNoData = new Common.UI.CheckBox({ + el: $('#slicer-check-indicate-nodata'), + labelText: this.strIndNoData + }); + this.chIndNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + if (this._originalProps && this.api) { + this._originalProps.asc_getSlicerProperties().asc_setIndicateItemsWithNoData(checked); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + }, this)); + this.lockedControls.push(this.chIndNoData); + + this.chShowNoData = new Common.UI.CheckBox({ + el: $('#slicer-check-show-nodata-last'), + disabled: true, + labelText: this.strShowNoData + }); + this.chShowNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (this._originalProps && this.api) { + this._originalProps.asc_getSlicerProperties().asc_setShowItemsWithNoDataLast(field.getValue()=='checked'); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + }, this)); + this.lockedControls.push(this.chShowNoData); + + this.chShowDel = new Common.UI.CheckBox({ + el: $('#slicer-check-show-deleted'), + labelText: this.strShowDel + }); + this.chShowDel.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + // if (this._originalProps && this.api) { + // this._originalProps.asc_getSlicerProperties().asc_setIndicateItemsWithNoData(field.getValue()=='checked'); + // this.api.asc_setGraphicObjectProps(this._originalProps); + // } + }, this)); + this.lockedControls.push(this.chShowDel); + + $(this.el).on('click', '#slicer-advanced-link', _.bind(this.openAdvancedSettings, this)); + }, + + createDelayedElements: function() { + this.createDelayedControls(); + this.updateMetricUnit(); + this._initSettings = false; + }, + + onSendThemeColors: function() { + // get new table templates + if (this.mnuSlicerPicker && this._originalProps) { + this.onInitStyles(this._originalProps.asc_getSlicerProperties().asc_getStylesPictures()); + this.mnuSlicerPicker.scroller.update({alwaysVisibleY: true}); + } + }, + + openAdvancedSettings: function(e) { + if (this.linkAdvanced.hasClass('disabled')) return; + + var me = this; + var win; + if (me.api && !this._locked){ + var selectedElements = me.api.asc_getGraphicObjectProps(); + if (selectedElements && selectedElements.length>0){ + var elType, elValue; + for (var i = selectedElements.length - 1; i >= 0; i--) { + elType = selectedElements[i].asc_getObjectType(); + elValue = selectedElements[i].asc_getObjectValue(); + if (Asc.c_oAscTypeSelectElement.Image == elType) { + (new SSE.Views.SlicerSettingsAdvanced( + { + imageProps: elValue, + api: me.api, + styles: me.styles || me._originalProps.asc_getSlicerProperties().asc_getStylesPictures(), + handler: function(result, value) { + if (result == 'ok') { + if (me.api) { + me.api.asc_setGraphicObjectProps(value.imageProps); + } + } + Common.NotificationCenter.trigger('edit:complete', me); + } + })).show(); + break; + } + } + } + } + }, + + ChangeSettings: function(props) { + if (this._initSettings) + this.createDelayedElements(); + + if (props ){ + this._originalProps = new Asc.asc_CImgProperty(props); + + var value = props.asc_getWidth(); + if ( Math.abs(this._state.Width-value)>0.001 || + (this._state.Width===null || value===null)&&(this._state.Width!==value)) { + this.spnWidth.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true); + this._state.Width = value; + } + + value = props.asc_getHeight(); + if ( Math.abs(this._state.Height-value)>0.001 || + (this._state.Height===null || value===null)&&(this._state.Height!==value)) { + this.spnHeight.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true); + this._state.Height = value; + } + + if (props.asc_getHeight()>0) + this._nRatio = props.asc_getWidth()/props.asc_getHeight(); + + value = props.asc_getLockAspect(); + if (this._state.keepRatio!==value) { + this.btnRatio.toggle(value); + this._state.keepRatio=value; + } + + value = props.get_Position(); + if (value) { + var Position = {X: value.get_X(), Y: value.get_Y()}; + this.spnHor.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true); + this.spnVert.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true); + } else { + this.spnHor.setValue('', true); + this.spnVert.setValue('', true); + } + + var slicerprops = props.asc_getSlicerProperties(); + this.disableControls(this._locked, slicerprops ? slicerprops.asc_getLockedPosition() : false); + + if (slicerprops) { + value = slicerprops.asc_getColumnCount(); + if ( Math.abs(this._state.ColCount-value)>0.1 || + (this._state.ColCount===null || value===null)&&(this._state.ColCount!==value)) { + this.numCols.setValue((value!==null) ? value : '', true); + this._state.ColCount = value; + } + + value = slicerprops.asc_getButtonWidth()/36000; + if ( Math.abs(this._state.ColWidth-value)>0.001 || + (this._state.ColWidth===null || value===null)&&(this._state.ColWidth!==value)) { + this.spnColWidth.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true); + this._state.ColWidth = value; + } + + value = slicerprops.asc_getRowHeight()/36000; + if ( Math.abs(this._state.ColHeight-value)>0.001 || + (this._state.ColHeight===null || value===null)&&(this._state.ColHeight!==value)) { + this.spnColHeight.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true); + this._state.ColHeight = value; + } + + if (!this.btnSlicerStyle) + this.onInitStyles(slicerprops.asc_getStylesPictures()); + value = slicerprops.asc_getStyle(); + if (this._state.StyleType!==value || this._isTemplatesChanged) { + var rec = this.mnuSlicerPicker.store.findWhere({type: value}); + if (!rec) { + rec = this.mnuSlicerPicker.store.at(0); + } + this.btnSlicerStyle.suspendEvents(); + this.mnuSlicerPicker.selectRecord(rec, true); + this.btnSlicerStyle.resumeEvents(); + this.$el.find('.icon-template-slicer').css({'background-image': 'url(' + rec.get("imageUrl") + ')', 'height': '49px', 'width': '36px', 'background-position': 'center', 'background-size': 'cover'}); + this._state.StyleType=value; + } + this._isTemplatesChanged = false; + + value = slicerprops.asc_getLockedPosition(); + this.chLock.setValue((value !== null && value !== undefined) ? !!value : 'indeterminate', true); + + // depends of data type + // this.radioAsc.setCaption(this.textAsc + ' (' + this.textAZ + ')' ); + // this.radioDesc.setCaption(this.textDesc + ' (' + this.textZA + ')' ); + value = slicerprops.asc_getSortOrder(); + (value==Asc.ST_tabularSlicerCacheSortOrder.Ascending) ? this.radioAsc.setValue(true, true) : this.radioDesc.setValue(true, true); + + value = slicerprops.asc_getIndicateItemsWithNoData(); + if ( this._state.IndNoData!==value ) { + this.chIndNoData.setValue((value !== null && value !== undefined) ? !!value : 'indeterminate', true); + this._state.IndNoData=value; + } + + value = slicerprops.asc_getShowItemsWithNoDataLast(); + if ( this._state.ShowNoData!==value ) { + this.chShowNoData.setValue((value !== null && value !== undefined) ? !!value : 'indeterminate', true); + this._state.ShowNoData=value; + } + + value = slicerprops.asc_getHideItemsWithNoData(); + if ( this._state.HideNoData!==value ) { + this.chHideNoData.setValue((value !== null && value !== undefined) ? !!value : 'indeterminate', true); + this._state.HideNoData=value; + } + + this.chIndNoData.setDisabled(value || this._locked); + this.chShowNoData.setDisabled(value || (this.chIndNoData.getValue()!='checked') || this._locked); + this.chShowDel.setDisabled(value || this._locked); + + // value = slicerprops.asc_getShowDeleted(); + // if ( this._state.ShowDel!==value ) { + // this.chShowDel.setValue((value !== null && value !== undefined) ? !!value : 'indeterminate', true); + // this._state.ShowDel=value; + // } + } + } + }, + + onWidthChange: function(field, newValue, oldValue, eOpts){ + var w = field.getNumberValue(); + var h = this.spnHeight.getNumberValue(); + if (this.btnRatio.pressed) { + h = w/this._nRatio; + if (h>this.spnHeight.options.maxValue) { + h = this.spnHeight.options.maxValue; + w = h * this._nRatio; + this.spnWidth.setValue(w, true); + } + this.spnHeight.setValue(h, true); + } + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_putWidth(Common.Utils.Metric.fnRecalcToMM(w)); + this._originalProps.asc_putHeight(Common.Utils.Metric.fnRecalcToMM(h)); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onHeightChange: function(field, newValue, oldValue, eOpts){ + var h = field.getNumberValue(), w = this.spnWidth.getNumberValue(); + if (this.btnRatio.pressed) { + w = h * this._nRatio; + if (w>this.spnWidth.options.maxValue) { + w = this.spnWidth.options.maxValue; + h = w/this._nRatio; + this.spnHeight.setValue(h, true); + } + this.spnWidth.setValue(w, true); + } + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_putWidth(Common.Utils.Metric.fnRecalcToMM(w)); + this._originalProps.asc_putHeight(Common.Utils.Metric.fnRecalcToMM(h)); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onHorChange: function(field, newValue, oldValue, eOpts){ + var Position = new Asc.CPosition(); + if (field.getValue() !== '') + Position.put_X(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + if (this.spnVert.getValue() !== '') + Position.put_Y(Common.Utils.Metric.fnRecalcToMM(this.spnVert.getNumberValue())); + + if (this.api) { + if (this._originalProps) { + this._originalProps.put_Position(Position); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onVertChange: function(field, newValue, oldValue, eOpts){ + var Position = new Asc.CPosition(); + if (this.spnHor.getValue() !== '') + Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnHor.getNumberValue())); + if (field.getValue() !== '') + Position.put_Y(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + + if (this.api) { + if (this._originalProps) { + this._originalProps.put_Position(Position); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onColWidthChange: function(field, newValue, oldValue, eOpts){ + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setButtonWidth(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())*36000); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onColHeightChange: function(field, newValue, oldValue, eOpts){ + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setRowHeight(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())*36000); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onColChange: function(field, newValue, oldValue, eOpts){ + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setColumnCount(field.getNumberValue()); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onInitStyles: function(Templates){ + var self = this; + this._isTemplatesChanged = true; + this.styles = Templates; + + if (!this.btnSlicerStyle) { + this.btnSlicerStyle = new Common.UI.Button({ + cls : 'btn-large-dataview sheet-template-slicer', + iconCls : 'icon-template-slicer', + menu : new Common.UI.Menu({ + style: 'width: 333px;', + items: [ + { template: _.template('') } + ] + }) + }); + this.btnSlicerStyle.on('render:after', function(btn) { + self.mnuSlicerPicker = new Common.UI.DataView({ + el: $('#id-slicer-menu-style'), + parentMenu: btn.menu, + restoreHeight: 325, + groups: new Common.UI.DataViewGroupStore(), + store: new Common.UI.DataViewStore(), + itemTemplate: _.template('
    '), + style: 'max-height: 325px;' + }); + }); + this.btnSlicerStyle.render($('#slicer-btn-style')); + this.lockedControls.push(this.btnSlicerStyle); + this.mnuSlicerPicker.on('item:click', _.bind(this.onSelectSlicerStyle, this, this.btnSlicerStyle)); + if (this._locked) this.btnSlicerStyle.setDisabled(this._locked); + } + + if (Templates) { + var count = self.mnuSlicerPicker.store.length; + if (count>0 && count==Templates.length) { + var data = self.mnuSlicerPicker.store.models; + _.each(Templates, function(template, index){ + data[index].set('imageUrl', template.asc_getImage()); + }); + } else { + var arr = []; + _.each(Templates, function(template){ + arr.push({ + id : Common.UI.getId(), + type : template.asc_getName(), + imageUrl : template.asc_getImage(), + allowSelected : true, + selected : false + }); + }); + self.mnuSlicerPicker.store.reset(arr); + } + } + this.btnSlicerStyle.setDisabled(this.mnuSlicerPicker.store.length<1 || this._locked); + }, + + onSelectSlicerStyle: function(btn, picker, itemView, record) { + if (this._noApply) return; + + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setStyle(record.get('type')); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + onLockSlicerChange: function(field, newValue, oldValue, eOpts){ + if (this.api) { + if (this._originalProps) { + this._originalProps.asc_getSlicerProperties().asc_setLockedPosition(field.getValue()=='checked'); + this.api.asc_setGraphicObjectProps(this._originalProps); + } + } + Common.NotificationCenter.trigger('edit:complete', this); + }, + + setLocked: function (locked) { + this._locked = locked; + }, + + disableControls: function(disable, disableSize) { + if (this._initSettings) return; + + this.disableSizeControls(disable || disableSize); + if (this._state.DisabledControls!==disable) { + this._state.DisabledControls = disable; + _.each(this.lockedControls, function(item) { + item.setDisabled(disable); + }); + this.linkAdvanced.toggleClass('disabled', disable); + } + }, + + disableSizeControls: function(disable) { + if (this._state.DisabledSizeControls!==disable) { + this._state.DisabledSizeControls = disable; + _.each(this.sizeControls, function(item) { + item.setDisabled(disable); + }); + } + }, + + textKeepRatio: 'Constant Proportions', + textSize: 'Size', + textWidth: 'Width', + textHeight: 'Height', + textAdvanced: 'Show advanced settings', + textPosition: 'Position', + textHor: 'Horizontal', + textVert: 'Vertical', + textButtons: 'Buttons', + textColumns: 'Columns', + textStyle: 'Style', + textLock: 'Disable resizing or moving', + strSorting: 'Sorting and filtering', + textAsc: 'Ascending', + textDesc: 'Descending', + textAZ: 'A to Z', + textZA: 'Z to A', + textOldNew: 'oldest to newest', + textNewOld: 'newest to oldest', + textSmallLarge: 'smallest to largest', + textLargeSmall: 'largest to smallest', + strHideNoData: 'Hide items with no data', + strIndNoData: 'Visually indicate items with no data', + strShowNoData: 'Show items with no data last', + strShowDel: 'Show items deleted from the data source' + + }, SSE.Views.SlicerSettings || {})); +}); + diff --git a/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js new file mode 100644 index 000000000..c749b5efd --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js @@ -0,0 +1,569 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2020 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * SlicerSettingsAdvanced.js + * + * Created by Julia Radzhabova on 14.04.2020 + * Copyright (c) 2018 Ascensio System SIA. All rights reserved. + * + */ + +define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template', + 'common/main/lib/view/AdvancedSettingsWindow', + 'common/main/lib/component/MetricSpinner', + 'common/main/lib/component/CheckBox', + 'common/main/lib/component/RadioBox', + 'common/main/lib/component/ComboDataView' +], function (contentTemplate) { + 'use strict'; + + SSE.Views.SlicerSettingsAdvanced = Common.Views.AdvancedSettingsWindow.extend(_.extend({ + options: { + contentWidth: 330, + height: 435, + toggleGroup: 'slicer-adv-settings-group', + storageName: 'sse-slicer-settings-adv-category' + }, + + initialize : function(options) { + var me = this; + _.extend(this.options, { + title: this.textTitle, + items: [ + {panelId: 'id-adv-slicer-style', panelCaption: this.strStyleSize}, + {panelId: 'id-adv-slicer-sorting', panelCaption: this.strSorting}, + {panelId: 'id-adv-slicer-references', panelCaption: this.strReferences}, + {panelId: 'id-adv-slicer-snap', panelCaption: this.textSnap}, + {panelId: 'id-adv-slicer-alttext', panelCaption: this.textAlt} + ], + contentTemplate: _.template(contentTemplate)({ + scope: this + }) + }, options); + Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); + + this._changedProps = null; + this._noApply = true; + this.spinners = []; + this._nRatio = 1; + + this._originalProps = this.options.imageProps; + }, + + render: function() { + Common.Views.AdvancedSettingsWindow.prototype.render.call(this); + + var me = this; + + // Style & Size + this.inputHeader = new Common.UI.InputField({ + el : $('#sliceradv-text-header'), + allowBlank : false, + blankError : me.txtEmpty, + style : 'width: 178px;' + }).on('changed:after', function() { + me.isCaptionChanged = true; + }); + + this.chHeader = new Common.UI.CheckBox({ + el: $('#sliceradv-checkbox-header'), + labelText: this.strShowHeader + }); + this.chHeader.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (this._changedProps) { + this._changedProps.asc_setShowCaption(field.getValue()=='checked'); + } + }, this)); + + this.btnSlicerStyle = new Common.UI.Button({ + parentEl: $('#sliceradv-btn-style'), + cls : 'btn-large-dataview sheet-template-slicer', + iconCls : 'icon-template-slicer', + menu : new Common.UI.Menu({ + style: 'width: 333px;', + additionalAlign: this.menuAddAlign, + items: [ + { template: _.template('') } + ] + }) + }); + this.mnuSlicerPicker = new Common.UI.DataView({ + el: $('#sliceradv-menu-style'), + parentMenu: this.btnSlicerStyle.menu, + restoreHeight: 325, + groups: new Common.UI.DataViewGroupStore(), + store: new Common.UI.DataViewStore(), + itemTemplate: _.template('
    '), + style: 'max-height: 325px;' + }); + this.mnuSlicerPicker.on('item:click', _.bind(this.onSelectSlicerStyle, this, this.btnSlicerStyle)); + + this.numWidth = new Common.UI.MetricSpinner({ + el: $('#sliceradv-spin-width'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.numWidth.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (this.btnRatio.pressed) { + var w = field.getNumberValue(); + var h = w/this._nRatio; + if (h>this.numHeight.options.maxValue) { + h = this.numHeight.options.maxValue; + w = h * this._nRatio; + this.numWidth.setValue(w, true); + } + this.numHeight.setValue(h, true); + } + if (this._originalProps) { + this._originalProps.put_Width(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this._originalProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.numHeight.getNumberValue())); + } + }, this)); + this.spinners.push(this.numWidth); + + this.numHeight = new Common.UI.MetricSpinner({ + el: $('#sliceradv-spin-height'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.numHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var h = field.getNumberValue(), w = null; + if (this.btnRatio.pressed) { + w = h * this._nRatio; + if (w>this.numWidth.options.maxValue) { + w = this.numWidth.options.maxValue; + h = w/this._nRatio; + this.numHeight.setValue(h, true); + } + this.numWidth.setValue(w, true); + } + if (this._originalProps) { + this._originalProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.numWidth.getNumberValue())); + this._originalProps.put_Height(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + } + }, this)); + this.spinners.push(this.numHeight); + + this.btnRatio = new Common.UI.Button({ + parentEl: $('#sliceradv-button-ratio'), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon advanced-btn-ratio', + style: 'margin-bottom: 1px;', + enableToggle: true, + hint: this.textKeepRatio + }); + this.btnRatio.on('click', _.bind(function(btn, e) { + if (btn.pressed && this.numHeight.getNumberValue()>0) { + this._nRatio = this.numWidth.getNumberValue()/this.numHeight.getNumberValue(); + } + if (this._originalProps) { + this._originalProps.asc_putLockAspect(btn.pressed); + } + }, this)); + + this.numColHeight = new Common.UI.MetricSpinner({ + el: $('#sliceradv-spin-col-height'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 5963.9, + minValue: 0 + }); + this.numColHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var numval = field.getNumberValue(); + if (this._changedProps) { + this._changedProps.asc_setRowHeight(Common.Utils.Metric.fnRecalcToMM(numval)*36000); + } + }, this)); + this.spinners.push(this.numColHeight); + + this.numCols = new Common.UI.MetricSpinner({ + el: $('#sliceradv-spin-columns'), + step: 1, + width: 85, + defaultUnit : "", + defaultValue : 1, + value: '1', + allowDecimal: false, + maxValue: 20000, + minValue: 1 + }); + this.numCols.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var numval = field.getNumberValue(); + if (this._changedProps) { + this._changedProps.asc_setColumnCount(numval); + } + }, this)); + + // Sorting & Filtering + + this.radioAsc = new Common.UI.RadioBox({ + el: $('#sliceradv-radio-asc'), + name: 'asc-radio-sliceradv-sort', + labelText: this.textAsc, + checked: true + }); + this.radioAsc.on('change', _.bind(function(field, newValue, eOpts) { + if (newValue) { + if (this._changedProps) { + this._changedProps.asc_setSortOrder(Asc.ST_tabularSlicerCacheSortOrder.Ascending); + } + } + }, this)); + + this.radioDesc = new Common.UI.RadioBox({ + el: $('#sliceradv-radio-desc'), + name: 'asc-radio-sliceradv-sort', + labelText: this.textDesc, + checked: false + }); + this.radioDesc.on('change', _.bind(function(field, newValue, eOpts) { + if (newValue) { + if (this._changedProps) { + this._changedProps.asc_setSortOrder(Asc.ST_tabularSlicerCacheSortOrder.Descending); + } + } + }, this)); + + this.chHideNoData = new Common.UI.CheckBox({ + el: $('#sliceradv-check-hide-nodata'), + labelText: this.strHideNoData + }); + this.chHideNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + this.chIndNoData.setDisabled(checked); + this.chShowNoData.setDisabled(checked || (this.chIndNoData.getValue()!='checked')); + this.chShowDel.setDisabled(checked); + if (this._changedProps) { + this._changedProps.asc_setHideItemsWithNoData(checked); + } + }, this)); + + this.chIndNoData = new Common.UI.CheckBox({ + el: $('#sliceradv-check-indicate-nodata'), + labelText: this.strIndNoData + }); + this.chIndNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + this.chShowNoData.setDisabled(!checked); + if (this._changedProps) { + this._changedProps.asc_setIndicateItemsWithNoData(checked); + } + }, this)); + + this.chShowNoData = new Common.UI.CheckBox({ + el: $('#sliceradv-check-show-nodata-last'), + disabled: true, + labelText: this.strShowNoData + }); + this.chShowNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (this._changedProps) { + this._changedProps.asc_setShowItemsWithNoDataLast(field.getValue()=='checked'); + } + }, this)); + + this.chShowDel = new Common.UI.CheckBox({ + el: $('#sliceradv-check-show-deleted'), + labelText: this.strShowDel + }); + this.chShowDel.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (this._changedProps) { + // this._changedProps.asc_putStrikeout(field.getValue()=='checked'); + } + }, this)); + + // References + + this.inputName = new Common.UI.InputField({ + el : $('#sliceradv-text-name'), + allowBlank : false, + blankError : me.txtEmpty, + style : 'width: 178px;' + }).on('changed:after', function() { + me.isNameChanged = true; + }); + + this.lblSource = $('#sliceradv-lbl-source'); + this.lblFormula = $('#sliceradv-lbl-formula'); + + // Snapping + this.radioTwoCell = new Common.UI.RadioBox({ + el: $('#slicer-advanced-radio-twocell'), + name: 'asc-radio-snap', + labelText: this.textTwoCell, + value: AscCommon.c_oAscCellAnchorType.cellanchorTwoCell + }); + this.radioTwoCell.on('change', _.bind(this.onRadioSnapChange, this)); + + this.radioOneCell = new Common.UI.RadioBox({ + el: $('#slicer-advanced-radio-onecell'), + name: 'asc-radio-snap', + labelText: this.textOneCell, + value: AscCommon.c_oAscCellAnchorType.cellanchorOneCell + }); + this.radioOneCell.on('change', _.bind(this.onRadioSnapChange, this)); + + this.radioAbsolute = new Common.UI.RadioBox({ + el: $('#slicer-advanced-radio-absolute'), + name: 'asc-radio-snap', + labelText: this.textAbsolute, + value: AscCommon.c_oAscCellAnchorType.cellanchorAbsolute + }); + this.radioAbsolute.on('change', _.bind(this.onRadioSnapChange, this)); + + // Alt Text + + this.inputAltTitle = new Common.UI.InputField({ + el : $('#sliceradv-alt-title'), + allowBlank : true, + validateOnBlur: false, + style : 'width: 100%;' + }).on('changed:after', function() { + me.isAltTitleChanged = true; + }); + + this.textareaAltDescription = this.$window.find('textarea'); + this.textareaAltDescription.keydown(function (event) { + if (event.keyCode == Common.UI.Keys.RETURN) { + event.stopPropagation(); + } + me.isAltDescChanged = true; + }); + + this.on('show', function(obj) { + obj.getChild('.footer .primary').focus(); + }); + + this.afterRender(); + }, + + getSettings: function() { + if (this.isCaptionChanged) + this._changedProps.asc_setCaption(this.inputHeader.getValue()); + if (this.isNameChanged) + this._changedProps.asc_setName(this.inputName.getValue()); + + if (this.isAltTitleChanged) + this._originalProps.asc_putTitle(this.inputAltTitle.getValue()); + + if (this.isAltDescChanged) + this._originalProps.asc_putDescription(this.textareaAltDescription.val()); + + return {imageProps: this._originalProps}; + }, + + _setDefaults: function(props) { + if (props){ + var value = props.asc_getWidth(); + this.numWidth.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value).toFixed(2) : '', true); + value = props.asc_getHeight(); + this.numHeight.setValue((value!==null) ? Common.Utils.Metric.fnRecalcFromMM(value).toFixed(2) : '', true); + + if (props.asc_getHeight()>0) + this._nRatio = props.asc_getWidth()/props.asc_getHeight(); + + value = props.asc_getLockAspect(); + this.btnRatio.toggle(value); + + value = props.asc_getTitle(); + this.inputAltTitle.setValue(value ? value : ''); + + value = props.asc_getDescription(); + this.textareaAltDescription.val(value ? value : ''); + + value = props.asc_getAnchor(); + switch (value) { + case AscCommon.c_oAscCellAnchorType.cellanchorTwoCell: + this.radioTwoCell.setValue(true, true); + break; + case AscCommon.c_oAscCellAnchorType.cellanchorOneCell: + this.radioOneCell.setValue(true, true); + break; + case AscCommon.c_oAscCellAnchorType.cellanchorAbsolute: + this.radioAbsolute.setValue(true, true); + break; + } + + var slicerprops = props.asc_getSlicerProperties(); + if (slicerprops) { + this._noApply = true; + + this.numCols.setValue(slicerprops.asc_getColumnCount(), true); + this.numColHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(slicerprops.asc_getRowHeight()/36000).toFixed(2), true); + + this.inputHeader.setValue(slicerprops.asc_getCaption(), true); + var checked = slicerprops.asc_getShowCaption(); + this.chHeader.setValue(checked !== null && checked !== undefined ? checked : 'indeterminate', true); + + // depends of data type + this.radioAsc.setCaption(this.textAsc + ' (' + this.textAZ + ')' ); + this.radioDesc.setCaption(this.textDesc + ' (' + this.textZA + ')' ); + (slicerprops.asc_getSortOrder()==Asc.ST_tabularSlicerCacheSortOrder.Ascending) ? this.radioAsc.setValue(true, true) : this.radioDesc.setValue(true, true); + + checked = slicerprops.asc_getIndicateItemsWithNoData(); + this.chIndNoData.setValue(checked !== null && checked !== undefined ? checked : 'indeterminate', true); + checked = slicerprops.asc_getShowItemsWithNoDataLast(); + this.chShowNoData.setValue(checked !== null && checked !== undefined ? checked : 'indeterminate', true); + checked = slicerprops.asc_getHideItemsWithNoData(); + this.chHideNoData.setValue(checked !== null && checked !== undefined ? checked : 'indeterminate', true); + + this.chIndNoData.setDisabled(checked); + this.chShowNoData.setDisabled(checked || (this.chIndNoData.getValue()!='checked')); + this.chShowDel.setDisabled(checked); + + this.inputName.setValue(slicerprops.asc_getName()); + this.lblSource.text(slicerprops.asc_getSourceName()); + this.lblFormula.text(slicerprops.asc_getNameInFormulas()); + + value = slicerprops.asc_getStyle(); + var rec = this.mnuSlicerPicker.store.findWhere({type: value}); + if (!rec && this.mnuSlicerPicker.store.length>0) { + rec = this.mnuSlicerPicker.store.at(0); + } + if (rec) { + this.btnSlicerStyle.suspendEvents(); + this.mnuSlicerPicker.selectRecord(rec, true); + this.btnSlicerStyle.resumeEvents(); + this.$window.find('.icon-template-slicer').css({'background-image': 'url(' + rec.get("imageUrl") + ')', 'height': '49px', 'width': '36px', 'background-position': 'center', 'background-size': 'cover'}); + } else + this.$window.find('.icon-template-slicer').css({'height': '49px', 'width': '36px', 'background-position': 'center', 'background-size': 'cover'}); + + this._noApply = false; + + this._changedProps = slicerprops; + } + } + }, + + updateMetricUnit: function() { + if (this.spinners) { + for (var i=0; iAre you sure you want to continue?', - textRemDuplicates: 'Remove duplicates' + textRemDuplicates: 'Remove duplicates', + textSlicer: 'Insert slicer' }, SSE.Views.TableSettings || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index e2ff01a99..44112ef06 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -92,7 +92,8 @@ define([ headerLock: 'header-lock', sheetLock: 'sheet-lock', noPivot: 'no-pivot', - noSubitems: 'no-subitems' + noSubitems: 'no-subitems', + noSlicerSource: 'no-slicer-source' }; SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({ @@ -630,6 +631,14 @@ define([ toggleGroup : 'textorientgroup', value : 'clockwise' }, + { + caption : me.textVertical, + iconCls : 'menu__icon text-orient-vertical', + checkable : true, + checkmark : false, + toggleGroup : 'textorientgroup', + value : 'vertical' + }, { caption : me.textRotateUp, iconCls : 'menu__icon text-orient-rup', @@ -733,6 +742,14 @@ define([ lock: [_set.selImage, _set.selChart, _set.selShape, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect] }); + me.btnInsertSlicer = new Common.UI.Button({ + id: 'tlbtn-insertslicer', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-slicer', + caption: me.capBtnInsSlicer, + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.multiselect, _set.noSlicerSource] + }); + me.btnTableTemplate = new Common.UI.Button({ id : 'id-toolbar-btn-ttempl', cls : 'btn-toolbar', @@ -1399,7 +1416,7 @@ define([ me.btnItalic, me.btnUnderline, me.btnStrikeout, me.btnSubscript, me.btnTextColor, me.btnAlignLeft, me.btnAlignCenter,me.btnAlignRight,me.btnAlignJust, me.btnAlignTop, me.btnAlignMiddle, me.btnAlignBottom, me.btnWrap, me.btnTextOrient, me.btnBackColor, me.btnInsertTable, - me.btnMerge, me.btnInsertFormula, me.btnNamedRange, me.btnIncDecimal, me.btnInsertShape, me.btnInsertEquation, me.btnInsertSymbol, + me.btnMerge, me.btnInsertFormula, me.btnNamedRange, me.btnIncDecimal, me.btnInsertShape, me.btnInsertEquation, me.btnInsertSymbol, me.btnInsertSlicer, me.btnInsertText, me.btnInsertTextArt, me.btnSortUp, me.btnSortDown, me.btnSetAutofilter, me.btnClearAutofilter, me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell, me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink, @@ -1576,6 +1593,7 @@ define([ _injectComponent('#slot-btn-instextart', this.btnInsertTextArt); _injectComponent('#slot-btn-insequation', this.btnInsertEquation); _injectComponent('#slot-btn-inssymbol', this.btnInsertSymbol); + _injectComponent('#slot-btn-insslicer', this.btnInsertSlicer); _injectComponent('#slot-btn-sortdesc', this.btnSortDown); _injectComponent('#slot-btn-sortasc', this.btnSortUp); _injectComponent('#slot-btn-setfilter', this.btnSetAutofilter); @@ -1657,6 +1675,7 @@ define([ _updateHint(this.btnInsertShape, this.tipInsertShape); _updateHint(this.btnInsertEquation, this.tipInsertEquation); _updateHint(this.btnInsertSymbol, this.tipInsertSymbol); + _updateHint(this.btnInsertSlicer, this.tipInsertSlicer); _updateHint(this.btnSortDown, this.txtSortAZ); _updateHint(this.btnSortUp, this.txtSortZA); _updateHint(this.btnSetAutofilter, this.txtFilter + ' (Ctrl+Shift+L)'); @@ -2398,6 +2417,9 @@ define([ tipInsertSymbol: 'Insert symbol', txtAutosumTip: 'Summation', capBtnPrintTitles: 'Print Titles', - tipPrintTitles: 'Print titles' + tipPrintTitles: 'Print titles', + capBtnInsSlicer: 'Slicer', + tipInsertSlicer: 'Insert slicer', + textVertical: 'Vertical Text' }, SSE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 41c2f353a..701e63c4f 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -814,6 +814,11 @@ "SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
    If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
    If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "SSE.Controllers.Main.txtMultiSelect": "Multi-Select (Alt+S)", + "SSE.Controllers.Main.txtClearFilter": "Clear Filter (Alt+C)", + "SSE.Controllers.Main.txtBlank": "(blank)", + "SSE.Controllers.Main.textHasMacros": "The file contains automatic macros.
    Do you want to run macros?", + "SSE.Controllers.Main.textRemember": "Remember my choice", "SSE.Controllers.Print.strAllSheets": "All Sheets", "SSE.Controllers.Print.textFirstCol": "First column", "SSE.Controllers.Print.textFirstRow": "First row", @@ -1255,6 +1260,9 @@ "SSE.Views.CellSettings.tipOuter": "Set outer border only", "SSE.Views.CellSettings.tipRight": "Set outer right border only", "SSE.Views.CellSettings.tipTop": "Set outer top border only", + "SSE.Views.CellSettings.textControl": "Text Control", + "SSE.Views.CellSettings.strWrap": "Wrap text", + "SSE.Views.CellSettings.strShrink": "Shrink to fit", "SSE.Views.ChartSettings.strLineWeight": "Line Weight", "SSE.Views.ChartSettings.strSparkColor": "Color", "SSE.Views.ChartSettings.strTemplate": "Template", @@ -1573,6 +1581,7 @@ "SSE.Views.DocumentHolder.txtWidth": "Width", "SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "SSE.Views.DocumentHolder.textFromStorage": "From Storage", + "SSE.Views.DocumentHolder.advancedSlicerText": "Slicer Advanced Settings", "SSE.Views.FieldSettingsDialog.strLayout": "Layout", "SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals", "SSE.Views.FieldSettingsDialog.textReport": "Report Form", @@ -1687,6 +1696,15 @@ "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strMacrosSettings": "Macros Settings", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacros": "Show Notification", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacros": "Enable All", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacros": "Disable All", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacrosDesc": "Disable all macros with notification", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacrosDesc": "Enable all macros without notification", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacrosDesc": "Disable all macros without notification", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strPaste": "Cut, copy and paste", + "SSE.Views.FileMenuPanels.MainSettingsGeneral.strPasteButton": "Show Paste Options button when content is pasted", "SSE.Views.FileMenuPanels.MainSpellCheckSettings.okButtonText": "Apply", "SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language", "SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE", @@ -1753,6 +1771,11 @@ "SSE.Views.FormulaTab.txtFormulaTip": "Insert function", "SSE.Views.FormulaTab.txtMore": "More functions", "SSE.Views.FormulaTab.txtRecent": "Recently used", + "SSE.Views.FormulaWizard.textTitle": "Function Argumens", + "SSE.Views.FormulaWizard.textValue": "Formula result", + "SSE.Views.FormulaWizard.textFunctionRes": "Function result", + "SSE.Views.FormulaWizard.textFunction": "Function", + "SSE.Views.FormulaWizard.textHelp": "Help on this function", "SSE.Views.GroupDialog.textColumns": "Columns", "SSE.Views.GroupDialog.textRows": "Rows", "SSE.Views.HeaderFooterDialog.textAlign": "Align with page margins", @@ -2108,6 +2131,7 @@ "SSE.Views.RightMenu.txtSparklineSettings": "Sparkline Settings", "SSE.Views.RightMenu.txtTableSettings": "Table settings", "SSE.Views.RightMenu.txtTextArtSettings": "Text Art settings", + "SSE.Views.RightMenu.txtSlicerSettings": "Slicer Settings", "SSE.Views.ScaleDialog.textAuto": "Auto", "SSE.Views.ScaleDialog.textError": "The entered value is incorrect.", "SSE.Views.ScaleDialog.textFewPages": "pages", @@ -2231,6 +2255,71 @@ "SSE.Views.SignatureSettings.txtRequestedSignatures": "This spreadsheet needs to be signed.", "SSE.Views.SignatureSettings.txtSigned": "Valid signatures has been added to the spreadsheet. The spreadsheet is protected from editing.", "SSE.Views.SignatureSettings.txtSignedInvalid": "Some of the digital signatures in spreadsheet are invalid or could not be verified. The spreadsheet is protected from editing.", + "SSE.Views.SlicerAddDialog.txtTitle": "Insert Slicers", + "SSE.Views.SlicerAddDialog.textColumns": "Columns", + "SSE.Views.SlicerSettings.textKeepRatio": "Constant Proportions", + "SSE.Views.SlicerSettings.textSize": "Size", + "SSE.Views.SlicerSettings.textWidth": "Width", + "SSE.Views.SlicerSettings.textHeight": "Height", + "SSE.Views.SlicerSettings.textAdvanced": "Show advanced settings", + "SSE.Views.SlicerSettings.textPosition": "Position", + "SSE.Views.SlicerSettings.textHor": "Horizontal", + "SSE.Views.SlicerSettings.textVert": "Vertical", + "SSE.Views.SlicerSettings.textButtons": "Buttons", + "SSE.Views.SlicerSettings.textColumns": "Columns", + "SSE.Views.SlicerSettings.textStyle": "Style", + "SSE.Views.SlicerSettings.textLock": "Disable resizing or moving", + "SSE.Views.SlicerSettings.strSorting": "Sorting and filtering", + "SSE.Views.SlicerSettings.textAsc": "Ascending", + "SSE.Views.SlicerSettings.textDesc": "Descending", + "SSE.Views.SlicerSettings.textAZ": "A to Z", + "SSE.Views.SlicerSettings.textZA": "Z to A", + "SSE.Views.SlicerSettings.textOldNew": "oldest to newest", + "SSE.Views.SlicerSettings.textNewOld": "newest to oldest", + "SSE.Views.SlicerSettings.textSmallLarge": "smallest to largest", + "SSE.Views.SlicerSettings.textLargeSmall": "largest to smallest", + "SSE.Views.SlicerSettings.strHideNoData": "Hide items with no data", + "SSE.Views.SlicerSettings.strIndNoData": "Visually indicate items with no data", + "SSE.Views.SlicerSettings.strShowNoData": "Show items with no data last", + "SSE.Views.SlicerSettings.strShowDel": "Show items deleted from the data source", + "SSE.Views.SlicerSettingsAdvanced.textTitle": "Slicer - Advanced Settings", + "SSE.Views.SlicerSettingsAdvanced.textHeader": "Header", + "SSE.Views.SlicerSettingsAdvanced.strStyle": "Style", + "SSE.Views.SlicerSettingsAdvanced.strSize": "Size", + "SSE.Views.SlicerSettingsAdvanced.strWidth": "Width", + "SSE.Views.SlicerSettingsAdvanced.strHeight": "Height", + "SSE.Views.SlicerSettingsAdvanced.strButtons": "Buttons", + "SSE.Views.SlicerSettingsAdvanced.strColumns": "Columns", + "SSE.Views.SlicerSettingsAdvanced.textSort": "Sort", + "SSE.Views.SlicerSettingsAdvanced.textSourceName": "Source name", + "SSE.Views.SlicerSettingsAdvanced.textFormulaName": "Name to use in formulas", + "SSE.Views.SlicerSettingsAdvanced.textName": "Name", + "SSE.Views.SlicerSettingsAdvanced.strStyleSize": "Style & Size", + "SSE.Views.SlicerSettingsAdvanced.strSorting": "Sorting & Filtering", + "SSE.Views.SlicerSettingsAdvanced.strReferences": "References", + "SSE.Views.SlicerSettingsAdvanced.txtEmpty": "This field is required", + "SSE.Views.SlicerSettingsAdvanced.strShowHeader": "Display header", + "SSE.Views.SlicerSettingsAdvanced.textAsc": "Ascending", + "SSE.Views.SlicerSettingsAdvanced.textDesc": "Descending", + "SSE.Views.SlicerSettingsAdvanced.textAZ": "A to Z", + "SSE.Views.SlicerSettingsAdvanced.textZA": "Z to A", + "SSE.Views.SlicerSettingsAdvanced.textOldNew": "oldest to newest", + "SSE.Views.SlicerSettingsAdvanced.textNewOld": "newest to oldest", + "SSE.Views.SlicerSettingsAdvanced.textSmallLarge": "smallest to largest", + "SSE.Views.SlicerSettingsAdvanced.textLargeSmall": "largest to smallest", + "SSE.Views.SlicerSettingsAdvanced.strHideNoData": "Hide items with no data", + "SSE.Views.SlicerSettingsAdvanced.strIndNoData": "Visually indicate items with no data", + "SSE.Views.SlicerSettingsAdvanced.strShowNoData": "Show items with no data last", + "SSE.Views.SlicerSettingsAdvanced.strShowDel": "Show items deleted from the data source", + "SSE.Views.SlicerSettingsAdvanced.textAlt": "Alternative Text", + "SSE.Views.SlicerSettingsAdvanced.textAltTitle": "Title", + "SSE.Views.SlicerSettingsAdvanced.textAltDescription": "Description", + "SSE.Views.SlicerSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.", + "SSE.Views.SlicerSettingsAdvanced.textSnap": "Cell Snapping", + "SSE.Views.SlicerSettingsAdvanced.textAbsolute": "Don't move or size with cells", + "SSE.Views.SlicerSettingsAdvanced.textOneCell": "Move but don't size with cells", + "SSE.Views.SlicerSettingsAdvanced.textTwoCell": "Move and size with cells", + "SSE.Views.SlicerSettingsAdvanced.textKeepRatio": "Constant Proportions", "SSE.Views.SortDialog.errorEmpty": "All sort criteria must have a column or row specified.", "SSE.Views.SortDialog.errorMoreOneCol": "More than one column is selected.", "SSE.Views.SortDialog.errorMoreOneRow": "More than one row is selected.", @@ -2383,6 +2472,7 @@ "SSE.Views.TableSettings.textTemplate": "Select From Template", "SSE.Views.TableSettings.textTotal": "Total", "SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
    Are you sure you want to continue?", + "SSE.Views.TableSettings.textSlicer": "Insert slicer", "SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text", "SSE.Views.TableSettingsAdvanced.textAltDescription": "Description", "SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.", @@ -2657,6 +2747,9 @@ "SSE.Views.Toolbar.txtTime": "Time", "SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells", "SSE.Views.Toolbar.txtYen": "Â¥ Yen", + "SSE.Views.Toolbar.textVertical": "Vertical Text", + "SSE.Views.Toolbar.capBtnInsSlicer": "Slicer", + "SSE.Views.Toolbar.tipInsertSlicer": "Insert slicer", "SSE.Views.Top10FilterDialog.textType": "Show", "SSE.Views.Top10FilterDialog.txtBottom": "Bottom", "SSE.Views.Top10FilterDialog.txtItems": "Item", diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png new file mode 100644 index 000000000..d000dc432 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/text-orient-vertical.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png new file mode 100644 index 000000000..bd523533e Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/text-orient-vertical.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-addcell.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-addcell.png index fd1b91837..9ae5e1abd 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-addcell.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-addcell.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-autofilter.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-autofilter.png index 5873cde3e..a93bded8f 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-autofilter.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-autofilter.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-border-style.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-border-style.png index e3c5a0c24..faa2e6477 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-border-style.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-border-style.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-clear-filter.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-clear-filter.png index 03ea81cb7..c954b75ad 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-clear-filter.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-clear-filter.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-currency-style.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-currency-style.png index f0ec99e9d..f76185b0e 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-currency-style.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-currency-style.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-decdecimal.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-decdecimal.png index 5e24d9f3f..84bee01a4 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-decdecimal.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-decdecimal.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-delcell.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-delcell.png index a96621296..9e53f69a9 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-delcell.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-delcell.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-formula.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-formula.png index e97ec2a0c..5e6588c47 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-formula.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-formula.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-function.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-function.png index 237fd38d1..1577e3b1b 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-function.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-function.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-incdecimal.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-incdecimal.png index 526644579..ccb1dea72 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-incdecimal.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-incdecimal.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-cell.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-cell.png index 6bd232b8d..93b8e8edf 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-cell.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-cell.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png index e83913f9a..f1c73e7e2 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-merge.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-merge.png index bb3833b4a..1cc79ff79 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-merge.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-merge.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-named-range.png index 1c82aa0b2..b3e68275e 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-named-range.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-named-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-percent-style.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-percent-style.png index df12adcb7..894c63017 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-percent-style.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-percent-style.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down(ru).png index b75608325..2c40972d0 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down(ru).png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down(ru).png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down.png index c7855a84d..28bc86203 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-down.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up(ru).png index d7cb54d61..1989f3562 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up(ru).png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up(ru).png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up.png index 7dbf0bb98..aeb9be99b 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sort-up.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png index 70bdfc7b4..2fe75c8e0 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-ccw.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-ccw.png index 7703888ab..c47dc0661 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-ccw.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-ccw.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-cw.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-cw.png index 106595e02..2ecb82e6a 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-cw.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-cw.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png new file mode 100644 index 000000000..36e5a9a64 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/text-orient-vertical.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-slicer.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-slicer.png new file mode 100644 index 000000000..61c780644 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-slicer.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-slicer.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-slicer.png new file mode 100644 index 000000000..27398f4fc Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-slicer.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/text-orient-vertical.png new file mode 100644 index 000000000..fb5020317 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/text-orient-vertical.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-slicer.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-slicer.png new file mode 100644 index 000000000..530e454a3 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-slicer.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-slicer.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-slicer.png new file mode 100644 index 000000000..389f78334 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-slicer.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/text-orient-vertical.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/text-orient-vertical.png new file mode 100644 index 000000000..82d82e9cf Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/text-orient-vertical.png differ diff --git a/apps/spreadsheeteditor/main/resources/less/rightmenu.less b/apps/spreadsheeteditor/main/resources/less/rightmenu.less index 596b0f3a6..6dadc6928 100644 --- a/apps/spreadsheeteditor/main/resources/less/rightmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/rightmenu.less @@ -224,8 +224,8 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - } .list-item > div:nth-child(1) { - width:70px; - padding-right: 5px; + width:65px; + padding-right: 0; display: inline-block; white-space: pre; overflow: hidden; @@ -235,9 +235,9 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - .listitem-icon { vertical-align: middle; - width: 16px; + width: 22px; height: 16px; - background-position: -1px -274px; + background-position: 1px -274px; display: inline-block; } } @@ -320,4 +320,16 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px - } } } -} \ No newline at end of file +} + +.sheet-template-slicer { + width: 56px; + height: 55px; +} + +.menu-slicer-template { + .item { + border: none; + .box-shadow(none); + } +} diff --git a/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js b/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js index cfec8afca..1e52d4a59 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js +++ b/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js @@ -67,7 +67,7 @@ define([ 'function:click': this.onInsertFunction.bind(this), 'function:hint': function (name, type) { setTimeout(function(){ - me.api.asc_insertFormula(name, type, false); + me.api.asc_insertInCell(name, type, false); }, 0); } } diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 927dc8965..21e802e98 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -243,6 +243,14 @@ define([ if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo)) $('#editor_sdk').append('
    ' + '
    '.repeat(2) + '
    '); + + var value = Common.localStorage.getItem("sse-mobile-macros-mode"); + if (value === null) { + value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn'; + value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0); + } else + value = parseInt(value); + Common.Utils.InternalSettings.set("sse-mobile-macros-mode", value); }, loadDocument: function(data) { @@ -270,10 +278,16 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + + var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + docInfo.asc_putIsEnabledMacroses(!!enable); + enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); + docInfo.asc_putIsEnabledPlugins(!!enable); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); + this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this)); this.api.asc_setDocInfo(docInfo); this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId); @@ -1483,6 +1497,51 @@ define([ return false; }, + onRunAutostartMacroses: function() { + var me = this, + enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); + if (enable) { + var value = Common.Utils.InternalSettings.get("sse-mobile-macros-mode"); + if (value==1) + this.api.asc_runAutostartMacroses(); + else if (value === 0) { + uiApp.modal({ + title: this.notcriticalErrorTitle, + text: this.textHasMacros, + afterText: '', + buttons: [{ + text: this.textYes, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("sse-mobile-macros-mode", 1); + Common.localStorage.setItem("sse-mobile-macros-mode", 1); + } + setTimeout(function() { + me.api.asc_runAutostartMacroses(); + }, 1); + } + }, + { + text: this.textNo, + onClick: function () { + var dontshow = $('input[name="checkbox-show-macros"]').prop('checked'); + if (dontshow) { + Common.Utils.InternalSettings.set("sse-mobile-macros-mode", 2); + Common.localStorage.setItem("sse-mobile-macros-mode", 2); + } + } + }] + }); + } + } + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -1666,7 +1725,11 @@ define([ waitText: 'Please, wait...', errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
    Please contact your Document Server administrator for details.', errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', - errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.' + errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.', + textHasMacros: 'The file contains automatic macros.
    Do you want to run macros?', + textRemember: 'Remember my choice', + textYes: 'Yes', + textNo: 'No' } })(), SSE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 847826eed..dcea13ddf 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -258,6 +258,8 @@ define([ me.initRegSettings(); } else if ('#settings-info-view' == pageId) { me.initPageInfo(); + } else if ('#settings-macros-view' == pageId) { + me.initPageMacrosSettings(); } else { var _userCount = SSE.getController('Main').returnUserCount(); if (_userCount > 0) { @@ -266,6 +268,20 @@ define([ } }, + initPageMacrosSettings: function() { + var me = this, + $pageMacrosSettings = $('.page[data-page="settings-macros-view"] input:radio[name=macros-settings]'), + value = Common.Utils.InternalSettings.get("sse-mobile-macros-mode") || 0; + $pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me)); + $pageMacrosSettings.val([value]); + }, + + onChangeMacrosSettings: function(e) { + var value = parseInt($(e.currentTarget).val()); + Common.Utils.InternalSettings.set("sse-mobile-macros-mode", value); + Common.localStorage.setItem("sse-mobile-macros-mode", value); + }, + initPageInfo: function() { var document = Common.SharedSettings.get('document') || {}, info = document.info || {}; diff --git a/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js b/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js index bde23be46..869ebaed6 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js +++ b/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js @@ -157,7 +157,7 @@ define([ }, onDoneComment: function(documentFlag) { - var value = $('#comment-text').val(); + var value = $('#comment-text').val().trim(); if (value.length > 0) { if (SSE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag)) { this.view.isComments = true; diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js index 27d213da6..94c848f72 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js @@ -132,6 +132,8 @@ define([ me.initBorderColorPage(); } else if ('#edit-text-format' == pageId) { me.initTextFormat(); + } else if ('#edit-text-orientation' == pageId) { + me.initTextOrientation(); } else if ('#edit-border-style' == pageId) { me.initBorderStyle(); } else if (!_.isUndefined(pageId) && pageId.indexOf('#edit-cell-format') > -1) { @@ -339,6 +341,8 @@ define([ return; } + me.initTextOrientation(); + me.initTextFormat(); }, @@ -504,6 +508,49 @@ define([ return clr; }, + initTextOrientation: function() { + if (_.isUndefined(this._cellInfo)) return; + + var me = this, + $pageTextOrientation = $('.page[data-page=edit-text-orientation]'), + orientationStr = 'horizontal', + xfs = this._cellInfo.asc_getXfs(); + + var textAngle = xfs.asc_getAngle(); + + switch(textAngle) { + case 45: orientationStr = 'anglecount'; break; + case -45: orientationStr = 'angleclock'; break; + case 255: orientationStr = 'vertical'; break; + case 90: orientationStr = 'rotateup'; break; + case -90: orientationStr = 'rotatedown'; break; + case 0: orientationStr = 'horizontal'; break; + } + + $('#text-orientation .item-media i').removeClass().addClass(Common.Utils.String.format('icon icon-text-orientation-{0}', orientationStr)); + + if ($pageTextOrientation.length > 0) { + var $radioOrientation = $pageTextOrientation.find('input:radio[name=text-orientation]'); + $radioOrientation.val([orientationStr]); + $radioOrientation.single('change', _.bind(me.onTextOrientationChange, me)); + } + }, + + onTextOrientationChange: function(e) { + var $target = $(e.currentTarget), + value = $target.prop('value'); + var angle = 0; + switch (value) { + case 'anglecount': angle = 45; break; + case 'angleclock': angle = -45; break; + case 'vertical': angle = 255; break; + case 'rotateup': angle = 90; break; + case 'rotatedown': angle = -90; break; + } + if (this.api) + this.api.asc_setCellAngle(angle); + }, + textFonts: 'Fonts', textAuto: 'Auto', textPt: 'pt' diff --git a/apps/spreadsheeteditor/mobile/app/template/EditCell.template b/apps/spreadsheeteditor/mobile/app/template/EditCell.template index 765b5be16..3c4a872a2 100644 --- a/apps/spreadsheeteditor/mobile/app/template/EditCell.template +++ b/apps/spreadsheeteditor/mobile/app/template/EditCell.template @@ -55,6 +55,16 @@
    +
  • + +
    + <% if (!android) { %>
    <% } %> +
    +
    <%= scope.textTextOrientation %>
    +
    +
    +
    +
  • @@ -303,6 +313,121 @@
  • + +
    + +
    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    +
    +
    +
    +
    +
    @@ -844,4 +857,55 @@ + + + +
    + +
    +
    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index 2ec25b119..7ac8485b4 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -54,7 +54,8 @@ define([ canDownload = false, canAbout = true, canHelp = true, - canPrint = false; + canPrint = false, + isShowMacros = true; return { // el: '.view-main', @@ -126,6 +127,7 @@ define([ if (mode.customization) { canHelp = (mode.customization.help!==false); + isShowMacros = (mode.customization.macros!==false); } }, @@ -143,6 +145,7 @@ define([ if (!canAbout) $layout.find('#settings-about').hide(); if (!canHelp) $layout.find('#settings-help').hide(); if (!canPrint) $layout.find('#settings-print').hide(); + if (!isShowMacros) $layour.find('#settings-macros').hide(); return $layout.html(); } @@ -173,6 +176,10 @@ define([ } }, + showMacros: function () { + this.showPage('#settings-macros-view'); + }, + showSetApp: function() { this.showPage('#settings-application-view'); $('#language-formula').single('click', _.bind(this.showFormulaLanguage, this)); @@ -180,6 +187,9 @@ define([ if (!isEdit) { $('.page[data-page=settings-application-view] .page-content > :not(.display-view)').hide(); } + if (isShowMacros) { + $('#settings-macros').single('click', _.bind(this.showMacros, this)); + } }, showFormulaLanguage: function () { @@ -421,7 +431,14 @@ define([ textLastModified: 'Last Modified', textLastModifiedBy: 'Last Modified By', textUploaded: 'Uploaded', - textLocation: 'Location' + textLocation: 'Location', + textMacrosSettings: 'Macros Settings', + textDisableAll: 'Disable All', + textDisableAllMacrosWithoutNotification: 'Disable all macros without notification', + textShowNotification: 'Show Notification', + textDisableAllMacrosWithNotification: 'Disable all macros with notification', + textEnableAll: 'Enable All', + textEnableAllMacrosWithoutNotification: 'Enable all macros without notification' } })(), SSE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/view/edit/EditCell.js b/apps/spreadsheeteditor/mobile/app/view/edit/EditCell.js index 4d31ef663..27b035370 100644 --- a/apps/spreadsheeteditor/mobile/app/view/edit/EditCell.js +++ b/apps/spreadsheeteditor/mobile/app/view/edit/EditCell.js @@ -166,6 +166,7 @@ define([ Common.Utils.addScrollIfNeed('.page[data-page=edit-border-style]', '.page[data-page=edit-border-style] .page-content'); Common.Utils.addScrollIfNeed('.page[data-page=edit-cell-format]', '.page[data-page=edit-cell-format] .page-content'); Common.Utils.addScrollIfNeed('.page[data-page=edit-text-format]', '.page[data-page=edit-text-format] .page-content'); + Common.Utils.addScrollIfNeed('.page[data-page=edit-text-orientation]', '.page[data-page=edit-text-orientation] .page-content'); $(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this)); }, @@ -422,7 +423,14 @@ define([ textCharacterItalic: 'I', textCharacterUnderline: 'U', textAddCustomColor: 'Add Custom Color', - textCustomColor: 'Custom Color' + textCustomColor: 'Custom Color', + textTextOrientation: 'Text Orientation', + textHorizontalText: 'Horizontal Text', + textAngleCounterclockwise: 'Angle Counterclockwise', + textAngleClockwise: 'Angle Clockwise', + textVerticalText: 'Vertical Text', + textRotateTextUp: 'Rotate Text Up', + textRotateTextDown: 'Rotate Text Down' } })(), SSE.Views.EditCell || {})) }); diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 81a4904f7..f1718608d 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -312,6 +312,10 @@ "SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
    If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
    If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "SSE.Controllers.Main.textHasMacros": "The file contains automatic macros.
    Do you want to run macros?", + "SSE.Controllers.Main.textRemember": "Remember my choice", + "SSE.Controllers.Main.textYes": "Yes", + "SSE.Controllers.Main.textNo": "No", "SSE.Controllers.Search.textNoTextFound": "Text not found", "SSE.Controllers.Search.textReplaceAll": "Replace All", "SSE.Controllers.Settings.notcriticalErrorTitle": "Warning", @@ -428,6 +432,13 @@ "SSE.Views.EditCell.textTopBorder": "Top Border", "SSE.Views.EditCell.textWrapText": "Wrap Text", "SSE.Views.EditCell.textYen": "Yen", + "SSE.Views.EditCell.textTextOrientation": "Text Orientation", + "SSE.Views.EditCell.textHorizontalText": "Horizontal Text", + "SSE.Views.EditCell.textAngleCounterclockwise": "Angle Counterclockwise", + "SSE.Views.EditCell.textAngleClockwise": "Angle Clockwise", + "SSE.Views.EditCell.textVerticalText": "Vertical Text", + "SSE.Views.EditCell.textRotateTextUp": "Rotate Text Up", + "SSE.Views.EditCell.textRotateTextDown": "Rotate Text Down", "SSE.Views.EditChart.textAddCustomColor": "Add Custom Color", "SSE.Views.EditChart.textAuto": "Auto", "SSE.Views.EditChart.textAxisCrosses": "Axis Crosses", @@ -616,5 +627,12 @@ "SSE.Views.Settings.textUploaded": "Uploaded", "SSE.Views.Settings.textVersion": "Version", "SSE.Views.Settings.unknownText": "Unknown", + "SSE.Views.Settings.textMacrosSettings": "Macros Settings", + "SSE.Views.Settings.textDisableAll": "Disable All", + "SSE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification", + "SSE.Views.Settings.textShowNotification": "Show Notification", + "SSE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification", + "SSE.Views.Settings.textEnableAll": "Enable All", + "SSE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification", "SSE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css index bdf003a6f..d29880080 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css @@ -6552,17 +6552,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after padding: 16px 0; word-wrap: break-word; } -.page-comments p, -.add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .add-comment .list-reply, .page-view-comments .list-reply, @@ -6658,6 +6647,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .add-comment .reply-item, .page-view-comments .reply-item, @@ -7435,6 +7442,36 @@ i.icon.icon-add-other { height: 24px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7.00049%2018C7.00049%2018.8284%206.32892%2019.5%205.50049%2019.5C4.67206%2019.5%204.00049%2018.8284%204.00049%2018C4.00049%2017.1716%204.67206%2016.5%205.50049%2016.5C6.32892%2016.5%207.00049%2017.1716%207.00049%2018ZM13.5005%2018C13.5005%2018.8284%2012.8289%2019.5%2012.0005%2019.5C11.1721%2019.5%2010.5005%2018.8284%2010.5005%2018C10.5005%2017.1716%2011.1721%2016.5%2012.0005%2016.5C12.8289%2016.5%2013.5005%2017.1716%2013.5005%2018ZM18.5005%2019.5C19.3289%2019.5%2020.0005%2018.8284%2020.0005%2018C20.0005%2017.1716%2019.3289%2016.5%2018.5005%2016.5C17.6721%2016.5%2017.0005%2017.1716%2017.0005%2018C17.0005%2018.8284%2017.6721%2019.5%2018.5005%2019.5Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-text-orientation-horizontal { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.51367%2010.75H11.269L8.06905%202H6.36276L3.25%2010.75H4.96174L5.62136%208.76245H8.81589L9.51367%2010.75ZM7.19682%204.04127L8.29801%207.2882H6.11744L7.19682%204.04127ZM16.0002%202H12.8057V10.75H15.5259C16.5544%2010.742%2017.2031%2010.7221%2017.4721%2010.6903C17.9009%2010.6386%2018.2607%2010.5013%2018.5515%2010.2785C18.8458%2010.0517%2019.0766%209.75125%2019.2438%209.37722C19.4146%208.9992%2019.5%208.61124%2019.5%208.21334C19.5%207.70799%2019.3692%207.2683%2019.1075%206.89427C18.8458%206.52024%2018.4715%206.25563%2017.9845%206.10044C18.3298%205.92934%2018.6023%205.67269%2018.8022%205.33049C19.0057%204.98829%2019.1075%204.61227%2019.1075%204.20242C19.1075%203.82441%2019.0257%203.4842%2018.8622%203.18179C18.6986%202.8754%2018.4933%202.63068%2018.2462%202.44765C18.0027%202.26461%2017.7247%202.14524%2017.4121%202.08953C17.1032%202.02984%2016.6326%202%2016.0002%202ZM14.4193%205.47971L14.4193%203.45634L15.346%203.45634C16.1056%203.45634%2016.5653%203.46629%2016.7252%203.48619C16.9942%203.522%2017.1959%203.62545%2017.3303%203.79656C17.4684%203.96368%2017.5375%204.18253%2017.5375%204.4531C17.5375%204.73562%2017.4575%204.96442%2017.2976%205.1395C17.1414%205.3106%2016.9251%205.41405%2016.6489%205.44986C16.4963%205.46976%2016.1056%205.47971%2015.4769%205.47971H14.4193ZM14.4193%209.27575V6.93605H15.7222C16.4563%206.93605%2016.9324%206.97783%2017.1504%207.06139C17.3721%207.14495%2017.5411%207.27825%2017.6574%207.46129C17.7737%207.64433%2017.8319%207.86716%2017.8319%208.12977C17.8319%208.44014%2017.7555%208.68884%2017.6029%208.87585C17.4539%209.05889%2017.2595%209.17428%2017.0196%209.22203C16.8633%209.25784%2016.4945%209.27575%2015.913%209.27575H14.4193ZM17.9829%2013.25L21.5023%2017.0829L22%2017.625L21.5023%2018.1671L17.9829%2022L16.9875%2020.9159L19.3053%2018.3916H2V16.8584H19.3053L16.9875%2014.3341L17.9829%2013.25Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-anglecount { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M22%208.71927H16.3964V10.0783L19.7586%2010.0783L8.55143%2020.9162L9.67214%2022L20.597%2011.1439V14.4301L22%2014.4301V8.71927Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M10.6577%2011.3859L9.54484%2012.462L7.84242%2011.6713L5.81718%2013.6298L6.65905%2015.2527L5.57385%2016.3022L2%209.02933L3.08174%207.98323L10.6577%2011.3859ZM6.57946%2011.085L3.82288%209.76944L5.19705%2012.4218L6.57946%2011.085Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M6.08463%205.07929L8.10987%203.12078C8.51077%202.73309%208.82806%202.46285%209.06174%202.31005C9.2952%202.15259%209.54714%202.05532%209.81755%202.01826C10.0903%201.97896%2010.3756%202.0031%2010.6735%202.09068C10.9689%202.17582%2011.2364%202.33426%2011.4761%202.56602C11.7359%202.81728%2011.9098%203.1102%2011.9977%203.44478C12.0879%203.77712%2012.0778%204.10158%2011.9674%204.41815C12.3746%204.21472%2012.7796%204.14745%2013.1826%204.21634C13.5857%204.28523%2013.9473%204.47458%2014.2677%204.7844C14.52%205.02835%2014.7118%205.31856%2014.8432%205.65504C14.9743%205.98684%2015.0185%206.31251%2014.9756%206.63204C14.9326%206.9469%2014.7915%207.25165%2014.5524%207.54628C14.4021%207.73067%2014.0034%208.14059%2013.3564%208.77602L11.6319%2010.4438L6.08463%205.07929ZM8.03089%204.98287L9.31365%206.22336L9.98412%205.57498C10.3827%205.18952%2010.6241%204.94389%2010.7083%204.83812C10.8607%204.64682%2010.9322%204.45082%2010.9228%204.25012C10.9131%204.04474%2010.8188%203.85545%2010.6397%203.68225C10.4681%203.51636%2010.2856%203.42452%2010.0921%203.40673C9.89838%203.38427%209.70492%203.44451%209.51172%203.58743C9.39773%203.67327%209.09996%203.94903%208.61842%204.4147L8.03089%204.98287ZM10.2369%207.11622L11.7202%208.55065L12.6672%207.63489C13.0358%207.2784%2013.2583%207.04126%2013.3347%206.9235C13.4565%206.74717%2013.5066%206.55722%2013.485%206.35365C13.4632%206.14541%2013.354%205.94616%2013.1572%205.75587C12.9907%205.59487%2012.8126%205.4939%2012.6228%205.45299C12.433%205.41207%2012.2414%205.43395%2012.0479%205.51864C11.8567%205.60109%2011.5283%205.86736%2011.0629%206.31744L10.2369%207.11622Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-angleclock { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.2807%2022L15.2807%2016.3964L13.9217%2016.3964L13.9217%2019.7586L3.08379%208.55143L2%209.67214L12.8561%2020.597L9.56995%2020.597L9.56994%2022L15.2807%2022Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M12.6141%2010.6577L11.538%209.54484L12.3287%207.84242L10.3702%205.81718L8.74726%206.65905L7.69782%205.57385L14.9707%202L16.0168%203.08174L12.6141%2010.6577ZM12.915%206.57946L14.2306%203.82288L11.5782%205.19705L12.915%206.57946Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M18.9207%206.08463L20.8792%208.10987C21.2669%208.51077%2021.5372%208.82806%2021.6899%209.06174C21.8474%209.2952%2021.9447%209.54714%2021.9817%209.81755C22.021%2010.0903%2021.9969%2010.3756%2021.9093%2010.6735C21.8242%2010.9689%2021.6657%2011.2364%2021.434%2011.4761C21.1827%2011.7359%2020.8898%2011.9098%2020.5552%2011.9977C20.2229%2012.0879%2019.8984%2012.0778%2019.5819%2011.9674C19.7853%2012.3746%2019.8525%2012.7796%2019.7837%2013.1826C19.7148%2013.5857%2019.5254%2013.9473%2019.2156%2014.2677C18.9716%2014.52%2018.6814%2014.7118%2018.345%2014.8432C18.0132%2014.9743%2017.6875%2015.0185%2017.368%2014.9756C17.0531%2014.9326%2016.7484%2014.7915%2016.4537%2014.5524C16.2693%2014.4021%2015.8594%2014.0034%2015.224%2013.3564L13.5562%2011.6319L18.9207%206.08463ZM19.0171%208.03089L17.7766%209.31365L18.425%209.98412C18.8105%2010.3827%2019.0561%2010.6241%2019.1619%2010.7083C19.3532%2010.8607%2019.5492%2010.9322%2019.7499%2010.9228C19.9553%2010.9131%2020.1445%2010.8188%2020.3178%2010.6397C20.4836%2010.4681%2020.5755%2010.2856%2020.5933%2010.0921C20.6157%209.89838%2020.5555%209.70492%2020.4126%209.51172C20.3267%209.39773%2020.051%209.09996%2019.5853%208.61842L19.0171%208.03089ZM16.8838%2010.2369L15.4494%2011.7202L16.3651%2012.6672C16.7216%2013.0358%2016.9587%2013.2583%2017.0765%2013.3347C17.2528%2013.4565%2017.4428%2013.5066%2017.6463%2013.485C17.8546%2013.4632%2018.0538%2013.354%2018.2441%2013.1572C18.4051%2012.9907%2018.5061%2012.8126%2018.547%2012.6228C18.5879%2012.433%2018.566%2012.2414%2018.4814%2012.0479C18.3989%2011.8567%2018.1326%2011.5283%2017.6826%2011.0629L16.8838%2010.2369Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-vertical { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7.10359%2022.0648L11.0819%2018.5454L9.95669%2017.55L7.33664%2019.8678L7.33664%201.9375L5.7453%201.9375L5.7453%2019.8678L3.12525%2017.55L2%2018.5454L5.97834%2022.0648L6.54097%2022.5625L7.10359%2022.0648Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M14.513%2013.1875L17.8287%2013.1875C18.4851%2013.1875%2018.9736%2013.2173%2019.2942%2013.277C19.6186%2013.3327%2019.9072%2013.4521%2020.1599%2013.6351C20.4164%2013.8182%2020.6295%2014.0629%2020.7993%2014.3693C20.969%2014.6717%2021.0539%2015.0119%2021.0539%2015.3899C21.0539%2015.7998%2020.9483%2016.1758%2020.737%2016.518C20.5296%2016.8602%2020.2467%2017.1168%2019.8883%2017.2879C20.3938%2017.4431%2020.7823%2017.7077%2021.0539%2018.0818C21.3255%2018.4558%2021.4613%2018.8955%2021.4613%2019.4008C21.4613%2019.7987%2021.3726%2020.1867%2021.1954%2020.5647C21.0218%2020.9387%2020.7823%2021.2392%2020.4768%2021.466C20.175%2021.6888%2019.8015%2021.8261%2019.3564%2021.8778C19.0773%2021.9096%2018.404%2021.9295%2017.3365%2021.9375L14.513%2021.9375L14.513%2013.1875ZM16.1878%2014.6438L16.1878%2016.6672L17.2855%2016.6672C17.9381%2016.6672%2018.3436%2016.6573%2018.502%2016.6374C18.7887%2016.6016%2019.0132%2016.4981%2019.1754%2016.327C19.3413%2016.1519%2019.4243%2015.9231%2019.4243%2015.6406C19.4243%2015.37%2019.3527%2015.1512%2019.2093%2014.9841C19.0697%2014.813%2018.8604%2014.7095%2018.5813%2014.6737C18.4153%2014.6538%2017.9381%2014.6438%2017.1497%2014.6438L16.1878%2014.6438ZM16.1878%2018.1235L16.1878%2020.4632L17.7382%2020.4632C18.3417%2020.4632%2018.7246%2020.4453%2018.8868%2020.4095C19.1358%2020.3618%2019.3376%2020.2464%2019.4922%2020.0634C19.6507%2019.8763%2019.7299%2019.6276%2019.7299%2019.3173C19.7299%2019.0547%2019.6695%2018.8318%2019.5488%2018.6488C19.4281%2018.4658%2019.2527%2018.3325%2019.0226%2018.2489C18.7963%2018.1653%2018.3021%2018.1235%2017.5401%2018.1235L16.1878%2018.1235Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M22%2010.6875L20.1781%2010.6875L19.4538%208.69995L16.1381%208.69995L15.4534%2010.6875L13.6768%2010.6875L16.9076%201.9375L18.6786%201.9375L22%2010.6875ZM18.9163%207.2257L17.7733%203.97877L16.653%207.2257L18.9163%207.2257Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-rotateup { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.9142%202.48263L2%205.89535L3.1071%206.86061L5.68491%204.61307L5.68491%2022L7.25059%2022L7.25059%204.61307L9.82839%206.86061L10.9355%205.89535L7.0213%202.48263L6.46775%202L5.9142%202.48263Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M21.9277%2012.5942L21.8993%2014.2496L19.9679%2014.9391L19.9162%2017.9517L21.8256%2018.5424L21.7979%2020.1567L13.3952%2017.3594L13.4228%2015.7502L21.9277%2012.5942ZM18.5353%2015.4508L15.3807%2016.5406L18.5%2017.5072L18.5353%2015.4508Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M13.4994%2011.0787L13.5511%208.06604C13.5614%207.46968%2013.5978%207.02537%2013.6605%206.7331C13.7194%206.43747%2013.8392%206.1734%2014.0199%205.94087C14.2008%205.70492%2014.4405%205.50741%2014.7391%205.34834C15.0339%205.18933%2015.3639%205.10684%2015.7291%205.10087C16.1251%205.0944%2016.4867%205.18442%2016.814%205.37095C17.1413%205.55405%2017.3849%205.80704%2017.5446%206.12994C17.7024%205.66822%2017.9641%205.31103%2018.3296%205.05835C18.6952%204.80567%2019.1221%204.67534%2019.6103%204.66736C19.9947%204.66107%2020.3681%204.73549%2020.7306%204.8906C21.0892%205.04235%2021.3757%205.25524%2021.59%205.52927C21.8006%205.79994%2021.9274%206.13708%2021.9704%206.54069C21.9968%206.79381%2022.0056%207.40527%2021.9966%208.37509V11.0787H13.4994ZM14.9325%209.53393L16.8872%209.50197L16.9043%208.50461C16.9145%207.91168%2016.9112%207.5434%2016.8945%207.39976C16.8643%207.13985%2016.7679%206.93756%2016.6051%206.79289C16.4386%206.64485%2016.2188%206.57306%2015.9459%206.57752C15.6845%206.5818%2015.472%206.65037%2015.3083%206.78325C15.1408%206.91277%2015.0376%207.10462%2014.9986%207.35881C14.9768%207.50993%2014.9598%207.94364%2014.9475%208.65996L14.9325%209.53393ZM18.2941%209.47896L20.5545%209.442L20.5786%208.03336C20.588%207.48499%2020.5767%207.1374%2020.5446%206.99059C20.5024%206.76514%2020.3941%206.58359%2020.2196%206.44597C20.0414%206.30497%2019.8024%206.23693%2019.5026%206.24183C19.2489%206.24598%2019.0327%206.30434%2018.854%206.4169C18.6753%206.52947%2018.5437%206.69095%2018.4594%206.90133C18.3752%207.10829%2018.3271%207.55794%2018.3152%208.25026L18.2941%209.47896Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-rotatedown { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7.0213%2021.5174L10.9355%2018.1047L9.82839%2017.1394L7.25058%2019.3869L7.25059%202L5.68491%202L5.68491%2019.3869L3.1071%2017.1394L2%2018.1047L5.91419%2021.5174L6.46774%2022L7.0213%2021.5174Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M13.4675%2011.4058L13.4959%209.75035L15.4273%209.06091L15.479%206.04827L13.5695%205.45761L13.5972%203.84333L22%206.64062L21.9724%208.24976L13.4675%2011.4058ZM16.8599%208.54922L20.0145%207.45944L16.8952%206.49282L16.8599%208.54922Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M21.8957%2012.9213L21.844%2015.934C21.8338%2016.5303%2021.7974%2016.9746%2021.7347%2017.2669C21.6758%2017.5625%2021.556%2017.8266%2021.3752%2018.0591C21.1944%2018.2951%2020.9547%2018.4926%2020.656%2018.6517C20.3612%2018.8107%2020.0312%2018.8932%2019.6661%2018.8991C19.2701%2018.9056%2018.9085%2018.8156%2018.5812%2018.6291C18.2538%2018.446%2018.0103%2018.193%2017.8506%2017.8701C17.6928%2018.3318%2017.4311%2018.689%2017.0655%2018.9417C16.7%2019.1943%2016.2731%2019.3247%2015.7849%2019.3326C15.4005%2019.3389%2015.0271%2019.2645%2014.6646%2019.1094C14.306%2018.9577%2014.0195%2018.7448%2013.8051%2018.4707C13.5946%2018.2001%2013.4678%2017.8629%2013.4248%2017.4593C13.3984%2017.2062%2013.3896%2016.5947%2013.3986%2015.6249L13.3986%2012.9213L21.8957%2012.9213ZM20.4627%2014.4661L18.508%2014.498L18.4909%2015.4954C18.4807%2016.0883%2018.484%2016.4566%2018.5007%2016.6002C18.5309%2016.8601%2018.6273%2017.0624%2018.7901%2017.2071C18.9566%2017.3552%2019.1764%2017.4269%2019.4493%2017.4225C19.7107%2017.4182%2019.9232%2017.3496%2020.0869%2017.2167C20.2544%2017.0872%2020.3576%2016.8954%2020.3965%2016.6412C20.4184%2016.4901%2020.4354%2016.0564%2020.4477%2015.34L20.4627%2014.4661ZM17.101%2014.521L14.8407%2014.558L14.8166%2015.9666C14.8071%2016.515%2014.8185%2016.8626%2014.8505%2017.0094C14.8928%2017.2349%2015.0011%2017.4164%2015.1755%2017.554C15.3537%2017.695%2015.5928%2017.7631%2015.8926%2017.7582C16.1463%2017.754%2016.3625%2017.6957%2016.5412%2017.5831C16.7199%2017.4705%2016.8514%2017.3091%2016.9358%2017.0987C17.02%2016.8917%2017.0681%2016.4421%2017.08%2015.7497L17.101%2014.521Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} .active i.icon.icon-add-chart { width: 24px; height: 24px; @@ -8306,3 +8343,10 @@ html.pixel-ratio-3 .cell-styles.dataview .row li { .picker-modal.container-view-comment .pages { background-color: #FFFFFF; } +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #8e8e93; +} diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-material.css b/apps/spreadsheeteditor/mobile/resources/css/app-material.css index 47dd60a12..bbe6c5a4b 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-material.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-material.css @@ -6139,17 +6139,6 @@ html.phone .document-menu .list-block .item-link { .page-edit-reply .list-block .item-inner:after { content: none; } -.page-comments p, -.page-add-comment p, -.page-view-comments p, -.container-edit-comment p, -.container-add-reply p, -.page-edit-comment p, -.page-add-reply p, -.page-edit-reply p { - margin: 0; - word-break: break-word; -} .page-comments .list-reply, .page-add-comment .list-reply, .page-view-comments .list-reply, @@ -6244,6 +6233,24 @@ html.phone .document-menu .list-block .item-link { max-width: 100%; padding-right: 15px; } +.page-comments .comment-text pre, +.page-add-comment .comment-text pre, +.page-view-comments .comment-text pre, +.container-edit-comment .comment-text pre, +.container-add-reply .comment-text pre, +.page-edit-comment .comment-text pre, +.page-add-reply .comment-text pre, +.page-edit-reply .comment-text pre, +.page-comments .reply-text pre, +.page-add-comment .reply-text pre, +.page-view-comments .reply-text pre, +.container-edit-comment .reply-text pre, +.container-add-reply .reply-text pre, +.page-edit-comment .reply-text pre, +.page-add-reply .reply-text pre, +.page-edit-reply .reply-text pre { + white-space: pre-wrap; +} .page-comments .reply-item, .page-add-comment .reply-item, .page-view-comments .reply-item, @@ -7126,6 +7133,36 @@ i.icon.icon-done-comment-white { height: 24px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9%2016.1719L19.5938%205.57812L21%206.98438L9%2018.9844L3.42188%2013.4062L4.82812%2012L9%2016.1719Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-text-orientation-horizontal { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.51367%2010.75H11.269L8.06905%202H6.36276L3.25%2010.75H4.96174L5.62136%208.76245H8.81589L9.51367%2010.75ZM7.19682%204.04127L8.29801%207.2882H6.11744L7.19682%204.04127ZM16.0002%202H12.8057V10.75H15.5259C16.5544%2010.742%2017.2031%2010.7221%2017.4721%2010.6903C17.9009%2010.6386%2018.2607%2010.5013%2018.5515%2010.2785C18.8458%2010.0517%2019.0766%209.75125%2019.2438%209.37722C19.4146%208.9992%2019.5%208.61124%2019.5%208.21334C19.5%207.70799%2019.3692%207.2683%2019.1075%206.89427C18.8458%206.52024%2018.4715%206.25563%2017.9845%206.10044C18.3298%205.92934%2018.6023%205.67269%2018.8022%205.33049C19.0057%204.98829%2019.1075%204.61227%2019.1075%204.20242C19.1075%203.82441%2019.0257%203.4842%2018.8622%203.18179C18.6986%202.8754%2018.4933%202.63068%2018.2462%202.44765C18.0027%202.26461%2017.7247%202.14524%2017.4121%202.08953C17.1032%202.02984%2016.6326%202%2016.0002%202ZM14.4193%205.47971L14.4193%203.45634L15.346%203.45634C16.1056%203.45634%2016.5653%203.46629%2016.7252%203.48619C16.9942%203.522%2017.1959%203.62545%2017.3303%203.79656C17.4684%203.96368%2017.5375%204.18253%2017.5375%204.4531C17.5375%204.73562%2017.4575%204.96442%2017.2976%205.1395C17.1414%205.3106%2016.9251%205.41405%2016.6489%205.44986C16.4963%205.46976%2016.1056%205.47971%2015.4769%205.47971H14.4193ZM14.4193%209.27575V6.93605H15.7222C16.4563%206.93605%2016.9324%206.97783%2017.1504%207.06139C17.3721%207.14495%2017.5411%207.27825%2017.6574%207.46129C17.7737%207.64433%2017.8319%207.86716%2017.8319%208.12977C17.8319%208.44014%2017.7555%208.68884%2017.6029%208.87585C17.4539%209.05889%2017.2595%209.17428%2017.0196%209.22203C16.8633%209.25784%2016.4945%209.27575%2015.913%209.27575H14.4193ZM17.9829%2013.25L21.5023%2017.0829L22%2017.625L21.5023%2018.1671L17.9829%2022L16.9875%2020.9159L19.3053%2018.3916H2V16.8584H19.3053L16.9875%2014.3341L17.9829%2013.25Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-anglecount { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M22%208.71927H16.3964V10.0783L19.7586%2010.0783L8.55142%2020.9162L9.67214%2022L20.597%2011.1439V14.4301L22%2014.4301V8.71927Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M10.6577%2011.3859L9.54484%2012.462L7.84242%2011.6713L5.81718%2013.6298L6.65905%2015.2527L5.57385%2016.3022L2%209.02933L3.08174%207.98323L10.6577%2011.3859ZM6.57946%2011.085L3.82288%209.76944L5.19705%2012.4218L6.57946%2011.085Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M6.08462%205.07929L8.10986%203.12078C8.51077%202.73309%208.82806%202.46285%209.06174%202.31005C9.2952%202.15259%209.54714%202.05532%209.81755%202.01826C10.0903%201.97896%2010.3756%202.0031%2010.6735%202.09068C10.9689%202.17582%2011.2364%202.33426%2011.4761%202.56602C11.7359%202.81728%2011.9098%203.1102%2011.9977%203.44478C12.0879%203.77712%2012.0778%204.10158%2011.9674%204.41815C12.3746%204.21472%2012.7796%204.14745%2013.1826%204.21634C13.5857%204.28523%2013.9473%204.47458%2014.2677%204.7844C14.52%205.02835%2014.7118%205.31856%2014.8432%205.65504C14.9743%205.98684%2015.0184%206.31251%2014.9756%206.63204C14.9326%206.9469%2014.7915%207.25165%2014.5524%207.54628C14.4021%207.73067%2014.0034%208.14059%2013.3564%208.77602L11.6319%2010.4438L6.08462%205.07929ZM8.03089%204.98287L9.31365%206.22336L9.98412%205.57498C10.3827%205.18952%2010.6241%204.94389%2010.7082%204.83812C10.8607%204.64682%2010.9322%204.45082%2010.9228%204.25012C10.9131%204.04474%2010.8188%203.85545%2010.6397%203.68225C10.4681%203.51636%2010.2856%203.42452%2010.0921%203.40673C9.89838%203.38427%209.70492%203.44451%209.51172%203.58743C9.39773%203.67327%209.09996%203.94903%208.61842%204.4147L8.03089%204.98287ZM10.2369%207.11622L11.7202%208.55065L12.6672%207.63489C13.0358%207.2784%2013.2583%207.04126%2013.3347%206.9235C13.4565%206.74717%2013.5066%206.55722%2013.485%206.35365C13.4632%206.14541%2013.354%205.94616%2013.1572%205.75587C12.9907%205.59487%2012.8126%205.4939%2012.6228%205.45299C12.433%205.41207%2012.2414%205.43395%2012.0479%205.51864C11.8567%205.60109%2011.5283%205.86736%2011.0629%206.31744L10.2369%207.11622Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-angleclock { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.2807%2022L15.2807%2016.3964L13.9217%2016.3964L13.9217%2019.7586L3.08379%208.55143L2%209.67214L12.8561%2020.597L9.56995%2020.597L9.56994%2022L15.2807%2022Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M12.6141%2010.6577L11.538%209.54484L12.3287%207.84242L10.3702%205.81718L8.74726%206.65905L7.69782%205.57385L14.9707%202L16.0168%203.08174L12.6141%2010.6577ZM12.915%206.57946L14.2306%203.82288L11.5782%205.19705L12.915%206.57946Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M18.9207%206.08463L20.8792%208.10987C21.2669%208.51077%2021.5372%208.82806%2021.6899%209.06174C21.8474%209.2952%2021.9447%209.54714%2021.9817%209.81755C22.021%2010.0903%2021.9969%2010.3756%2021.9093%2010.6735C21.8242%2010.9689%2021.6657%2011.2364%2021.434%2011.4761C21.1827%2011.7359%2020.8898%2011.9098%2020.5552%2011.9977C20.2229%2012.0879%2019.8984%2012.0778%2019.5819%2011.9674C19.7853%2012.3746%2019.8525%2012.7796%2019.7837%2013.1826C19.7148%2013.5857%2019.5254%2013.9473%2019.2156%2014.2677C18.9716%2014.52%2018.6814%2014.7118%2018.345%2014.8432C18.0132%2014.9743%2017.6875%2015.0185%2017.368%2014.9756C17.0531%2014.9326%2016.7484%2014.7915%2016.4537%2014.5524C16.2693%2014.4021%2015.8594%2014.0034%2015.224%2013.3564L13.5562%2011.6319L18.9207%206.08463ZM19.0171%208.03089L17.7766%209.31365L18.425%209.98412C18.8105%2010.3827%2019.0561%2010.6241%2019.1619%2010.7083C19.3532%2010.8607%2019.5492%2010.9322%2019.7499%2010.9228C19.9553%2010.9131%2020.1445%2010.8188%2020.3178%2010.6397C20.4836%2010.4681%2020.5755%2010.2856%2020.5933%2010.0921C20.6157%209.89838%2020.5555%209.70492%2020.4126%209.51172C20.3267%209.39773%2020.051%209.09996%2019.5853%208.61842L19.0171%208.03089ZM16.8838%2010.2369L15.4494%2011.7202L16.3651%2012.6672C16.7216%2013.0358%2016.9587%2013.2583%2017.0765%2013.3347C17.2528%2013.4565%2017.4428%2013.5066%2017.6463%2013.485C17.8546%2013.4632%2018.0538%2013.354%2018.2441%2013.1572C18.4051%2012.9907%2018.5061%2012.8126%2018.547%2012.6228C18.5879%2012.433%2018.566%2012.2414%2018.4814%2012.0479C18.3989%2011.8567%2018.1326%2011.5283%2017.6826%2011.0629L16.8838%2010.2369Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-vertical { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7.10359%2022.0648L11.0819%2018.5454L9.95669%2017.55L7.33664%2019.8678L7.33664%201.9375L5.7453%201.9375L5.7453%2019.8678L3.12525%2017.55L2%2018.5454L5.97834%2022.0648L6.54097%2022.5625L7.10359%2022.0648Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M14.513%2013.1875L17.8287%2013.1875C18.4851%2013.1875%2018.9736%2013.2173%2019.2942%2013.277C19.6186%2013.3327%2019.9072%2013.4521%2020.1599%2013.6351C20.4164%2013.8182%2020.6295%2014.0629%2020.7993%2014.3693C20.969%2014.6717%2021.0539%2015.0119%2021.0539%2015.3899C21.0539%2015.7998%2020.9483%2016.1758%2020.737%2016.518C20.5296%2016.8602%2020.2467%2017.1168%2019.8883%2017.2879C20.3938%2017.4431%2020.7823%2017.7077%2021.0539%2018.0818C21.3255%2018.4558%2021.4613%2018.8955%2021.4613%2019.4008C21.4613%2019.7987%2021.3726%2020.1867%2021.1954%2020.5647C21.0218%2020.9387%2020.7823%2021.2392%2020.4768%2021.466C20.175%2021.6888%2019.8015%2021.8261%2019.3564%2021.8778C19.0773%2021.9096%2018.404%2021.9295%2017.3365%2021.9375L14.513%2021.9375L14.513%2013.1875ZM16.1878%2014.6438L16.1878%2016.6672L17.2855%2016.6672C17.9381%2016.6672%2018.3436%2016.6573%2018.502%2016.6374C18.7887%2016.6016%2019.0132%2016.4981%2019.1754%2016.327C19.3413%2016.1519%2019.4243%2015.9231%2019.4243%2015.6406C19.4243%2015.37%2019.3527%2015.1512%2019.2093%2014.9841C19.0697%2014.813%2018.8604%2014.7095%2018.5813%2014.6737C18.4153%2014.6538%2017.9381%2014.6438%2017.1497%2014.6438L16.1878%2014.6438ZM16.1878%2018.1235L16.1878%2020.4632L17.7382%2020.4632C18.3417%2020.4632%2018.7246%2020.4453%2018.8868%2020.4095C19.1358%2020.3618%2019.3376%2020.2464%2019.4922%2020.0634C19.6507%2019.8763%2019.7299%2019.6276%2019.7299%2019.3173C19.7299%2019.0547%2019.6695%2018.8318%2019.5488%2018.6488C19.4281%2018.4658%2019.2527%2018.3325%2019.0226%2018.2489C18.7963%2018.1653%2018.3021%2018.1235%2017.5401%2018.1235L16.1878%2018.1235Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M22%2010.6875L20.1781%2010.6875L19.4538%208.69995L16.1381%208.69995L15.4534%2010.6875L13.6768%2010.6875L16.9076%201.9375L18.6786%201.9375L22%2010.6875ZM18.9163%207.2257L17.7733%203.97877L16.653%207.2257L18.9163%207.2257Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-rotateup { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.9142%202.48263L2%205.89535L3.1071%206.86061L5.68491%204.61307L5.68491%2022L7.25059%2022L7.25059%204.61307L9.82839%206.86061L10.9355%205.89535L7.0213%202.48263L6.46775%202L5.9142%202.48263Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M21.9277%2012.5942L21.8993%2014.2496L19.9679%2014.9391L19.9162%2017.9517L21.8256%2018.5424L21.7979%2020.1567L13.3952%2017.3594L13.4228%2015.7502L21.9277%2012.5942ZM18.5353%2015.4508L15.3807%2016.5406L18.5%2017.5072L18.5353%2015.4508Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M13.4994%2011.0787L13.5511%208.06604C13.5614%207.46968%2013.5978%207.02537%2013.6605%206.7331C13.7194%206.43747%2013.8392%206.1734%2014.0199%205.94087C14.2008%205.70492%2014.4405%205.50741%2014.7391%205.34834C15.0339%205.18933%2015.3639%205.10684%2015.7291%205.10087C16.1251%205.0944%2016.4867%205.18442%2016.814%205.37095C17.1413%205.55405%2017.3849%205.80704%2017.5446%206.12994C17.7024%205.66822%2017.9641%205.31103%2018.3296%205.05835C18.6952%204.80567%2019.1221%204.67534%2019.6103%204.66736C19.9947%204.66107%2020.3681%204.73549%2020.7306%204.8906C21.0892%205.04235%2021.3757%205.25524%2021.59%205.52927C21.8006%205.79994%2021.9274%206.13708%2021.9704%206.54069C21.9968%206.79381%2022.0056%207.40527%2021.9966%208.37509V11.0787H13.4994ZM14.9325%209.53393L16.8872%209.50197L16.9043%208.50461C16.9145%207.91168%2016.9112%207.5434%2016.8945%207.39976C16.8643%207.13985%2016.7679%206.93756%2016.6051%206.79289C16.4386%206.64485%2016.2188%206.57306%2015.9459%206.57752C15.6845%206.5818%2015.472%206.65037%2015.3083%206.78325C15.1408%206.91277%2015.0376%207.10462%2014.9986%207.35881C14.9768%207.50993%2014.9598%207.94364%2014.9475%208.65996L14.9325%209.53393ZM18.2941%209.47896L20.5545%209.442L20.5786%208.03336C20.588%207.48499%2020.5767%207.1374%2020.5446%206.99059C20.5024%206.76514%2020.3941%206.58359%2020.2196%206.44597C20.0414%206.30497%2019.8024%206.23693%2019.5026%206.24183C19.2489%206.24598%2019.0327%206.30434%2018.854%206.4169C18.6753%206.52947%2018.5437%206.69095%2018.4594%206.90133C18.3752%207.10829%2018.3271%207.55794%2018.3152%208.25026L18.2941%209.47896Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-text-orientation-rotatedown { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7.0213%2021.5174L10.9355%2018.1047L9.82839%2017.1394L7.25058%2019.3869L7.25059%202L5.68491%202L5.68491%2019.3869L3.1071%2017.1394L2%2018.1047L5.91419%2021.5174L6.46774%2022L7.0213%2021.5174Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M13.4675%2011.4058L13.4959%209.75035L15.4273%209.06091L15.479%206.04827L13.5695%205.45761L13.5972%203.84333L22%206.64062L21.9724%208.24976L13.4675%2011.4058ZM16.8599%208.54922L20.0145%207.45944L16.8952%206.49282L16.8599%208.54922Z%22%20fill%3D%22%2340865c%22%2F%3E%3Cpath%20d%3D%22M21.8957%2012.9213L21.844%2015.934C21.8338%2016.5303%2021.7974%2016.9746%2021.7347%2017.2669C21.6758%2017.5625%2021.556%2017.8266%2021.3752%2018.0591C21.1944%2018.2951%2020.9547%2018.4926%2020.656%2018.6517C20.3612%2018.8107%2020.0312%2018.8932%2019.6661%2018.8991C19.2701%2018.9056%2018.9085%2018.8156%2018.5812%2018.6291C18.2538%2018.446%2018.0103%2018.193%2017.8506%2017.8701C17.6928%2018.3318%2017.4311%2018.689%2017.0655%2018.9417C16.7%2019.1943%2016.2731%2019.3247%2015.7849%2019.3326C15.4005%2019.3389%2015.0271%2019.2645%2014.6646%2019.1094C14.306%2018.9577%2014.0195%2018.7448%2013.8051%2018.4707C13.5946%2018.2001%2013.4678%2017.8629%2013.4248%2017.4593C13.3984%2017.2062%2013.3896%2016.5947%2013.3986%2015.6249L13.3986%2012.9213L21.8957%2012.9213ZM20.4627%2014.4661L18.508%2014.498L18.4909%2015.4954C18.4807%2016.0883%2018.484%2016.4566%2018.5007%2016.6002C18.5309%2016.8601%2018.6273%2017.0624%2018.7901%2017.2071C18.9566%2017.3552%2019.1764%2017.4269%2019.4493%2017.4225C19.7107%2017.4182%2019.9232%2017.3496%2020.0869%2017.2167C20.2544%2017.0872%2020.3576%2016.8954%2020.3965%2016.6412C20.4184%2016.4901%2020.4354%2016.0564%2020.4477%2015.34L20.4627%2014.4661ZM17.101%2014.521L14.8407%2014.558L14.8166%2015.9666C14.8071%2016.515%2014.8185%2016.8626%2014.8505%2017.0094C14.8928%2017.2349%2015.0011%2017.4164%2015.1755%2017.554C15.3537%2017.695%2015.5928%2017.7631%2015.8926%2017.7582C16.1463%2017.754%2016.3625%2017.6957%2016.5412%2017.5831C16.7199%2017.4705%2016.8514%2017.3091%2016.9358%2017.0987C17.02%2016.8917%2017.0681%2016.4421%2017.08%2015.7497L17.101%2014.521Z%22%20fill%3D%22%2340865c%22%2F%3E%3C%2Fsvg%3E"); +} .navbar i.icon.icon-logo { width: 100px; height: 14px; @@ -8249,3 +8286,10 @@ html.pixel-ratio-3 .cell-styles.dataview .row li { .picker-modal.container-view-comment .pages { background-color: #FFFFFF; } +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title { + font-weight: normal; +} +.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle { + font-size: 14px; + color: #9e9e9e; +} diff --git a/apps/spreadsheeteditor/mobile/resources/less/app-ios.less b/apps/spreadsheeteditor/mobile/resources/less/app-ios.less index ea4955770..1fe2094fb 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/app-ios.less +++ b/apps/spreadsheeteditor/mobile/resources/less/app-ios.less @@ -354,4 +354,19 @@ input, textarea { .swipe-container, .toolbar, .pages { background-color: #FFFFFF; } +} + +// Macros settings +.page-macros-settings[data-page="settings-macros-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/resources/less/app-material.less b/apps/spreadsheeteditor/mobile/resources/less/app-material.less index da83d5662..c4ca7fba0 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/app-material.less +++ b/apps/spreadsheeteditor/mobile/resources/less/app-material.less @@ -355,4 +355,19 @@ input, textarea { .swipe-container, .toolbar, .pages { background-color: #FFFFFF; } +} + +// Macros settings +.page-macros-settings[data-page="settings-macros-view"] { + .list-block { + li.media-item { + .item-title { + font-weight: normal; + } + .item-subtitle { + font-size: 14px; + color: @gray; + } + } + } } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less index 4db7458e3..7d65fe9a0 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less @@ -440,6 +440,37 @@ i.icon { height: 24px; .encoded-svg-background(''); } + // Text orientation + &.icon-text-orientation-horizontal { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-anglecount { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-angleclock { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-vertical { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-rotateup { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-rotatedown { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } } .active { diff --git a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less index cd0e20035..a81b86ed4 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less @@ -388,6 +388,37 @@ i.icon { height: 24px; .encoded-svg-background(''); } + // Text orientation + &.icon-text-orientation-horizontal { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-anglecount { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-angleclock { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-vertical { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-rotateup { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } + &.icon-text-orientation-rotatedown { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } } // Overwrite color for toolbar