From e01ee8d8e9fdf8187f1cef20517dbcd309e4f0a7 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Wed, 16 Jul 2025 19:06:59 +0300 Subject: [PATCH] Add Suggest a Feature to File menu --- apps/api/documents/api.js | 3 ++- .../img/toolbar/1.25x/btn-suggest-feature.png | Bin 0 -> 613 bytes .../img/toolbar/1.5x/btn-suggest-feature.png | Bin 0 -> 668 bytes .../img/toolbar/1.75x/btn-suggest-feature.png | Bin 0 -> 807 bytes .../img/toolbar/1x/btn-suggest-feature.png | Bin 0 -> 527 bytes .../img/toolbar/2.5x/btn-suggest-feature.svg | 3 +++ .../img/toolbar/2x/btn-suggest-feature.png | Bin 0 -> 959 bytes .../toolbar/v2/1.25x/btn-suggest-feature.png | Bin 0 -> 946 bytes .../toolbar/v2/1.5x/btn-suggest-feature.png | Bin 0 -> 981 bytes .../toolbar/v2/1.75x/btn-suggest-feature.png | Bin 0 -> 1259 bytes .../img/toolbar/v2/1x/btn-suggest-feature.png | Bin 0 -> 777 bytes .../toolbar/v2/2.5x/btn-suggest-feature.svg | 3 +++ .../img/toolbar/v2/2x/btn-suggest-feature.png | Bin 0 -> 1473 bytes .../main/app/controller/LeftMenu.js | 1 + .../documenteditor/main/app/controller/Main.js | 8 ++++++++ .../main/app/template/FileMenu.template | 1 + apps/documenteditor/main/app/view/FileMenu.js | 16 +++++++++++++++- apps/documenteditor/main/locale/en.json | 1 + apps/pdfeditor/main/app/controller/LeftMenu.js | 1 + apps/pdfeditor/main/app/controller/Main.js | 8 ++++++++ .../main/app/template/FileMenu.template | 1 + apps/pdfeditor/main/app/view/FileMenu.js | 17 ++++++++++++++++- apps/pdfeditor/main/locale/en.json | 1 + .../main/app/controller/LeftMenu.js | 1 + .../main/app/controller/Main.js | 8 ++++++++ .../main/app/template/FileMenu.template | 1 + .../main/app/view/FileMenu.js | 17 ++++++++++++++++- apps/presentationeditor/main/locale/en.json | 1 + .../main/app/controller/LeftMenu.js | 1 + .../main/app/controller/Main.js | 8 ++++++++ .../main/app/template/FileMenu.template | 1 + .../main/app/view/FileMenu.js | 17 ++++++++++++++++- apps/spreadsheeteditor/main/locale/en.json | 1 + .../main/app/controller/LeftMenu.js | 1 + apps/visioeditor/main/app/controller/Main.js | 8 ++++++++ .../main/app/template/FileMenu.template | 1 + apps/visioeditor/main/app/view/FileMenu.js | 17 ++++++++++++++++- apps/visioeditor/main/locale/en.json | 1 + build/Gruntfile.js | 3 +++ 39 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.5x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/v2/1x/btn-suggest-feature.png create mode 100644 apps/common/main/resources/img/toolbar/v2/2.5x/btn-suggest-feature.svg create mode 100644 apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 8c2bedcf91..c2e454897a 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -274,7 +274,8 @@ showHorizontalScroll: true/false, // show/hide scroll in the spreadsheet editor by default startFillingForm: { text: 'Share & collect' // caption of the start filling button, used for pdf-forms - } + }, + suggestFeature: true/false }, coEditing: { mode: 'fast', // , 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..56321383e3693145eaa441737445ea4df3e001f0 GIT binary patch literal 613 zcmV-r0-F7aP)X1^@s6b5wmq00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yP!yr$@0)DHUhIPzw6_h~+_~axFHym#}{+8^M?14Odk$oWTR4j8;RrNpy$Ulc; zszw%Nu(Cf0sYVtBkOC0pVC<#G4cklK$ov|$?2iSrNe>#|{7WyXbo1u8nngJ#-<>%o zSXVHA9NP~s7`HRmtSgv5j_u!rc43#`Tj(N+PekUI;M;(R*-hgg^H-HV=4H%(i12*UgWrMOoyMehYXNZFB3+W#fQWRGvU2Y>Mj-wmG0fdJVWtHv8Px`JM?q=NU`blH-U^A zimWb;Z#WMPd8Rl}tnqzyV;C7{<1c6cnRuo+P^@K#V>w2~*?1FOzKU$tOw2cuzd{AH z_?4J76Z4JaSLs^l%m$3ivnYTTZ8c_l^MYxMLU_>*WmuW7Mi%W*K)6^az)|c_2hX>f z32c<2N|)#7b~*Kwex!Iq9X$UDIxeMqJ_b6}VW7ONX=nBnRl4DS8A?3bp!ywJXcOJs z?@TQ`0mcL910k#mU0gm zhq}VUX2yMH%#{`%j77e*ObHvzSX!nGwjC0Q0f8ZBYnZ_8V%sr zuGo$Zg_n}o>h#dn9VNH5V^hggTA3*Hal5Y^ND9l6{P)S zG%o7Lt1tS@(_HtgT{&JRI%0Ur1?i(LE&o0D&@sy{j*5DJ8Qse9GSLg(()|6`B*wV^ z6Z3G&6d`6t-Jf#NN8*U`?_XJZFAFh_rFHX-Yvl_vX7`5~w8 z4j0FSXaEL5kOo#(Rtm5|9y<{y|92$6MQ+OFa+$Pcv)Pzz`Gj=tNFGUENq&;tkH)@{ zoJd-d2hm*&3dSADBT3K}8f!@&SQiW8(K~&T*C8B9ExL1hX2?-5PP6lVM$eJdqU*5$ zd!#$+<(WMSLJsaz9UTR-s4X77gAVC96wI8FgAR#E_7uw;UYog&d6^??ol8y0a%>dX z?3!~#UsH0aNh)MO&K$X>AQP!M6*93dq4#+7JDC~l5}KID%T8v7`+{ebqm?<6;XZ|= zm@N|Ipe#JIT{!PgB#nT1;(Ll7u&(UEFErWi>31&;Iy8Kc!A~ zEifI)HZXQT--eG3+R1x|z%yTDP79r8%Q!gldMR73jxo8N878ExZvbm{cZ7V9B$utnwy z61!cWNuEf4A+31s7Jgigs*HAaf< zYswO|-1+i4=YHa4^xkl#*o@xeK4D1xMIc9$Y@tkvw&gR@d6N$s(@f~`H~E5PS-U+r5 zdRt_6x)Cg9i=~g@t>{&In&MvLT-2D>CjpG^DwUwuLgQLnPK8^&QD~gnuXEZ>Prc l88e)JR9m#O(aK65e*sD}!;dbIa!vpM002ovPDHLkV1g}lTf_hW literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..22db9e4f99f8781d3a2791297c9fc2d1a45c9490 GIT binary patch literal 527 zcmV+q0`UEbP) zbBtAz2pFiqBj`La$5^u7js{}ToX1#_?v5Hr$WxP1J*^S_3{K+EoR(`sFU`T)w{xCc z-N}}9`U6{oE3hGB(3~^ZgwX4u2^xujIU_x5P`m47#>K?=WX3Y3hutZZp|MYIs*AsI z7#KUq?{OFyo2|E&af7H(P1@Z$a*Y=-v9=9Db2V9*m^MmKPoV{>h40LKNev3pL3`zCPVL5G(jh0$!}Sxv#!3*XuE7goT8mEx)CiCFe^1ewF#?_1G9onk!>^ z3rQEhC6e`0&cQ#$T^nq~f5zpKc30m-FZPdmBjZE60rzqR*s;#)p@a9KHJ`{R?!yCw Rr3?T7002ovPDHLkV1kCp;1d7< literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg b/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg new file mode 100644 index 0000000000..dc8de16a45 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..b41f1ef10fc7ad57ce6142f26535d3b4de2b2976 GIT binary patch literal 959 zcmV;w13>(VP)kitH5^^C>=N*a1bvMRs^g7$(I?unH@X= zq4oE|0v52au<(Uhp$uj0flFeuyczq$cHnY$wAKm&|5mHj?EWcZM`K!ON4{qktZ>GT zTF#Nho}9I@9Xeqy#`eax=zd-BXJzcgSnIXlaUYXlL|7Z!dBR+b?Tu}Xk=Kq`pL+GOMjEa%S zk>|u~a|GZYp!Gzo8i{V$=8ESabRzCh32)eDiRbm>i&)J+g>Lu}${}2*0F4TXh37H{ zp%51F!u=^!z-8M8^=Qy#=OT2MZ5vd=n-h!u+n^h|HL>$caTJ;_xN$=l72!Em6oud7 zUEz_-6Y63YvIqXGkk2ERCsf2Nti}GN1pL9}0rfd?`G9=>cmFqW`xRc zGAW)OT=osoBD}OAuRgc`C@%Fz>f6xL##^$qx&4cLL|VY1^&$1@a{G@vClm0~`mnd& zn^Zt20tM;`pG6$H7P{AM3$ySox!02IpXG?_m)u6$5N-vNh-XnKTnl<@ zz-^>WU$CTje4ksONBv7>;on@UNSjweEqN&n1}Z^0`?+Rp%V7gS&|r10us8RyGJGT_0(CC7@`995>7S$EYbtj zn1F;kAE?Fz)Ds`5S_roy4m}_ypf4VwGWzyNza0`FA)qfFVIr(kPKaipJ|y51;=)&f zBe4x7m5_ku(o;~MpSOZT9ybbq%;EW5?NA8B1_5=frTt{Anr2< zzHv!{w$!_44&I-oW#@k6-!m5tAbz>hS=G~x82a{gH7T?C=dcfS{~O25y-PSN`g+85 h5eWDGE+H1~!#^45k=0F{^rQd)002ovPDHLkV1iA)x~l*H literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..ce2d6996f33bab4aef75d9f620c3831335776cf6 GIT binary patch literal 946 zcmV;j15NyiP)RWv{UH8|B%rL_Y-x(QK!!Qixplo?*2QRRYpeA7`r5?D0HeIT zyj*~|3}=4F2r=s0+uKKyBA%X}N)X$GxBw!{FE1~J)z#GuXMX2H`1ts!KRi4fNm_u2 z6O88O=4R1i7toIOk^&wdA5S2piDBfuySoc$M|+tRJTWCAaJ27<-r3ptEfatzMiCU_ zVjqjXzrVNgCdRN5S;yELCpPH`xm>QkxVTt|qNpWf0x=uVP227E-p0npt?NGJ33bGD z0WqD(Yl`7eJQC6M^>qWW^%n`w>y#ljB=0z43B-1f_x=6d$ZHaODE;i~g9^qk@xvh! zk{53_o2_84kvCB=OV85MQbS)uY~Jkd?tV!kbYZURYuv{YB7R^6hGug#NaXRSBphcEL^|Fb=^qq zGxC~FxW#5eUt@eCnH*3wGdRWaJJ)qP?qhQxerU1T&=(k=xZi;ieWb)5a9y`k`;5G% z6K){!47o=v8XwO`i6yvCbwWO9z+;AZW6|W55n>6o&&X>^S{Kq!TtkROjuNZjo$&CW zE-*&&#v(_FRePJcwJ<&OBBq+ zgEU`O@fwH&v}UF3`y#=_15WnmH6_A|xLF~ut$rI{9xg90`LyXGb(?5SY!zZFG6B}t z*XdnVim-`}#nK+GUJ(ndZ%g>`r_vXFZZYNcs5{tA>{! z;r0?e<#bk0p@6tlDI%_o>+9=NNr~6j*V$G)QM>yiR5FE91y=jR6spkq%v+S5-=gGSm>#F_H*M6$&oXrvuQ z9FHlHY%z&yWL09|i7N(SBT=dn15aEr1%*LrNdo9^suxihltl5+U$++(!wfLF{lw)` zl0p9iF@ULfFtKaJ6DknkD&R^o9GNV)Ca9n!iU%v7Bc|fP&=`pUOg#s~Bh%;T^q`sS z?Cjj_?(SOCb(@=;7VG67fCk^8e2E81q{VtkfQ~@zS<5@p`a>jMO;03>v#_wxWWC>( zHW>3shv{cL0n7U#-qG|#qBzK~o2>U6DjThMbOgGR8RPZ#_SVH%-ls@h=_n3=v)*qD z8w>N;Z!rKwxWc<^fBov}s*4GHUx`#z;_S12#$&i&(~3t&pbH6Dfjp6Ldmbc?;sAmF z5(7Z!i=cQskrM~;58O| zMOyTuzi6Vp%%hPfQ2tCNBH8n7vDEWyrbT=DNeZm3t({<^J?nP6q1%S1r>8xNLwov3 znot~^3*GtZM!w$s}IusZFdA@*x%iKl23TL#nKAufzt(k3d%a3oSdAToGkbQ9;g$^wuhhy00000NkvXXu0mjf D#Sz0- literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..1b24df60974bb16a4ac750e1f07374da48a9878f GIT binary patch literal 1259 zcmVCopn(M@q$GUbU%0)!?Y3I2Pp_}9 z9bEFXE7aotKvI^tzP{d>oSf|7 zOMC{&zjYk@wm-^RA*T2E`1l*o=jZ2Ob#*o5h0DuJT5AU!KZ9$+6V|$2#9EyNO^F%e z_yU0f$2ql&ni4aFU|(Q)!FzMg&(A#=K{BU^s4a0v^noCFIyX1BmM11b@i>-q4-ZZ}t(Uwm+cSOJF1loKA0N#C)=GifE)T^9 zy3`|{@RjY@SGocZ#fML&l~dq0g|?aJVxc}y5aLG}|EDe@;EsELf8Ujg0Wp2H2#rFuj>5f_hzr;DIoG@;cxmGTI9!o&GXs)wg-X`T$P z*y1}|^K=&U=;&yOD19rAp88m^=`&o0C)LB_X?b~hh$nsP#l=OBZF<6}KEq{rVu>PQ zQyN_y+*Jpra7OI8r(?zn?ABfQ|2++by!d(?udK z`Mx<}Yip}x-m_waJTXW&FJhDGYhN5+dgs-F@i3v{%X^P3djHsYKK_S9_`f?}Tmm#Vr@1&T_oAu?PRF9E7 z)1u1zViw|QE$ICGd>^|qgIiyN^C1|b#>f*xn&`J$o*?~YOHlpgTexL5-hd#~KNi!H z>W_R-fjMJW&*h0R3C~f!H4lY<0!dY$Y|;J*F->UE*okMEDpg@Y35fdYG9F@<`n;k* zfbPT-X=`DgQ&Iu)gmM+WF60U2Dts2I$mJUtsKi456bsBl6&9F>#zHGb<3kOM-G^#! zpH+b9Wm+$OG`$8TJ1rt{{AmZ?3s}g9Z&6G-&Y0;(tV| Vxe4y^Alt^01=LFzyyd-vcAIHfH}diCs=U;h7&M1K-|DYfCy%8Kn{Tk5dY7)m473>aMP8As%=j6pUL2rBcZ@4C8IT-*ZeK4u@$Z5^*p#`~AKnLSizR z*x-Hxrwz_D{xOB@KyGF-8Rypb5tXuBE;lf=K-f*CQWhKrzwwM8bvR!v78@d*^9^vd z;B0p`n_1ax*4S>h&-h1&^VHwsFjUTi#7riWHOFzLmwMZ_)63=Z9X9S@F!(Kg;5-(_ zoX_Vq%d)QcUDr*o*Xwr#=VB-H_?b3%Ms!kTM?LLmFZ7(Z$K&w`Q1UYf+R@(6#xsSO z^BC%0D=&k3o(0&~gdUFkUMnxdG|efvo4ei4m)|o09$5M(0sv>@1H&(&0R(NsDJO_+ zEEfAf8foz}g$}Ze^YB@zRPuZ;6bgCDD*IbNS{yFqPdrC{q)nc(%3g-&4zN_p`H#x* zid|{L(P}grZBv$UUHf*|!t-dOemdW3gEL@zS5Vv~jZ22GXR4 zyl3b2 + + diff --git a/apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png new file mode 100644 index 0000000000000000000000000000000000000000..46b4cf2bcd96324912d01abcfb69325fae41dedb GIT binary patch literal 1473 zcmV;y1wQ(TP)5g#}RToD+Om0vntoaDu=IW^O=ogK&e%3FZj#x1rcg<^*`hYXKYHk4*oa zc1mO7M3Uu@snV~?mSf9J)2)`&l8HPXkH_Qjcs!n&Qz1v}?CgYG?DK&#kb?$;!Cj?N z>C4eQJw5Hy9CCAW6LPW7`l1ZvAlCVg??GoA-ObHSr}`ImfEfOmhKAQ6;-h_bb{5eb z0K>C^jr3=yv^O?3B65JW1Hv$@K0iMnv-02Z8!dfdVWA5J(PG%ZG48X20vfiaLmEa% zAoV+IYisQ&itgwOxV^otzP-JT^hZm7e}C^TEiFZ_udn^>?d=%%FD@nF} zk^X$$;rs3N_4PvfTR8wmWd(k+@^$HAPF7b}J37YXcUv@!82l4`e*YkK)~sOT2W;e@ zd|8L#*|;YU4-cJMtu|HvtE;OPzjG`<`^(GA2keBHEHQR~wEP~7&p%^68m0!6sOa$l zNA_1%RvNR41hjlMKK^#1Kezfu+S+wNR4gtoCi>IR2@TswSRg~B+p#u2karr80a=fa zkH<74(CttG;{&{dcWG#Yy2!M`C<0`_?a9wt(XIoLzz+DuQBb9!Gb1Vy8E_N**?=`0 zLp0Ny2avxpEd44XJpQfhDyr1&Mk7@FY!ec-ppZotx&htcn znbXJWGfCWf@_x-mejdhoz!U;LdSdVdHR+=HCowb(p59Q5A5aOHI3UJJHExD9F~Rf1 z2^r(ZQs)z?Oe_mfdBiwj?mq6Jl30zLkTHIme0@TZX{^7o19+sbk9(+Qwnf@lMZJfBJew#2DYa=pRs_ZhsPL`D4)R~SgkiiYIrOGzN$N`7~ zES@0>C^OwOMa>N$a~4~a5(QX1t7fO0rl`3AHgs&aD2?*~-aNsM5JD{=ODBxkkZIA3 z;8{?MhO?Ex)(M&EX`dGpTV#o`1F(38ZA8@xlLqA+M#hJ%S?&vC@r(!71Nz$uM*6G9 zhb*0~%si|zVGOL;MkJZ8O&gR|c6WDCH^94)G3)(cfPocD4kY?d8-{0Ri zitZ~|FGWbJJ(8bIgICkKM_=_t1VAKk1Sa}(sjWZfL21r%RHWsnxcDw;Ko*p>=w?c~ zh-QlEqFWxW7vnsJERiF0TeNM&l#OnSwvCuPd<1+k&LUu5TedE)TedDf0=^hO1_=M` z7=Vv+QR*y7%xLG!ltdSuB?+aDGyMxkfPC48CE0T}u
  • +
  • diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index dd81d13dc4..2e28396b8f 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -312,6 +312,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -331,7 +342,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -441,6 +453,8 @@ define([ this.miSettings[isVisible?'show':'hide'](); isVisible = this.mode.canHelp; this.miHelp[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); // 5: Close button isVisible = this.mode.canBack; diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index bc9dc835e6..e1510eb7bc 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2193,6 +2193,7 @@ "DE.Views.EditListItemDialog.textValueError": "An item with the same value already exists.", "DE.Views.FileMenu.ariaFileMenu": "File menu", "DE.Views.FileMenu.btnBackCaption": "Open File Location", + "DE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "DE.Views.FileMenu.btnCloseEditor": "Close File", "DE.Views.FileMenu.btnCloseMenuCaption": "Back", "DE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/pdfeditor/main/app/controller/LeftMenu.js b/apps/pdfeditor/main/app/controller/LeftMenu.js index 10d3623e4b..41f710db13 100644 --- a/apps/pdfeditor/main/app/controller/LeftMenu.js +++ b/apps/pdfeditor/main/app/controller/LeftMenu.js @@ -261,6 +261,7 @@ define([ break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index ed9f1d598d..eb9bdf02c2 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -187,6 +187,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this)); Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); @@ -746,6 +747,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1372,6 +1377,9 @@ define([ this.appOptions.canDownload = this.permissions.download !== false; this.appOptions.showSaveButton = this.appOptions.isEdit && !this.appOptions.isPDFFill && (this.appOptions.canSaveToFile || this.appOptions.canDownload); + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); + this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/pdfeditor/main/app/template/FileMenu.template b/apps/pdfeditor/main/app/template/FileMenu.template index 2c9db50a27..cbd27ae5cf 100644 --- a/apps/pdfeditor/main/app/template/FileMenu.template +++ b/apps/pdfeditor/main/app/template/FileMenu.template @@ -20,6 +20,7 @@
  • +
  • diff --git a/apps/pdfeditor/main/app/view/FileMenu.js b/apps/pdfeditor/main/app/view/FileMenu.js index 9657408b3c..e29b69970e 100644 --- a/apps/pdfeditor/main/app/view/FileMenu.js +++ b/apps/pdfeditor/main/app/view/FileMenu.js @@ -299,6 +299,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -317,7 +328,8 @@ define([ this.miAccess, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -421,6 +433,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 70a9d52138..5fe5f39f51 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1260,6 +1260,7 @@ "PDFE.Views.DocumentHolder.vertAlignText": "Vertical alignment", "PDFE.Views.FileMenu.ariaFileMenu": "File menu", "PDFE.Views.FileMenu.btnBackCaption": "Open File Location", + "PDFE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "PDFE.Views.FileMenu.btnCloseEditor": "Close File", "PDFE.Views.FileMenu.btnCloseMenuCaption": "Back", "PDFE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index bcd57959d7..4dbef27e9d 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -279,6 +279,7 @@ define([ case 'external-help': close_menu = true; break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index ec57ad6816..ef09c43be3 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -233,6 +233,7 @@ define([ this.api.asc_registerCallback('asc_onEndDemonstration', _.bind(this.onEndDemonstration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('showmessage', _.bind(this.onExternalMessage, this)); Common.NotificationCenter.on('showerror', _.bind(this.onError, this)); @@ -657,6 +658,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1379,6 +1384,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); + this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/presentationeditor/main/app/template/FileMenu.template b/apps/presentationeditor/main/app/template/FileMenu.template index a52eb60ae4..7bdc786891 100644 --- a/apps/presentationeditor/main/app/template/FileMenu.template +++ b/apps/presentationeditor/main/app/template/FileMenu.template @@ -22,6 +22,7 @@
  • +
  • diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 91440a1ce8..cad0141014 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -311,6 +311,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -330,7 +341,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -435,6 +447,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index d6aaf4f19d..d582cabc41 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -2076,6 +2076,7 @@ "PE.Views.FileMenu.ariaFileMenu": "File menu", "PE.Views.FileMenu.btnAboutCaption": "About", "PE.Views.FileMenu.btnBackCaption": "Open File Location", + "PE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "PE.Views.FileMenu.btnCloseEditor": "Close File", "PE.Views.FileMenu.btnCloseMenuCaption": "Back", "PE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index c1564c6ae3..b38f53c9e2 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -332,6 +332,7 @@ define([ case 'external-help': close_menu = true; break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index b736b9a2a5..061afecabe 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -243,6 +243,7 @@ define([ this.api.asc_registerCallback('asc_onOleEditorReady', _.bind(this.onOleEditorReady, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this)); Common.NotificationCenter.on('protectedrange:locked', _.bind(this.onProtectedRangeLocked, this)); @@ -740,6 +741,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1502,6 +1507,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); + this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/spreadsheeteditor/main/app/template/FileMenu.template b/apps/spreadsheeteditor/main/app/template/FileMenu.template index 74738688a0..22df29f200 100644 --- a/apps/spreadsheeteditor/main/app/template/FileMenu.template +++ b/apps/spreadsheeteditor/main/app/template/FileMenu.template @@ -22,6 +22,7 @@
  • +
  • diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 8652b5869a..66ab5b77a6 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -292,6 +292,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -311,7 +322,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -417,6 +429,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 4ce7b02130..10147cefde 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2686,6 +2686,7 @@ "SSE.Views.FieldSettingsDialog.txtVarp": "Varp", "SSE.Views.FileMenu.ariaFileMenu": "File menu", "SSE.Views.FileMenu.btnBackCaption": "Open File Location", + "SSE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "SSE.Views.FileMenu.btnCloseEditor": "Close File", "SSE.Views.FileMenu.btnCloseMenuCaption": "Back", "SSE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/visioeditor/main/app/controller/LeftMenu.js b/apps/visioeditor/main/app/controller/LeftMenu.js index f1696934c3..be7b89f41e 100644 --- a/apps/visioeditor/main/app/controller/LeftMenu.js +++ b/apps/visioeditor/main/app/controller/LeftMenu.js @@ -222,6 +222,7 @@ define([ break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/visioeditor/main/app/controller/Main.js b/apps/visioeditor/main/app/controller/Main.js index 7cd3226dc1..49086949d4 100644 --- a/apps/visioeditor/main/app/controller/Main.js +++ b/apps/visioeditor/main/app/controller/Main.js @@ -171,6 +171,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this)); Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); @@ -649,6 +650,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1176,6 +1181,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); + this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/visioeditor/main/app/template/FileMenu.template b/apps/visioeditor/main/app/template/FileMenu.template index 42aacd17e8..619bde2e36 100644 --- a/apps/visioeditor/main/app/template/FileMenu.template +++ b/apps/visioeditor/main/app/template/FileMenu.template @@ -17,6 +17,7 @@
  • +
  • diff --git a/apps/visioeditor/main/app/view/FileMenu.js b/apps/visioeditor/main/app/view/FileMenu.js index 68d05c1940..5e43e6ae79 100644 --- a/apps/visioeditor/main/app/view/FileMenu.js +++ b/apps/visioeditor/main/app/view/FileMenu.js @@ -240,6 +240,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -254,7 +265,8 @@ define([ this.miAccess, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -352,6 +364,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/visioeditor/main/locale/en.json b/apps/visioeditor/main/locale/en.json index 86d3a26b30..01e6bb75d4 100644 --- a/apps/visioeditor/main/locale/en.json +++ b/apps/visioeditor/main/locale/en.json @@ -318,6 +318,7 @@ "VE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.
    Are you sure you want to continue?", "VE.Views.FileMenu.ariaFileMenu": "File menu", "VE.Views.FileMenu.btnBackCaption": "Open File Location", + "VE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "VE.Views.FileMenu.btnCloseEditor": "Close File", "VE.Views.FileMenu.btnCloseMenuCaption": "Back", "VE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/build/Gruntfile.js b/build/Gruntfile.js index efd803b9d1..28f199c5ed 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -110,6 +110,9 @@ module.exports = function(grunt) { }, { from: /\{\{DEFAULT_LANG\}\}/g, to: _encode(process.env.DEFAULT_LANG) || 'en' + }, { + from: /\{\{SUGGEST_URL\}\}/g, + to: _encode(process.env.DEFAULT_LANG) || 'https://feedback.onlyoffice.com/forums/966080-your-voice-matters?category_id=519084' }]; var helpreplacements = [