From bf057320ea2bb723316ccee4a64419a3307612c9 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 17 Jun 2020 16:55:01 +0300 Subject: [PATCH 01/35] [PE][SSE] Change list settings dialog --- .../main/lib/view/ListSettingsDialog.js | 307 ++++++++++++++---- .../main/app/controller/Toolbar.js | 1 + .../main/app/controller/DocumentHolder.js | 4 +- 3 files changed, 252 insertions(+), 60 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index 87df71f64..c0f993230 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -53,8 +53,8 @@ define([ Common.Views.ListSettingsDialog = Common.UI.Window.extend(_.extend({ options: { type: 0, // 0 - markers, 1 - numbers - width: 230, - height: 200, + width: 280, + height: 255, style: 'min-width: 240px;', cls: 'modal-dlg', split: false, @@ -63,6 +63,7 @@ define([ initialize : function(options) { this.type = options.type || 0; + this.subtype = options.subtype || 1; _.extend(this.options, { title: this.txtTitle @@ -70,23 +71,53 @@ define([ this.template = [ '
', - '
', - '
', + '
', + '', + '', '
', - '
', - '
', + '
', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
', + '', + '', + '
', + '
', + '
', + '', + '', + '
', + '
', + '', + '
', + '', + '', + '
', + '
', + '', + '', + '
', + '
', '
', - '<% if (type == 0) { %>', - '
', - '', - '', - '
', - '<% } %>', - '<% if (type == 1) { %>', - '
', - '
', - '
', - '<% } %>', '
' ].join(''); @@ -103,10 +134,152 @@ define([ $window = this.getChild(); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); + me.btnBullet = new Common.UI.Button({ + el: $('#id-dlg-list-bullet'), + enableToggle: true, + toggleGroup: 'list-type', + allowDepress: false, + pressed: true + }); + me.btnBullet.on('click', _.bind(me.onListTypeClick, me, 0)); + + me.btnNumbering = new Common.UI.Button({ + el: $('#id-dlg-list-numbering'), + enableToggle: true, + toggleGroup: 'list-type', + allowDepress: false + }); + me.btnNumbering.on('click', _.bind(me.onListTypeClick, me, 1)); + + this.cmbNumFormat = new Common.UI.ComboBox({ + el : $('#id-dlg-list-numbering-format'), + menuStyle : 'min-width: 100%;max-height: 183px;', + editable : false, + cls : 'input-group-nr', + data : [ + { displayValue: this.txtNone, value: -1 }, + { displayValue: 'A, B, C,...', value: 4 }, + { displayValue: 'a), b), c),...', value: 6 }, + { displayValue: 'a, b, c,...', value: 6 }, + { displayValue: '1, 2, 3,...', value: 1 }, + { displayValue: '1), 2), 3),...', value: 2 }, + { displayValue: 'I, II, III,...', value: 3 }, + { displayValue: 'i, ii, iii,...', value: 7 } + ] + }); + this.cmbNumFormat.on('selected', _.bind(function (combo, record) { + if (this._changedProps) { + if (record.value == -1) { + // this._changedProps.put_ListType(-1); + } else { + // this._changedProps.put_ListType(1); + // this._changedProps.put_ListSubType(record.value); + } + } + }, this)); + + var itemsTemplate = + [ + '<% _.each(items, function(item) { %>', + '
  • ', + '<%= item.displayValue %><% if (item.value === 0) { %><%=item.symbol%><% } %>', + '
  • ', + '<% }); %>' + ]; + var template = [ + '
    ', + '
    ', + '
    ', + '', + '', + '
    ' + ]); + this.cmbBulletFormat = new Common.UI.ComboBoxCustom({ + el : $('#id-dlg-list-bullet-format'), + menuStyle : 'min-width: 100%;max-height: 183px;', + style : "width: 100px;", + editable : false, + template : _.template(template.join('')), + itemsTemplate: _.template(itemsTemplate.join('')), + data : [ + { displayValue: this.txtNone, value: -1 }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "·", font: 'Symbol' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "o", font: 'Courier New' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "§", font: 'Wingdings' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "v", font: 'Wingdings' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "Ø", font: 'Wingdings' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "ü", font: 'Wingdings' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "¨", font: 'Symbol' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "–", font: 'Arial' }, + { displayValue: this.txtNewBullet, value: 1 } + ], + updateFormControl: function(record) { + var formcontrol = $(this.el).find('.form-control'); + if (record) { + if (record.get('value')==0) + formcontrol[0].innerHTML = record.get('displayValue') + '' + record.get('symbol') + ''; + else + formcontrol[0].innerHTML = record.get('displayValue'); + } else + formcontrol[0].innerHTML = ''; + } + }); + this.cmbBulletFormat.on('selected', _.bind(function (combo, record) { + if (this._changedProps) { + if (record.value === 1) { + var me = this, + props = me.bulletProps, + handler = function(dlg, result, settings) { + if (result == 'ok') { + var store = combo.store; + if (!store.findWhere({value: 0, symbol: settings.symbol, font: settings.font})) + store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: settings.symbol, font: settings.font }, {at: store.length-1}); + combo.setData(store.models); + combo.selectRecord(combo.store.findWhere({value: 0, symbol: settings.symbol, font: settings.font})); + + props.changed = true; + props.code = settings.code; + props.font = settings.font; + props.symbol = settings.symbol; + if (me._changedProps) { + me._changedProps.asc_putBulletFont(props.font); + me._changedProps.asc_putBulletSymbol(props.symbol); + } + } + }, + win = new Common.Views.SymbolTableDialog({ + api: me.options.api, + lang: me.options.interfaceLang, + modal: true, + type: 0, + font: props.font, + symbol: props.symbol, + handler: handler + }); + win.show(); + win.on('symbol:dblclick', handler); + } if (record.value == -1) { + // this._changedProps.put_ListType(-1); + } else { + // this._changedProps.put_ListType(0); + // this._changedProps.put_ListSubType(record.value); + this.bulletProps.changed = true; + this.bulletProps.code = record.code; + this.bulletProps.font = record.font; + this.bulletProps.symbol = record.symbol; + if (this._changedProps) { + this._changedProps.asc_putBulletFont(this.bulletProps.font); + this._changedProps.asc_putBulletSymbol(this.bulletProps.symbol); + } + } + } + }, this)); + this.spnSize = new Common.UI.MetricSpinner({ el : $window.find('#id-dlg-list-size'), step : 1, - width : 53, + width : 100, value : 100, defaultUnit : '', maxValue : 400, @@ -120,7 +293,7 @@ define([ this.btnColor = new Common.UI.ColorButton({ parentEl: $window.find('#id-dlg-list-color'), - style: "width:53px;", + style: "width:45px;", additionalAlign: this.menuAddAlign }); this.btnColor.on('color:select', _.bind(this.onColorsSelect, this)); @@ -129,7 +302,7 @@ define([ this.spnStart = new Common.UI.MetricSpinner({ el : $window.find('#id-dlg-list-start'), step : 1, - width : 53, + width : 100, value : 1, defaultUnit : '', maxValue : 32767, @@ -141,12 +314,10 @@ define([ } }); - this.btnEdit = new Common.UI.Button({ - el: $window.find('#id-dlg-list-edit'), - hint: this.tipChange - }); - this.btnEdit.on('click', _.bind(this.onEditBullet, this)); - this.btnEdit.cmpEl.css({'font-size': '16px', 'line-height': '16px'}); + me.numberingControls = $window.find('.numbering'); + + var el = $window.find('table tr:first() td:first()'); + el.width(Math.max($window.find('.numbering .text').width(), el.width())); this.afterRender(); }, @@ -166,34 +337,34 @@ define([ } }, - onEditBullet: function() { - var me = this, - props = me.bulletProps, - handler = function(dlg, result, settings) { - if (result == 'ok') { - props.changed = true; - props.code = settings.code; - props.font = settings.font; - props.symbol = settings.symbol; - props.font && me.btnEdit.cmpEl.css('font-family', props.font); - settings.symbol && me.btnEdit.setCaption(settings.symbol); - if (me._changedProps) { - me._changedProps.asc_putBulletFont(props.font); - me._changedProps.asc_putBulletSymbol(props.symbol); - } + onListTypeClick: function(type, btn, event) { + this.ShowHideElem(type); + if (this._changedProps) { + if (type==0) {//markers + if (this.cmbBulletFormat.getValue()==-1) { + // this._changedProps.asc_putType(-1); + } else { + this._changedProps.asc_putBulletFont(this.bulletProps.font); + this._changedProps.asc_putBulletSymbol(this.bulletProps.symbol); } - }, - win = new Common.Views.SymbolTableDialog({ - api: me.options.api, - lang: me.options.interfaceLang, - modal: true, - type: 0, - font: props.font, - symbol: props.symbol, - handler: handler - }); - win.show(); - win.on('symbol:dblclick', handler); + // this._changedProps.asc_putType(0); + // this._changedProps.asc_putSubType(0); + } else { + var value = this.cmbNumFormat.getValue(); + if (value==-1) { + // this._changedProps.asc_putType(-1); + } else { + // this._changedProps.asc_putType(1); + // this._changedProps.asc_putSubType(value); + } + } + } + }, + + ShowHideElem: function(value) { + this.numberingControls.toggleClass('hidden', value==0); + this.cmbNumFormat.setVisible(value==1); + this.cmbBulletFormat.setVisible(value==0); }, _handleInput: function(state) { @@ -214,10 +385,10 @@ define([ _setDefaults: function (props) { if (props) { + (this.type == 0) ? this.btnBullet.toggle(true) : this.btnNumbering.toggle(true); + this.ShowHideElem(this.type); + this.spnSize.setValue(props.asc_getBulletSize() || '', true); - var value = props.get_NumStartAt(); - this.spnStart.setValue(value || '', true); - this.spnStart.setDisabled(value===null); var color = props.asc_getBulletColor(); if (color) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { @@ -243,8 +414,20 @@ define([ if (this.type==0) { this.bulletProps = {symbol: props.asc_getBulletSymbol(), font: props.asc_getBulletFont()}; - this.bulletProps.font && this.btnEdit.cmpEl.css('font-family', this.bulletProps.font); - this.bulletProps.symbol && this.btnEdit.setCaption(this.bulletProps.symbol); + if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) + this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); + this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); + this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); + this.cmbNumFormat.setValue(1); + } else { + this.cmbNumFormat.setValue(this.subtype, ''); + var rec = this.cmbBulletFormat.store.at(1); + this.cmbBulletFormat.selectRecord(rec); + this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; + + var value = props.get_NumStartAt(); + this.spnStart.setValue(value || '', true); + this.spnStart.setDisabled(value===null); } } this._changedProps = new Asc.asc_CParagraphProperty(); @@ -256,6 +439,12 @@ define([ txtOfText: '% of text', txtStart: 'Start at', txtBullet: 'Bullet', - tipChange: 'Change bullet' + tipChange: 'Change bullet', + textBulleted: 'Bulleted', + textNumbering: 'Numbered', + txtType: 'Type', + txtNone: 'None', + txtNewBullet: 'New bullet', + txtSymbol: 'Symbol' }, Common.Views.ListSettingsDialog || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index b56dedc45..70d361b9f 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1136,6 +1136,7 @@ define([ api: me.api, props: props, type: type, + subtype: this._state.bullets.subtype, interfaceLang: me.toolbar.mode.lang, handler: function(result, value) { if (result == 'ok') { diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index e35085aae..dd75b436c 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -773,10 +773,12 @@ define([ } } if (props) { + var listtype = me.api.asc_getCurrentListType(); (new Common.Views.ListSettingsDialog({ api: me.api, props: props, - type: me.api.asc_getCurrentListType().get_ListType(), + type: listtype.get_ListType(), + subtype: listtype.get_ListSubType(), interfaceLang: me.permissions.lang, handler: function(result, value) { if (result == 'ok') { From bfa54f210f7f8ac6ea9babc8f17dd98800ee8c79 Mon Sep 17 00:00:00 2001 From: Kirill Volkov Date: Thu, 18 Jun 2020 15:02:05 +0300 Subject: [PATCH 02/35] Change Icon for Named range --- .../img/toolbar/1.25x/big/btn-named-range.png | Bin 171 -> 365 bytes .../img/toolbar/1.25x/btn-named-range.png | Bin 160 -> 286 bytes .../img/toolbar/1.5x/big/btn-named-range.png | Bin 163 -> 454 bytes .../img/toolbar/1.5x/btn-named-range.png | Bin 151 -> 328 bytes .../img/toolbar/1.75x/big/btn-named-range.png | Bin 187 -> 533 bytes .../img/toolbar/1.75x/btn-named-range.png | Bin 171 -> 366 bytes .../img/toolbar/1x/big/btn-named-range.png | Bin 154 -> 326 bytes .../img/toolbar/1x/btn-named-range.png | Bin 140 -> 253 bytes .../img/toolbar/2x/big/btn-named-range.png | Bin 186 -> 647 bytes .../img/toolbar/2x/btn-named-range.png | Bin 164 -> 458 bytes 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-named-range.png index b3e68275e477308b485419c17bd33b59f86d667e..f9db46bc2a142ec57d0678b6ed3cde3465990b61 100644 GIT binary patch delta 349 zcmV-j0iyn^0qp{i8Gi%-004s?wB`T+0W?WOK~#7F?UqfE!!Qhm1)&fGp%6T=JdF+OCHj6fg-$S2Z}tTi74LWhg_)+@D0uuV{6Of zH87OBQRktjxYibR9ePB|?onl42fIgARV#lC v!_X6+5Jbz~`?zYIMc7YxT+PhP%$%HG=Z>-VL>hX@00000NkvXXu0mjf{zaVg delta 154 zcmaFMw3=~(WIY2A@YE=81X4^TL4Lsu3}utgS^#+|o-U3d6^w7ESo1L`a5!7aeBUp` zH%nq-e<$CHJ)MrTE~zo8$TtZ+7M}FL=vheWnU`yPE-VhoSgQHeOfNa^T3A6*yUy&q zE|%FVa?j`KP2!w+Ht*rWO^o+>b#_!n9s9j|&Y{Wq8qC7+*Xn)zsy#r?@O1TaS?83{ F1OP}zI?Mn7 diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-named-range.png index 5445d2db268c6610a5acd5a7ce3db9cecd3344d2..de07d3985f867f7a7cf8c12d7bbaaaad4fc5cbd0 100644 GIT binary patch delta 271 zcmV+q0r38y0iFVo7=H)^0002lUA4~u008AlL_t(|0qvAgalGb~7(yUus&%J- z34;cL8AwbD#SjcZ5Dek}o{Br=eXXEJ$g z%w%G0%0vnmFQIFit_urY({xGB&3lp?_e2U^{Qr%Y9JVi)iEFnjK-29yapI5h4Q%cx V#2P))8~^|S00>D%PDHLkV1kItcSisK delta 144 zcmbQow19DfL_HHT0|Nt})zs@iiZj3`#1%-pxVZfP|9_p}Hg6z@u_VYZn8D%MjWi&~ z)zif>q=GSdfe;5TZ)rlpg{ZArj2+Jp9AbE)X<(?4Fp*g>fzyCrXC=c_9>(k|O<5%j spG6ERXJ`p7dl20D%484UQa%QTvbWMreFVdQ&MBb@09-3B)c^nh diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-named-range.png index 4506c591ab63a8685e847a7325d1e4c5e312d5f4..2cc7edfa15d7b4f48e534f151d2877580f724cd5 100644 GIT binary patch delta 439 zcmV;o0Z9I%0mcK68Gi%-004(dwEF-60gXvSK~#7F?U&tg!ypiZuLPAq2`+&NE05o- z4(t-#fz*NAK}v85lt2lTpb|Duj(;MU_#iVG53Bd(({T%jNK;c&Q&ZDF*LJ`HzW((w z?a6@)HOhEOAGd?%2f++zq{@?NPmJzUw-aelj#PRkL3hSQYk%s3(lF9g26Y#lL@I+` zsP;^N_D2_UAnRWql*e2kQW?sE?o6-V_7rHzwkJU`Yh#oFomu3$0$LKI6liHZS3&#e z4p(G&5MgIZdz6ufZ)8t0JY&DyqxUgFz$AhRzO176F=F5(!ig_>{s2Y5{&~UNP4g?z z!2R=rWFhFs>3>!~c#I+#5eh+1xBAg@6yeBF2r2@9J?gDN0O4(UkNWFTPs2dc7x$=$ z-C(hu6leu>!-YkjtF7YBnCpUy@XWb7sO_-8RtD|3&{hT&aYOD%Qr`7L?nqMI^^cLN zQ_;srRja6oHTpznZ`(?>jLYpS3pH0pz&RGOVr$X1t^RF7L^52Ls%P zH&=@L;s?Q=$0zWv2F_dkcPdRix8dJuYHDg+e~#!-2h(;Gwg3PC07*qoM6N<$g0EJN Axc~qF delta 123 zcmV->0EGX@0+#`hBXj^>Nkl_FqYxz4X#gTe~DWM4f DVy5p0 literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^AwaCf!3-p&=Jq%NDb4_&5LY1W;^OlE|NnJ@+q{7s z#*!evU#yhb^?X;K{o-@! io$tomVb!%Gk!jvSrUvaI&+S0F7(8A5T-G@yGywp3dPKJX 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 b3e68275e477308b485419c17bd33b59f86d667e..0c51aa92b713d2176f4dcc80047f28d3dfa526b2 100644 GIT binary patch delta 350 zcmV-k0iph@0qz2j8Gi%-004s?wB`T+0X0cPK~#7F?Uq52!!Qg*1)&fGp%6T=Jd=tCS#%`H8 zmB4M-0uzN%(AWaAh2kb(t$SF3+0fi#!lWDv(WfxTaI_dOmVcu6X{o_jir$B%3gb~! zfpI7@VSI`#7@r~o=1>$D(NyBnqv=qD1&V^DOVgn!mB4{Tdv@kfgaQUbyLKjS^8H*w zXP&u5*(uDk1queYC_8}(H&F>hL{pAMbjn?tZcv2R>_CybG!eyz{E#cB1N?xq#rU;l zf6Yxl3=#GVephXxz@q7Xwy5*aQ{2xMbsc&{)9O)WUI(j3Rpp}esH$9)`vn)}pQ@QZ whGFOhPY9xEZGBwT&LXTAJg!DYMn*2qFXxW2_O=5iApigX07*qoM6N<$f`A^Ly#N3J delta 154 zcmaFIw3=~(WIY2A@YE=81X4^TL4Lsu3}utgS^#+|o-U3d6^w7ESo1L`a5!7aeBUp` zH%nq-e<$CHJ)MrTE~zo8$TtZ+7M}FL=vheWnU`yPE-VhoSgQHeOfNa^T3A6*yUy&q zE|%FVa?j`KP2!w+Ht*rWO^o+>b#_!n9s9j|&Y{Wq8qC7+*Xn)zsy#r?@O1TaS?83{ F1OQ0jI?Vt8 diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-named-range.png index c799c693c8aacbd52485bdbc4a61144206a3787f..beeb67914923ac08063f7c7fe0c9b7ef88281053 100644 GIT binary patch delta 310 zcmV-60m=TF0mcH58Gi%-005q{w6y>L0S!q+K~#7F?Ug|d!!Qg*KZHOCgh8-YN7`+J zPzZ%EC}S`Pg%AjaPzZmAXqvi2OPbRT`8`{&esLUNWMt%b!mO-)!SXuJtS7I#_+a8| zKc&oYp2lh&vpP%kOtbn7CHpTPKZ?M%N6~Rj+`GMnL1I%bHTIyaE(Pfbr91Rq1pK28f$X zV{LSHz#9#qOC25>n(3)`08sfYG&{p*x)Kz+LqPGmg;Up*Zaj5NDR5piqURniY^p14 z8eNmtV?cmw*Dt0?S}(o>=(%<6QsBJQUyITdbLo05Mn?WJFT2rD2UA)+O#lD@07*qo IM6N<$f)MJ5&Hw-a delta 137 zcmX@cG>dV9WIY2A2wqTr1f-Zsg8YIR7|JG}wE*&hJzX3_DsH`SpQ7&6#m2F&byKMqLNGh?W5e$sv?|69TbkS7*9(T)N(gmwf)Gt#;)nz(rI@# nTs?k?hYfj^Xf7U#h!=bXK?L@!X>&CLxW1!TZwAM*a`0y;&v zB*-tAA^!dU`yi~KFn@mjeTDq}`xh)oNN~t^sIQ+;P%xpOp+P_(A%6Y(fPnsfyFF*Z z7#J9vJY5_^Dj45RYhCx+K!A1oy(`ksPKVU|`G5cWrmZWARIJ^@-)OqnoRZL-=%FIi zdG-xY`-!qAo3{%o-Jk4#P*CENhANY{on*L3(@dM9m6|Oal_qz}IyOw-XlP?qt~ zrBm|+9xiZXe7M4qaUq*)i_bNV+^<^dE-ZikTuJ9k^S&>&l48Fc<0~JUssMQ>4@G;tVAq|oy7Q-|!k4CLN?&z8 z3F+6AJKBFS{Fwe_$07$}sy3RR?)Hv4roL2r z_M>mhxR3izKDO$a3ioo~(@6z^yO&ko+M?qozV*#-@mnfyc>Xtt?PC?UtKDF!9DUpI z4eQNYCa?S*Rs_~NI`#gNwwd=&!810*;l&~)r`|3OQ!SM%EBqg*zG4;3y7FdE?25q8 z+)7tg)H5!0`^(O0nl)ouhHBP~Ibl1t$sCF~`P^{2z_*D)oi0irb^ow;ypdW~^6QWX QFd7*=UHx3vIVCg!0JJGCGynhq delta 170 zcmZo?-NiUTqMnJFfq@~Sb;?a3#Tnoe;tHf)TwMPD|G!Rfn>UcdSQ6wH%;50sMjDV4 z@9E+gQgQ3;1xB_520X0~<+*HQ6~1#f%q#K`co4WPcia31{$Ho&pVMYe2yJxBW)CbE zyZ7@}+=WRNHr{izFTb#3Xr36XCSYJHCEI-b(Z6$lmG{>^^n1Y}zA(L2TlmLRK7oyW VdmrSiT@AF0!PC{xWt~$(698SHLNx#Y diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-named-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-named-range.png index 49761e20f1411c17a0a5370d969d3577a4114f90..7ea49984e65db557dfb64ef7349e6bfc24352c4e 100644 GIT binary patch delta 443 zcmV;s0Yv_!0m=iA8Gi%-006^jwTb`$0g*{WK~#7F?U%uk!Y~j76@o)h2p571ttmgr z0B1l5I0KWxIRio<1VT^<8$#dX3`bFi>;*kF{*St5tgV%ERaI40RaJ%6dASOfuT63P z+7Hhan-Up6*CrdDAc$rF6L!7!YkMIkTjqlB60Zl0egN70a({)H0TZw<1{e?a{BnRC z?D=H?JKrW@yDJ5VCjq-+fHDel&VxLDi-03=&VxK^0kHFe5PT^>JOI8JV4Q^bJs)`# z6_xRmikX1fk0Xk*((hlu$NXfxr!>3^_?RE#J*44nz&HuYrLg%~B0f&Ns5(Lrix8mW3aLe?KiUXi?#lxLpmEVd>5>KL{>;Ax1 zm*j+^tn_;U7`&(;!Ic{`3WPj}Va&|cUP=MZ)m{n$hGr>4OU2I7EM;h_cuj^jz~v0h zfT4*=*cMy2XbP`e&TV?3O`$0Rcw1O$iUB$&7yHVe+cY7$ys`4|5Vln^#002ovPDHLkV1n;K#@7G< delta 147 zcmX@byo7OrWIY2A_;4%T1yW2UL4Lsu3}utgS^#;mo-U3d6}R4Ab>w3Z6mSV_FaEFn zH6^E3XNkkBwQK4w37mW*Be~RTfvICeqCi;FgS*uy3Tzher-iUHXEyKu__ec1zt`%< xxdSKozVWd>SjbRXP?y5~egD(n|HZ0ru$wMD9rEys=w%*|{hqFVF6*2UngFzlJBI)O From b621f6f273391d3a4e4ba513f099de6a63620efc Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Jun 2020 18:43:27 +0300 Subject: [PATCH 03/35] Refactoring --- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 62b0a622d..f5bf3de3e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -109,6 +109,8 @@ define([ }, zoomDocument: function(d,e) { + if (!this.api) return; + switch (d) { case 'up': var f = Math.floor(this.api.asc_getZoom() * 10)/10; @@ -125,7 +127,7 @@ define([ }, menuZoomClick: function(menu, item) { - this.api.asc_setZoom(item.value/100); + this.api && this.api.asc_setZoom(item.value/100); Common.NotificationCenter.trigger('edit:complete', this.statusbar); }, From 8d69e3e642ce064269b4511c07a3d61da9a37d41 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 22 Jun 2020 15:04:56 +0300 Subject: [PATCH 04/35] [SSE] Add note when changing table size --- .../main/app/view/TableOptionsDialog.js | 15 ++++++++++----- apps/spreadsheeteditor/main/locale/en.json | 1 + apps/spreadsheeteditor/main/locale/ru.json | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js b/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js index ff2a53ef0..28bf0bb47 100644 --- a/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js @@ -51,7 +51,7 @@ define([ SSE.Views.TableOptionsDialog = Common.UI.Window.extend(_.extend({ options: { - width : 350, + width : 355, cls : 'modal-dlg', modal : false, buttons: ['ok', 'cancel'] @@ -65,7 +65,8 @@ define([ this.template = [ '
    ', '
    ', - '
    ', + '', + '', '
    ' ].join(''); @@ -96,6 +97,8 @@ define([ labelText : this.txtTitle }); + me.lblNote =$window.find('#id-dlg-tableoptions-lbl'); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); this.on('close', _.bind(this.onClose, this)); @@ -113,12 +116,13 @@ define([ me.api = settings.api; if (settings.range) { - me.cbTitle.setVisible(false); - me.setHeight(130); me.checkRangeType = Asc.c_oAscSelectionDialogType.FormatTableChangeRange; me.inputRange.setValue(settings.range); me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.FormatTable, settings.range); } else { + me.cbTitle.$el && me.cbTitle.$el.removeClass('hidden'); + me.lblNote.addClass('hidden'); + me.setHeight(152); var options = me.api.asc_getAddFormatTableOptions(); me.inputRange.setValue(options.asc_getRange()); me.cbTitle.setValue(options.asc_getIsTitle()); @@ -218,6 +222,7 @@ define([ errorAutoFilterDataRange: 'The operation could not be done for the selected range of cells.
    Select a uniform data range inside or outside the table and try again.', errorFTChangeTableRangeError: 'Operation could not be completed for the selected cell range.
    Select a range so that the first table row was on the same row
    and the resulting table overlapped the current one.', errorFTRangeIncludedOtherTables: 'Operation could not be completed for the selected cell range.
    Select a range which does not include other tables.', - errorMultiCellFormula: 'Multi-cell array formulas are not allowed in tables.' + errorMultiCellFormula: 'Multi-cell array formulas are not allowed in tables.', + txtNote: 'The headers must remain in the same row, and the resulting table range must overlap the original table range.' }, SSE.Views.TableOptionsDialog || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index d63896dee..2b044c92f 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2442,6 +2442,7 @@ "SSE.Views.TableOptionsDialog.txtFormat": "Create table", "SSE.Views.TableOptionsDialog.txtInvalidRange": "ERROR! Invalid cells range", "SSE.Views.TableOptionsDialog.txtTitle": "Title", + "SSE.Views.TableOptionsDialog.txtNote": "The headers must remain in the same row, and the resulting table range must overlap the original table range.", "SSE.Views.TableSettings.deleteColumnText": "Delete Column", "SSE.Views.TableSettings.deleteRowText": "Delete Row", "SSE.Views.TableSettings.deleteTableText": "Delete Table", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 200cb3dc4..b9643690f 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -2342,6 +2342,7 @@ "SSE.Views.TableOptionsDialog.txtFormat": "Создать таблицу", "SSE.Views.TableOptionsDialog.txtInvalidRange": "ОШИБКА! Недопустимый диапазон ячеек", "SSE.Views.TableOptionsDialog.txtTitle": "Заголовок", + "SSE.Views.TableOptionsDialog.txtNote": "Заголовки должны оставаться в той же строке, а результирующий диапазон таблицы - частично перекрываться с исходным диапазоном.", "SSE.Views.TableSettings.deleteColumnText": "Удалить столбец", "SSE.Views.TableSettings.deleteRowText": "Удалить строку", "SSE.Views.TableSettings.deleteTableText": "Удалить таблицу", From e536772dcb28c095a916ea065e5b3f6d9d8b36e0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 22 Jun 2020 16:01:05 +0300 Subject: [PATCH 05/35] [SSE] Add pivot table from the right panel --- .../main/app/controller/PivotTable.js | 3 +++ .../main/app/template/TableSettings.template | 5 +++++ .../main/app/view/RightMenu.js | 1 + .../main/app/view/TableSettings.js | 21 +++++++++++++++++-- apps/spreadsheeteditor/main/locale/en.json | 1 + 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/PivotTable.js b/apps/spreadsheeteditor/main/app/controller/PivotTable.js index d295b33f3..b59919c80 100644 --- a/apps/spreadsheeteditor/main/app/controller/PivotTable.js +++ b/apps/spreadsheeteditor/main/app/controller/PivotTable.js @@ -66,6 +66,9 @@ define([ 'pivottable:blankrows': _.bind(this.onPivotBlankRows, this), 'pivottable:subtotals': _.bind(this.onPivotSubtotals, this), 'pivottable:grandtotals': _.bind(this.onPivotGrandTotals, this) + }, + 'TableSettings': { + 'pivottable:create': _.bind(this.onCreateClick, this) } }); }, diff --git a/apps/spreadsheeteditor/main/app/template/TableSettings.template b/apps/spreadsheeteditor/main/app/template/TableSettings.template index 5f980d0ce..78e589aa3 100644 --- a/apps/spreadsheeteditor/main/app/template/TableSettings.template +++ b/apps/spreadsheeteditor/main/app/template/TableSettings.template @@ -88,6 +88,11 @@ + + + + +
    diff --git a/apps/spreadsheeteditor/main/app/view/RightMenu.js b/apps/spreadsheeteditor/main/app/view/RightMenu.js index a2f6f68bb..c38ecd3f1 100644 --- a/apps/spreadsheeteditor/main/app/view/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/view/RightMenu.js @@ -266,6 +266,7 @@ define([ this.mode = mode; this.imageSettings && this.imageSettings.setMode(mode); this.shapeSettings && this.shapeSettings.setMode(mode); + this.tableSettings && this.tableSettings.setMode(mode); return this; }, diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 43dc418e4..563607dff 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -184,6 +184,10 @@ define([ return this; }, + setMode: function(mode) { + this.mode = mode; + }, + createDelayedControls: function() { var me = this; this.chHeader = new Common.UI.CheckBox({ @@ -312,6 +316,14 @@ define([ this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this)); this.lockedControls.push(this.btnSlicer); + this.btnPivot = new Common.UI.Button({ + el: $('#table-btn-pivot') + }); + this.btnPivot.on('click', _.bind(this.onInsertPivotClick, this)); + this.lockedControls.push(this.btnPivot); + + this.$el.find('.pivot-only').toggleClass('hidden', !this.mode.canFeaturePivot); + $(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this)); this._initSettings = false; @@ -551,6 +563,10 @@ define([ } }, + onInsertPivotClick: function() { + this.fireEvent('pivottable:create'); + }, + onApiEditCell: function(state) { this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd); if ( state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) @@ -609,7 +625,8 @@ define([ textLongOperation: 'Long operation', warnLongOperation: 'The operation you are about to perform might take rather much time to complete.
    Are you sure you want to continue?', textRemDuplicates: 'Remove duplicates', - textSlicer: 'Insert slicer' - + textSlicer: 'Insert slicer', + textPivot: 'Insert pivot table' + }, SSE.Views.TableSettings || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 2b044c92f..989028ff4 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2479,6 +2479,7 @@ "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.TableSettings.textPivot": "Insert pivot table", "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.", From c0d625d76bdfa965b7d6ce44a7b069cc8d6b0619 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 22 Jun 2020 17:07:09 +0300 Subject: [PATCH 06/35] [SSE] Fix math box --- apps/spreadsheeteditor/main/app/view/Statusbar.js | 10 +++++----- .../main/resources/less/statusbar.less | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 6e2dcb7b4..c00e9686c 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -493,11 +493,11 @@ define([ setMathInfo: function(info) { if (info.count>1) { if (!this.boxMath.is(':visible')) this.boxMath.show(); - this.labelCount.text(this.textCount + ': ' + info.count); - this.labelMin.text((info.min && info.min.length) ? (this.textMin + ': ' + info.min) : ''); - this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max) : ''); - this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum) : ''); - this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average) : ''); + this.labelCount.text(this.textCount + ': ' + String(info.count).substring(0,11) + (info.count.length > 11 ? '...' : '')); + this.labelMin.text((info.min && info.min.length) ? (this.textMin + ': ' + info.min.substring(0,11) + (info.min.length > 11 ? '...' : '')) : ''); + this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max.substring(0,11) + (info.max.length > 11 ? '...' : '')) : ''); + this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum.substring(0,11) + (info.sum.length > 11 ? '...' : '')) : ''); + this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average.substring(0,11) + (info.average.length > 11 ? '...' : '')) : ''); } else { if (this.boxMath.is(':visible')) this.boxMath.hide(); } diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index fe679eb1b..9dab9f2c3 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -122,16 +122,17 @@ #status-math-box, #status-filtered-box { float: right; + padding-top: 6px; + padding-right: 14px; label { - padding-top: 6px; - height: 25px; &:not(:last-child) { padding-right: 10px; } - &:last-child { - padding-right: 14px; - } + } + + .separator { + margin-top: -6px; } } From 423dc2c0fff794913fa625a53a0ab4f751e05891 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 22 Jun 2020 20:15:47 +0300 Subject: [PATCH 07/35] [DE] Add new content controls --- .../main/app/controller/Toolbar.js | 30 ++++++++++------ apps/documenteditor/main/app/view/Toolbar.js | 35 +++++++++++++++++-- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 664a25181..82fad3fa6 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -783,10 +783,10 @@ define([ toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked); if (!(paragraph_locked || header_locked)) { var control_disable = control_plain || content_locked; - for (var i=0; i<7; i++) + for (var i=0; i<14; i++) toolbar.btnContentControls.menu.items[i].setDisabled(control_disable); - toolbar.btnContentControls.menu.items[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); - toolbar.btnContentControls.menu.items[10].setDisabled(!in_control); + toolbar.btnContentControls.menu.items[15].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); + toolbar.btnContentControls.menu.items[17].setDisabled(!in_control); } var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock; @@ -1826,16 +1826,26 @@ define([ } } } else { + var isnew = (item.value.indexOf('new-')==0), + oPr, oFormPr; + if (isnew) { + oFormPr = new AscCommon.CSdtFormPr(); + oPr = new AscCommon.CSdtTextFormPr(); + } if (item.value == 'plain' || item.value == 'rich') this.api.asc_AddContentControl((item.value=='plain') ? Asc.c_oAscSdtLevelType.Inline : Asc.c_oAscSdtLevelType.Block); - else if (item.value == 'picture') - this.api.asc_AddContentControlPicture(); - else if (item.value == 'checkbox') - this.api.asc_AddContentControlCheckBox(); - else if (item.value == 'date') + else if (item.value.indexOf('picture')>=0) + this.api.asc_AddContentControlPicture(oFormPr); + else if (item.value.indexOf('checkbox')>=0) + this.api.asc_AddContentControlCheckBox(oPr, oFormPr); + else if (item.value.indexOf('radiobox')>=0) { + this.api.asc_AddContentControlCheckBox(oPr, oFormPr); + } else if (item.value == 'date') this.api.asc_AddContentControlDatePicker(); - else if (item.value == 'combobox' || item.value == 'dropdown') - this.api.asc_AddContentControlList(item.value == 'combobox'); + else if (item.value.indexOf('combobox')>=0 || item.value.indexOf('dropdown')>=0) + this.api.asc_AddContentControlList(item.value.indexOf('combobox')>=0, oPr, oFormPr); + else if (item.value == 'new-field') + this.api.asc_AddContentControlTextForm(oPr, oFormPr); Common.component.Analytics.trackEvent('ToolBar', 'Add Content Control'); } diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 029e27b84..b740bd2d8 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -643,6 +643,31 @@ define([ value: 'checkbox' }, {caption: '--'}, + { + caption: this.textNewFieldControl, + value: 'new-field' + }, + { + caption: this.textNewPictureControl, + value: 'new-picture' + }, + { + caption: this.textNewComboboxControl, + value: 'new-combobox' + }, + { + caption: this.textNewDropdownControl, + value: 'new-dropdown' + }, + { + caption: this.textNewCheckboxControl, + value: 'new-checkbox' + }, + { + caption: this.textNewRadioboxControl, + value: 'new-radiobox' + }, + {caption: '--'}, { caption: this.textRemoveControl, // iconCls: 'menu__icon cc-remove', @@ -1957,7 +1982,7 @@ define([ this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge); this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles); - this.btnContentControls.menu.items[10].setVisible(mode.canEditContentControl); + this.btnContentControls.menu.items[17].setVisible(mode.canEditContentControl); this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); }, @@ -2321,7 +2346,13 @@ define([ mniEraseTable: 'Erase Table', textListSettings: 'List Settings', capBtnDateTime: 'Date & Time', - tipDateTime: 'Insert current date and time' + tipDateTime: 'Insert current date and time', + textNewFieldControl: 'New text field', + textNewPictureControl: 'New picture', + textNewComboboxControl: 'New combo box', + textNewCheckboxControl: 'New check box', + textNewRadioboxControl: 'New radio box', + textNewDropdownControl: 'New drop-down list' } })(), DE.Views.Toolbar || {})); }); From 1a9e30a27c91951e666b7fbaa5734b466e86870c Mon Sep 17 00:00:00 2001 From: Kirill Volkov Date: Tue, 23 Jun 2020 11:51:11 +0300 Subject: [PATCH 08/35] Change Icons sort. Old icons were hard to read. --- .../img/toolbar/1.25x/btn-sort-down(ru).png | Bin 393 -> 388 bytes .../img/toolbar/1.25x/btn-sort-down.png | Bin 368 -> 355 bytes .../img/toolbar/1.25x/btn-sort-up(ru).png | Bin 385 -> 376 bytes .../resources/img/toolbar/1.25x/btn-sort-up.png | Bin 387 -> 353 bytes .../img/toolbar/1.5x/btn-sort-down(ru).png | Bin 435 -> 437 bytes .../img/toolbar/1.5x/btn-sort-down.png | Bin 408 -> 440 bytes .../img/toolbar/1.5x/btn-sort-up(ru).png | Bin 419 -> 438 bytes .../resources/img/toolbar/1.5x/btn-sort-up.png | Bin 402 -> 415 bytes .../img/toolbar/1.75x/btn-sort-down(ru).png | Bin 610 -> 510 bytes .../img/toolbar/1.75x/btn-sort-down.png | Bin 578 -> 454 bytes .../img/toolbar/1.75x/btn-sort-up(ru).png | Bin 527 -> 502 bytes .../resources/img/toolbar/1.75x/btn-sort-up.png | Bin 578 -> 463 bytes .../img/toolbar/1x/btn-sort-down(ru).png | Bin 286 -> 306 bytes .../resources/img/toolbar/1x/btn-sort-down.png | Bin 276 -> 298 bytes .../img/toolbar/1x/btn-sort-up(ru).png | Bin 285 -> 291 bytes .../resources/img/toolbar/1x/btn-sort-up.png | Bin 271 -> 300 bytes .../img/toolbar/2x/btn-sort-down(ru).png | Bin 535 -> 564 bytes .../resources/img/toolbar/2x/btn-sort-down.png | Bin 513 -> 528 bytes .../img/toolbar/2x/btn-sort-up(ru).png | Bin 524 -> 539 bytes .../resources/img/toolbar/2x/btn-sort-up.png | Bin 520 -> 520 bytes 20 files changed, 0 insertions(+), 0 deletions(-) diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-down(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-down(ru).png index aa81ef6636d1eecca92e3af7a43d4db1a0d02f13..ea4e7479b572488d863be93e6ceb936fe6f0a7a1 100644 GIT binary patch delta 361 zcmV-v0ha!W1B3&RB!5duL_t(|0qxYmk%S-+1<($G5ITejfm+%sv(OOCfXQIYV9caL zFa$#RdvH~7kios|9;Urn1+Th4K=i5KSJMk*NdE~+E6@WttUz%EiOMW`2~o_@3rNcX zdlOhwi+};#0GMi|=|zb|(}5L{9!dmF2UbKxT}SjaqysA=ihqs>Lprbm(z0Ov;(?tb zVC-e8ki7#@xmO`u2T%lD|f*abpvf;Oh_=j0j8am57_% zb2(Mj$b{!|s;ZGDh|O(VKmu%T+tTS$d9)mF8~2qyHQT{`fa7iBzF=~hu;_XjH`XtR z_~Wzra~XBLi((t=7X%)fA6V~#HBl$*f_Q;=7c6H7)+4|~oiGAC0FMC9J}YY~dkU6a z5S$Xcrn091MgUF-A~(75HEPSEd4dQN#@DF9&=cZQ|E9hHgCGtBX0Rc&00000NkvXX Hu0mjfdV-&L delta 366 zcmV-!0g?WM1BnBWB!5szL_t(|0qxYmt%EQO2H=dq2p-{$U@4B&V>c)xbc3)#y8&## z2p)kEJVHnK-ytCK&`U{fJv2uo{~yFQ&VA2^p9=}XPyR&kz5)c`PX$gYoS(eP(1c7- z3{8kE+<9w47Id%%#9#gBoTzXuf-6Snpx}CB4n0%oMXQk+J%0#2v=X_HyhKGsy>VBA zfbfDsp)hn+Na+2ze$i9zRY;Gu0#Dql5Lve272YrGEwXIG3*Im6bh`ebn@i3be+w2Y zSRQ=R_!|rc%Y#plVEl6oK0z#9SOX$RQ`LYVO;rmr$Sf?Jf^%>m=>sxg27^;@4x%eF z4^cm+U{Q$)k!P5%=Ye@ZF|NUim=Hv0aZ^&*`u5~aqClcIrsAe(_Vxrr1Q21M!p4U+ zZ0iG)H^Cc%wy>=aAQ(_2ob!_m$7VB$mI&uCZ9n1X?z%iOf_HYT2+R0`-%~*HSjDi6|!#E`Mdi8pzFn&nItK9iib7 z!zJXX0E+bzvR6RmdI`bir!)5k**KlKw==2W-6?;K9Ahtk+h|u7ot5D3AAObZ&PNx5 z;A3CA7#O=|GFl&Nl1CsWIwcw+%wX)B!oj{9mnWwR)ZoW1mS#b?&}z7iyI&$ zgn|0Hj+if@h(R+xB7g{aeFYM^{y+oCkk{83_|C9OoCdx#tPr&$>uGz5CWkLTm~(JmO&v5 zgg_Vwf$;X=bdzYC)V}r5Ia>O9n(sHxedojH;Dz+Fd=d5&cwm*_O~S={R5>?6?kMLb zhzy~N)&v>oum(sx#+!4Z5^5nFxjBat>LHKR2cLS;YRH2gPk)bALJnR=QBl!op{s%5 z8Br9)=&B&8kGE-~tDLGJJyU`!rz(gHPkANGh3!Iyr@Vx@u(x)-KsQJBH@PHBmQ2Q_ z#JihZFbrc{N?f%`vf$e`!SGEG$!!i4Q`Iz|y7HsGBUi?$m00000NkvXXu0mjfNPe6M diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-up(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-up(ru).png index aeb4c78f4d68798ca303e3db8b0ace348a6e1c1b..0617932d3d97152283689dcd91f37b625e25f77c 100644 GIT binary patch delta 349 zcmV-j0iyna1NZ`vB!53iL_t(|0qxYm(Sk4#hT$zCC8PvP$oyGm>;gNG4q^#*pdDDk zmOu$9!4ls85OD;7A)Y+AoM1>E_S+01zxu3#)6`@|QC^>q?_LW>A_Fjbhs6~VukjZA z`?f2{l^gzj+Z9C7Ft_ar0%303HN=|BzOEDFQrSuH@iCFjh<_g@vKbMH$C!iL-iZiD zGOnVNz1Mr0N<}C4GL@Rsb*>!zm2>6bmrq^oif=%ggQ8sx!U5>25H;=9st}{cDv-Tb z!cGZpD}o1hfZL2T2Q?A3A+UlKWDLKAWg^%RSiuT{TL>$*B7fZwn3|@7Xqtxj467BP z8v?^f1tDPzVO9-S`R?Fj)}&~Px%{7J!Wzmwo@5e`$jq!5cW`o_5NK;IRebS6@^AMH&wM^WUNO00000NkvXXu0mjfMirrQ delta 358 zcmV-s0h#{z0)YdNB!5UrL_t(|0qxVlt%EQO24Ihn5i$ZJSc)U{*bT}E-5_kxZU7rF zf=6HkkI)hRcL4fOfl}Xks83Nu@(DXX(XYO`(j{BAY=Zy2<$7JXz+f;ezQWrRl#Q#` ziw_V(^?LCEBH-XefZ#4k+INP`{>b|6G@6HV>s2oY{jw11wN)S}LI)lgTvPB9xt z4}u6obRnseW_|Hnq(ig5_;4m$FV1`75IIFbt~>}LfXaoWF6rE~50MUv#)ZhhA(;yq z5MT}@ol{FBDojMQO#isvAkJuspkN}RW%?2JkUrNOpJ`DkBO+zo*+6>Kh|jbr%7~yq z_lEuu6%|d!fnSJYGARNnY0A&W&>v7J6oxS6rT{2&em3%++Ubw(awVD=>=8t$F`d92 z*JnJjOAyI0KVIRvJsd^%2qFyg;|0&{L4@uSzxtZ`1M=bbSZ;2NKmY&$07*qoM6N<$ Ef`Un*-T(jq diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-up.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sort-up.png index 9ccda2bedd961b8ff28c5d5ffc0c9ba01187bc17..0bdf84b49d73c7c80e550a93ed60e073a641d840 100644 GIT binary patch delta 326 zcmV-M0lEHz1K|RYB!4JLL_t(|0qxY$je{@@24IiC2pNG9qKlEb1&qK3VS{!fkH82X z<-dnCTnQv3r_-qqHE)*8hyS1ued>3`_<8pI+yq`~-@nH0?oo$qFTLZ@gs^v-Zg@d> zXu4r>VCbD%(}JLf!ZaW^GpOwkyA?)Ypg2qvkwJMmc8iGOWPhT7qz8VDqz7Ju{O2!R zzeyf%o%nlXm>4{_AeaEmO$ZCGEKP`Dg)|^H!>~QWcC`o$fF3|sjSLeD5laj#U;){~ zFJTE0BnB3+fS}8SKBFr%`2z)@`A(^n^6TaITr|cQ*k2l&D zR;=#XQFs9Uct4{NQL@4E49qxXoD<0g%LXfuA&7W&W6BX(!*Wg#Va1qoL@tqqAp}Ahcp0<|S_XwM z5CXvv0^!?3k~TkUIl1-FIVF)^KKadi7WvKxk6vSrIcDuco_(dP;7TTw>6s~D2P|gq z_Ca31&A3AlP5QfduS!TP6jjKNn_IO9f@7tqLY7wTf-J1s0e@LrRfnvtszSC_RnxVx zstSo&`!U3}6O!r25Zi&B96Lz?T~C)1PY2Tlr$dnN2zIO|Jg|d3(atx^^;aPs&2s$} zNH~YPh?;s45#PKa!}C9gGj|aTFCs$ohR~EC&)9kw+aX6*v*{p!O-jax=u5X9wNg^cr6|klFB7gEYSXu!mUPKs3&G0rD z8bowsSwkC40D=e`GNBQUlX3iZjqpURT_fDNJ$*82xe<0gdr@)|9G|1lpnN*b%P`N( zdda8LeAPIejol5+{}bNgs)C^DT%NRAo_FeAIq3_JjDD2f({fw97j4Cm?Ia&$|U3alZzjR)Aq=wGkW z8Qqg{66pvBobdoN;+*Z3t}jd1tv%4jGAlw~mabcSpy2|$4V{;G&CgUrbmIaW@Di{2 znG$eVWJTgs-yWx7(qL(c6=AAxkJB&_NQ>;f?)97X0Ti{*J7k?d&yWBB002ovPDHLk FV1g^n%klsK delta 409 zcmV;K0cQTS1G58=B!7BIL_t(|+G3z90JK*JHx7e97=>GK36wwyBYBYa=5(;>!0sR= zxCEDw5-7nXPy!{q1v!ez?jgW&l|c$tq+g%F1OC*fzKo*s`kzvl#Q?vuPzk$DcU?Q- zjh(d%mO-Pl8f9pQ8HiXSLkH}x>J#MM+yP%nSv+$Gto!(#et#$R9q>-dGU1!yyvZsm z<3&+vgRw*e;Q~l2ylHeH4~@Du!W)r59+9;P&W$DJK}p$QN>yV$vPjurP}f+`$_>^4 zUn#O>gF#(mJPugcNH-z9q%}BM=(eSEGEI^yQ>2>35Gyuhf^i; zc5byU&K|I{x>T(Bc5XEb_JFax%jz)0vARRyl&;i@Y zmarvE2`=H~ut03ckJm^XP$q{+mOedR`IGJ3ZEo{-vl|qZdQEA|G63JQG-h3#bcwH> z@WjGv7c5@01kK{N!+0`*jPHQcsIzlA>!AZ4nVn@~07*qo IM6N<$g6!hLNB{r; delta 381 zcmV-@0fPRx1DFGlB!6E?L_t(|+U=FWZG zmB|G5ouud_`K}#IN5bW&Gl1hwmJC|rU;y99UKR!eSk~~7-+vcb4B(aQ<-*boj!u$z z@!=|nZv*2<_*_@Ow}NL$QNK%)OpV}~gl?6XTEJVdeE&rGeZYiM!Fqb}`+&j8U=`H? z6V3&zs16vM4Azh0AWH*yW#?sJslZl=$=m=I_SFWaQUz{N)G%9bj4~U+au4cz8<;yv zZvk)nX^WWwOm+`suL114sOIg|p|GY7#C(E<*_-7?qh}+o$O*=q~(;-hzGt?;n8o)$q16;(v#!sp)FC13pj`T@8zD zTPx8mTV4x`&{A+RxdLw5=tFx|!9KLtYIqkKAKR;9I{DaMHPh)(-CR9~>gHOCJy86= z;pWAdmXUQZFMw9Uv5!7|>6LJgbEth{H?^XhD%ep9n+mvTEsI!g+VwCkS%gem0b7pm zBHPaLd8D&6!GD&ly9sCBMd&!!(vc>Z#I4$0Ff@qh#>%)oYKU%WfGv&d+7&hcL4*zE zygde-G{B^BUAx*?<4=HL`*C!jjU`ruo+kpNpZd#OMy>>0{h{#6aq1SHB`}zzO zdXwSE&VmUPZVX3u8myw_h%T^TwGMEKT4Zp7BZa{St{Su6RevO?IR0_wjt~$BSV9Gp za>@>H;0|Q+Ik2fBzdfJYdj58PYF)-$gA2?;w$5GSG+E{ur^yLU>$tkdX=Uw<(|M_{ z_ypK`Rq=rdfH=Wv)m?8+@XF531(rdJonNQH43u_$Il$?vTLo=tc7U(cS~g|}SoiU( zJ}2EA;GJ5_bbsI-mxPMScu`awmxLf(067a@wWNG3EzMxMq}aeI>e4Y*AwO1W24f*M zFp;HWED5ihS%w2Q=87c6RAa|jR*N))5y?bov1=@o8LXid!*+~iGJ_c!!*-1IRGRHI ntm|JG>nUce*1CP`-{}Xkmrkt$qtGe<0000tvD~5En)o&Bp;rM0@PBn;ntxVhNL99B7$}BhWgBkQ zexxe}uwtcm6PAlrZm0^z1&XE?{_8nTe-u^6|AyPcH^%8uJxkFEk1Z_h+;z4%9_7x#q4NxuqvoQcrm(Tg7L z3BzHn_hq@CX_~pcCX@vO%+fy+N}Y8H1)B1Sr`pqS+`eO&axQ5E9&LUvKzd8WC;@DMUb!$ zjHeK^Ec1>!8lvU{$q%RkTpConSS!fK@aN+X+@v8tXCIt$z}%CdPJ*cH94_LmvpJ VH7gTE1hoJF002ovPDHLkV1iZ^rr!Vn 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 2c40972d04b0a9e99d31cb306fe78e56f0fb57c5..659c970c1cca7f595a21b010b03a41a44854925b 100644 GIT binary patch delta 495 zcmV6kb|l%ny=P5nC^69*!c>AT=4szzHc98;$6f}^OS@erdlGRDpsqot2f l8phZ;gQh>ETy@pot1q(YlT>9*#E<|0002ovPDHLkV1mSb={EoX literal 610 zcmeAS@N?(olHy`uVBq!ia0vp^Za}Qe!3-qjPWHqDsonse5LY1W>gwtO2LE9I$OAH+ z!2nGPDDL6m;o#r^Q47=yR0UBF6oD|{+98HGIXOY3fGQy(KoV#I#1Nnf?(XhD5uh@e z&zF3G4$?0P@(X6T|NcJ^IXEnszkfXlD+nkEB;0REXecPCub(g>z99bm`t$ku1_}lX z{QVO=Ym(a-7#Kr6T^vIy7~ftFo%Py)$02d%T?1p@;_v(S90<=-+8;L~nC)-k5ANT+ z7d}_Btu8FA(@!*YU1?+x#gUs-Htns1#P!e2%)&-XGg^!`UWrn%n4HF7;y$y9xkD)3 zgLT4fjl2+9E&&@z1SL>ES*7-uVhgx!G#LH!DIeFw$VckmC zO=p+n%C5S`{+nrdlz}%fj&rutOmn^E0cxptf4g@X zwZ5@`%#@xZ%^-5>haE%4oS#O<>t@bu$roPyw0~k_tsCdeih3 zSV;Trv%=kxGmh=EpSUyp%jX^U^?Y96H$GyObHzQ(*JpC=f!sURIU#3WcV<@B)Ze<$ z&unbTEFCt*Tu^?-$;v7H+Fl+-76zLShfSF=-N3k=zsR*QmMxvl?oBmo3|~51l6~9# af4kh+IR#2?9yA1{CI(MeKbLh*2~7YBoDysR 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 28bc86203ba787f52e93ca831485aeef852d39f0..d841b17f1e1f75644c9b1fd63ba94ff7acdb237f 100644 GIT binary patch delta 439 zcmV;o0Z9JB1jYl98Gi%-004s?wB`T+0gXvSK~#7F?bgw4gD?=ragV?VH$q0RoX0&m^ zN-l0*w@cagnEvlM&1st6&JJ_FpL`Zlo(}whei&>DUmT&Trg0gl*kx_01?Wb8`z5aZOWb- h7{NyI+F&dWgS=i+cb7002ovPDHLkV1jo?#VY^+ literal 578 zcmeAS@N?(olHy`uVBq!ia0vp^Za}Qe!3-qjPWHqDsm1`G5LY1W>gwtO2LE9I$OAH+ z!2nGPDDL6m;o#r^Q47=yR0UBF6oD|{+98HGIXOY3fGU9upk6mOH@FFff??Z$j?gX% z@(X6T|NcJ^IXEnszkfXlD+nkEB;0REXecPCub(g>z99bm`tu3_1_1^(tO*?q42-Ux zE{-7;x87bjIq8ssK*Phfw97rmT4u~Rd-u$zfBY700Y@1dH;4Wc|HTk5$~*s_fz#cd z4@SrC>O4rD6f`qI#2H{Hzn9NVNB;1%U2sXOIS=$xC^8Mbs9v9lexZQ*Ry zpw?})hCSo6hH|0)(*~nM8ifH_B3j4RXjHoO3#J{uX&yJ7t^9Lz!ZE*_ z2{RNwiye-#e!4jE*q!8e<{NxV*62i0-#dVye4 z2v$wZNbsec-K7qP)!voH&;+Yr~TYGaIV zYxgZh=RKHd8)6)7jG@Kth4YgnygDDOTQS!8pl&C;_gUz!G;m=ajR+k-62$?jTSk8{)4MFfGt!|)Br5VmaD@`FjoY|8X~-TA)07mgU0eA{`v zN-j$3Rd1pqo>fhV6vs&drTo<^zLIyN39aw&K#*kC(J%()020a zh!`jLG^HWg?OZ(xGhnxK_4F~_i@v1Hf5K$b>W9IoZWtAEWy zJ^PEiO$Z@y;#y_y(G0^{6%{2H6%}ojSz;ZvU0}3bF#jnp6a=A#Sz<=o1%{S!Ro>~o z&X!GU>Mos#$+VeZv`sc$7kA~I?rX!SbXSjzW`d!`h;FO$ro+5?Zx)FqCQAn;9Uef5 zz_kj^A~6x;0323PruXmSgY2|U{#?7mI?Cn!yIV}5(%gU=Jb)5{eol{v>!F=*?U1PB rI!Xw9@}&yrTRVu151?$>vc-|#kS&);kALe<00000NkvXXu0mjfLTdA! 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 aeb9be99b27ca834e39e3a33b5e96dc01a3def51..c58cab60ad974be3c24045c16634832e54ca733d 100644 GIT binary patch delta 448 zcmV;x0YCo21kVGI8Gi%-004s?wB`T+0hUQbK~#7F?bgAKgD?;UP?tanE`bs(d606X zgU|u#07^&)n+}o=TtZ5i5-8#C0g_-A2D6jHZp3g&1hSvZw+CbP+Us+QFumrVl1IUh znty5o>|hI~_BWVlN()A-#!#TJw0;{f0byzV(kYE+XSEnKV1HO8Mxvx+BuX-d9D$q^ z^CXG`;G~$Vg1ZH?9NZ0n%9)H+jfi& zQ{-E?}IMn1dy_oI00jFt7k}bjVbgqN1BI6zHVFRJa*~fRhfx z{%8!j;;zClj(^6$;jX}t^E~|O;t(HfQO6ixFHYnzjDju>F)ZpBgIWsj*Dz&E*YO=^ zJyY|-Q1f8VhIbeREv^#`qj_P_fQ9gmuQu#;|(&2fO0E>=|Io=t(;_=CSF>2S>9ui60uYcL`*zLm$&$Z8t=1Da;c=@vUz_&V!GjAAooNJjG+sruq?fO&t z3f-B!BryL_t(|0p-)d4TCTYg<+4-5i&wXK#f5?vH>e}12O`ebOc7| z2p%CL{5_ybNeF^dFZC_R`mkRVk^imUE1k=~D6Kv`Q1sF4ldx#gcmZ5U#0y|=8g;z@ z8jpW%Y2u@(DW^OsP2$99B%|FxYV-;T5Jbwa)2Ub0WN$%G7YI dJMO>g1A5rExezPcTjT%$002ovPDHLkV1l(^fw=$x delta 258 zcmV+d0sa260-gepB!A^eL_t(|+G3zC7zHlp9R!egfO6=lwqY2E!#I>0f+0lpS=*Z- z)C?L1DT6>T1VboIg%CK-fQWkJbd~||8Ul^ap*YfVwUwI*&vyf^bb&0 zy=sGKM>WAu7n&@6^cjewu^dOk+2C}&NQ!p@%p@*)cLV$#8+(cY?j2j3s(So+en(j;9G;XL-mZn+eW5nAl8EfhtRE`}Z8Zpf`^lm4)`ld(a!Z zn8U44jy^O6Tl52$x%J6PHP9P6r6%_Sc5>vtDclZrQoA>PU#Xdvs>wu--T(jq07*qo IM6N<$f_fTsOaK4? diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sort-down.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sort-down.png index 1b2caf519f067166b04299e42e12043d2f5ac0e9..5053885b89cd714473ab4f8d6d333a2ef9550032 100644 GIT binary patch delta 271 zcmV+q0r38m0;&R#B!BTqL_t(|0p*jy5rZHQMJd4&C?O>XbW#T&_+Ls2ZBP_x|?iH{fzcxCS#0ANmc5KHc*~vubvD z>qzqebnDK)BbQDLY!0}C=KPw^vo9`Hl99;ZqS7@!5?pR6N|KFnxur1DCb%o<1M5P) VvYf}?8~^|S00>D%PDHLkV1il!dBy+$ delta 248 zcmVJ77vk35Ym?TS{O$U^;*fQi4mM zlqn&l{P+OK(hwzwy)BM>i1hSHPsz`B{&r;D|GFEk94jtIE0<;|$J_^*DdYiAitT*> zEVlP9c$#9Bt1I0AnW$WSX=oMBhn?hf>3}nt9hpl9e3gyb0db!>)PZ9oonQx)5;dx< zJ&=N;tZmSvw|E}RA$0*17Onq^v0GH1l#2UsJwG51R$`@rPz?(f7FOG7LhY3}OgjQV4-i z2m`?o?q66{n#59P)lJ_nv32BUjYWPp*D;%-y#L#OwJ>79ZiUW1$(G}h=z>N(5?wIa zEjYp80*9zopAIlmc{;#bNai|Wzx%NCKuR?IyZg`%zsfC!e@{O1P7QFty&!5 zLZx_4Xj*jLUQPqAV`mZz>-KUQ$apSXMYOik!zG!{iq6UQ*FdC-P+Ms(7&9=pf!`NK zQC_8okW4vpA}q9&Z7$)&iDXNY$lrY{Jp^5koCwAw!u_puU_Eialz(0ix4EO|Zx#Rm O002ovPDHLkU;%=+z;t;4 delta 257 zcmV+c0sj7@0-XYoB!A>dL_t(|+G3z47zG{*F6*7=yS#_-0p-)t34<^ch2a&tfsT+7 zq~6fJWrVsxvw_{f5gZ{SID#W&l)smv7BJ=Jy@4YH4j-I=Lb*pvV&>?<575uvDYKa1 zjP_Ve@EYYMovbDpdC{?&pb|+&pDj>{#7MR$5B;NR^1!2NvU)6CTLmt(1<*cX7cEfM z?otD?qP>bYl<5|1kb#L%0m`IF6`=M=CU|fAEaN^}qIZHO7XFjWxQ`~{Kod)Y!?ls% zpP!pk9-qA{3=TA!PY*{1&8c^c?PvXLK*QV(`P(%cekv;;0)1kgC zr{2Ul25!r#H-Yt4hu{tXuMD`4Ky9N1zxH(l*JAj!uisiq`G3i=zHb5RN?E$Nvy=*! zF75zhr+J>jU0_Eh9huNHY5%yLnh|(v3ZRjA_R)+$no@8U(L9O{E}FJV873;S2zeBZ z!)Re6OtG6{Gl>a4no?$yZc5G6hsU7IrqmYCB7c{c=-{F|VM5DEhD3f&-%;0U2UY5zGwvO(P- z*}xGTA){mjN4Z`Dra;BK|5Y9$93Px0$z_*iKksPgkdV309MD5oH+8{^te6zw)40sz z5`+PB3ee}#sK5-P0R3F+_Cd^GP6HN~Kl>6a$lz{({Uw@UA8eF;ylFt}xT)Sy(j%ze zFd-;FNt{gqCeC&V@(&hSYH5ky3OKRx2Md;38W9%Y#8%;OA0+tKakJ#%i?@x!0R!jA tktzV^CwG>u--cv^`<4ZBl_dAi>kUl^j9c?14=4Zt002ovPDHLkV1nY!Zg&6x diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sort-down(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sort-down(ru).png index a4f3f8728d6e2ac43b1d33cbeb8d6839c9441a7c..cfa80116bf8f99862a780a2765a5c34c04a099a4 100644 GIT binary patch delta 539 zcmV+$0_6Rd1hfQ@B!Bx!L_t(|0qvK;jjS*bL@ z2!ag701W^`F~H6Wg3QGLEdX;Nz^)Or?QG2C96%btVq+#}0e@;E=uw-P$ytB~7%?%E z^Ezk+`II(hau%QkK51hnX8^7VR;`L9IUR6KutLR>oB^nf@0`qGlQRH~?;La34VO00z{qfBqr19-^;iG>)X002ovPDHLkV1oU)0^9%q delta 509 zcmVzJ_a^=c#v}*nIKg3t(vGVCW;H&d` zCzO3t3y1?UO*LQ`wQh~ofFtYHSPz)GA>6xE4VW0XlPUq_g@1RxQI@X(!~>3ojIRO= zvld&Fmny)S#TMnI9B3D8Cz*Xy0hk!v=#%G zt*v!oEd=&Xgm$+sO$iVOw7Yd_ihyD4(hifuy$Cq6n@8qe1k_`{xr$ngfDd-_h^&Xe zdNE)@{&%2n^na`@-dYZ%;hBu30#FZS#n6UUu?p}(Cem(=6@c=h8{Rj%9Eb;O9%Cio z_ovFhr;5Pd3B`&)2gEu+i=qf~7`M(<-oXgWj9ceYpykIPltWVf2+`ELcVO={og@xG zCXqivm~ihv9MehQMq7@qSd$28gCTksk~l{su^e476Lyer05}r-ooFoYj)2~ENxZ^d zpI!3qp|MTlt4<@4nhg;06L)r zN^l93aQ1`85`G#aT35)? zfEHN%Xk8&EPJfcH(k4m7MlQe$aJBIEIn*RO`fR`#h^PCr^__@$x<6ar0MwNrl-f~YWW)$u-iF|qNiE| zQn@z~#LKd;hal)`1{{xp{Je*kWjp|=X29tf`27kcy>B2xk?%%ZkBEQo{U+K}2?lok zs7J)ryAGYcMi9Op&fczHE}@WJMgxG;Z$g|E^7CCSJBVStXL#8aV$d)0qMi`Lc99qL sgc#u$KS}Bsyo5t<8 delta 487 zcmV;{}kB+h<78>V;~%nfKvoG>S#27e_;=rn8a01^P9BNJSJ zan-FX%GCw9vXw=-wgXGS6(CX9&Crn@zeyI*_}t`)CAOz{pRXfQxoum-Fciz zb)aJkusuH#sDDX$%wVlR5?^D@!0;CP`~03Xx4%hvqc1a&xjI%H*TF*PS1~I_=LXcE z43pyrYXBz4C5bkyo=bwUI&QIE1`FZ`OBsyEl`Ehqyh|Kz25cb^9p z;%#2$39vh_LImo(`kN$ccubvGEezjaLusQ@_Q+^GcAya|-g` dydy`B`~{pQ55nB;d+-1N002ovPDHLkV1jTb<@f*q diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sort-up(ru).png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sort-up(ru).png index b5b47b961b7dc8d8c4b7a0a8416bd212c8a38efc..6d0cef36f878997ace04c05669d51d99170ccb20 100644 GIT binary patch delta 513 zcmV+c0{;Ds1e*kqB!A*bL_t(|0qvK;k)tpWMHPZVAOu37R!!C1CIlvg2|*!{0c7A1 z2!Rk3fvn;=sjq8RW7OnHb?At}+BkQ9B93-AJbQd@6X)&Qj5vaAB=dO;Ac z2G|4O^*R`r)_+M2FfOf=5@1^kF0|puD1VMhY z27|@!lgtkQ-2zAlz;D*z*g2W@CdVx?f+aj(VDMy2+IkCLZpSS#fpxj8Zw7B?m%NC$ zo?JQe{I_$Tv4Y%kq`^& znKmr@v@yoCgz638Byw+p#;Zizkhx>13w&rmmo-X1O_1c z04lwU}e!-J%E~TvmiAUsSZF5Gf*j1C!o?cmlj(nY+fxkRt!!+V-Y-o zwtsFw+dmJWq2%fWG!$1ypzKr8iyv^u*6RT}#DH%3KY_B#?g?aPcLUnTuExO&NB}B> z8!#=hYh^d!!hf!n{eWef(`_nlz{1Rp;slf^#1IFm59Zm(|s$V9-UA}!Oe!P%x-|ql?g7_2!8U6?G3E~rg zp%9?y1)+QRPdXE?2jJm9=`6dhkyVhT)nx!_Sb+sy1n|$TvwwoI?adp179ck)VDb88 z0mkw20ONRBfUTBAkhN_>yV3#CEWk?8F9Wcf1mW!--jxA30TA&^?}LHX@*TiXYxy2v zy-5n*BqbtFRRyeo&*~aMD0P!4MFUXiCQ(W$Gse1MCg2$BhPfwb1wrOwfEIwc5Mb8` z#&$Loa@MfW0Dl%63ONhVjDnfW7z#NHa0DjCP{?^FXa#wf)(yGUvY7q~XnOxp`xNjy zts63$h5iai?;mO}0Sm2ewOh$=cR?`y0k}O2?qIk`}vy5BG7sNPT z;|w#m0Akc{t6+Pgtgj(<#JJrS@af0;8e&IG@Kc=?%yj-eeC=9>6udp)(~pO*T{9%% eRaI5}IQ<2za=ALEx;d8s0000z<7Q$6|sGuF=w zsJEDd_yM_*5jWsL>Uf=iNFA>iu#VRcSjX!G)SH$den4&%#0_ZUO=mm#01?3Yc>#6N zqTyK%|0IR*toMPm^)_&m_kbO#K)3u%pf0+20$Erbfwsq5!r%o&fWqJgOeecRy}AKU zEG%68fH@x1Ie%t1VCKk~>;%-H1POx{4IV%OAPf|O3ouPO*G0Lz04L_UD0dg24Y=Oq zW>NHVkP5U#y7UjY-sEOcxFG+42$$Xk;aPt^*E}U<+i>L|DJwlhPOS6U@E{{tgbZCo zopny*qvE`N8U~43G1%if<{%xwnVGTH%&K2S*@t?PzF{|+v00a4OSJ0d2{1P6GHi)8 z8R;5u`*6`>FJ3LNmsbbe^rK+?T4FEHqF?Ri>a`BJA@=bse9`pdT8G>cjpvsj#`6pE e-@HA0_WT7(n-9XVhUA|B0000 Date: Tue, 23 Jun 2020 13:14:45 +0300 Subject: [PATCH 09/35] [DE] Fix adding new controls --- apps/documenteditor/main/app/controller/Toolbar.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 82fad3fa6..8be4f6935 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1830,22 +1830,25 @@ define([ oPr, oFormPr; if (isnew) { oFormPr = new AscCommon.CSdtFormPr(); - oPr = new AscCommon.CSdtTextFormPr(); } if (item.value == 'plain' || item.value == 'rich') this.api.asc_AddContentControl((item.value=='plain') ? Asc.c_oAscSdtLevelType.Inline : Asc.c_oAscSdtLevelType.Block); else if (item.value.indexOf('picture')>=0) this.api.asc_AddContentControlPicture(oFormPr); - else if (item.value.indexOf('checkbox')>=0) - this.api.asc_AddContentControlCheckBox(oPr, oFormPr); - else if (item.value.indexOf('radiobox')>=0) { + else if (item.value.indexOf('checkbox')>=0 || item.value.indexOf('radiobox')>=0) { + if (isnew) { + oPr = new AscCommon.CSdtCheckBoxPr(); + (item.value.indexOf('radiobox')>=0) && oPr.put_GroupKey('Group 1'); + } this.api.asc_AddContentControlCheckBox(oPr, oFormPr); } else if (item.value == 'date') this.api.asc_AddContentControlDatePicker(); else if (item.value.indexOf('combobox')>=0 || item.value.indexOf('dropdown')>=0) this.api.asc_AddContentControlList(item.value.indexOf('combobox')>=0, oPr, oFormPr); - else if (item.value == 'new-field') + else if (item.value == 'new-field') { + oPr = new AscCommon.CSdtTextFormPr(); this.api.asc_AddContentControlTextForm(oPr, oFormPr); + } Common.component.Analytics.trackEvent('ToolBar', 'Add Content Control'); } From eb36fff041e80596f7245898c72e5655ad1b3aca Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Jun 2020 17:50:08 +0300 Subject: [PATCH 10/35] [DE] Show new control settings --- .../template/ControlSettingsDialog.template | 39 +++++- .../main/app/view/ControlSettingsDialog.js | 122 ++++++++++++++++-- 2 files changed, 152 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/main/app/template/ControlSettingsDialog.template b/apps/documenteditor/main/app/template/ControlSettingsDialog.template index 7637f6d0e..70bd8aea9 100644 --- a/apps/documenteditor/main/app/template/ControlSettingsDialog.template +++ b/apps/documenteditor/main/app/template/ControlSettingsDialog.template @@ -148,4 +148,41 @@
    -
    \ No newline at end of file + +
    +
    + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index d47059c98..e77a20787 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -66,7 +66,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', {panelId: 'id-adv-control-settings-lock', panelCaption: this.textLock}, {panelId: 'id-adv-control-settings-list', panelCaption: this.textCombobox}, {panelId: 'id-adv-control-settings-date', panelCaption: this.textDate}, - {panelId: 'id-adv-control-settings-checkbox',panelCaption: this.textCheckbox} + {panelId: 'id-adv-control-settings-checkbox',panelCaption: this.textCheckbox}, + {panelId: 'id-adv-control-settings-field', panelCaption: this.textField}, + {panelId: 'id-adv-control-settings-additional',panelCaption: this.textAdditional} ], contentTemplate: _.template(contentTemplate)({ scope: this @@ -248,6 +250,50 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', this.btnEditUnchecked.cmpEl.css({'font-size': '16px', 'line-height': '16px'}); this.btnEditUnchecked.on('click', _.bind(this.onEditCheckbox, this, false)); + // Additional + this.txtGroupKey = new Common.UI.InputField({ + el : $('#control-settings-txt-groupkey'), + allowBlank : true, + validateOnChange: false, + validateOnBlur: false, + style : 'width: 100%;', + // maxLength: 64, + value : '' + }); + + this.txtKey = new Common.UI.InputField({ + el : $('#control-settings-txt-key'), + allowBlank : true, + validateOnChange: false, + validateOnBlur: false, + style : 'width: 100%;', + // maxLength: 64, + value : '' + }); + + this.txtLabel = new Common.UI.InputField({ + el : $('#control-settings-txt-label'), + allowBlank : true, + validateOnChange: false, + validateOnBlur: false, + style : 'width: 100%;', + // maxLength: 64, + value : '' + }); + + this.textareaHelp = this.$window.find('#control-settings-txt-help'); + this.textareaHelp.keydown(function (event) { + if (event.keyCode == Common.UI.Keys.RETURN) { + event.stopPropagation(); + } + me.isHelpChanged = true; + }); + + this.chRequired = new Common.UI.CheckBox({ + el: $('#control-settings-chb-required'), + labelText: this.textRequired + }); + this.afterRender(); }, @@ -316,12 +362,13 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', this.chLockEdit.setValue(val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.ContentLocked); var type = props.get_SpecificType(); + var specProps; //for list controls this.btnsCategory[2].setVisible(type == Asc.c_oAscContentControlSpecificType.ComboBox || type == Asc.c_oAscContentControlSpecificType.DropDownList); if (type == Asc.c_oAscContentControlSpecificType.ComboBox || type == Asc.c_oAscContentControlSpecificType.DropDownList) { this.btnsCategory[2].setCaption(type == Asc.c_oAscContentControlSpecificType.ComboBox ? this.textCombobox : this.textDropDown); - var specProps = (type == Asc.c_oAscContentControlSpecificType.ComboBox) ? props.get_ComboBoxPr() : props.get_DropDownListPr(); + specProps = (type == Asc.c_oAscContentControlSpecificType.ComboBox) ? props.get_ComboBoxPr() : props.get_DropDownListPr(); if (specProps) { var count = specProps.get_ItemsCount(); var arr = []; @@ -339,7 +386,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', //for date picker this.btnsCategory[3].setVisible(type == Asc.c_oAscContentControlSpecificType.DateTime); if (type == Asc.c_oAscContentControlSpecificType.DateTime) { - var specProps = props.get_DateTimePr(); + specProps = props.get_DateTimePr(); if (specProps) { this.datetime = specProps; var lang = specProps.get_LangId() || this.options.controlLang; @@ -360,7 +407,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', // for check box this.btnsCategory[4].setVisible(type == Asc.c_oAscContentControlSpecificType.CheckBox); if (type == Asc.c_oAscContentControlSpecificType.CheckBox) { - var specProps = props.get_CheckBoxPr(); + specProps = props.get_CheckBoxPr(); if (specProps) { var code = specProps.get_CheckedSymbol(), font = specProps.get_CheckedFont(); @@ -377,6 +424,38 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', } this.type = type; + + // form settings + var formPr = props.get_FormPr(); + this.btnsCategory[6].setVisible(!!formPr); + if (formPr) { + val = formPr.get_Key(); + this.txtKey.setValue(val ? val : ''); + + val = formPr.get_Label(); + this.txtLabel.setValue(val ? val : ''); + + val = formPr.get_HelpText(); + this.textareaHelp.val(val ? val : ''); + + val = formPr.get_Required(); + this.chRequired.setValue(!!val); + + var hidden = true; + if (type == Asc.c_oAscContentControlSpecificType.CheckBox && specProps) { + val = specProps.get_GroupKey(); + this.txtGroupKey.setValue(val ? val : ''); + hidden = (typeof val !== 'string'); + !hidden && this.btnsCategory[4].setCaption(this.textRadiobox); + } + this.$window.find('.group-key').toggleClass('hidden', hidden); + } + + var formTextPr = props.get_TextFormPr(); + this.btnsCategory[5].setVisible(!!formTextPr); + if (formTextPr) { + + } } }, @@ -404,9 +483,10 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', lock = Asc.c_oAscSdtLockType.ContentLocked; props.put_Lock(lock); + var specProps; // for list controls if (this.type == Asc.c_oAscContentControlSpecificType.ComboBox || this.type == Asc.c_oAscContentControlSpecificType.DropDownList) { - var specProps = (this.type == Asc.c_oAscContentControlSpecificType.ComboBox) ? this.props.get_ComboBoxPr() : this.props.get_DropDownListPr(); + specProps = (this.type == Asc.c_oAscContentControlSpecificType.ComboBox) ? this.props.get_ComboBoxPr() : this.props.get_DropDownListPr(); specProps.clear(); this.list.store.each(function (item, index) { specProps.add_Item(item.get('name'), item.get('value')); @@ -416,7 +496,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', //for date picker if (this.type == Asc.c_oAscContentControlSpecificType.DateTime) { - var specProps = this.props.get_DateTimePr(); + specProps = this.props.get_DateTimePr(); specProps.put_DateFormat(this.txtDate.getValue()); specProps.put_LangId(this.cmbLang.getValue()); props.put_DateTimePr(specProps); @@ -425,7 +505,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', // for check box if (this.type == Asc.c_oAscContentControlSpecificType.CheckBox) { if (this.checkedBox && this.checkedBox.changed || this.uncheckedBox && this.uncheckedBox.changed) { - var specProps = this.props.get_CheckBoxPr(); + specProps = this.props.get_CheckBoxPr(); if (this.checkedBox) { specProps.put_CheckedSymbol(this.checkedBox.code); specProps.put_CheckedFont(this.checkedBox.font); @@ -438,6 +518,24 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', } } + if (this.btnsCategory[6].isVisible()) { + var formPr = new AscCommon.CSdtFormPr(); + formPr.put_Key(this.txtKey.getValue()); + formPr.put_Label(this.txtLabel.getValue()); + formPr.put_Required(this.chRequired.getValue()=='checked'); + + if (this.isHelpChanged) + formPr.put_HelpText(this.textareaHelp.val()); + + if (this.type == Asc.c_oAscContentControlSpecificType.CheckBox && !this.$window.find('.group-key').hasClass('hidden')) { + specProps = this.props.get_CheckBoxPr(); + if (specProps) { + specProps.put_GroupKey(this.txtGroupKey.getValue()); + props.put_CheckBoxPr(specProps); + } + } + props.put_FormPr(formPr); + } return props; }, @@ -636,7 +734,15 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', textChecked: 'Checked symbol', textUnchecked: 'Unchecked symbol', tipChange: 'Change symbol', - textPlaceholder: 'Placeholder' + textPlaceholder: 'Placeholder', + textAdditional: 'Additional', + textField: 'Text field', + textKey: 'Key', + textLabel: 'Label', + textHelp: 'Help text', + textRequired: 'Required', + textGroupKey: 'Group key', + textRadiobox: 'Radio box' }, DE.Views.ControlSettingsDialog || {})) }); \ No newline at end of file From 9c30933ef05b260713f511330b0f5a348d91c17c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Jun 2020 20:45:38 +0300 Subject: [PATCH 11/35] [DE] Show text field settings --- .../template/ControlSettingsDialog.template | 29 +++++ .../main/app/view/ControlSettingsDialog.js | 122 +++++++++++++++++- 2 files changed, 149 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/template/ControlSettingsDialog.template b/apps/documenteditor/main/app/template/ControlSettingsDialog.template index 70bd8aea9..dd7a39238 100644 --- a/apps/documenteditor/main/app/template/ControlSettingsDialog.template +++ b/apps/documenteditor/main/app/template/ControlSettingsDialog.template @@ -185,4 +185,33 @@
    +
    + + + + + + + + + + + + + + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index e77a20787..e776693f9 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -294,6 +294,52 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', labelText: this.textRequired }); + // Text field + this.btnEditPlaceholder = new Common.UI.Button({ + el: $('#control-settings-btn-placeholder-edit'), + hint: this.tipChange + }); + this.btnEditPlaceholder.cmpEl.css({'font-size': '16px', 'line-height': '16px'}); + this.btnEditPlaceholder.on('click', _.bind(this.onEditPlaceholder, this)); + + this.spnWidth = new Common.UI.MetricSpinner({ + el: $('#control-settings-spin-width'), + step: .1, + width: 80, + defaultUnit : "cm", + value: '3 cm', + maxValue: 55.88, + minValue: 0.1 + }); + + this.spnMaxChars = new Common.UI.MetricSpinner({ + el: $('#control-settings-spin-max-chars'), + step: 1, + width: 53, + defaultUnit : "", + value: '10', + maxValue: 1000000, + minValue: 1 + }); + + this.chMaxChars = new Common.UI.CheckBox({ + el: $('#control-settings-chb-max-chars'), + labelText: this.textMaxChars + }); + this.chMaxChars.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + this.spnMaxChars.setDisabled(field.getValue()!='checked'); + }, this)); + + this.chComb = new Common.UI.CheckBox({ + el: $('#control-settings-chb-comb'), + labelText: this.textComb + }); + this.chComb.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + if (field.getValue()=='checked') { + this.chMaxChars.setValue(true); + } + }, this)); + this.afterRender(); }, @@ -318,6 +364,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', afterRender: function() { this.updateThemeColors(); + this.updateMetricUnit(); this._setDefaults(this.props); if (this.storageName) { var value = Common.localStorage.getItem(this.storageName); @@ -454,7 +501,22 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', var formTextPr = props.get_TextFormPr(); this.btnsCategory[5].setVisible(!!formTextPr); if (formTextPr) { - + var code = formTextPr.get_PlaceHolderSymbol(), + font = formTextPr.get_PlaceHolderFont(); + font && this.btnEditPlaceholder.cmpEl.css('font-family', font); + code && this.btnEditPlaceholder.setCaption(String.fromCharCode(code)); + this.placeholder = {code: code, font: font}; + + val = formTextPr.get_Comb(); + this.chComb.setValue(!!val, true); + + val = formTextPr.get_MaxCharacters(); + this.chMaxChars.setValue(val && val>=0, true); + this.spnMaxChars.setDisabled(!val || val<0); + this.spnMaxChars.setValue(val && val>=0 ? val : 10); + + val = formTextPr.get_Width(); + this.spnWidth.setValue(val ? val : '', true); } } }, @@ -536,6 +598,25 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', } props.put_FormPr(formPr); } + + if (this.btnsCategory[5].isVisible()) { + var formTextPr = new AscCommon.CSdtTextFormPr(); + if (this.spnWidth.getValue()) + formTextPr.put_Width(this.spnWidth.getNumberValue()); + if (this.placeholder && this.placeholder.changed) { + formTextPr.put_PlaceHolderSymbol(this.placeholder.code); + formTextPr.put_PlaceHolderFont(this.placeholder.font); + } + formTextPr.put_Comb(this.chComb.getValue()=='checked'); + + var checked = (this.chMaxChars.getValue()=='checked' || this.chComb.getValue()=='checked'); + formTextPr.put_MaxCharacters(checked); + if (checked) + formTextPr.put_MaxCharacters(this.spnMaxChars.getNumberValue() || 12); + + props.put_TextFormPr(formTextPr); + } + return props; }, @@ -699,11 +780,44 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', } }, + onEditPlaceholder: function() { + if (this.api) { + var me = this, + props = me.placeholder, + cmp = me.btnEditPlaceholder, + handler = function(dlg, result, settings) { + if (result == 'ok') { + props.changed = true; + props.code = settings.code; + props.font = settings.font; + props.font && cmp.cmpEl.css('font-family', props.font); + settings.symbol && cmp.setCaption(settings.symbol); + } + }, + win = new Common.Views.SymbolTableDialog({ + api: me.api, + lang: me.options.interfaceLang, + modal: true, + type: 0, + font: props.font, + code: props.code, + handler: handler + }); + win.show(); + win.on('symbol:dblclick', handler); + } + }, + onSelectFormat: function(lisvView, itemView, record) { if (!record) return; this.txtDate.setValue(record.get('format')); }, + updateMetricUnit: function() { + this.spnWidth.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); + this.spnWidth.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1); + }, + textTitle: 'Content Control Settings', textName: 'Title', textTag: 'Tag', @@ -742,7 +856,11 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', textHelp: 'Help text', textRequired: 'Required', textGroupKey: 'Group key', - textRadiobox: 'Radio box' + textRadiobox: 'Radio box', + textWidth: 'Width', + textPlaceholderSymbol: 'Placeholder symbol', + textMaxChars: 'Characters limit', + textComb: 'Comb of characters' }, DE.Views.ControlSettingsDialog || {})) }); \ No newline at end of file From f539f5cf9e916bf8d9228540e5edf7d67c487b96 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 23 Jun 2020 22:05:25 +0300 Subject: [PATCH 12/35] [SSE] Add examples in customize statusbar menu, fix update width of sheets box --- .../main/app/view/Statusbar.js | 81 +++++++++++++++++-- 1 file changed, 74 insertions(+), 7 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index c00e9686c..ceb171bd0 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -353,19 +353,64 @@ define([ }); }); + var customizeStatusBarMenuTemplate = _.template(''+ + '
    '+ + '
    <%= caption %>
    ' + + '' + + '
    '); + this.customizeStatusBarMenu = new Common.UI.Menu({ style: 'margin-top: -14px; margin-left: -7px;', menuAlign: 'bl-tl', items: [ //{template: _.template('
    ' + this.textCustomizeStatusBar + '
    ')}, //{caption: '--'}, - {caption: this.itemAverage, value: 'average', checkable: true, checked: true, leaveopen: true}, - {caption: this.itemCount, value: 'count', checkable: true, checked: true, leaveopen: true}, - {caption: this.itemMinimum, value: 'min', checkable: true, checked: true, leaveopen: true}, - {caption: this.itemMaximum, value: 'max', checkable: true, checked: true, leaveopen: true}, - {caption: this.itemSum, value: 'sum', checkable: true, checked: true, leaveopen: true} - ], - leaveopen: true + { + id: 'math-item-average', + caption: this.itemAverage, + value: 'average', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + }, + { + id: 'math-item-count', + caption: this.itemCount, + value: 'count', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + }, + { + id: 'math-item-min', + caption: this.itemMinimum, + value: 'min', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + }, + { + id: 'math-item-max', + caption: this.itemMaximum, + value: 'max', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + }, + { + id: 'math-item-sum', + caption: this.itemSum, + value: 'sum', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + } + ] }); this.tabbar.$el.append(''); @@ -498,7 +543,28 @@ define([ this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max.substring(0,11) + (info.max.length > 11 ? '...' : '')) : ''); this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum.substring(0,11) + (info.sum.length > 11 ? '...' : '')) : ''); this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average.substring(0,11) + (info.average.length > 11 ? '...' : '')) : ''); + + this.customizeStatusBarMenu.items.forEach(function (item) { + if (item.options.id === 'math-item-average') { + item.options.exampleval = (info.average && info.average.length) ? info.average : ''; + } else if (item.options.id === 'math-item-min') { + item.options.exampleval = (info.min && info.min.length) ? info.min : ''; + } else if (item.options.id === 'math-item-max') { + item.options.exampleval = (info.max && info.max.length) ? info.max : ''; + } else if (item.options.id === 'math-item-count') { + item.options.exampleval = (info.count) ? String(info.count) : ''; + } else if (item.options.id === 'math-item-sum') { + item.options.exampleval = (info.sum && info.sum.length) ? info.sum : ''; + } else { + item.options.exampleval = ''; + } + $(item.el).find('label').text(item.options.exampleval); + }); } else { + this.customizeStatusBarMenu.items.forEach(function (item) { + item.options.exampleval = ''; + $(item.el).find('label').text(''); + }); if (this.boxMath.is(':visible')) this.boxMath.hide(); } @@ -720,6 +786,7 @@ define([ this.boxMath.find('.separator').show(); } } + this.updateTabbarBorders(); event.stopPropagation(); item.$el.find('a').blur(); }, From 8013708f03b2dc252291508108b0c5566ecfd21a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Jun 2020 13:41:37 +0300 Subject: [PATCH 13/35] [SSE] Change list settings --- .../main/lib/view/ListSettingsDialog.js | 144 +++++++++--------- .../main/app/controller/DocumentHolder.js | 7 +- 2 files changed, 80 insertions(+), 71 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index c0f993230..0ad77ce61 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -170,10 +170,10 @@ define([ this.cmbNumFormat.on('selected', _.bind(function (combo, record) { if (this._changedProps) { if (record.value == -1) { - // this._changedProps.put_ListType(-1); + this._changedProps.asc_putSymbol(undefined); } else { - // this._changedProps.put_ListType(1); - // this._changedProps.put_ListSubType(record.value); + this._changedProps.asc_putSymbol(undefined); + this._changedProps.asc_putAutoNumType(record.value); } } }, this)); @@ -204,13 +204,13 @@ define([ itemsTemplate: _.template(itemsTemplate.join('')), data : [ { displayValue: this.txtNone, value: -1 }, - { displayValue: this.txtSymbol + ': ', value: 0, symbol: "·", font: 'Symbol' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "•", font: 'Arial' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "o", font: 'Courier New' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "§", font: 'Wingdings' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "v", font: 'Wingdings' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "Ø", font: 'Wingdings' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "ü", font: 'Wingdings' }, - { displayValue: this.txtSymbol + ': ', value: 0, symbol: "¨", font: 'Symbol' }, + { displayValue: this.txtSymbol + ': ', value: 0, symbol: "w", font: 'Wingdings' }, { displayValue: this.txtSymbol + ': ', value: 0, symbol: "–", font: 'Arial' }, { displayValue: this.txtNewBullet, value: 1 } ], @@ -232,21 +232,20 @@ define([ props = me.bulletProps, handler = function(dlg, result, settings) { if (result == 'ok') { - var store = combo.store; - if (!store.findWhere({value: 0, symbol: settings.symbol, font: settings.font})) - store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: settings.symbol, font: settings.font }, {at: store.length-1}); - combo.setData(store.models); - combo.selectRecord(combo.store.findWhere({value: 0, symbol: settings.symbol, font: settings.font})); - props.changed = true; props.code = settings.code; props.font = settings.font; props.symbol = settings.symbol; if (me._changedProps) { - me._changedProps.asc_putBulletFont(props.font); - me._changedProps.asc_putBulletSymbol(props.symbol); + me._changedProps.asc_putFont(props.font); + me._changedProps.asc_putSymbol(props.symbol); } } + var store = combo.store; + if (!store.findWhere({value: 0, symbol: props.symbol, font: props.font})) + store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: props.symbol, font: props.font }, {at: store.length-1}); + combo.setData(store.models); + combo.selectRecord(combo.store.findWhere({value: 0, symbol: props.symbol, font: props.font})); }, win = new Common.Views.SymbolTableDialog({ api: me.options.api, @@ -259,18 +258,16 @@ define([ }); win.show(); win.on('symbol:dblclick', handler); - } if (record.value == -1) { - // this._changedProps.put_ListType(-1); + } else if (record.value == -1) { + this._changedProps.asc_putSymbol(undefined); } else { - // this._changedProps.put_ListType(0); - // this._changedProps.put_ListSubType(record.value); this.bulletProps.changed = true; this.bulletProps.code = record.code; this.bulletProps.font = record.font; this.bulletProps.symbol = record.symbol; if (this._changedProps) { - this._changedProps.asc_putBulletFont(this.bulletProps.font); - this._changedProps.asc_putBulletSymbol(this.bulletProps.symbol); + this._changedProps.asc_putFont(this.bulletProps.font); + this._changedProps.asc_putSymbol(this.bulletProps.symbol); } } } @@ -287,7 +284,7 @@ define([ allowDecimal: false }).on('change', function(field, newValue, oldValue, eOpts){ if (me._changedProps) { - me._changedProps.asc_putBulletSize(field.getNumberValue()); + me._changedProps.asc_putSize(field.getNumberValue()); } }); @@ -310,7 +307,7 @@ define([ allowDecimal: false }).on('change', function(field, newValue, oldValue, eOpts){ if (me._changedProps) { - me._changedProps.put_NumStartAt(field.getNumberValue()); + me._changedProps.asc_putNumStartAt(field.getNumberValue()); } }); @@ -333,7 +330,7 @@ define([ onColorsSelect: function(btn, color) { if (this._changedProps) { - this._changedProps.asc_putBulletColor(Common.Utils.ThemeColor.getRgbColor(color)); + this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(color)); } }, @@ -342,23 +339,22 @@ define([ if (this._changedProps) { if (type==0) {//markers if (this.cmbBulletFormat.getValue()==-1) { - // this._changedProps.asc_putType(-1); + this._changedProps.asc_putSymbol(undefined); } else { - this._changedProps.asc_putBulletFont(this.bulletProps.font); - this._changedProps.asc_putBulletSymbol(this.bulletProps.symbol); + this._changedProps.asc_putFont(this.bulletProps.font); + this._changedProps.asc_putSymbol(this.bulletProps.symbol); } - // this._changedProps.asc_putType(0); - // this._changedProps.asc_putSubType(0); } else { var value = this.cmbNumFormat.getValue(); if (value==-1) { - // this._changedProps.asc_putType(-1); + this._changedProps.asc_putSymbol(undefined); } else { - // this._changedProps.asc_putType(1); - // this._changedProps.asc_putSubType(value); + this._changedProps.asc_putSymbol(undefined); + this._changedProps.asc_putAutoNumType(value); } } } + this.type = type; }, ShowHideElem: function(value) { @@ -369,7 +365,8 @@ define([ _handleInput: function(state) { if (this.options.handler) { - this.options.handler.call(this, state, this._changedProps); + var listtype = (this.type==0) ? this.cmbBulletFormat.getValue() : this.cmbNumFormat.getValue(); + this.options.handler.call(this, state, (listtype==-1) ? null : this._changedProps); } this.close(); }, @@ -388,49 +385,56 @@ define([ (this.type == 0) ? this.btnBullet.toggle(true) : this.btnNumbering.toggle(true); this.ShowHideElem(this.type); - this.spnSize.setValue(props.asc_getBulletSize() || '', true); - var color = props.asc_getBulletColor(); - if (color) { - if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { - color = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; - } else { - color = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); - } - } else - color = 'transparent'; - this.btnColor.setColor(color); - if ( typeof(color) == 'object' ) { - var isselected = false; - for (var i=0; i<10; i++) { - if ( Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue ) { - this.colors.select(color,true); - isselected = true; - break; + var bullet = props.asc_getBullet(); + if (bullet) { + this.spnSize.setValue(bullet.asc_getSize() || '', true); + + var color = bullet.asc_getColor(); + if (color) { + if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { + color = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; + } else { + color = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); } + } else + color = 'transparent'; + this.btnColor.setColor(color); + if ( typeof(color) == 'object' ) { + var isselected = false; + for (var i=0; i<10; i++) { + if ( Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue ) { + this.colors.select(color,true); + isselected = true; + break; + } + } + if (!isselected) this.colors.clearSelection(); + } else + this.colors.select(color,true); + + var symbol = bullet.asc_getSymbol(); + if (symbol===undefined) { // numbered + this.cmbNumFormat.setValue(this.subtype, ''); + var rec = this.cmbBulletFormat.store.at(1); + this.cmbBulletFormat.selectRecord(rec); + this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; + + var value = bullet.asc_getNumStartAt(); + this.spnStart.setValue(value || '', true); + this.spnStart.setDisabled(value===null); + } else { + this.bulletProps = {symbol: symbol, font: bullet.asc_getFont()}; + if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) + this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); + this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); + this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); + this.cmbNumFormat.setValue(1); } - if (!isselected) this.colors.clearSelection(); - } else - this.colors.select(color,true); - - if (this.type==0) { - this.bulletProps = {symbol: props.asc_getBulletSymbol(), font: props.asc_getBulletFont()}; - if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) - this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); - this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); - this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); - this.cmbNumFormat.setValue(1); - } else { - this.cmbNumFormat.setValue(this.subtype, ''); - var rec = this.cmbBulletFormat.store.at(1); - this.cmbBulletFormat.selectRecord(rec); - this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; - - var value = props.get_NumStartAt(); - this.spnStart.setValue(value || '', true); - this.spnStart.setDisabled(value===null); + this._changedProps = bullet; } } - this._changedProps = new Asc.asc_CParagraphProperty(); + if (!this._changedProps) + this._changedProps = new Asc.asc_CBullet(); }, txtTitle: 'List Settings', diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index dd75b436c..c2d25f075 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -783,7 +783,12 @@ define([ handler: function(result, value) { if (result == 'ok') { if (me.api) { - me.api.asc_setGraphicObjectProps(value); + if (value==-1) + me.api.asc_setListType(-1); + else { + props.asc_putBullet(value); + me.api.asc_setGraphicObjectProps(props); + } } } Common.NotificationCenter.trigger('edit:complete', me.documentHolder); From baa406536341d79f04641a1768ff058de7781947 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Jun 2020 13:52:14 +0300 Subject: [PATCH 14/35] [SSE][PE] Fix list settings --- apps/common/main/lib/view/ListSettingsDialog.js | 2 +- apps/presentationeditor/main/app/controller/Toolbar.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index 0ad77ce61..3a59dfd72 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -366,7 +366,7 @@ define([ _handleInput: function(state) { if (this.options.handler) { var listtype = (this.type==0) ? this.cmbBulletFormat.getValue() : this.cmbNumFormat.getValue(); - this.options.handler.call(this, state, (listtype==-1) ? null : this._changedProps); + this.options.handler.call(this, state, (listtype==-1) ? -1 : this._changedProps); } this.close(); }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 70d361b9f..9e012cc0f 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1141,7 +1141,12 @@ define([ handler: function(result, value) { if (result == 'ok') { if (me.api) { - me.api.paraApply(value); + if (value==-1) + me.api.put_ListType(0, -1); + else { + props.asc_putBullet(value); + me.api.paraApply(props); + } } } Common.NotificationCenter.trigger('edit:complete', me.toolbar); From 5a059744d2af02af6638b2d122027aac32eefff6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Jun 2020 14:13:08 +0300 Subject: [PATCH 15/35] [DE] Fix text field settings --- .../template/ControlSettingsDialog.template | 18 +++++++++--------- .../main/app/view/ControlSettingsDialog.js | 8 +++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/documenteditor/main/app/template/ControlSettingsDialog.template b/apps/documenteditor/main/app/template/ControlSettingsDialog.template index dd7a39238..278ead730 100644 --- a/apps/documenteditor/main/app/template/ControlSettingsDialog.template +++ b/apps/documenteditor/main/app/template/ControlSettingsDialog.template @@ -189,8 +189,13 @@ + + + @@ -203,13 +208,8 @@ - - -
    - -
    +
    +
    +
    +
    -
    -
    -
    -
    + +
    diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index e776693f9..15ba936c1 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -335,9 +335,12 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', labelText: this.textComb }); this.chComb.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (field.getValue()=='checked') { + var checked = (field.getValue()=='checked'); + if (checked) { this.chMaxChars.setValue(true); } + this.btnEditPlaceholder.setDisabled(!checked); + this.spnWidth.setDisabled(!checked); }, this)); this.afterRender(); @@ -510,6 +513,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', val = formTextPr.get_Comb(); this.chComb.setValue(!!val, true); + this.btnEditPlaceholder.setDisabled(!val); + this.spnWidth.setDisabled(!val); + val = formTextPr.get_MaxCharacters(); this.chMaxChars.setValue(val && val>=0, true); this.spnMaxChars.setDisabled(!val || val<0); From 260ab8b283935ffb0be586580b6e337a87eb8ab5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Jun 2020 17:28:38 +0300 Subject: [PATCH 16/35] [SSE] Fix list settings --- .../main/lib/view/ListSettingsDialog.js | 84 ++++++++++--------- .../main/app/controller/DocumentHolder.js | 12 +-- 2 files changed, 50 insertions(+), 46 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index 3a59dfd72..7acce541d 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -62,8 +62,8 @@ define([ }, initialize : function(options) { - this.type = options.type || 0; - this.subtype = options.subtype || 1; + this.type = (options.type>0) ? 1 : 0; + this.subtype = (options.subtype>=0) ? options.subtype : 1; _.extend(this.options, { title: this.txtTitle @@ -123,6 +123,7 @@ define([ this.props = options.props; this.options.tpl = _.template(this.template)(this.options); + this.color = '000000'; Common.UI.Window.prototype.initialize.call(this, this.options); }, @@ -169,14 +170,10 @@ define([ }); this.cmbNumFormat.on('selected', _.bind(function (combo, record) { if (this._changedProps) { - if (record.value == -1) { - this._changedProps.asc_putSymbol(undefined); - } else { - this._changedProps.asc_putSymbol(undefined); - this._changedProps.asc_putAutoNumType(record.value); - } + this._changedProps.asc_putListType(1, record.value); } }, this)); + this.cmbNumFormat.setValue(this.subtype); var itemsTemplate = [ @@ -225,6 +222,7 @@ define([ formcontrol[0].innerHTML = ''; } }); + this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.at(1)); this.cmbBulletFormat.on('selected', _.bind(function (combo, record) { if (this._changedProps) { if (record.value === 1) { @@ -259,7 +257,7 @@ define([ win.show(); win.on('symbol:dblclick', handler); } else if (record.value == -1) { - this._changedProps.asc_putSymbol(undefined); + this._changedProps.asc_putListType(0, record.value); } else { this.bulletProps.changed = true; this.bulletProps.code = record.code; @@ -291,7 +289,8 @@ define([ this.btnColor = new Common.UI.ColorButton({ parentEl: $window.find('#id-dlg-list-color'), style: "width:45px;", - additionalAlign: this.menuAddAlign + additionalAlign: this.menuAddAlign, + color: this.color }); this.btnColor.on('color:select', _.bind(this.onColorsSelect, this)); this.colors = this.btnColor.getPicker(); @@ -329,6 +328,7 @@ define([ }, onColorsSelect: function(btn, color) { + this.color = color; if (this._changedProps) { this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(color)); } @@ -336,25 +336,6 @@ define([ onListTypeClick: function(type, btn, event) { this.ShowHideElem(type); - if (this._changedProps) { - if (type==0) {//markers - if (this.cmbBulletFormat.getValue()==-1) { - this._changedProps.asc_putSymbol(undefined); - } else { - this._changedProps.asc_putFont(this.bulletProps.font); - this._changedProps.asc_putSymbol(this.bulletProps.symbol); - } - } else { - var value = this.cmbNumFormat.getValue(); - if (value==-1) { - this._changedProps.asc_putSymbol(undefined); - } else { - this._changedProps.asc_putSymbol(undefined); - this._changedProps.asc_putAutoNumType(value); - } - } - } - this.type = type; }, ShowHideElem: function(value) { @@ -364,9 +345,24 @@ define([ }, _handleInput: function(state) { - if (this.options.handler) { - var listtype = (this.type==0) ? this.cmbBulletFormat.getValue() : this.cmbNumFormat.getValue(); - this.options.handler.call(this, state, (listtype==-1) ? -1 : this._changedProps); + if (this.options.handler) + { + var type = this.btnBullet.pressed ? 0 : 1; + if (this._changedProps && (this.type !== type)) { + if (type==0) {//markers + if (this.cmbBulletFormat.getValue()==-1) { + this._changedProps.asc_putListType(0, -1); + } else { + this._changedProps.asc_putFont(this.bulletProps.font); + this._changedProps.asc_putSymbol(this.bulletProps.symbol); + } + } else { + var value = this.cmbNumFormat.getValue(); + this._changedProps.asc_putListType(1, value); + this._changedProps.asc_putNumStartAt(this.spnStart.getNumberValue()); + } + } + this.options.handler.call(this, state, this._changedProps); } this.close(); }, @@ -423,18 +419,30 @@ define([ this.spnStart.setValue(value || '', true); this.spnStart.setDisabled(value===null); } else { - this.bulletProps = {symbol: symbol, font: bullet.asc_getFont()}; - if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) - this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); - this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); - this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); + this.bulletProps = {symbol: (symbol!==null) ? symbol : '', font: bullet.asc_getFont()}; + if (symbol!==null) { + if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) + this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); + this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); + this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); + } else + this.cmbBulletFormat.setValue(''); this.cmbNumFormat.setValue(1); } this._changedProps = bullet; } } - if (!this._changedProps) + if (!this._changedProps) { this._changedProps = new Asc.asc_CBullet(); + this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color)); + this._changedProps.asc_putSize(this.spnSize.getNumberValue()); + if (this.type==0) { + this._changedProps.asc_putListType(0, this.cmbBulletFormat.getValue()); + } else { + this._changedProps.asc_putListType(1, this.cmbNumFormat.getValue()); + this._changedProps.asc_putNumStartAt(this.spnStart.getNumberValue()); + } + } }, txtTitle: 'List Settings', diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index c2d25f075..5b32ada45 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -759,7 +759,7 @@ define([ onSelectBulletMenu: function(menu, item) { if (this.api) { if (item.options.value == -1) { - this.api.asc_setListType(item.options.value); + this.api.asc_setListType(0, item.options.value); Common.NotificationCenter.trigger('edit:complete', this.documentHolder); Common.component.Analytics.trackEvent('DocumentHolder', 'List Type'); } else if (item.options.value == 'settings') { @@ -783,12 +783,8 @@ define([ handler: function(result, value) { if (result == 'ok') { if (me.api) { - if (value==-1) - me.api.asc_setListType(-1); - else { - props.asc_putBullet(value); - me.api.asc_setGraphicObjectProps(props); - } + props.asc_putBullet(value); + me.api.asc_setGraphicObjectProps(props); } } Common.NotificationCenter.trigger('edit:complete', me.documentHolder); @@ -1790,7 +1786,7 @@ define([ documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270); documentHolder.menuParagraphBulletNone.setChecked(listtype.get_ListType() == -1); - documentHolder.mnuListSettings.setDisabled(listtype.get_ListType() == -1); + // documentHolder.mnuListSettings.setDisabled(listtype.get_ListType() == -1); var rec = documentHolder.paraBulletsPicker.store.findWhere({ type: listtype.get_ListType(), subtype: listtype.get_ListSubType() }); documentHolder.paraBulletsPicker.selectRecord(rec, true); } else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) { From b97195489b510fa2aac7d3f7ceb9f72012b15999 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Jun 2020 14:02:09 +0300 Subject: [PATCH 17/35] [SSE][PE] Fix list settings (different list types) --- .../main/lib/view/ListSettingsDialog.js | 81 ++++++++++--------- .../main/app/controller/Toolbar.js | 13 +-- .../main/app/view/Toolbar.js | 2 - .../main/app/controller/DocumentHolder.js | 3 +- 4 files changed, 48 insertions(+), 51 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index 7acce541d..aa77d226c 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -62,8 +62,7 @@ define([ }, initialize : function(options) { - this.type = (options.type>0) ? 1 : 0; - this.subtype = (options.subtype>=0) ? options.subtype : 1; + this.type = options.type || 0; _.extend(this.options, { title: this.txtTitle @@ -173,7 +172,7 @@ define([ this._changedProps.asc_putListType(1, record.value); } }, this)); - this.cmbNumFormat.setValue(this.subtype); + this.cmbNumFormat.setValue(1); var itemsTemplate = [ @@ -222,7 +221,9 @@ define([ formcontrol[0].innerHTML = ''; } }); - this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.at(1)); + var rec = this.cmbBulletFormat.store.at(1); + this.cmbBulletFormat.selectRecord(rec); + this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; this.cmbBulletFormat.on('selected', _.bind(function (combo, record) { if (this._changedProps) { if (record.value === 1) { @@ -348,7 +349,14 @@ define([ if (this.options.handler) { var type = this.btnBullet.pressed ? 0 : 1; - if (this._changedProps && (this.type !== type)) { + if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) { + this._changedProps = new Asc.asc_CBullet(); + this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color)); + this._changedProps.asc_putSize(this.spnSize.getNumberValue()); + } + + if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE || + this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR && type==1 || this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM && type==0) { // changed list type if (type==0) {//markers if (this.cmbBulletFormat.getValue()==-1) { this._changedProps.asc_putListType(0, -1); @@ -357,8 +365,7 @@ define([ this._changedProps.asc_putSymbol(this.bulletProps.symbol); } } else { - var value = this.cmbNumFormat.getValue(); - this._changedProps.asc_putListType(1, value); + this._changedProps.asc_putListType(1, this.cmbNumFormat.getValue()); this._changedProps.asc_putNumStartAt(this.spnStart.getNumberValue()); } } @@ -378,11 +385,11 @@ define([ _setDefaults: function (props) { if (props) { - (this.type == 0) ? this.btnBullet.toggle(true) : this.btnNumbering.toggle(true); - this.ShowHideElem(this.type); - + var type = 0; var bullet = props.asc_getBullet(); if (bullet) { + this.originalType = bullet.asc_getType(); + this.spnSize.setValue(bullet.asc_getSize() || '', true); var color = bullet.asc_getColor(); @@ -394,6 +401,7 @@ define([ } } else color = 'transparent'; + this.color = Common.Utils.ThemeColor.colorValue2EffectId(color); this.btnColor.setColor(color); if ( typeof(color) == 'object' ) { var isselected = false; @@ -408,41 +416,42 @@ define([ } else this.colors.select(color,true); - var symbol = bullet.asc_getSymbol(); - if (symbol===undefined) { // numbered - this.cmbNumFormat.setValue(this.subtype, ''); - var rec = this.cmbBulletFormat.store.at(1); - this.cmbBulletFormat.selectRecord(rec); - this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; - - var value = bullet.asc_getNumStartAt(); - this.spnStart.setValue(value || '', true); - this.spnStart.setDisabled(value===null); - } else { - this.bulletProps = {symbol: (symbol!==null) ? symbol : '', font: bullet.asc_getFont()}; - if (symbol!==null) { + if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) { + this.cmbNumFormat.setValue(-1); + this.cmbBulletFormat.setValue(-1); + type = this.type; + } else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR) { + var symbol = bullet.asc_getSymbol(); + if (symbol) { + this.bulletProps = {symbol: symbol, font: bullet.asc_getFont()}; if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})) this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1}); this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models); this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font})); } else this.cmbBulletFormat.setValue(''); - this.cmbNumFormat.setValue(1); + this._changedProps = bullet; + type = 0; + } else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM) { + var autonum = bullet.asc_getAutoNumType(); + this.cmbNumFormat.setValue(autonum, ''); + + var value = bullet.asc_getNumStartAt(); + this.spnStart.setValue(value || '', true); + this.spnStart.setDisabled(value===null); + this._changedProps = bullet; + type = 1; } - this._changedProps = bullet; - } - } - if (!this._changedProps) { - this._changedProps = new Asc.asc_CBullet(); - this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color)); - this._changedProps.asc_putSize(this.spnSize.getNumberValue()); - if (this.type==0) { - this._changedProps.asc_putListType(0, this.cmbBulletFormat.getValue()); - } else { - this._changedProps.asc_putListType(1, this.cmbNumFormat.getValue()); - this._changedProps.asc_putNumStartAt(this.spnStart.getNumberValue()); + } else {// different bullet types + this.cmbNumFormat.setValue(-1); + this.cmbBulletFormat.setValue(-1); + this._changedProps = new Asc.asc_CBullet(); + type = this.type; } } + + (type == 1) ? this.btnNumbering.toggle(true) : this.btnBullet.toggle(true); + this.ShowHideElem(type); }, txtTitle: 'List Settings', diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 9e012cc0f..eff06972e 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -486,7 +486,6 @@ define([ this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true); else this.toolbar.mnuMarkersPicker.deselectAll(true); - this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(this._state.bullets.subtype<0); break; case 1: var idx = 0; @@ -515,7 +514,6 @@ define([ } this.toolbar.btnNumbers.toggle(true, true); this.toolbar.mnuNumbersPicker.selectByIndex(idx, true); - this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(idx==0); break; } } @@ -1136,17 +1134,12 @@ define([ api: me.api, props: props, type: type, - subtype: this._state.bullets.subtype, interfaceLang: me.toolbar.mode.lang, handler: function(result, value) { if (result == 'ok') { if (me.api) { - if (value==-1) - me.api.put_ListType(0, -1); - else { - props.asc_putBullet(value); - me.api.paraApply(props); - } + props.asc_putBullet(value); + me.api.paraApply(props); } } Common.NotificationCenter.trigger('edit:complete', me.toolbar); @@ -1715,8 +1708,6 @@ define([ this.toolbar.mnuMarkersPicker.selectByIndex(0, true); this.toolbar.mnuNumbersPicker.selectByIndex(0, true); - this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(true); - this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(true); }, _getApiTextSize: function () { diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 4537f48c0..e3b673fbe 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1111,7 +1111,6 @@ define([ {template: _.template('')}, this.mnuMarkerSettings = new Common.UI.MenuItem({ caption: this.textListSettings, - disabled: (this.mnuMarkersPicker.conf.index || 0)==0, value: 'settings' }) ] @@ -1124,7 +1123,6 @@ define([ {template: _.template('')}, this.mnuNumberSettings = new Common.UI.MenuItem({ caption: this.textListSettings, - disabled: (this.mnuNumbersPicker.conf.index || 0)==0, value: 'settings' }) ] diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 5b32ada45..03743a1a8 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -777,8 +777,7 @@ define([ (new Common.Views.ListSettingsDialog({ api: me.api, props: props, - type: listtype.get_ListType(), - subtype: listtype.get_ListSubType(), + type: 0, interfaceLang: me.permissions.lang, handler: function(result, value) { if (result == 'ok') { From 9105ca9c46ee43525b94d36ab4eb2aee5e7692b5 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 26 Jun 2020 17:54:44 +0300 Subject: [PATCH 18/35] [SSE] Hide items of math box if number does not fit in size --- .../main/app/view/Statusbar.js | 27 +++++++++++++++---- .../main/resources/less/statusbar.less | 4 +++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index ceb171bd0..202230dc4 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -538,11 +538,11 @@ define([ setMathInfo: function(info) { if (info.count>1) { if (!this.boxMath.is(':visible')) this.boxMath.show(); - this.labelCount.text(this.textCount + ': ' + String(info.count).substring(0,11) + (info.count.length > 11 ? '...' : '')); - this.labelMin.text((info.min && info.min.length) ? (this.textMin + ': ' + info.min.substring(0,11) + (info.min.length > 11 ? '...' : '')) : ''); - this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max.substring(0,11) + (info.max.length > 11 ? '...' : '')) : ''); - this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum.substring(0,11) + (info.sum.length > 11 ? '...' : '')) : ''); - this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average.substring(0,11) + (info.average.length > 11 ? '...' : '')) : ''); + this.labelCount.text(this.textCount + ': ' + info.count); + this.labelMin.text((info.min && info.min.length) ? (this.textMin + ': ' + info.min) : ''); + this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max) : ''); + this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum) : ''); + this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average) : ''); this.customizeStatusBarMenu.items.forEach(function (item) { if (item.options.id === 'math-item-average') { @@ -570,6 +570,8 @@ define([ var me = this; _.delay(function(){ + me.updateVisibleItemsBoxMath(); + me.updateTabbarBorders(); me.onTabInvisible(undefined, me.tabbar.checkInvisible(true)); },30); }, @@ -733,6 +735,19 @@ define([ this.tabBarBox.css('right', right + 'px'); }, + updateVisibleItemsBoxMath: function () { + var widthStatusbar = parseInt(this.$el.css('width')); + var width = parseInt(this.boxZoom.css('width')) + parseInt($('#status-tabs-scroll').css('width')) + parseInt($('#status-addtabs-box').css('width')); + if (this.boxFiltered.is(':visible')) { + width += parseInt(this.boxFiltered.css('width')); + } + this.$el.find('.over-box').removeClass('over-box'); + while (width + parseInt(this.boxMath.css('width')) + 100 > widthStatusbar) { + var items = this.boxMath.find('label:not(.hide, .over-box)'); + $(items[items.length - 1]).addClass('over-box'); + } + }, + changeViewMode: function (edit) { if (edit) { this.tabBarBox.css('left', '152px'); @@ -786,7 +801,9 @@ define([ this.boxMath.find('.separator').show(); } } + this.updateVisibleItemsBoxMath(); this.updateTabbarBorders(); + this.onTabInvisible(undefined, this.tabbar.checkInvisible(true)); event.stopPropagation(); item.$el.find('a').blur(); }, diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 9dab9f2c3..f1afb8293 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -351,4 +351,8 @@ opacity: 0; background-color: @gray-light; z-index: @zindex-modal - 1; +} + +.over-box { + display: none; } \ No newline at end of file From cd2048a00af35f9b5d899504430608b8a00bc251 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Jun 2020 20:44:54 +0300 Subject: [PATCH 19/35] [SSE] Set decimal, thousands separators when convert text to columns and in special paste. --- apps/common/main/lib/view/OpenDialog.js | 56 ++++++- .../main/app/controller/DataTab.js | 7 +- .../main/app/controller/DocumentHolder.js | 8 +- .../main/app/controller/Toolbar.js | 3 +- .../main/app/view/AdvancedSeparatorDialog.js | 144 ++++++++++++++++++ 5 files changed, 209 insertions(+), 9 deletions(-) create mode 100644 apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 6fd52e989..659d4b7df 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -104,7 +104,7 @@ define([ '', '', '<% } %>', - '<% if (type == Common.Utils.importTextType.CSV || type == Common.Utils.importTextType.Paste || type == Common.Utils.importTextType.Columns) { %>', + '<% if (type == Common.Utils.importTextType.CSV) { %>', '
    ', '', '
    ', @@ -113,6 +113,16 @@ define([ '
    ', '
    ', '<% } %>', + '<% if (type == Common.Utils.importTextType.Paste || type == Common.Utils.importTextType.Columns) { %>', + '
    ', + '', + '
    ', + '
    ', + '
    ', + '', + '
    ', + '
    ', + '<% } %>', '<% if (!!preview) { %>', '
    ', '', @@ -234,7 +244,10 @@ define([ if (!this.closable && this.type == Common.Utils.importTextType.TXT) { //save last encoding only for opening txt files Common.localStorage.setItem("de-settings-open-encoding", encoding); } - this.handler.call(this, state, encoding, delimiter, delimiterChar); + + var decimal = this.separatorOptions ? this.separatorOptions.decimal : undefined, + thousands = this.separatorOptions ? this.separatorOptions.thousands : undefined; + this.handler.call(this, state, encoding, delimiter, delimiterChar, decimal, thousands); } } @@ -336,6 +349,13 @@ define([ this.inputDelimiter.setVisible(false); if (this.preview) this.inputDelimiter.on ('changing', _.bind(this.updatePreview, this)); + + if (this.type == Common.Utils.importTextType.Paste || this.type == Common.Utils.importTextType.Columns) { + this.btnAdvanced = new Common.UI.Button({ + el: $('#id-delimiters-advanced') + }); + this.btnAdvanced.on('click', _.bind(this.onAdvancedClick, this)); + } } }, @@ -355,7 +375,12 @@ define([ break; case Common.Utils.importTextType.Paste: case Common.Utils.importTextType.Columns: - this.api.asc_TextImport(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste); + var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar); + if (this.separatorOptions) { + options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal); + options.asc_setNumberGroupSeparator(this.separatorOptions.thousands); + } + this.api.asc_TextImport(options, _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste); break; } }, @@ -444,6 +469,28 @@ define([ this.updatePreview(); }, + onAdvancedClick: function() { + if (!SSE) return; + + var me = this, + decimal = this.api.asc_getDecimalSeparator(), + thousands = this.api.asc_getGroupSeparator(); + (new SSE.Views.AdvancedSeparatorDialog({ + props: { + decimal: decimal, + thousands: thousands + }, + handler: function(result, value) { + if (result == 'ok') { + me.separatorOptions = { + decimal: (value.decimal.length > 0) ? value.decimal : decimal, + thousands: (value.thousands.length > 0) ? value.thousands : thousands + }; + } + } + })).show(); + }, + txtDelimiter : "Delimiter", txtEncoding : "Encoding ", txtSpace : "Space", @@ -458,7 +505,8 @@ define([ txtComma: 'Comma', txtColon: 'Colon', txtSemicolon: 'Semicolon', - txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.' + txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.', + txtAdvanced: 'Advanced' }, Common.Views.OpenDialog || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/controller/DataTab.js b/apps/spreadsheeteditor/main/app/controller/DataTab.js index 6aa5e25db..46486cd48 100644 --- a/apps/spreadsheeteditor/main/app/controller/DataTab.js +++ b/apps/spreadsheeteditor/main/app/controller/DataTab.js @@ -199,10 +199,13 @@ define([ previewData: data, settings: me._state.CSVOptions, api: me.api, - handler: function (result, encoding, delimiter, delimiterChar) { + handler: function (result, encoding, delimiter, delimiterChar, decimal, thousands) { if (result == 'ok') { if (me && me.api) { - me.api.asc_TextToColumns(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); + var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar); + decimal && options.asc_setNumberDecimalSeparator(decimal); + thousands && options.asc_setNumberGroupSeparator(thousands); + me.api.asc_TextToColumns(options); } } } diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index e35085aae..2553a88e6 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -2442,12 +2442,16 @@ define([ type: Common.Utils.importTextType.Paste, preview: true, api: me.api, - handler: function (result, encoding, delimiter, delimiterChar) { + handler: function (result, encoding, delimiter, delimiterChar, decimal, thousands) { if (result == 'ok') { if (me && me.api) { var props = new Asc.SpecialPasteProps(); props.asc_setProps(Asc.c_oSpecialPasteProps.useTextImport); - props.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); + + var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar); + decimal && options.asc_setNumberDecimalSeparator(decimal); + thousands && options.asc_setNumberGroupSeparator(thousands); + props.asc_setAdvancedOptions(options); me.api.asc_SpecialPaste(props); } me._state.lastSpecPasteChecked = item; diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 8c277ddfa..856454690 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -60,7 +60,8 @@ define([ 'spreadsheeteditor/main/app/view/PrintTitlesDialog', 'spreadsheeteditor/main/app/view/ScaleDialog', 'spreadsheeteditor/main/app/view/SlicerAddDialog', - 'spreadsheeteditor/main/app/view/CellsAddDialog' + 'spreadsheeteditor/main/app/view/CellsAddDialog', + 'spreadsheeteditor/main/app/view/AdvancedSeparatorDialog' ], function () { 'use strict'; SSE.Controllers.Toolbar = Backbone.Controller.extend(_.extend({ diff --git a/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js b/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js new file mode 100644 index 000000000..5f2e2bf5e --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js @@ -0,0 +1,144 @@ +/* + * + * (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 + * +*/ +/** + * AdvancedSeparatorDialog.js + * + * Created by Julia Radzhabova on 26/06/20 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ + +define([ + 'common/main/lib/component/Window', + 'common/main/lib/component/InputField' +], function () { 'use strict'; + + SSE.Views.AdvancedSeparatorDialog = Common.UI.Window.extend(_.extend({ + options: { + width: 330, + cls: 'modal-dlg', + buttons: ['ok', 'cancel'] + }, + + initialize : function(options) { + _.extend(this.options, { + title: this.textTitle + }, options || {}); + + this.template = [ + '
    ', + '
    ', + '', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ' + ].join(''); + + this.options.tpl = _.template(this.template)(this.options); + this.props = options.props; + + Common.UI.Window.prototype.initialize.call(this, this.options); + }, + + render: function() { + Common.UI.Window.prototype.render.call(this); + + this.inputDecimalSeparator = new Common.UI.InputField({ + el: $('#id-adv-separator-decimal'), + style: 'width: 35px;', + maxLength: 1, + validateOnBlur: false + }); + + this.inputThousandsSeparator = new Common.UI.InputField({ + el: $('#id-adv-separator-thousands'), + style: 'width: 35px;', + maxLength: 1, + validateOnBlur: false + }); + + var $window = this.getChild(); + $window.find('.btn').on('click', _.bind(this.onBtnClick, this)); + + this.afterRender(); + }, + + afterRender: function() { + this._setDefaults(this.props); + }, + + _setDefaults: function (props) { + if (props) { + this.inputDecimalSeparator.setValue(props.decimal || ''); + this.inputThousandsSeparator.setValue(props.thousands || ''); + } + }, + + show: function() { + Common.UI.Window.prototype.show.apply(this, arguments); + + var me = this; + _.delay(function(){ + me.inputDecimalSeparator.cmpEl.find('input').focus(); + },50); + }, + + onPrimary: function(event) { + this._handleInput('ok'); + return false; + }, + + onBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + _handleInput: function(state) { + if (this.options.handler) { + this.options.handler.call(this, state, {decimal: this.inputDecimalSeparator.getValue(), thousands: this.inputThousandsSeparator.getValue()}); + } + + this.close(); + }, + + textTitle: 'Advanced Settings', + textLabel: 'Settings used to recognize numeric data', + strDecimalSeparator: 'Decimal separator', + strThousandsSeparator: 'Thousands separator' + + }, SSE.Views.AdvancedSeparatorDialog || {})); +}); \ No newline at end of file From 38d4026a91d6a330d8a6a502dff1a416676d9553 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Jun 2020 21:07:17 +0300 Subject: [PATCH 20/35] [SSE][PE] Add translation --- apps/common/main/lib/view/ListSettingsDialog.js | 2 -- apps/presentationeditor/main/locale/en.json | 8 ++++++-- apps/spreadsheeteditor/main/locale/en.json | 8 ++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index aa77d226c..cf529bc62 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -459,8 +459,6 @@ define([ txtColor: 'Color', txtOfText: '% of text', txtStart: 'Start at', - txtBullet: 'Bullet', - tipChange: 'Change bullet', textBulleted: 'Bulleted', textNumbering: 'Numbered', txtType: 'Type', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index cd66ef7f1..f4caa3913 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -119,13 +119,17 @@ "Common.Views.InsertTableDialog.txtTitle": "Table Size", "Common.Views.InsertTableDialog.txtTitleSplit": "Split Cell", "Common.Views.LanguageDialog.labelSelect": "Select document language", - "Common.Views.ListSettingsDialog.tipChange": "Change bullet", - "Common.Views.ListSettingsDialog.txtBullet": "Bullet", "Common.Views.ListSettingsDialog.txtColor": "Color", "Common.Views.ListSettingsDialog.txtOfText": "% of text", "Common.Views.ListSettingsDialog.txtSize": "Size", "Common.Views.ListSettingsDialog.txtStart": "Start at", "Common.Views.ListSettingsDialog.txtTitle": "List Settings", + "Common.Views.ListSettingsDialog.textBulleted": "Bulleted", + "Common.Views.ListSettingsDialog.textNumbering": "Numbered", + "Common.Views.ListSettingsDialog.txtType": "Type", + "Common.Views.ListSettingsDialog.txtNone": "None", + "Common.Views.ListSettingsDialog.txtNewBullet": "New bullet", + "Common.Views.ListSettingsDialog.txtSymbol": "Symbol", "Common.Views.OpenDialog.closeButtonText": "Close File", "Common.Views.OpenDialog.txtEncoding": "Encoding ", "Common.Views.OpenDialog.txtIncorrectPwd": "Password is incorrect.", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 989028ff4..6136fe219 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -109,13 +109,17 @@ "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", "Common.Views.ImageFromUrlDialog.txtEmpty": "This field is required", "Common.Views.ImageFromUrlDialog.txtNotUrl": "This field should be a URL in the \"http://www.example.com\" format", - "Common.Views.ListSettingsDialog.tipChange": "Change bullet", - "Common.Views.ListSettingsDialog.txtBullet": "Bullet", "Common.Views.ListSettingsDialog.txtColor": "Color", "Common.Views.ListSettingsDialog.txtOfText": "% of text", "Common.Views.ListSettingsDialog.txtSize": "Size", "Common.Views.ListSettingsDialog.txtStart": "Start at", "Common.Views.ListSettingsDialog.txtTitle": "List Settings", + "Common.Views.ListSettingsDialog.textBulleted": "Bulleted", + "Common.Views.ListSettingsDialog.textNumbering": "Numbered", + "Common.Views.ListSettingsDialog.txtType": "Type", + "Common.Views.ListSettingsDialog.txtNone": "None", + "Common.Views.ListSettingsDialog.txtNewBullet": "New bullet", + "Common.Views.ListSettingsDialog.txtSymbol": "Symbol", "Common.Views.OpenDialog.closeButtonText": "Close File", "Common.Views.OpenDialog.txtColon": "Colon", "Common.Views.OpenDialog.txtComma": "Comma", From 031a75e0b90d5f67ef4b168ac13654bae6c921b7 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Sat, 27 Jun 2020 23:22:54 +0300 Subject: [PATCH 21/35] [SSE mobile] Fix bug 45643 --- .../mobile/app/controller/Statusbar.js | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js index 93d0a81f9..4510819db 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js @@ -102,7 +102,7 @@ define([ this.api = api; this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this)); - // this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this)); + this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this)); // this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this)); this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this)); this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this)); @@ -144,6 +144,8 @@ define([ this.sheets.reset(items); this.hiddensheets.reset(hiddentems); + this.updateTabsColors(); + return; if (this.api) { @@ -271,7 +273,7 @@ define([ this.api['asc_hideWorksheet']([index]); } else { this.api['asc_showWorksheet'](index); - // this.loadTabColor(index); + this.loadTabColor(index); } }, @@ -436,11 +438,9 @@ define([ loadTabColor: function (sheetindex) { if (this.api) { - if (!this.api.asc_isWorksheetHidden(sheetindex)) { - var tab = _.findWhere(this.statusbar.tabbar.tabs, {sheetindex: sheetindex}); - if (tab) { - this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex)); - } + var tab = this.sheets.findWhere({index: sheetindex}); + if (tab) { + this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex)); } } }, @@ -454,19 +454,26 @@ define([ } if (color.length) { - if (!tab.isActive()) { - color = '0px 3px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset'; + if (!tab.get('active')) { + color = '0px 4px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset'; } else { - color = '0px 3px 0 ' + color + ' inset'; + color = '0px 4px 0 ' + color + ' inset'; } - tab.$el.find('a').css('box-shadow', color); + tab.get('el').find('a').css('box-shadow', color); } else { - tab.$el.find('a').css('box-shadow', ''); + tab.get('el').find('a').css('box-shadow', ''); } } }, + updateTabsColors: function () { + var me = this; + _.each(this.sheets.models, function (item) { + me.setTabLineColor(item, me.api.asc_getWorksheetTabColor(item.get('index'))); + }); + }, + onError: function(id, level, errData) { // if (id == Asc.c_oAscError.ID.LockedWorksheetRename) // this.statusbar.update(); From 0e371cfb9be932e6ed6c7983211f8cf401909fa3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 29 Jun 2020 15:30:24 +0300 Subject: [PATCH 22/35] [SSE] Show menu for total row in formated table --- .../main/app/controller/DocumentHolder.js | 59 +++++++++++++++++++ .../main/app/view/DocumentHolder.js | 27 ++++++++- 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 03743a1a8..ff3625d21 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -237,6 +237,7 @@ define([ view.pmiNumFormat.menu.on('item:click', _.bind(me.onNumberFormatSelect, me)); view.pmiNumFormat.menu.on('show:after', _.bind(me.onNumberFormatOpenAfter, me)); view.pmiAdvancedNumFormat.on('click', _.bind(me.onCustomNumberFormat, me)); + view.tableTotalMenu.on('item:click', _.bind(me.onTotalMenuClick, me)); } else { view.menuViewCopy.on('click', _.bind(me.onCopyPaste, me)); @@ -321,6 +322,7 @@ define([ this.api.asc_registerCallback('asc_onFormulaInfo', _.bind(this.onFormulaInfo, this)); this.api.asc_registerCallback('asc_ChangeCropState', _.bind(this.onChangeCropState, this)); this.api.asc_registerCallback('asc_onInputMessage', _.bind(this.onInputMessage, this)); + this.api.asc_registerCallback('asc_onTableTotalMenu', _.bind(this.onTableTotalMenu, this)); } return this; }, @@ -2120,6 +2122,63 @@ define([ } }, + onTableTotalMenu: function(current) { + if (current !== undefined) { + var me = this, + documentHolderView = me.documentHolder, + menu = documentHolderView.tableTotalMenu, + menuContainer = documentHolderView.cmpEl.find(Common.Utils.String.format('#menu-container-{0}', menu.id)); + + if (menu.isVisible()) { + menu.hide(); + return; + } + + Common.UI.Menu.Manager.hideAll(); + + if (!menu.rendered) { + // Prepare menu container + if (menuContainer.length < 1) { + menuContainer = $(Common.Utils.String.format('', menu.id)); + documentHolderView.cmpEl.append(menuContainer); + } + + menu.render(menuContainer); + menu.cmpEl.attr({tabindex: "-1"}); + } + + menu.clearAll(); + var func = _.find(menu.items, function(item) { return item.value == current; }); + if (func) + func.setChecked(true, true); + + var coord = me.api.asc_getActiveCellCoord(), + offset = {left:0,top:0}, + showPoint = [coord.asc_getX() + offset.left, (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top]; + menuContainer.css({left: showPoint[0], top : showPoint[1]}); + + me._preventClick = true; + menuContainer.attr('data-value', 'prevent-canvas-click'); + menu.show(); + + menu.alignPosition(); + _.delay(function() { + menu.cmpEl.focus(); + }, 10); + } else { + this.documentHolder.tableTotalMenu.hide(); + } + }, + + onTotalMenuClick: function(menu, item) { + if (item.value==Asc.ETotalsRowFunction.totalrowfunctionCustom) { + this.onInsFunction(item); + } else { + this.api.asc_insertInCell(item.value, Asc.c_oAscPopUpSelectorType.TotalRowFunc); + } + Common.NotificationCenter.trigger('edit:complete', this.documentHolder); + }, + onFormulaCompleteMenu: function(funcarr) { if (!this.documentHolder.funcMenu || Common.Utils.ModalWindow.isVisible() || this.rangeSelectionMode) return; diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index 426965d04..634f89992 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -979,6 +979,23 @@ define([ mnu.cmpEl.removeAttr('oo_editor_input').attr('oo_editor_keyboard', true); }); + this.tableTotalMenu = new Common.UI.Menu({ + maxHeight: 160, + cyclic: false, + cls: 'lang-menu', + items: [ + {caption: this.textNone, value: Asc.ETotalsRowFunction.totalrowfunctionNone, checkable: true}, + {caption: this.textAverage, value: Asc.ETotalsRowFunction.totalrowfunctionAverage, checkable: true }, + {caption: this.textCount, value: Asc.ETotalsRowFunction.totalrowfunctionCount, checkable: true }, + {caption: this.textMax, value: Asc.ETotalsRowFunction.totalrowfunctionMax, checkable: true }, + {caption: this.textMin, value: Asc.ETotalsRowFunction.totalrowfunctionMin, checkable: true }, + {caption: this.textSum, value: Asc.ETotalsRowFunction.totalrowfunctionSum, checkable: true }, + {caption: this.textStdDev, value: Asc.ETotalsRowFunction.totalrowfunctionStdDev, checkable: true }, + {caption: this.textVar, value: Asc.ETotalsRowFunction.totalrowfunctionVar, checkable: true }, + {caption: this.textMore, value: Asc.ETotalsRowFunction.totalrowfunctionCustom, checkable: true } + ] + }); + me.fireEvent('createdelayedelements', [me]); }, @@ -1111,7 +1128,15 @@ define([ textCropFit: 'Fit', textListSettings: 'List Settings', textFromStorage: 'From Storage', - advancedSlicerText: 'Slicer Advanced Settings' + advancedSlicerText: 'Slicer Advanced Settings', + textAverage: 'Average', + textMax: 'Max', + textMin: 'Min', + textCount: 'Count', + textSum: 'Sum', + textStdDev: 'StdDev', + textVar: 'Var', + textMore: 'More functions' }, SSE.Views.DocumentHolder || {})); }); \ No newline at end of file From 7548ee9683a68bb28d71518ca19abfc290e29642 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 29 Jun 2020 15:33:37 +0300 Subject: [PATCH 23/35] [SSE] Add translation --- apps/spreadsheeteditor/main/locale/en.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 6136fe219..8bc8ad4ea 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1586,6 +1586,14 @@ "SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "SSE.Views.DocumentHolder.textFromStorage": "From Storage", "SSE.Views.DocumentHolder.advancedSlicerText": "Slicer Advanced Settings", + "SSE.Views.DocumentHolder.textAverage": "Average", + "SSE.Views.DocumentHolder.textMax": "Max", + "SSE.Views.DocumentHolder.textMin": "Min", + "SSE.Views.DocumentHolder.textCount": "Count", + "SSE.Views.DocumentHolder.textSum": "Sum", + "SSE.Views.DocumentHolder.textStdDev": "StdDev", + "SSE.Views.DocumentHolder.textVar": "Var", + "SSE.Views.DocumentHolder.textMore": "More functions", "SSE.Views.FieldSettingsDialog.strLayout": "Layout", "SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals", "SSE.Views.FieldSettingsDialog.textReport": "Report Form", From 604933a0a0b6bd7595aa3c33d60c1e94b4fee490 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 29 Jun 2020 17:03:29 +0300 Subject: [PATCH 24/35] [SSE] Add translation --- apps/spreadsheeteditor/main/locale/en.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 989028ff4..c8fc8576b 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -131,6 +131,7 @@ "Common.Views.OpenDialog.txtTab": "Tab", "Common.Views.OpenDialog.txtTitle": "Choose %1 options", "Common.Views.OpenDialog.txtTitleProtected": "Protected File", + "Common.Views.OpenDialog.txtAdvanced": "Advanced", "Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document", "Common.Views.PasswordDialog.txtIncorrectPwd": "Confirmation password is not identical", "Common.Views.PasswordDialog.txtPassword": "Password", @@ -1188,6 +1189,10 @@ "SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar", "SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines", "SSE.Controllers.Viewport.textHideHeadings": "Hide Headings", + "SSE.Views.AdvancedSeparatorDialog.textTitle": "Advanced Settings", + "SSE.Views.AdvancedSeparatorDialog.textLabel": "Settings used to recognize numeric data", + "SSE.Views.AdvancedSeparatorDialog.strDecimalSeparator": "Decimal separator", + "SSE.Views.AdvancedSeparatorDialog.strThousandsSeparator": "Thousands separator", "SSE.Views.AutoFilterDialog.btnCustomFilter": "Custom Filter", "SSE.Views.AutoFilterDialog.textAddSelection": "Add current selection to filter", "SSE.Views.AutoFilterDialog.textEmptyItem": "{Blanks}", From 0d36fe7e91913c2b400821f8fe6265456615a6ae Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 29 Jun 2020 20:51:58 +0300 Subject: [PATCH 25/35] [SSE] Fix update statusbar when resizing --- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index f5bf3de3e..467c902b8 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -232,6 +232,8 @@ define([ }, onWindowResize: function(area) { + this.statusbar.updateVisibleItemsBoxMath(); + this.statusbar.updateTabbarBorders(); this.statusbar.onTabInvisible(undefined, this.statusbar.tabbar.checkInvisible(true)); }, From aab070446a3cd4fce00ffc8697664af4338ac68f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 30 Jun 2020 17:19:04 +0300 Subject: [PATCH 26/35] [all] support IE for debug --- apps/documenteditor/main/index.html | 3 +++ apps/presentationeditor/main/index.html | 3 +++ apps/spreadsheeteditor/main/index.html | 3 +++ 3 files changed, 9 insertions(+) diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 9ab7d1507..81e239298 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -201,6 +201,9 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; + + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + document.write(' diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index 5f5666c39..52070d126 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -229,6 +229,9 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; + + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + document.write(' diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index b80725c68..718b32b12 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -229,6 +229,9 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; + + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + document.write(' From 1b5d500bdb10f88c1fd697faddc8dfc83ec2b33d Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 30 Jun 2020 17:36:28 +0300 Subject: [PATCH 27/35] [all] add missed resources --- apps/common/main/lib/util/fix-ie-compat.js | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 apps/common/main/lib/util/fix-ie-compat.js diff --git a/apps/common/main/lib/util/fix-ie-compat.js b/apps/common/main/lib/util/fix-ie-compat.js new file mode 100644 index 000000000..e56227d2f --- /dev/null +++ b/apps/common/main/lib/util/fix-ie-compat.js @@ -0,0 +1,34 @@ + +if ( !window.fetch ) { + var element = document.createElement('script'); + element['src'] = '../../../vendor/fetch/fetch.umd.js'; + document.getElementsByTagName('head')[0].appendChild(element); + + if ( !window.Promise ) { + element = document.createElement('script'); + element['src'] = '../../../vendor/es6-promise/es6-promise.auto.min.js'; + document.getElementsByTagName('head')[0].appendChild(element); + } + + if (typeof Object.assign != 'function') { + Object.assign = function(target) { + 'use strict'; + if (target == null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + target = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source != null) { + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + } + return target; + }; + } +} From d1e531b6dd424bc9569a147ea29fd9eeed786585 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 30 Jun 2020 22:16:55 +0300 Subject: [PATCH 28/35] [SSE] Clean cell when change formula in formatted table total row. --- .../main/app/controller/DocumentHolder.js | 2 +- .../spreadsheeteditor/main/app/controller/FormulaDialog.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index ff3625d21..b4f5bdb12 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -509,7 +509,7 @@ define([ onInsFunction: function(item) { var controller = this.getApplication().getController('FormulaDialog'); if (controller && this.api) { - controller.showDialog(); + controller.showDialog(undefined, item.value==Asc.ETotalsRowFunction.totalrowfunctionCustom); } }, diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index 25cb50b7c..d1e0cc5f8 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -99,7 +99,7 @@ define([ if (autocomplete) this.api.asc_insertInCell(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete); else - this.api.asc_startWizard(func.name); + this.api.asc_startWizard(func.name, this._cleanCell); !autocomplete && this.updateLast10Formulas(func.origin); } } @@ -133,6 +133,7 @@ define([ }); this.formulas.on({ 'hide': function () { + me._cleanCell = undefined; // _cleanCell - clean cell when change formula in formatted table total row me.api.asc_enableKeyEvents(true); } }); @@ -212,7 +213,7 @@ define([ return null; }, - showDialog: function (group) { + showDialog: function (group, clean) { if (this.formulas) { if ( this.needUpdateFormula ) { this.needUpdateFormula = false; @@ -222,6 +223,7 @@ define([ } } this._formulagroup = group; + this._cleanCell = clean; this.api.asc_startWizard(); } }, @@ -249,6 +251,7 @@ define([ } } })).show(); + this._cleanCell = undefined; } else this.formulas.show(this._formulagroup); this._formulagroup = undefined; From 104cdd2a22e2982d120c386e3fbe805571213207 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Jul 2020 23:20:43 +0300 Subject: [PATCH 29/35] Fix Bug 45007 --- apps/api/documents/api.js | 4 +- .../main/index_internal.html | 235 ++++++++++++++++++ .../main/index_internal.html.deploy | 232 +++++++++++++++++ build/spreadsheeteditor.json | 4 + 4 files changed, 474 insertions(+), 1 deletion(-) create mode 100644 apps/spreadsheeteditor/main/index_internal.html create mode 100644 apps/spreadsheeteditor/main/index_internal.html.deploy diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 71a006e8f..542fb2816 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -770,7 +770,9 @@ if ( typeof(customization) == 'object' && ( customization.toolbarNoTabs || (config.editorConfig.targetApp!=='desktop') && (customization.loaderName || customization.loaderLogo))) { index = "/index_loader.html"; - } + } else if (config.editorConfig.mode == 'editdiagram' || config.editorConfig.mode == 'editmerge') + index = "/index_internal.html"; + } path += index; return path; diff --git a/apps/spreadsheeteditor/main/index_internal.html b/apps/spreadsheeteditor/main/index_internal.html new file mode 100644 index 000000000..ffa6c2ac7 --- /dev/null +++ b/apps/spreadsheeteditor/main/index_internal.html @@ -0,0 +1,235 @@ + + + + ONLYOFFICE Document Editor + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/spreadsheeteditor/main/index_internal.html.deploy b/apps/spreadsheeteditor/main/index_internal.html.deploy new file mode 100644 index 000000000..73ba16dc1 --- /dev/null +++ b/apps/spreadsheeteditor/main/index_internal.html.deploy @@ -0,0 +1,232 @@ + + + + ONLYOFFICE Document Editor + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/build/spreadsheeteditor.json b/build/spreadsheeteditor.json index 8c95362b8..9001b3643 100644 --- a/build/spreadsheeteditor.json +++ b/build/spreadsheeteditor.json @@ -188,6 +188,10 @@ { "src": "../apps/spreadsheeteditor/main/index_loader.html.deploy", "dest": "../deploy/web-apps/apps/spreadsheeteditor/main/index_loader.html" + }, + { + "src": "../apps/spreadsheeteditor/main/index_internal.html.deploy", + "dest": "../deploy/web-apps/apps/spreadsheeteditor/main/index_internal.html" } ] }, From 5f58bd0ca0d6b8f8063b1421c1b90e201c6416b0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 14:59:48 +0300 Subject: [PATCH 30/35] [DE] Add autocorrect options --- apps/common/main/lib/util/utils.js | 14 ++ .../common/main/lib/view/AutoCorrectDialog.js | 122 ++++++++++++++++++ apps/documenteditor/main/app/view/FileMenu.js | 2 + .../main/app/view/FileMenuPanels.js | 44 ++++++- 4 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 apps/common/main/lib/view/AutoCorrectDialog.js diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 0c32fc416..948cbb4e3 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -594,6 +594,20 @@ Common.Utils.String = new (function() { parseFloat: function(string) { (typeof string === 'string') && (string = string.replace(',', '.')); return parseFloat(string) + }, + + encodeSurrogateChar: function(nUnicode) { + if (nUnicode < 0x10000) + { + return String.fromCharCode(nUnicode); + } + else + { + nUnicode = nUnicode - 0x10000; + var nLeadingChar = 0xD800 | (nUnicode >> 10); + var nTrailingChar = 0xDC00 | (nUnicode & 0x3FF); + return String.fromCharCode(nLeadingChar) + String.fromCharCode(nTrailingChar); + } } } })(); diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js new file mode 100644 index 000000000..d2ef90c61 --- /dev/null +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -0,0 +1,122 @@ +/* + * + * (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 + * + */ + +/** + * AutoCorrectDialog.js + * + * Created by Julia Radzhabova on 03.07.2020 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ +if (Common === undefined) + var Common = {}; +define([ + 'common/main/lib/component/ListView', + 'common/main/lib/component/Window' +], function () { 'use strict'; + + Common.Views.AutoCorrectDialog = Common.UI.Window.extend(_.extend({ + options: { + width: 448, + cls: 'modal-dlg', + buttons: null + }, + + initialize : function(options) { + _.extend(this.options, { + title: this.textTitle + }, options || {}); + + this.template = [ + '
    ', + '
    ', + '', + '', + '', + '', + '', + '', + '', + '
    ', + '', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '' + ].join(''); + + this.options.tpl = _.template(this.template)(this.options); + this.props = this.options.props || []; + + Common.UI.Window.prototype.initialize.call(this, this.options); + }, + + render: function() { + Common.UI.Window.prototype.render.call(this); + + var $window = this.getChild(); + + // special + this.mathList = new Common.UI.ListView({ + el: $window.find('#auto-correct-math-list'), + store: new Common.UI.DataViewStore(this.props), + simpleAddMode: true, + template: _.template(['
    '].join('')), + itemTemplate: _.template([ + '
    ', + '
    <%= replaced %>
    ', + '
    <%= by %>
    ', + '
    ' + ].join('')), + scrollAlwaysVisible: true + }); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); + }, + + onBtnClick: function(event) { + this.close(); + }, + + onPrimary: function(event) { + return true; + }, + + textTitle: 'AutoCorrect', + textMathCorrect: 'Math AutoCorrect' + + }, Common.Views.AutoCorrectDialog || {})) +}); diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index f6b7f36e1..1a2a6838e 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -239,6 +239,7 @@ define([ if ( !!this.api ) { this.panels['info'].setApi(this.api); + this.panels['opts'].setApi(this.api); if ( this.panels['protect'] ) this.panels['protect'].setApi(this.api); } @@ -373,6 +374,7 @@ define([ if ( this.rendered ) { this.panels['info'].setApi(api); + this.panels['opts'].setApi(api); if (this.panels['protect']) this.panels['protect'].setApi(api); } diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index ced874565..a3a4ffb8c 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -41,7 +41,8 @@ */ define([ - 'common/main/lib/view/DocumentAccessDialog' + 'common/main/lib/view/DocumentAccessDialog', + 'common/main/lib/view/AutoCorrectDialog' ], function () { 'use strict'; @@ -202,6 +203,10 @@ define([ '', '
    ', '','', + '', + '', + '
    ', + '','', '', '', '
    ', @@ -430,6 +435,11 @@ define([ labelText: this.strPasteButton }); + this.btnAutoCorrect = new Common.UI.Button({ + el: $markup.findById('#fms-btn-auto-correct') + }); + this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this)); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-btn-apply') }); @@ -473,6 +483,11 @@ define([ $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); }, + setApi: function(o) { + this.api = o; + return this; + }, + updateSettings: function() { this.chInputMode.setValue(Common.Utils.InternalSettings.get("de-settings-inputmode")); @@ -593,6 +608,29 @@ define([ this._fontRender = combo.getValue(); }, + autoCorrect: function() { + if (!this._mathCorrect) { + var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [], + data = []; + _.each(arr, function(item, index){ + var itm = {replaced: item[0]}; + if (typeof item[1]=='object') { + itm.by = ''; + _.each(item[1], function(ch){ + itm.by += Common.Utils.String.encodeSurrogateChar(ch); + }); + } else { + itm.by = Common.Utils.String.encodeSurrogateChar(item[1]); + } + data.push(itm); + }); + this._mathCorrect = data; + } + (new Common.Views.AutoCorrectDialog({ + props: this._mathCorrect + })).show(); + }, + strLiveComment: 'Turn on option', strInputMode: 'Turn on hieroglyphs', strZoom: 'Default Zoom Value', @@ -642,7 +680,9 @@ define([ 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' + strPasteButton: 'Show Paste Options button when content is pasted', + txtProofing: 'Proofing', + txtAutoCorrect: 'AutoCorrect options...' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ From ad49bc4e6180361381f78098e9e7dc4ef53e0d15 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 15:15:17 +0300 Subject: [PATCH 31/35] [PE][SSE] Add autocorrect options --- apps/documenteditor/main/app/view/FileMenu.js | 4 +- .../main/app/view/FileMenu.js | 2 + .../main/app/view/FileMenuPanels.js | 42 ++++++++++++++++++- .../main/app/view/FileMenuPanels.js | 41 ++++++++++++++++-- 4 files changed, 83 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 1a2a6838e..e550d78a6 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -239,7 +239,7 @@ define([ if ( !!this.api ) { this.panels['info'].setApi(this.api); - this.panels['opts'].setApi(this.api); + if (this.panels['opts']) this.panels['opts'].setApi(this.api); if ( this.panels['protect'] ) this.panels['protect'].setApi(this.api); } @@ -374,7 +374,7 @@ define([ if ( this.rendered ) { this.panels['info'].setApi(api); - this.panels['opts'].setApi(api); + if (this.panels['opts']) this.panels['opts'].setApi(api); if (this.panels['protect']) this.panels['protect'].setApi(api); } diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 5d5189f4d..9c5ef6561 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -223,6 +223,7 @@ define([ if ( !!this.api ) { this.panels['info'].setApi(this.api); + if (this.panels['opts']) this.panels['opts'].setApi(this.api); if ( this.panels['protect'] ) this.panels['protect'].setApi(this.api); } @@ -352,6 +353,7 @@ define([ if ( this.rendered ) { this.panels['info'].setApi(api); + if (this.panels['opts']) this.panels['opts'].setApi(api); if (this.panels['protect']) this.panels['protect'].setApi(api); } this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this)); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 73dc6cf58..1575ebb79 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -42,6 +42,7 @@ define([ 'common/main/lib/view/DocumentAccessDialog', + 'common/main/lib/view/AutoCorrectDialog', 'common/main/lib/component/CheckBox' ], function () { 'use strict'; @@ -184,6 +185,10 @@ define([ '', '
    ', '','', + '', + '', + '', + '','', '', '', '
    ', @@ -373,6 +378,11 @@ define([ labelText: this.strPasteButton }); + this.btnAutoCorrect = new Common.UI.Button({ + el: $markup.findById('#fms-btn-auto-correct') + }); + this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this)); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-btn-apply') }); @@ -414,6 +424,11 @@ define([ $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); }, + setApi: function(o) { + this.api = o; + return this; + }, + updateSettings: function() { this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck")); @@ -506,6 +521,29 @@ define([ this._fontRender = combo.getValue(); }, + autoCorrect: function() { + if (!this._mathCorrect) { + var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [], + data = []; + _.each(arr, function(item, index){ + var itm = {replaced: item[0]}; + if (typeof item[1]=='object') { + itm.by = ''; + _.each(item[1], function(ch){ + itm.by += Common.Utils.String.encodeSurrogateChar(ch); + }); + } else { + itm.by = Common.Utils.String.encodeSurrogateChar(item[1]); + } + data.push(itm); + }); + this._mathCorrect = data; + } + (new Common.Views.AutoCorrectDialog({ + props: this._mathCorrect + })).show(); + }, + strInputMode: 'Turn on hieroglyphs', strZoom: 'Default Zoom Value', okButtonText: 'Apply', @@ -549,7 +587,9 @@ define([ 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' + strPasteButton: 'Show Paste Options button when content is pasted', + txtProofing: 'Proofing', + txtAutoCorrect: 'AutoCorrect options...' }, PE.Views.FileMenuPanels.Settings || {})); PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 6a92c8ff6..affbdea83 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -31,7 +31,8 @@ * */ define([ - 'common/main/lib/view/DocumentAccessDialog' + 'common/main/lib/view/DocumentAccessDialog', + 'common/main/lib/view/AutoCorrectDialog' ], function () { 'use strict'; @@ -257,6 +258,7 @@ define([ setApi: function(api) { this.generalSettings && this.generalSettings.setApi(api); + this.spellcheckSettings && this.spellcheckSettings.setApi(api); }, txtGeneral: 'General', @@ -1237,6 +1239,10 @@ define([ '', '', '','', + '', + '', + '', + '','', '', '', '', @@ -1272,6 +1278,11 @@ define([ menuStyle: 'min-width: 267px; max-height: 209px;' }); + this.btnAutoCorrect = new Common.UI.Button({ + el: $markup.findById('#fms-btn-auto-correct') + }); + this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this)); + this.btnApply = new Common.UI.Button({ el: $markup.findById('#fms-spellcheck-btn-apply') }); @@ -1362,11 +1373,35 @@ define([ } }, + autoCorrect: function() { + if (!this._mathCorrect) { + var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [], + data = []; + _.each(arr, function(item, index){ + var itm = {replaced: item[0]}; + if (typeof item[1]=='object') { + itm.by = ''; + _.each(item[1], function(ch){ + itm.by += Common.Utils.String.encodeSurrogateChar(ch); + }); + } else { + itm.by = Common.Utils.String.encodeSurrogateChar(item[1]); + } + data.push(itm); + }); + this._mathCorrect = data; + } + (new Common.Views.AutoCorrectDialog({ + props: this._mathCorrect + })).show(); + }, + strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE', strIgnoreWordsWithNumbers: 'Ignore words with numbers', strDictionaryLanguage: 'Dictionary language', - okButtonText: 'Apply' - + okButtonText: 'Apply', + txtProofing: 'Proofing', + txtAutoCorrect: 'AutoCorrect options...' }, SSE.Views.FileMenuPanels.MainSpellCheckSettings || {})); SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ From 660d38a853ac61f6d9776d9900b760f999f7bbfd Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 15:27:20 +0300 Subject: [PATCH 32/35] AutoCorrection: refactoring. Add translation --- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/documenteditor/main/locale/en.json | 4 ++++ apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/locale/en.json | 4 ++++ apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/locale/en.json | 4 ++++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a3a4ffb8c..2d46a8e45 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -205,7 +205,7 @@ define([ '','', '', '', - '', + '', '','', '', '', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 30b809527..d871d544c 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -157,6 +157,8 @@ "Common.Views.About.txtPoweredBy": "Powered by", "Common.Views.About.txtTel": "tel.: ", "Common.Views.About.txtVersion": "Version ", + "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", + "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", @@ -1581,6 +1583,8 @@ "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.FileMenuPanels.Settings.txtProofing": "Proofing", + "DE.Views.FileMenuPanels.Settings.txtAutoCorrect": "AutoCorrect options...", "DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center", "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left", "DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page", diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 1575ebb79..c7bd22e8e 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -187,7 +187,7 @@ define([ '','', '', '', - '', + '', '','', '', '', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index f4caa3913..fd52cf811 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -58,6 +58,8 @@ "Common.Views.About.txtPoweredBy": "Powered by", "Common.Views.About.txtTel": "tel.: ", "Common.Views.About.txtVersion": "Version ", + "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", + "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", @@ -1274,6 +1276,8 @@ "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.FileMenuPanels.Settings.txtProofing": "Proofing", + "PE.Views.FileMenuPanels.Settings.txtAutoCorrect": "AutoCorrect options...", "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/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index affbdea83..04a4ab069 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1241,7 +1241,7 @@ define([ '','', '', '', - '', + '', '','', '', '', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index b6bb22291..7d7a4d017 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -59,6 +59,8 @@ "Common.Views.About.txtPoweredBy": "Powered by", "Common.Views.About.txtTel": "tel.: ", "Common.Views.About.txtVersion": "Version ", + "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", + "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", @@ -1726,6 +1728,8 @@ "SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language", "SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE", "SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsWithNumbers": "Ignore words with numbers", + "SSE.Views.FileMenuPanels.MainSpellCheckSettings.txtProofing": "Proofing", + "SSE.Views.FileMenuPanels.MainSpellCheckSettings.txtAutoCorrect": "AutoCorrect options...", "SSE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning", "SSE.Views.FileMenuPanels.ProtectDoc.strEncrypt": "With password", "SSE.Views.FileMenuPanels.ProtectDoc.strProtect": "Protect Spreadsheet", From 4ca4897e9c09ff7fc8b249642283e44d4f0bb2e7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 18:06:34 +0300 Subject: [PATCH 33/35] Change autocorrect options --- .../common/main/lib/view/AutoCorrectDialog.js | 71 +++++++++++++++++-- apps/documenteditor/main/locale/en.json | 2 + apps/presentationeditor/main/locale/en.json | 2 + apps/spreadsheeteditor/main/locale/en.json | 2 + 4 files changed, 73 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index d2ef90c61..ba49b37a0 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -62,13 +62,25 @@ define([ '
    ', '', '', - '', '', '', '', + '', + '', + '', + '', + '', + '', '', '
    ', - '', + '', + '', '
    ', - '
    ', + '', + '', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', '
    ', @@ -89,6 +101,7 @@ define([ Common.UI.Window.prototype.render.call(this); var $window = this.getChild(); + var me = this; // special this.mathList = new Common.UI.ListView({ @@ -104,9 +117,57 @@ define([ ].join('')), scrollAlwaysVisible: true }); + this.mathList.on('item:select', _.bind(this.onSelectMathItem, this)); + + this.inputReplace = new Common.UI.InputField({ + el : $window.find('#auto-correct-replace'), + allowBlank : true, + validateOnChange : true, + validation : function () { return true; } + }).on ('changing', function (input, value) { + if (value.length) { + var store = me.mathList.store; + var _selectedItem = store.find(function(item) { + if ( item.get('replaced').indexOf(value) == 0) { + return true; + } + }); + if (_selectedItem) { + me.mathList.selectRecord(_selectedItem, true); + me.mathList.scrollToRecord(_selectedItem); + } else { + me.mathList.deselectAll(); + } + } else { + me.mathList.deselectAll(); + } + }); + + this.inputBy = new Common.UI.InputField({ + el : $window.find('#auto-correct-by'), + allowBlank : true, + validateOnChange : true, + validation : function () { return true; } + }); + // this.inputBy.cmpEl.find('input').css('font-size', '13px'); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); }, + onSelectMathItem: function(lisvView, itemView, record) { + this.inputReplace.setValue(record.get('replaced')); + this.inputBy.setValue(record.get('by')); + }, + + show: function() { + Common.UI.Window.prototype.show.apply(this, arguments); + + var me = this; + _.delay(function(){ + $('input', me.inputReplace.cmpEl).select().focus(); + },100); + }, + onBtnClick: function(event) { this.close(); }, @@ -116,7 +177,9 @@ define([ }, textTitle: 'AutoCorrect', - textMathCorrect: 'Math AutoCorrect' + textMathCorrect: 'Math AutoCorrect', + textReplace: 'Replace:', + textBy: 'By:' }, Common.Views.AutoCorrectDialog || {})) }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index d871d544c..79b088a3a 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -159,6 +159,8 @@ "Common.Views.About.txtVersion": "Version ", "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", + "Common.Views.AutoCorrectDialog.textReplace": "Replace:", + "Common.Views.AutoCorrectDialog.textBy": "By:", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index fd52cf811..6ae930552 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -60,6 +60,8 @@ "Common.Views.About.txtVersion": "Version ", "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", + "Common.Views.AutoCorrectDialog.textReplace": "Replace:", + "Common.Views.AutoCorrectDialog.textBy": "By:", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 7d7a4d017..d21b9534b 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -61,6 +61,8 @@ "Common.Views.About.txtVersion": "Version ", "Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect", "Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect", + "Common.Views.AutoCorrectDialog.textReplace": "Replace:", + "Common.Views.AutoCorrectDialog.textBy": "By:", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment", From 9619a20bd4bd2def74870952896a961273d438b5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 18:34:57 +0300 Subject: [PATCH 34/35] Autocorrect refactoring --- apps/common/main/lib/view/AutoCorrectDialog.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index ba49b37a0..f7d348a95 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -143,6 +143,20 @@ define([ } }); + this.inputReplace.cmpEl.find('input').on('keydown', function(event){ + if (event.key == 'ArrowDown') { + var _selectedItem = me.mathList.getSelectedRec() || me.mathList.store.at(0); + if (_selectedItem) { + me.mathList.selectRecord(_selectedItem); + me.mathList.scrollToRecord(_selectedItem); + } + _.delay(function(){ + me.mathList.cmpEl.find('.listview').focus(); + },10); + + } + }); + this.inputBy = new Common.UI.InputField({ el : $window.find('#auto-correct-by'), allowBlank : true, From c0e42f3d342069d27d3db0db54b0fce9c5bd4bf3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 3 Jul 2020 18:39:02 +0300 Subject: [PATCH 35/35] Refactoring --- apps/spreadsheeteditor/main/app/view/SlicerAddDialog.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/SlicerAddDialog.js b/apps/spreadsheeteditor/main/app/view/SlicerAddDialog.js index 6f39533c9..cb436fbb3 100644 --- a/apps/spreadsheeteditor/main/app/view/SlicerAddDialog.js +++ b/apps/spreadsheeteditor/main/app/view/SlicerAddDialog.js @@ -53,9 +53,6 @@ define([ }, initialize : function (options) { - var t = this, - _options = {}; - _.extend(this.options, { title: this.txtTitle }, options || {});