File tree Expand file tree Collapse file tree 3 files changed +6
-28
lines changed
app/code/Magento/Swatches/view/adminhtml
templates/catalog/product/attribute Expand file tree Collapse file tree 3 files changed +6
-28
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © 2015 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
-
6
+ echo " swatchjs " ;
7
7
// @codingStandardsIgnoreFile
8
8
9
9
?>
@@ -265,7 +265,7 @@ require([
265
265
setRowVisibility('is_unique', false);
266
266
setRowVisibility('frontend_class', false);
267
267
break;
268
- <?php $ hiddenFields = $ block ->helper ('Magento\Catalog\Helper\Data ' )->getAttributeHiddenFields () ?>
268
+ <?php $ hiddenFields = $ this ->helper ('Magento\Catalog\Helper\Data ' )->getAttributeHiddenFields () ?>
269
269
<?php foreach ($ hiddenFields as $ type => $ fields ): ?>
270
270
<?php if (in_array ($ type , array ('swatch_visual ' , 'swatch_text ' ))) continue ?>
271
271
case '<?php echo $ block ->escapeHtml ($ type ); ?> ':
Original file line number Diff line number Diff line change @@ -44,18 +44,8 @@ define([
44
44
data : data
45
45
} ) ;
46
46
47
- if ( isNewOption ) {
48
- visibleRadio = $$ ( '#swatch-text-options-panel [name="defaulttext[]"]' ) . findAll ( function ( el ) {
49
- return el . up ( ) . up ( ) . visible ( ) ;
50
- } ) ;
51
-
52
- if ( visibleRadio . length === 1 ) {
53
- visibleRadio [ 0 ] . checked = true ;
54
- }
55
-
56
- if ( ! this . isReadOnly ) {
57
- this . enableNewOptionDeleteButton ( data . id ) ;
58
- }
47
+ if ( isNewOption && ! this . isReadOnly ) {
48
+ this . enableNewOptionDeleteButton ( data . id ) ;
59
49
}
60
50
this . itemCount ++ ;
61
51
this . totalItems ++ ;
Original file line number Diff line number Diff line change @@ -46,20 +46,8 @@ define([
46
46
data : data
47
47
} ) ;
48
48
49
- if ( isNewOption ) {
50
- visibleRadio = $$ ( '#swatch-visual-options-panel [name="defaultvisual[]"]' ) . findAll (
51
- function ( el ) {
52
- return el . up ( ) . up ( ) . visible ( ) ;
53
- }
54
- ) ;
55
-
56
- if ( visibleRadio . length === 1 ) {
57
- visibleRadio [ 0 ] . checked = true ;
58
- }
59
-
60
- if ( ! this . isReadOnly ) {
61
- this . enableNewOptionDeleteButton ( data . id ) ;
62
- }
49
+ if ( isNewOption && ! this . isReadOnly ) {
50
+ this . enableNewOptionDeleteButton ( data . id ) ;
63
51
}
64
52
this . itemCount ++ ;
65
53
this . totalItems ++ ;
You can’t perform that action at this time.
0 commit comments