From a6b41b9c63bd80eb1fe4640343598a6d784a1a17 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Dec 2021 14:57:27 +0300 Subject: [PATCH 1/3] [DE forms] Fix Bug 53788 --- apps/common/main/lib/controller/Themes.js | 1 + .../resources/less/colors-table-classic.less | 4 +-- .../resources/less/colors-table-dark.less | 2 +- .../resources/less/colors-table-ie-fix.less | 5 +-- .../main/resources/less/colors-table.less | 6 ++-- .../main/resources/less/synchronize-tip.less | 36 ++++++++++--------- 6 files changed, 31 insertions(+), 23 deletions(-) diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index fe3f6a1a0..175ca5a2f 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -53,6 +53,7 @@ define([ "background-loader", "background-accent-button", "background-contrast-popover", + "shadow-contrast-popover", "highlight-button-hover", "highlight-button-pressed", diff --git a/apps/common/main/resources/less/colors-table-classic.less b/apps/common/main/resources/less/colors-table-classic.less index b2de6d89d..b882f5254 100644 --- a/apps/common/main/resources/less/colors-table-classic.less +++ b/apps/common/main/resources/less/colors-table-classic.less @@ -15,7 +15,7 @@ --background-notification-badge: #ffd112; --background-scrim: fade(#000, 20%); --background-loader: fade(#000, 65%); - --background-contrast-popover: #444444; + --background-contrast-popover: #fff; --highlight-button-hover: #d8dadc; --highlight-button-pressed: #7d858c; @@ -37,7 +37,7 @@ --border-control-focus: #848484; --border-color-shading: fade(#000, 20%); --border-error: #d9534f; - --border-contrast-popover: #444444; + --border-contrast-popover: #fff; --text-normal: #444; --text-normal-pressed: #fff; diff --git a/apps/common/main/resources/less/colors-table-dark.less b/apps/common/main/resources/less/colors-table-dark.less index 1e1f358a4..9dc4c765b 100644 --- a/apps/common/main/resources/less/colors-table-dark.less +++ b/apps/common/main/resources/less/colors-table-dark.less @@ -9,7 +9,7 @@ --background-toolbar: #404040; --background-toolbar-additional: #505050; --background-primary-dialog-button: #ddd; - --background-accent-button: #6194d0; + --background-accent-button: #486F9E; --background-tab-underline: #ddd; --background-notification-popover: #3e5968; --background-notification-badge: #ffd112; diff --git a/apps/common/main/resources/less/colors-table-ie-fix.less b/apps/common/main/resources/less/colors-table-ie-fix.less index f9917964e..d524f52e1 100644 --- a/apps/common/main/resources/less/colors-table-ie-fix.less +++ b/apps/common/main/resources/less/colors-table-ie-fix.less @@ -14,7 +14,8 @@ @background-loader-ie: fade(#000, 65%); @background-alt-key-hint-ie: #FFD938; @background-accent-button-ie: #446995; -@background-contrast-popover-ie: #444444; +@background-contrast-popover-ie: #fff; +@shadow-contrast-popover-ie: rgba(0, 0, 0, 0.3); @highlight-button-hover-ie: #d8dadc; @highlight-button-pressed-ie: #7d858c; @@ -36,7 +37,7 @@ @border-control-focus-ie: #848484; @border-color-shading-ie: fade(#000, 20%); @border-error-ie: #d9534f; -@border-contrast-popover-ie: #444444; +@border-contrast-popover-ie: #fff; @text-normal-ie: #444; @text-normal-pressed-ie: #fff; diff --git a/apps/common/main/resources/less/colors-table.less b/apps/common/main/resources/less/colors-table.less index b11493858..d690cf62d 100644 --- a/apps/common/main/resources/less/colors-table.less +++ b/apps/common/main/resources/less/colors-table.less @@ -26,7 +26,8 @@ --background-scrim: fade(#000, 20%); --background-loader: fade(#181818, 90%); --background-alt-key-hint: #FFD938; - --background-contrast-popover: #444444; + --background-contrast-popover: #fff; + --shadow-contrast-popover: rgba(0, 0, 0, 0.3); --highlight-button-hover: #e0e0e0; --highlight-button-pressed: #cbcbcb; @@ -48,7 +49,7 @@ --border-control-focus: #848484; --border-color-shading: fade(#000, 15%); --border-error: #f62211; - --border-contrast-popover: #444444; + --border-contrast-popover: #fff; --text-normal: fade(#000, 80%); --text-normal-pressed: fade(#000, 80%); @@ -161,6 +162,7 @@ @background-alt-key-hint: var(--background-alt-key-hint); @background-accent-button: var(--background-accent-button); @background-contrast-popover: var(--background-contrast-popover); +@shadow-contrast-popover: var(--shadow-contrast-popover); // Highlight // ------------------------- diff --git a/apps/common/main/resources/less/synchronize-tip.less b/apps/common/main/resources/less/synchronize-tip.less index c397cd8dd..1a3beb01d 100644 --- a/apps/common/main/resources/less/synchronize-tip.less +++ b/apps/common/main/resources/less/synchronize-tip.less @@ -93,16 +93,18 @@ .asc-synchronizetip { background-color: @background-contrast-popover-ie; background-color: @background-contrast-popover; - color: @text-contrast-background-ie; - color: @text-contrast-background; + color: @text-normal-ie; + color: @text-normal; border-color: @border-contrast-popover-ie; border-color: @border-contrast-popover; .close { &:before, &:after { - background-color: @text-contrast-background-ie; - background-color: @text-contrast-background; + background-color: @text-normal-ie; + background-color: @text-normal; } } + .box-shadow(0 0 40px 0 @shadow-contrast-popover-ie); + .box-shadow(0 0 40px 0 @shadow-contrast-popover); } .tip-arrow:before { @@ -124,31 +126,33 @@ padding: 3px 12px; margin-top: 10px; &:hover { - background-color: @highlight-header-button-hover-ie; - background-color: @highlight-header-button-hover; + background-color: @highlight-button-hover-ie; + background-color: @highlight-button-hover; } &:active { - background-color: @highlight-header-button-pressed-ie; - background-color: @highlight-header-button-pressed; + background-color: @highlight-button-pressed-ie; + background-color: @highlight-button-pressed; + color: @text-normal-pressed-ie; + color: @text-normal-pressed; } } .show-link label { - border-bottom: @scaled-one-px-value-ie dotted @text-contrast-background-ie; - border-bottom: @scaled-one-px-value dotted @text-contrast-background; - color: @text-contrast-background-ie; - color: @text-contrast-background; + border-bottom: @scaled-one-px-value-ie dotted @text-normal-ie; + border-bottom: @scaled-one-px-value dotted @text-normal; + color: @text-normal-ie; + color: @text-normal; cursor: pointer; &:hover:not(:disabled) { - color: @text-contrast-background; - border-bottom-color: dotted @text-contrast-background; + color: @text-normal; + border-bottom-color: dotted @text-normal; } &:active { - color: @text-contrast-background; - border-bottom-color: dotted @text-contrast-background; + color: @text-normal; + border-bottom-color: dotted @text-normal; } } } From 8f61492e3b141a59285490f884a6b4b7481c51c3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Dec 2021 15:17:36 +0300 Subject: [PATCH 2/3] Fix Bug 54276 --- apps/common/main/resources/less/variables.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/resources/less/variables.less b/apps/common/main/resources/less/variables.less index c10a760df..9c78c123d 100644 --- a/apps/common/main/resources/less/variables.less +++ b/apps/common/main/resources/less/variables.less @@ -242,7 +242,7 @@ @zindex-navbar: 1000; @zindex-dropdown: 1000; -@zindex-popover: 1010; +@zindex-popover: 1002; @zindex-tooltip: 1030; @zindex-navbar-fixed: 1030; @zindex-modal-background: 1040; From 012371a5038a8d8e0b960c497637ae28ab540cd5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Dec 2021 18:44:19 +0300 Subject: [PATCH 3/3] [DE] Fix lock/unlock form settings --- apps/common/main/resources/less/listview.less | 2 +- .../main/app/view/FormSettings.js | 33 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/apps/common/main/resources/less/listview.less b/apps/common/main/resources/less/listview.less index f14304f4b..8997ea0a0 100644 --- a/apps/common/main/resources/less/listview.less +++ b/apps/common/main/resources/less/listview.less @@ -23,7 +23,7 @@ } } - &:not(.no-focus):focus { + &:not(.no-focus):focus:not(.disabled) { border-color: @border-control-focus-ie; border-color: @border-control-focus; } diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 8e6bf0b7e..4f79415cf 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -182,7 +182,6 @@ define([ dataHintDirection: 'bottom', dataHintOffset: 'big' }); - this.lockedControls.push(this.spnMaxChars); this.spnMaxChars.on('change', this.onMaxCharsChange.bind(this)); this.spnMaxChars.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); @@ -209,7 +208,6 @@ define([ dataHintDirection: 'bottom', dataHintOffset: 'big' }); - this.lockedControls.push(this.spnWidth); this.spinners.push(this.spnWidth); this.spnWidth.on('change', this.onWidthChange.bind(this)); this.spnWidth.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); @@ -219,14 +217,12 @@ define([ labelText: this.textAutofit }); this.chAutofit.on('change', this.onChAutofit.bind(this)); - this.lockedControls.push(this.chAutofit); this.chMulti = new Common.UI.CheckBox({ el: $markup.findById('#form-chb-multiline'), labelText: this.textMulti }); this.chMulti.on('change', this.onChMulti.bind(this)); - this.lockedControls.push(this.chMulti); this.chRequired = new Common.UI.CheckBox({ el: $markup.findById('#form-chb-required'), @@ -408,7 +404,6 @@ define([ labelText: this.textAspect }); this.chAspect.on('change', this.onChAspect.bind(this)); - this.lockedControls.push(this.chAspect); this.cmbScale = new Common.UI.ComboBox({ el: $markup.findById('#form-combo-scale'), @@ -438,7 +433,6 @@ define([ }); this.sldrPreviewPositionX.on('change', _.bind(this.onImagePositionChange, this, 'x')); this.sldrPreviewPositionX.on('changecomplete', _.bind(this.onImagePositionChangeComplete, this, 'x')); - this.lockedControls.push(this.sldrPreviewPositionX); this.sldrPreviewPositionY = new Common.UI.SingleSlider({ el: $('#form-img-slider-position-y'), @@ -450,7 +444,6 @@ define([ }); this.sldrPreviewPositionY.on('change', _.bind(this.onImagePositionChange, this, 'y')); this.sldrPreviewPositionY.on('changecomplete', _.bind(this.onImagePositionChangeComplete, this, 'y')); - this.lockedControls.push(this.sldrPreviewPositionY); var xValue = this.sldrPreviewPositionX.getValue(), yValue = this.sldrPreviewPositionY.getValue(); @@ -508,7 +501,7 @@ define([ onChMaxCharsChanged: function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - this.spnMaxChars.setDisabled(!checked); + this.spnMaxChars.setDisabled(!checked || this._state.DisabledControls); if (!checked) { this.chComb.setValue(false, true); this.spnWidth.setDisabled(true); @@ -539,9 +532,9 @@ define([ var checked = (field.getValue()=='checked'); if (checked) { this.chMaxChars.setValue(true, true); - this.spnMaxChars.setDisabled(false); + this.spnMaxChars.setDisabled(false || this._state.DisabledControls); } - this.spnWidth.setDisabled(!checked); + this.spnWidth.setDisabled(!checked || this._state.DisabledControls); if (this.api && !this._noApply) { var props = this._originalProps || new AscCommon.CContentControlPr(); var formTextPr = this._originalTextFormProps || new AscCommon.CSdtTextFormPr(); @@ -1045,8 +1038,8 @@ define([ val = ((130 - 80) * this._state.imgPositionY) / 100 - 1; this.imagePositionPreview.css({'top': val + 'px'}); - this.chAspect.setDisabled(this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Never); - var disableSliders = this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Always && !this._state.Aspect; + this.chAspect.setDisabled(this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Never || this._state.DisabledControls); + var disableSliders = this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Always && !this._state.Aspect || this._state.DisabledControls; this.sldrPreviewPositionX.setDisabled(disableSliders); this.sldrPreviewPositionY.setDisabled(disableSliders); } @@ -1067,16 +1060,16 @@ define([ this.chMulti.setValue(!!val, true); this._state.Multi=val; } - this.chMulti.setDisabled(!this._state.Fixed || this._state.Comb); + this.chMulti.setDisabled(!this._state.Fixed || this._state.Comb || this._state.DisabledControls); val = formTextPr.get_AutoFit(); if ( this._state.AutoFit!==val ) { this.chAutofit.setValue(!!val, true); this._state.AutoFit=val; } - this.chAutofit.setDisabled(!this._state.Fixed || this._state.Comb); + this.chAutofit.setDisabled(!this._state.Fixed || this._state.Comb || this._state.DisabledControls); - this.spnWidth.setDisabled(!this._state.Comb); + this.spnWidth.setDisabled(!this._state.Comb || this._state.DisabledControls); val = formTextPr.get_Width(); if ( (val===undefined || this._state.Width===undefined)&&(this._state.Width!==val) || Math.abs(this._state.Width-val)>0.1) { this.spnWidth.setValue(val!==0 && val!==undefined ? Common.Utils.Metric.fnRecalcFromMM(val * 25.4 / 20 / 72.0) : -1, true); @@ -1091,7 +1084,7 @@ define([ val = formTextPr.get_MaxCharacters(); this.chMaxChars.setValue(val && val>=0); - this.spnMaxChars.setDisabled(!val || val<0); + this.spnMaxChars.setDisabled(!val || val<0 || this._state.DisabledControls); if ( (val===undefined || this._state.MaxChars===undefined)&&(this._state.MaxChars!==val) || Math.abs(this._state.MaxChars-val)>0.1) { this.spnMaxChars.setValue(val && val>=0 ? val : 10, true); this._state.MaxChars=val; @@ -1185,6 +1178,14 @@ define([ item.setDisabled(me._state.DisabledControls); }); } + this.spnMaxChars.setDisabled(this.chMaxChars.getValue()!=='checked' || this._state.DisabledControls); + this.spnWidth.setDisabled(!this._state.Comb || this._state.DisabledControls); + this.chMulti.setDisabled(!this._state.Fixed || this._state.Comb || this._state.DisabledControls); + this.chAutofit.setDisabled(!this._state.Fixed || this._state.Comb || this._state.DisabledControls); + this.chAspect.setDisabled(this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Never || this._state.DisabledControls); + var disableSliders = this._state.scaleFlag === Asc.c_oAscPictureFormScaleFlag.Always && !this._state.Aspect; + this.sldrPreviewPositionX.setDisabled(disableSliders || this._state.DisabledControls); + this.sldrPreviewPositionY.setDisabled(disableSliders || this._state.DisabledControls); this.btnLockForm.setDisabled(disable); },