File tree Expand file tree Collapse file tree 2 files changed +9
-15
lines changed
Catalog/view/adminhtml/web/js
Ui/view/base/web/js/dynamic-rows Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 11/**
2- * Copyright 2015 Adobe
3- * All Rights Reserved .
2+ * Copyright © Magento, Inc. All rights reserved.
3+ * See COPYING.txt for license details .
44 */
55
66/**
@@ -355,11 +355,6 @@ define([
355355 imageData . isRemoved = true ;
356356 $imageContainer . addClass ( 'removed' ) . hide ( ) . find ( '.is-removed' ) . val ( 1 ) ;
357357
358- $ . each ( this . options . types , $ . proxy ( function ( index , type ) {
359- this . element . find ( '.image-' + type . code ) . val ( 'no_selection' ) ;
360- this . options . types [ index ] . value = 'no_selection' ;
361- } , this ) ) ;
362-
363358 this . _contentUpdated ( ) ;
364359 } ,
365360
Original file line number Diff line number Diff line change 11/**
2- * Copyright © Magento, Inc. All rights reserved.
3- * See COPYING.txt for license details .
2+ * Copyright 2015 Adobe
3+ * All Rights Reserved .
44 */
55
66/**
@@ -691,12 +691,11 @@ define([
691691 processingAddChild : function ( ctx , index , prop ) {
692692 this . bubble ( 'addChild' , false ) ;
693693
694- if ( this . relatedData . length && this . relatedData . length % this . pageSize === 0 ) {
695- this . pages ( this . pages ( ) + 1 ) ;
696- this . nextPage ( ) ;
697- } else if ( ~ ~ this . currentPage ( ) !== this . pages ( ) ) {
698- this . currentPage ( this . pages ( ) ) ;
699- }
694+ var newTotal = this . relatedData . length + 1 ;
695+ var newPages = Math . ceil ( newTotal / this . pageSize ) ;
696+
697+ this . pages ( newPages ) ;
698+ this . currentPage ( newPages ) ;
700699
701700 this . addChild ( ctx , index , prop ) ;
702701 } ,
You can’t perform that action at this time.
0 commit comments