From 455a1f6a03c619adc7008300c8ffe11e23d4e5ae Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 25 Sep 2019 16:25:57 +0300 Subject: [PATCH] [DE] added localized version of items for TOC menu --- apps/common/main/resources/less/toolbar.less | 4 ++++ apps/documenteditor/main/app/view/Links.js | 4 +++- .../main/resources/img/toolbar/contents.png | Bin 733 -> 1315 bytes .../resources/img/toolbar/contents@2x.png | Bin 1624 -> 3217 bytes .../main/resources/less/toolbar.less | 18 ++++++++++++++++-- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index 4e64e2a59..8d4ff5bcd 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -559,6 +559,10 @@ .button-normal-icon(btn-sort-down, 5, @toolbar-icon-size); .button-normal-icon(btn-sort-up, 6, @toolbar-icon-size); .button-normal-icon(btn-currency-style, 7, @toolbar-icon-size); + + .dropdown-menu.toc-menu { + --bckgHOffset: -144px; + } } diff --git a/apps/documenteditor/main/app/view/Links.js b/apps/documenteditor/main/app/view/Links.js index c9b83f9d4..11ff7d738 100644 --- a/apps/documenteditor/main/app/view/Links.js +++ b/apps/documenteditor/main/app/view/Links.js @@ -160,11 +160,12 @@ define([ (new Promise(function (accept, reject) { accept(); })).then(function(){ - var contentsTemplate = _.template('
'); + var contentsTemplate = _.template('
'); me.btnsContents.forEach( function(btn) { btn.updateHint( me.tipContents ); var _menu = new Common.UI.Menu({ + cls: 'toc-menu', items: [ {template: contentsTemplate, offsety: 0, value: 0}, {template: contentsTemplate, offsety: 72, value: 1}, @@ -177,6 +178,7 @@ define([ }); me.contentsMenu = new Common.UI.Menu({ + cls: 'toc-menu', items: [ {template: contentsTemplate, offsety: 0, value: 0}, {template: contentsTemplate, offsety: 72, value: 1}, diff --git a/apps/documenteditor/main/resources/img/toolbar/contents.png b/apps/documenteditor/main/resources/img/toolbar/contents.png index 83210b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M`w< zQM9OF!gJ!h+My~YuIa`IP`IZ~WxYO)mC;s+B?+8OunQCx+&dz|s$L!-y zvs2~F>3d)9i1XK7gQim8;SLEeHNH!=PyLf1e3aiiUH}Ip^G+s#;IdXl$uU5@#$|HLJ9E zu%(Cn!G;Q!*itIIaIvaEGPV>Y882L^YP`k9u8IOLT&QXxPxh6J6V|KR%=32X^m|rcf zu4>jHjcsNxw6sfA?U0l@f4!>xnEkz-J2+tgh=CZ`f7f~X9};maGi9u?ez~Pt)vRg& z0000$KzAju-d#EGcUKDg-Ieopcy}eR-(5LbcjbL!-Ieo??#e8;Y`1Ix0Ns_^M0aK2 zL!{AnS9<&1mD6`u-q&|mdh6Yl^Uv;zRc(<~4FEuQB{I-mv8oMpR|08wrPp^?dR2Gj oeSLSOmvvXxS=GK}RRaLv0|h=Vy)j)Lo&W#<07*qoM6N<$f-ZzY5C8xG diff --git a/apps/documenteditor/main/resources/img/toolbar/contents@2x.png b/apps/documenteditor/main/resources/img/toolbar/contents@2x.png index e1946694c9974e5160557535ca55c6a1647179e8..5f84a8441ac74b24fdecc4faff921db36f3321d0 100644 GIT binary patch literal 3217 zcmb7HdpuNm8`ovKxOLf5JIAHAVoONNDAyDt3FR6RLpUxoYMF62m22rx32P7;v`m=E zT&f8r%&L?j(==nUQWH5wh*o1}-m!1(yYIgH&-?swp6};-e$VrJp6~DZeLm-$KjPw` zri@TlQc_ZLJZR^pq_hZDQd+!k#S#S*-&XCba6cY7>|wv){~xonvop20Ls5jSiFI>v zS6cJ^k9MA+aoNRntS3UT{EXWgEe9nfm3c=yTaS1?EF8kV-m@`d$jJD7*`CQ_Nh^Qc ze7j+A!6Gi4Nd9zrbs8uMK5=EyvND7s|8Q?A~?_S@%_ufb203KH;4{AxvJks zbgpV0yeoPRm1}h{t@s=NPWxV@pU6zhOR_F(3*MbogQPaAyEl*zm^?-|jU({~A0?}k z`>g$JVJ?-eOBEi)^jp6nU>{zd4+_nvY35~?@a~MQE|@B+8b^F^PJ zzG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e59baba..39e72988b 100644 --- a/apps/documenteditor/main/resources/less/toolbar.less +++ b/apps/documenteditor/main/resources/less/toolbar.less @@ -39,12 +39,15 @@ height: 38px; } -.dropdown-menu { +.dropdown-menu.toc-menu { + @contents-menu-item-height: 72px; + --bckgHOffset: 0px; + > li > a.item-contents { div { .background-ximage('@{app-image-path}/toolbar/contents.png', '@{app-image-path}/toolbar/contents@2x.png', 246px); width: 246px; - height: 72px; + height: @contents-menu-item-height; .box-shadow(0 0 0 1px @gray); @@ -62,6 +65,17 @@ } } } + + .loop(@counter) when (@counter > 0) { + .loop((@counter - 1)); + li:nth-child(@{counter}) > a.item-contents { + div { + background-position: 0 calc(~"var(--bckgHOffset) - " (@counter - 1)*@contents-menu-item-height); + } + } + } + + .loop(2); } .color-schemas-menu {