Skip to content

Commit 2e77ee2

Browse files
committed
Merge branch 'MAGETWO-59782' into 2.1-develop-pr45
2 parents da9b8c5 + 9233211 commit 2e77ee2

File tree

6 files changed

+157
-32
lines changed

6 files changed

+157
-32
lines changed

app/code/Magento/Catalog/view/adminhtml/web/catalog/product.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,27 @@ require([
2222
}
2323

2424
function disableFieldEditMode(fieldId) {
25-
byId(fieldId).prop('disabled', true);
25+
var field = byId(fieldId);
26+
27+
field.prop('disabled', true);
28+
29+
if (field.next().hasClass('addafter')) {
30+
field.parent().addClass('_update-attributes-disabled');
31+
}
2632

2733
if (byId(fieldId + '_hidden').length) {
2834
byId(fieldId + '_hidden').prop('disabled', true);
2935
}
3036
}
3137

3238
function enableFieldEditMode(fieldId) {
33-
byId(fieldId).prop('disabled', false);
39+
var field = byId(fieldId);
40+
41+
field.prop('disabled', false);
42+
43+
if (field.parent().hasClass('_update-attributes-disabled')) {
44+
field.parent().removeClass('_update-attributes-disabled');
45+
}
3446

3547
if (byId(fieldId + '_hidden').length) {
3648
byId(fieldId + '_hidden').prop('disabled', false);

app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/_module-old.less

Lines changed: 98 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,116 @@
6464
}
6565
}
6666

67+
.field-price {
68+
label {
69+
&.mage-error {
70+
position: static;
71+
}
72+
}
73+
}
74+
6775
.field-price,
6876
.field-special_price,
6977
.field-gift_wrapping_price,
7078
.field-msrp,
7179
.field-cost,
7280
.field-gift_wrapping_price {
81+
&:not(.field-weight) {
82+
.addon {
83+
.lib-vendor-prefix-display(inline-flex);
84+
.lib-vendor-prefix-flex-direction(row);
85+
color: #303030;
86+
display: inline-flex;
87+
flex-flow: row nowrap;
88+
margin: 0 0 35px;
89+
position: relative;
90+
width: 100%;
91+
z-index: 1;
92+
93+
&._update-attributes-disabled {
94+
background: #f4f4f4;
95+
border-color: #d6d6d6;
96+
97+
.addafter {
98+
strong {
99+
opacity: .5;
100+
}
101+
}
102+
}
103+
104+
input[type="text"] {
105+
border: solid #adadad;
106+
border-width: 1px 1px 1px 0;
107+
108+
&[disabled] {
109+
+ .addafter {
110+
border-color: #d0d0d0;
111+
}
112+
113+
&.mage-error {
114+
+ .addafter {
115+
border-color: #eb8d8d !important;
116+
}
117+
}
118+
}
119+
}
120+
121+
.addafter {
122+
border: solid #adadad;
123+
border-width: 1px 0 1px 1px;
124+
}
125+
}
126+
}
127+
128+
._update-attributes-disabled {
129+
.admin__control-text {
130+
background: none;
131+
}
132+
}
133+
134+
.admin__control-text {
135+
.lib-css(appearance, none, 1);
136+
.lib-vendor-prefix-flex-basis(auto);
137+
.lib-vendor-prefix-flex-grow(1);
138+
.lib-vendor-prefix-flex-shrink(1);
139+
background: none;
140+
border: 0;
141+
}
142+
73143
.control {
74-
.addon > input {
75-
padding-left: 23px;
144+
.admin__control-text {
145+
&[disabled] {
146+
background: none;
147+
}
76148
}
149+
}
77150

78-
.addafter {
79-
> strong {
80-
left: 5px;
81-
position: absolute;
82-
top: 3px;
151+
.addafter {
152+
.lib-vendor-prefix-flex-basis(auto);
153+
.lib-vendor-prefix-flex-grow(0);
154+
.lib-vendor-prefix-flex-shrink(0);
155+
.lib-vendor-prefix-order(0);
156+
position: relative;
157+
z-index: 0;
158+
159+
strong {
160+
padding-top: 4px;
161+
position: relative;
162+
vertical-align: top;
163+
z-index: 1;
164+
165+
+ strong {
166+
padding-left: 0;
83167
}
84168
}
85169
}
170+
171+
.attribute-change-checkbox {
172+
left: 0;
173+
position: absolute;
174+
top: 35px;
175+
}
176+
86177
}
87178

88179
.field.type-price,

app/design/adminhtml/Magento/backend/Magento_ProductVideo/web/css/source/_module.less

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@
221221
}
222222

223223
input[type='checkbox'] {
224-
-moz-appearance: none;
225-
-webkit-appearance: none;
226-
appearance: none;
224+
.lib-css(appearance, none, 1);
227225
background: @color-white;
228226
border: 1px solid @color-gray68;
229227
border-radius: 2px;

app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/_module-old.less

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,43 @@
340340
}
341341

342342
.weight-switcher {
343+
margin-bottom: 18px;
344+
343345
.addafter {
344346
margin-top: 30px;
347+
position: absolute;
348+
}
349+
350+
.mage-error {
351+
+ .addafter {
352+
+ .admin__addon-suffix,
353+
+ .admin__addon-suffix:hover {
354+
&:before {
355+
border-color: #e22626 !important;
356+
}
357+
}
358+
}
359+
360+
&[disabled] {
361+
border-color: #eb8d8d !important;
362+
}
363+
}
364+
}
365+
366+
.field-weight {
367+
.addon {
368+
+ .mage-error {
369+
margin-top: 14px;
370+
}
345371
}
346372
}
347373
}
348374

349-
.field .control input[type='text'][disabled] ~ .addafter strong,
350-
.field .control select[disabled] ~ .addafter strong {
351-
background-color: #e9e9e9;
375+
.field .control input[type='text'][disabled],
376+
.field .control select[disabled] {
377+
~ .addafter strong {
378+
background-color: #e9e9e9;
379+
}
352380
}
353381

354382
.field-price.addon {

app/design/adminhtml/Magento/backend/web/css/source/actions/_actions-dropdown.less

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@
227227
display: inline-block;
228228

229229
input[type='text'] {
230-
-moz-appearance: none;
231-
-webkit-appearance: none;
232-
appearance: none;
230+
.lib-css(appearance, none, 1);
233231
border: 0;
234232
display: inline;
235233
margin: 0;
@@ -369,9 +367,7 @@
369367
}
370368

371369
.selectmenu-item-action {
372-
-moz-appearance: none;
373-
-webkit-appearance: none;
374-
appearance: none;
370+
.lib-css(appearance, none, 1);
375371
background: transparent;
376372
border: 0;
377373
color: @text__color;

app/design/adminhtml/Magento/backend/web/css/styles-old.less

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -862,20 +862,18 @@
862862

863863
input[type="radio"],
864864
input[type="checkbox"] {
865+
.lib-css(appearance, none, 1);
865866
background: #fff;
866-
border: 1px solid #adadad;
867867
border-radius: 2px;
868+
border: 1px solid #adadad;
868869
cursor: pointer;
869870
display: inline-block;
870-
vertical-align: middle;
871-
margin: 0 5px 0 0;
872871
height: 16px;
873-
width: 16px;
872+
margin: 0 5px 0 0;
874873
position: relative;
875-
appearance: none;
876-
-webkit-appearance: none;
877-
-moz-appearance: none;
878874
transition: all 0.1s ease-in;
875+
vertical-align: middle;
876+
width: 16px;
879877

880878
&:focus {
881879
border-color: #007bdb;
@@ -1706,10 +1704,6 @@
17061704
}
17071705
}
17081706

1709-
.field-price .addon input[type="text"] ~ .addafter strong {
1710-
font-size: 18px;
1711-
}
1712-
17131707
.field-weight,
17141708
.field-base_price {
17151709
.addon {
@@ -1722,20 +1716,23 @@
17221716
.field.type-price .addon,
17231717
.field-price .addon,
17241718
.field-special_price .addon,
1719+
.field-gift_wrapping_price .addon,
17251720
.field-msrp .addon {
17261721
direction: rtl;
17271722
}
17281723

17291724
.field.type-price .addon > *,
17301725
.field-price .addon > *,
17311726
.field-special_price .addon > *,
1727+
.field-gift_wrapping_price .addon > *,
17321728
.field-msrp .addon > * {
17331729
direction: ltr;
17341730
}
17351731

17361732
.field.type-price .addon .addafter,
17371733
.field-price .addon .addafter,
17381734
.field-special_price .addon .addafter,
1735+
.field-gift_wrapping_price .addon .addafter,
17391736
.field-msrp .addon .addafter {
17401737
border-width: 1px 0 1px 1px;
17411738
border-radius: 1px 0 0 1px;
@@ -1744,20 +1741,23 @@
17441741
.field.type-price .addon input[type=text]:first-child,
17451742
.field-price .addon input[type=text]:first-child,
17461743
.field-special_price .addon input[type=text]:first-child,
1744+
.field-gift_wrapping_price .addon input[type=text]:first-child,
17471745
.field-msrp .addon input[type=text]:first-child {
17481746
border-radius: 0 1px 1px 0;
17491747
}
17501748

17511749
.field.type-price input:focus,
17521750
.field-price input:focus,
17531751
.field-special_price input:focus,
1752+
.field-gift_wrapping_price input:focus,
17541753
.field-msrp input:focus {
17551754
border-color: #007bdb;
17561755
}
17571756

17581757
.field.type-price input:focus ~ label.addafter,
17591758
.field-price input:focus ~ label.addafter,
17601759
.field-special_price input:focus ~ label.addafter,
1760+
.field-gift_wrapping_price input:focus ~ label.addafter,
17611761
.field-msrp input:focus ~ label.addafter {
17621762
border-color: #007bdb;
17631763
}

0 commit comments

Comments
 (0)