From 7dc69c25088ec3fad279695c9e9fcf48366cdff3 Mon Sep 17 00:00:00 2001 From: Kirill Volkov Date: Tue, 21 Apr 2020 18:32:49 +0300 Subject: [PATCH 1/5] Remove and relocate icons. Remove and relocate icons to avoid duplication. --- .../resources/img/toolbar/1.5x/big/btn-update.png | Bin 0 -> 623 bytes .../resources/img/toolbar/1.5x/btn-higlight.png | Bin 275 -> 0 bytes .../resources/img/toolbar/1x/big/btn-controls.png | Bin 187 -> 0 bytes .../resources/img/toolbar/1x/big/btn-update.png | Bin 0 -> 468 bytes .../resources/img/toolbar/1x/btn-higlight.png | Bin 246 -> 0 bytes .../resources/img/toolbar/2x/big/btn-update.png | Bin 0 -> 868 bytes .../resources/img/toolbar/2x/btn-higlight.png | Bin 356 -> 0 bytes .../img/toolbar/1.5x/big/btn-pageorient.png | Bin 275 -> 0 bytes .../img/toolbar/1.5x/big/btn-pagesize.png | Bin 230 -> 0 bytes .../img/toolbar/1.5x/big/btn-update-pivot.png | Bin 557 -> 0 bytes .../img/toolbar/1x/big/btn-pageorient.png | Bin 229 -> 0 bytes .../resources/img/toolbar/1x/big/btn-pagesize.png | Bin 192 -> 0 bytes .../img/toolbar/1x/big/btn-update-pivot.png | Bin 396 -> 0 bytes .../img/toolbar/2x/big/btn-pageorient.png | Bin 394 -> 0 bytes .../resources/img/toolbar/2x/big/btn-pagesize.png | Bin 306 -> 0 bytes .../img/toolbar/2x/big/btn-update-pivot.png | Bin 800 -> 0 bytes 16 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/1.5x/big/btn-update.png delete mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-higlight.png delete mode 100644 apps/common/main/resources/img/toolbar/1x/big/btn-controls.png create mode 100644 apps/common/main/resources/img/toolbar/1x/big/btn-update.png delete mode 100644 apps/common/main/resources/img/toolbar/1x/btn-higlight.png create mode 100644 apps/common/main/resources/img/toolbar/2x/big/btn-update.png delete mode 100644 apps/common/main/resources/img/toolbar/2x/btn-higlight.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-pageorient.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-pagesize.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-update-pivot.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pageorient.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pagesize.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-update-pivot.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pageorient.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pagesize.png delete mode 100644 apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-update-pivot.png diff --git a/apps/common/main/resources/img/toolbar/1.5x/big/btn-update.png b/apps/common/main/resources/img/toolbar/1.5x/big/btn-update.png new file mode 100644 index 0000000000000000000000000000000000000000..1baa18d2603084b7eb8161d6970446fea34922fd GIT binary patch literal 623 zcmeAS@N?(olHy`uVBq!ia0vp^AwaCf!3-p&=Jq%Nsm1`G5LY1W;^N}$>L@eoqMz#zV$;C?_sKth5+LO_0feQV|pB?bn@B2O2`kP61P zSJRsoD=@S@~5pD2I|~U&KqMiCt0~jgDx2 z%wGIbW?~oDMh!=X#0n(~rX5E%KjCEzZc_hg&1AOoxBbNA2SVE(Nbod@8*a$p(_fcp zZB()GVEw`!Da`D$4-JhAI(q+KY|75#E0DP&b8)(fjo+&WX8sOOiZ``hKiPBbM!xUz zT^o<@b3Jg!ph^1B3mL|#(`3wJy0{YEozJH*o;le%lTrW8)`*W%D}IE&Vp~74WohKH p45tswHq%`rvnCe*`F{Vd`@wtg3WW z-g3<*v4(~Ulh}@CI|UlnQJ#fu&lj&q2e*BV7YJ_qaS;sC#4dtCnjiTc^xI2-wRaFV zN{Ai1_Q|ma*suS253z&hB*Kn+PJ%2a8q3N5U>D0omW<9Go40HtyP?4pmefT$$dbB9 zE3A2QkPfqk29VZRcsr}#65HX5TV%5xyBCo)>?l97E63cCz6p~(z-giD8y zOI*4Bn$5edwcr1l(61c$gw6TTUjF7S9Pij)s?4dIJ*&_0+rC@{cVk0|b1a;XLIM`% z23-DmJZ!?tKgoI#R)RWnxuo7~H2sq?xvF%^vBe>~y>D++h_IG;Bg0*`jwO5zTlgQ% n6|>E?TF)r#U=?!hJHfET@Mr%05~mEHYZyFT{an^LB{Ts5Z)Zp} diff --git a/apps/common/main/resources/img/toolbar/1x/big/btn-update.png b/apps/common/main/resources/img/toolbar/1x/big/btn-update.png new file mode 100644 index 0000000000000000000000000000000000000000..9b7ccdb1f14b013e37d4ccddb6842eea0795f7dd GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0vp^7C@TTnb9BbCFtd2-Zu1~uBRoPHqbhf9BX6l#k)&}#o z1TI-K`76^8uQ^XoW^9Uiog-2CEcR~4mCeune=?e{=ZeaHf42u13=E#GelF{r5}E)k CgV&`1 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-higlight.png b/apps/common/main/resources/img/toolbar/1x/btn-higlight.png deleted file mode 100644 index 290cbf2f4efa924aa9bec6d2dd00fe7328c40812..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVmSq7gKrNAL(&6$e5Jkqk7I5f%`h50Ol)Yl^=E zL6Ii7+*p>DDdZZ&nxb@lDWBUXjq4~oOK!Sn9TW?zo30KD0(H1dBi*ay_DBv#`(3P) z$Bnsi&*XAruIQkcvpMG6{jF(|OEa7mD@)87qL7$7cII=(&O(m3Gpr@Y{~oMmj@wwL wxD9IDAB%B)P6?g*0Ix@;3<&!_ z4&dP6094@S=H}tyfvf~5=Th0-XVt zcW&PF#ti5(qmm%MURPd+J5TcM;{RmpnRHFe z#PIcBOFIMhSyMB)<-ArE<(%yIko(o_eRkqOvEnmTFZtz!<{o%7M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sheeteditor/main/resources/img/toolbar/1.5x/big/btn-update-pivot.png deleted file mode 100644 index 504a074e6b80cb7147b01f2bc3c86ed86ab8618e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmV+|0@D47P)NklpY!U{5XW^sx+51_^`y3=ByS1VIo2;q3j^o8_+iwE6nlIrEK=MoAnt z-pR(s#s(!Sq_h$Uw31MvboCE}MvzdTSOEYl1O-=_Xv^d?8wp)F9(LgiY2e5+Dch&% zRZ*N_5L^)PEfWJGW+)8POQOe-l!Rlr14k0JJl}$GqFG&qI@O^6$pR-9Mf6N#1)?NjG;3y#Qy7DyK5$B=nWN~yNedg{YB*s z#S3D8(KQX-MOO^{MG?9Kgzz7Wu7}+ls^9e&RZ1_cGOu}@b$@ik7hpkzdqfcBJRu|Urn?;FP-grIvrn4ORaQVWx57{ zgwmrWMtW7ccK`(G(Gr8YOTXR#*+_Y&l!ou}l<0#bSI)9J0*V<4!w>m{4@mtiD{!Pj v^6N@Rsr>sJD!}F}%e{x^=7$w(|5U;>EKlN|W?%7q}XMT)X>XlyR`Qgl;sJACl>XtfMeJE`x zdBAw7F;qb`g7s39f-1+QhS#sTEGL9}G@faEvs0lM2-O>c9VQ4L&{Q~KZp_Mg--1=@ ziAcqS;0KO=jqH}Jax9vT6PS*Oa7+kJaCqi0?T<|(b0rg}5&I_g2I(VTe|}#Rwm*1H ccDcWNa8)*o_|`5~pt~77UHx3vIVCg!07>yx&Hw-a diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pagesize.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pagesize.png deleted file mode 100644 index 9a0427b59227a66104821c0e7901a833145f7794..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^7CeKgnD&dFc<_YeUI=8LC=fPtSl?L_+oNKsL8bTe?3??x!?PQC7Xsr_P&n1E5;03jU s1B~o42Jr{hesRCt#BH(kSNvt}i8mAMYW{mN0iDF)>FVdQ&MBb@07A)1o&W#< diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-update-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-update-pivot.png deleted file mode 100644 index afc6bc1a7b70af6267f3b798cb1386b7acaac2ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 396 zcmV;70dxL|P)OzqoODWmBQsgH!SW^C4YT)Cu#m#quxrG`hiUBD4EM+ zW<@DX-N3s~D(B&^NKSh9b|C(F_$y=-59V}9% z^!SZ&ol)HYc!oSDB`!mOg=H+Trg=vXx+r_R0`O*A` zZ#+B=&qwodTr(OOxJDGSQN<>7g>R+cfR6sdBY qJHJY{W^2q@s2nItCF9+P|B|1{=IFiy|3`rU00000{{R307*qoM6N<$f^|~8O#lD@ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pagesize.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pagesize.png deleted file mode 100644 index a664abff6e64846aa3e0727c11064cd05956b881..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^1wd@U!2%@vA8k1Zq<(t3IEGZ*dVBNYN+v@Aw}(5Y zmCb#tteU}oJM&G#n+MmQ3#8cQI6ScbEb~O!LWA@9oZ{8qOFu|XxHq@-nb1R}qiP9F zKiU4umb^2UGJjZq+N*ZXDcgd_Y9YZdi6SIlMmmGFE}vsnxGJW56zzXt8SgFeZw>l+4~Rf$M*l&mj1?ZH~a5B flZ($;erM9V@NJE{!P`n;ATW5k`njxgN@xNAn1_r@ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-update-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-update-pivot.png deleted file mode 100644 index 6c2ea793a2dc6d36bc8aab71df147731b2fdb748..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 800 zcmV+*1K<3KP)rI|xfq2NA5x2QSls)B)Xr)xj&lC9njQpb}WZlyLqcT*N?ro=NEu`1m?r z5fE^5FcXp(o(}#G92^`R92^{|_d(GonGiCqiaz-6n=cXD^XLgg5(a>=5(#{h2W-ph z&zgM_pFf{`()xA%YrMKW1vxX5Ad^U}PwNr4qoC$ov&DzY+vy9wyG)9olA8AtWX1qk z2t4J{F%h%myo=z~X%#Zv`}4on*Xg%R_;ht!1#zr^ap(NQH@`6;;Wi3hCYey|-5;CS z4G$q3#w~(O7!dhm9*zfKjFo~}58=bh-`|ALTr0=~z{`2u0GKNUhYun1-KhZI$;2?$ z2=W0KMR{}>FanhS@0rMYrHWQAh{GW3l`2|=pid>uDV~27f~lxEzoGPCV0h$313_jW z=QR+#I-f-EPL05k0C#GIpK|>g!IbOQie~l8w60$#v^3P~fTd;qf*8hzf&myC3M%IF zuMtF`Ybm&jQ$twc)Dqc{nhF}Jtsq*P3c}i0uyF+;{U=-0C(*J+Nl^ZWHE4AbG;MW7 zad~TZT_6H)4X+D62p{&i&+7j2K_7Ox&)#30ehMwSTo>M7oPNUQJRctVXO`G zkJ1j{4pisysOSK#Lbs~+yw%)=Sb?fMZdG@ozJ6?oEVpNyu_2Z1?Wg*|Z}mx5Ir!aj zSfg7(bJ~{umkCN5l^eEk{~bPL!auI=g`GF%$CnN8fdLQP3p;Pjk1yNk-H^o3lKnZq zAg;dKXGZ$7Bxhy}Sa%wATyCF|T7Hebd)D_six4v1PdmXaOD>Gh3OE7_0LD&vS>!Th zNyO&^w*Ruu&!fA6V|seBUP({uJLkVLG4(-Ft4s))Pl`VH_rEwX4MbK903#6zyqtG% eaBy&NaPSYQyf>u$0?bGN0000 Date: Tue, 21 Apr 2020 20:13:03 +0300 Subject: [PATCH 2/5] Fix InputFieldBtn component --- apps/common/main/resources/less/input.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/common/main/resources/less/input.less b/apps/common/main/resources/less/input.less index 1500060e1..ae0c3328a 100644 --- a/apps/common/main/resources/less/input.less +++ b/apps/common/main/resources/less/input.less @@ -108,4 +108,8 @@ textarea.form-control:focus { right: 22px; } } + + input { + padding-right: 20px; + } } \ No newline at end of file From 62ec2aa9f3a1e440bb4814b80f9c22a787cbd341 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 21 Apr 2020 20:35:58 +0300 Subject: [PATCH 3/5] Fix icons --- .../img/toolbar/1.5x/big/btn-controls.png | Bin 229 -> 0 bytes .../resources/img/toolbar/2x/big/btn-controls.png | Bin 316 -> 0 bytes apps/documenteditor/main/app/view/Links.js | 2 +- .../img/toolbar/1.5x/big/btn-contents-update.png | Bin 557 -> 0 bytes .../img/toolbar/1x/big/btn-contents-update.png | Bin 396 -> 0 bytes .../img/toolbar/2x/big/btn-contents-update.png | Bin 800 -> 0 bytes .../spreadsheeteditor/main/app/view/PivotTable.js | 2 +- 7 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 apps/common/main/resources/img/toolbar/1.5x/big/btn-controls.png delete mode 100644 apps/common/main/resources/img/toolbar/2x/big/btn-controls.png delete mode 100644 apps/documenteditor/main/resources/img/toolbar/1.5x/big/btn-contents-update.png delete mode 100644 apps/documenteditor/main/resources/img/toolbar/1x/big/btn-contents-update.png delete mode 100644 apps/documenteditor/main/resources/img/toolbar/2x/big/btn-contents-update.png diff --git a/apps/common/main/resources/img/toolbar/1.5x/big/btn-controls.png b/apps/common/main/resources/img/toolbar/1.5x/big/btn-controls.png deleted file mode 100644 index 14ff00f77dce7d403af91d59608ede7ff2ccf9a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmV^P)E04> fRCyB-k+nPkR@t3lZYw{|00000NkvXXu0mjfN!DM* diff --git a/apps/common/main/resources/img/toolbar/2x/big/btn-controls.png b/apps/common/main/resources/img/toolbar/2x/big/btn-controls.png deleted file mode 100644 index 3a2b9e0e574b8406b1fa2b63e17f877e26c759ea..0000000000000000000000000000000000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`()xA%YrMKW1vxX5Ad^U}PwNr4qoC$ov&DzY+vy9wyG)9olA8AtWX1qk z2t4J{F%h%myo=z~X%#Zv`}4on*Xg%R_;ht!1#zr^ap(NQH@`6;;Wi3hCYey|-5;CS z4G$q3#w~(O7!dhm9*zfKjFo~}58=bh-`|ALTr0=~z{`2u0GKNUhYun1-KhZI$;2?$ z2=W0KMR{}>FanhS@0rMYrHWQAh{GW3l`2|=pid>uDV~27f~lxEzoGPCV0h$313_jW z=QR+#I-f-EPL05k0C#GIpK|>g!IbOQie~l8w60$#v^3P~fTd;qf*8hzf&myC3M%IF zuMtF`Ybm&jQ$twc)Dqc{nhF}Jtsq*P3c}i0uyF+;{U=-0C(*J+Nl^ZWHE4AbG;MW7 zad~TZT_6H)4X+D62p{&i&+7j2K_7Ox&)#30ehMwSTo>M7oPNUQJRctVXO`G zkJ1j{4pisysOSK#Lbs~+yw%)=Sb?fMZdG@ozJ6?oEVpNyu_2Z1?Wg*|Z}mx5Ir!aj zSfg7(bJ~{umkCN5l^eEk{~bPL!auI=g`GF%$CnN8fdLQP3p;Pjk1yNk-H^o3lKnZq zAg;dKXGZ$7Bxhy}Sa%wATyCF|T7Hebd)D_six4v1PdmXaOD>Gh3OE7_0LD&vS>!Th zNyO&^w*Ruu&!fA6V|seBUP({uJLkVLG4(-Ft4s))Pl`VH_rEwX4MbK903#6zyqtG% eaBy&NaPSYQyf>u$0?bGN0000 Date: Wed, 22 Apr 2020 12:35:55 +0300 Subject: [PATCH 4/5] Refactoring --- apps/common/main/lib/util/utils.js | 17 +++++++++++++ .../main/app/controller/Main.js | 24 +++++++++--------- .../main/app/controller/Toolbar.js | 4 +-- .../main/app/controller/Main.js | 23 ++++++++--------- .../main/app/controller/Toolbar.js | 4 +-- .../main/app/controller/Main.js | 25 +++++++++---------- .../main/app/controller/Toolbar.js | 4 +-- 7 files changed, 58 insertions(+), 43 deletions(-) diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 5009f3668..68629b54e 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -901,3 +901,20 @@ Common.Utils.InternalSettings.set('window-inactive-area-top', 0); Common.Utils.InternalSettings.set('toolbar-height-compact', Common.Utils.InternalSettings.get('toolbar-height-tabs')); Common.Utils.InternalSettings.set('toolbar-height-normal', Common.Utils.InternalSettings.get('toolbar-height-tabs') + Common.Utils.InternalSettings.get('toolbar-height-controls')); + +Common.Utils.ModalWindow = new(function() { + var count = 0; + return { + show: function() { + count++; + }, + + close: function() { + count--; + }, + + isVisible: function() { + return count>0; + } + } +})(); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 9521e300d..0c2c96c87 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -157,7 +157,7 @@ define([ this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false}; this.languages = null; - this.isModalShowed = 0; + // Initialize viewport if (!Common.Utils.isBrowserSupported()){ @@ -229,13 +229,13 @@ define([ me.beforeShowDummyComment = me.beforeCloseDummyComment = false; } else if (/textarea-control/.test(e.target.className)) me.inTextareaControl = true; - else if (!me.isModalShowed && /form-control/.test(e.target.className)) + else if (!Common.Utils.ModalWindow.isVisible() && /form-control/.test(e.target.className)) me.inFormControl = true; } }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed) { + if (!Common.Utils.ModalWindow.isVisible()) { if (/form-control/.test(e.target.className)) me.inFormControl = false; if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) @@ -283,31 +283,31 @@ define([ Common.NotificationCenter.on({ 'modal:show': function(){ - me.isModalShowed++; + Common.Utils.ModalWindow.show(); me.api.asc_enableKeyEvents(false); }, 'modal:close': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'modal:hide': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'settings:unitschanged':_.bind(this.unitsChanged, this), 'dataview:focus': function(e){ }, 'dataview:blur': function(e){ - if (!me.isModalShowed) { + if (!Common.Utils.ModalWindow.isVisible()) { me.api.asc_enableKeyEvents(true); } }, 'menu:show': function(e){ }, 'menu:hide': function(e, isFromInputControl){ - if (!me.isModalShowed && !isFromInputControl) + if (!Common.Utils.ModalWindow.isVisible() && !isFromInputControl) me.api.asc_enableKeyEvents(true); }, 'edit:complete': _.bind(me.onEditComplete, me) @@ -754,7 +754,7 @@ define([ if ( type == Asc.c_oAscAsyncActionType.BlockInteraction && (!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) && (!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) && - !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl)) ) { + !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl)) ) { // this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод this.api.asc_enableKeyEvents(true); } @@ -2140,7 +2140,7 @@ define([ }, onPrint: function() { - if (!this.appOptions.canPrint || this.isModalShowed) return; + if (!this.appOptions.canPrint || Common.Utils.ModalWindow.isVisible()) return; if (this.api) this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 376659a6f..f73d38dcb 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -420,7 +420,7 @@ define([ }, onApiChangeFont: function(font) { - !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + !Common.Utils.ModalWindow.isVisible() && this.toolbar.cmbFontName.onApiChangeFont(font); }, onApiFontSize: function(size) { @@ -1232,7 +1232,7 @@ define([ onFontNameSelect: function(combo, record) { if (this.api) { if (record.isNewFont) { - !this.getApplication().getController('Main').isModalShowed && + !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, closable: false, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3323fef10..b32a87ac0 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -135,7 +135,6 @@ define([ this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false}; this.languages = null; - this.isModalShowed = 0; window.storagename = 'presentation'; @@ -204,13 +203,13 @@ define([ me.dontCloseDummyComment = true; else if (/textarea-control/.test(e.target.className)) me.inTextareaControl = true; - else if (!me.isModalShowed && /form-control/.test(e.target.className)) + else if (!Common.Utils.ModalWindow.isVisible() && /form-control/.test(e.target.className)) me.inFormControl = true; } }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed) { + if (!Common.Utils.ModalWindow.isVisible()) { if (/form-control/.test(e.target.className)) me.inFormControl = false; if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) @@ -250,31 +249,31 @@ define([ Common.NotificationCenter.on({ 'modal:show': function(e){ - me.isModalShowed++; + Common.Utils.ModalWindow.show(); me.api.asc_enableKeyEvents(false); }, 'modal:close': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'modal:hide': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'settings:unitschanged':_.bind(this.unitsChanged, this), 'dataview:focus': function(e){ }, 'dataview:blur': function(e){ - if (!me.isModalShowed) { + if (!Common.Utils.ModalWindow.isVisible()) { me.api.asc_enableKeyEvents(true); } }, 'menu:show': function(e){ }, 'menu:hide': function(e, isFromInputControl){ - if (!me.isModalShowed && !isFromInputControl) + if (!Common.Utils.ModalWindow.isVisible() && !isFromInputControl) me.api.asc_enableKeyEvents(true); }, 'edit:complete': _.bind(me.onEditComplete, me) @@ -517,7 +516,7 @@ define([ if (this.appOptions.isEdit && (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2)) this.synchronizeChanges(); - if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl))) { + if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl))) { this.onEditComplete(this.loadMask); this.api.asc_enableKeyEvents(true); } @@ -1796,7 +1795,7 @@ define([ }, onPrint: function() { - if (!this.appOptions.canPrint || this.isModalShowed) return; + if (!this.appOptions.canPrint || Common.Utils.ModalWindow.isVisible()) return; if (this.api) this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 6d4c89df1..a99b68c08 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -396,7 +396,7 @@ define([ }, onApiChangeFont: function(font) { - !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + !Common.Utils.ModalWindow.isVisible() && this.toolbar.cmbFontName.onApiChangeFont(font); }, onApiFontSize: function(size) { @@ -1154,7 +1154,7 @@ define([ onFontNameSelect: function(combo, record) { if (this.api) { if (record.isNewFont) { - !this.getApplication().getController('Main').isModalShowed && + !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, closable: false, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index bb8cd489b..309144476 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -149,7 +149,6 @@ define([ var me = this; this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false}; - this.isModalShowed = 0; if (!Common.Utils.isBrowserSupported()){ Common.Utils.showBrowserRestriction(); @@ -218,7 +217,7 @@ define([ me.dontCloseDummyComment = true; else if (/textarea-control/.test(e.target.className)) me.inTextareaControl = true; - else if (!me.isModalShowed && /form-control/.test(e.target.className)) + else if (!Common.Utils.ModalWindow.isVisible() && /form-control/.test(e.target.className)) me.inFormControl = true; } }); @@ -226,7 +225,7 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (me.isAppDisabled === true || me.isFrameClosed) return; - if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) { + if ((!Common.Utils.ModalWindow.isVisible() || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) { if (/form-control/.test(e.target.className)) me.inFormControl = false; if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) @@ -266,30 +265,30 @@ define([ Common.NotificationCenter.on({ 'modal:show': function(e){ - me.isModalShowed++; + Common.Utils.ModalWindow.show(); me.api.asc_enableKeyEvents(false); }, 'modal:close': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'modal:hide': function(dlg) { - me.isModalShowed--; - if (!me.isModalShowed) + Common.Utils.ModalWindow.close(); + if (!Common.Utils.ModalWindow.isVisible()) me.api.asc_enableKeyEvents(true); }, 'dataview:focus': function(e){ }, 'dataview:blur': function(e){ - if (!me.isModalShowed) { + if (!Common.Utils.ModalWindow.isVisible()) { me.api.asc_enableKeyEvents(true); } }, 'menu:show': function(e){ }, 'menu:hide': function(menu, isFromInputControl){ - if (!me.isModalShowed && (!menu || !menu.cmpEl.hasClass('from-cell-edit')) && !isFromInputControl) { + if (!Common.Utils.ModalWindow.isVisible() && (!menu || !menu.cmpEl.hasClass('from-cell-edit')) && !isFromInputControl) { me.api.asc_InputClearKeyboardElement(); me.api.asc_enableKeyEvents(true); } @@ -565,12 +564,12 @@ define([ this.setLongActionView(action); } else { if (this.loadMask) { - if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.inTextareaControl && !this.isModalShowed && !this.inFormControl) + if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.inTextareaControl && !Common.Utils.ModalWindow.isVisible() && !this.inFormControl) this.api.asc_enableKeyEvents(true); this.loadMask.hide(); } - if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl) )) + if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl) )) this.onEditComplete(this.loadMask, {restorefocus:true}); } }, @@ -2130,7 +2129,7 @@ define([ }, onPrint: function() { - if (!this.appOptions.canPrint || this.isModalShowed) return; + if (!this.appOptions.canPrint || Common.Utils.ModalWindow.isVisible()) return; Common.NotificationCenter.trigger('print', this); }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 08cd523a2..737263986 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -425,7 +425,7 @@ define([ // }, onApiChangeFont: function(font) { - !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + !Common.Utils.ModalWindow.isVisible() && this.toolbar.cmbFontName.onApiChangeFont(font); }, onContextMenu: function() { @@ -1353,7 +1353,7 @@ define([ onFontNameSelect: function(combo, record) { if (this.api) { if (record.isNewFont) { - !this.getApplication().getController('Main').isModalShowed && + !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, closable: false, From a7b6ea5c0959542e10ab6201e2d88df17814a22a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 22 Apr 2020 12:57:00 +0300 Subject: [PATCH 5/5] [SSE] Refactoring --- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 309144476..7dee9bd7c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1958,7 +1958,7 @@ define([ this.isAppDisabled = data.data; break; case 'queryClose': - if ($('body .asc-window:visible').length === 0) { + if (!Common.Utils.ModalWindow.isVisible()) { this.isFrameClosed = true; this.api.asc_closeCellEditor(); Common.UI.Menu.Manager.hideAll();