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 1
1
/**
2
- * Copyright 2015 Adobe
3
- * All Rights Reserved .
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details .
4
4
*/
5
5
6
6
/**
@@ -355,11 +355,6 @@ define([
355
355
imageData . isRemoved = true ;
356
356
$imageContainer . addClass ( 'removed' ) . hide ( ) . find ( '.is-removed' ) . val ( 1 ) ;
357
357
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
-
363
358
this . _contentUpdated ( ) ;
364
359
} ,
365
360
Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright © Magento, Inc. All rights reserved.
3
- * See COPYING.txt for license details .
2
+ * Copyright 2015 Adobe
3
+ * All Rights Reserved .
4
4
*/
5
5
6
6
/**
@@ -691,12 +691,11 @@ define([
691
691
processingAddChild : function ( ctx , index , prop ) {
692
692
this . bubble ( 'addChild' , false ) ;
693
693
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 ) ;
700
699
701
700
this . addChild ( ctx , index , prop ) ;
702
701
} ,
You can’t perform that action at this time.
0 commit comments