From cfd2b31b61e190becf5ea65931cda5d5b61422c3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Jan 2017 11:17:58 +0300 Subject: [PATCH] [SSE] Changed border styles for cell in the toolbar. --- .../main/app/controller/Toolbar.js | 1 - .../main/app/view/Toolbar.js | 20 ++++++++++++------ apps/spreadsheeteditor/main/locale/en.json | 3 ++- .../main/resources/img/toolbar/BorderSize.png | Bin 99 -> 2446 bytes .../main/resources/less/toolbar.less | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 5f5644d177..d50393acee 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -517,7 +517,6 @@ define([ onBordersWidth: function(menu, item, state) { if (state) { - $('#id-toolbar-mnu-item-border-width .menu-item-icon').css('border-width', (item.value == 'thin' ? 1 : (item.value == 'medium' ? 2 : 3)) + 'px'); this.toolbar.btnBorders.options.borderswidth = item.value; Common.NotificationCenter.trigger('edit:complete', this.toolbar); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 564dd4b1e7..8539e9de03 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1486,9 +1486,9 @@ define([ {caption: '--'}, { id : 'id-toolbar-mnu-item-border-width', - caption : this.textBordersWidth, + caption : this.textBordersStyle, iconCls : 'mnu-icon-item mnu-border-width', - template : _.template('<%= caption %>'), + template : _.template('<%= caption %>'), menu : (function(){ var itemTemplate = _.template('
'); @@ -1497,9 +1497,17 @@ define([ menuAlign : 'tl-tr', id : 'toolbar-menu-borders-width', items: [ - { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: 'thin', offsety: 0, checked:true}, - { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: 'medium', offsety: 20}, - { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: 'thick', offsety: 40} + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Thin , offsety: 0, checked:true}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Hair, offsety: 20}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Dotted, offsety: 40}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Dashed, offsety: 60}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.DashDot, offsety: 80}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.DashDotDot, offsety: 100}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Medium, offsety: 120}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.MediumDashed, offsety: 140}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.MediumDashDot, offsety: 160}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.MediumDashDotDot, offsety: 180}, + { template: itemTemplate, stopPropagation: true, checkable: true, toggleGroup: 'border-width', value: Asc.c_oAscBorderStyles.Thick, offsety: 200} ] }); @@ -1852,7 +1860,7 @@ define([ tipAlignTop: 'Align Top', tipAlignMiddle: 'Align Middle', tipAlignBottom: 'Align Bottom', - textBordersWidth: 'Borders Width', + textBordersStyle: 'Border Style', textBordersColor: 'Borders Color', textAlignLeft: 'Left align text', textAlignRight: 'Right align text', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index e51ebed987..a514a67c91 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1484,7 +1484,8 @@ "SSE.Views.Toolbar.textAllBorders": "All Borders", "SSE.Views.Toolbar.textBold": "Bold", "SSE.Views.Toolbar.textBordersColor": "Border Color", - "SSE.Views.Toolbar.textBordersWidth": "Border Width", + "del_SSE.Views.Toolbar.textBordersWidth": "Border Width", + "SSE.Views.Toolbar.textBordersStyle": "Border Style", "SSE.Views.Toolbar.textBottomBorders": "Bottom Borders", "SSE.Views.Toolbar.textCenterBorders": "Inside Vertical Borders", "SSE.Views.Toolbar.textClockwise": "Angle Clockwise", diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/BorderSize.png b/apps/spreadsheeteditor/main/resources/img/toolbar/BorderSize.png index 459301b020031b443e53b4e604484289bcee1e33..9cd1ceddd199427a911c0a3377f02f68b046ec43 100644 GIT binary patch literal 2446 zcmb_ee{2&~952KHE&(Ji!I>E^2P2!ay}SOn_AV=|?OnGTJ4@TJWh3hC?ybG8y}RAr z)@~}v&;(uJ4-%6lh7n*YA13~?=pwrtx{)O^@QB1=QtJE z0)pHDkVuwGfjHoV{+>@jz0I~VCMH|;*68CjFJ~Q`fpO%s3beM_>bK+-j_(FK(g9MU zl@S`oBC>~WpAT2fxs30-Woa6_(c}hUHY)0zyG<1*!I)~)58A+q_ezf41 zhGSzILy-bR@AjkfNwr2}NJv%z;&Hg_JWdb@NjeC(ha`zd5hqSKF&utLJK?51B<=Jf z<_Cq*RH2iOGhs6peDb4dT~}xf%jI&8oXa7rDU6^f%JAWI+9ATO^-DUJw@ccFq6Y?O zyecZXC`*Xpk?W9qbw3I-oi8D)SZ*cFY!hr4mgf|VaNtHs1)#uNIHgz36oLyp1~MQE zBwd48!otEXMWYscQMcKwh1PVo4`yW6wkTRl_A3C315NH#dBFC;h#QKDX?h&oXw6-i zLwLbhp+hR*bXiTxa;8XFEG_G@mX;MHlpv9s7Eu!9oK|ZDGx31obl^uJd88dO=kz5Z zd4!jC6Lq+Y#_@S*R2Ia}ehccgR`QsE)^#v|23Hruj`5hjq#PyKi~&~*mCuk73^ zb*`@Nm(%ZWdV6#)7_FHJ)jF=6c&_RA1KVHQ_iJ=A5*i^qah zv((Tv@$jDC-#nZ?VS$VR3NO^YS0>iH-cr45$9MupT=?FI)-b4UJ>;5N-|@{uC)=-1 zjNLzbYW73#`XlnunRnK_+*Yw?TQTvX<>0a5ZLX=~sj=b7Q%ia5`k8(!aUe4~T^n<^ z-4xTv$=z66*|_=YtK4Mh2-EZIJ-0Vu=e_SXUh3NT)iWd0yGecBndzEOPs>kT`m4IH z`?t0qF8+~j|C=}(zpi<1cmBcWU+f+qzJ9RMUg2lE28Kqy{qvUojXpneey}}!u;F~d fs%;0gcG(Ks=#{e<;^!_*8UK(XY%?OyQ~s_4@?<<+978G? ulYj6t%C9)zz_{bYg5-n-#V2W27IF+p?6Xr&i*MHi>GpK>b6Mw<&;$TXAQ}(= diff --git a/apps/spreadsheeteditor/main/resources/less/toolbar.less b/apps/spreadsheeteditor/main/resources/less/toolbar.less index 4d4106bab2..9beb5159db 100644 --- a/apps/spreadsheeteditor/main/resources/less/toolbar.less +++ b/apps/spreadsheeteditor/main/resources/less/toolbar.less @@ -246,7 +246,7 @@ #id-toolbar-mnu-item-border-width { .border-size-item { - background: ~"url(@{app-image-const-path}/toolbar/BorderSize.png) repeat-x scroll 0 0"; + background: ~"url(@{app-image-const-path}/toolbar/BorderSize.png) no-repeat scroll 0 0"; width: 80px; height: 20px; margin-top: -3px;