Merge pull request #1375 from ONLYOFFICE/fix/form-colors
Fix/form colors
This commit is contained in:
commit
33c511c432
|
@ -53,6 +53,7 @@ define([
|
|||
"background-loader",
|
||||
"background-accent-button",
|
||||
"background-contrast-popover",
|
||||
"shadow-contrast-popover",
|
||||
|
||||
"highlight-button-hover",
|
||||
"highlight-button-pressed",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
// -------------------------
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue