Skip to content

Commit

Permalink
fix: attribute not remove in vendor product edit page fixed #637
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Feb 10, 2020
1 parent db3b0a5 commit e4c55e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@ jQuery(function($) {
if ( $parent.is( '.taxonomy' ) ) {
$parent.find( 'select, input[type=text]' ).val( '' );
$( 'select.dokan_attribute_taxonomy' ).find( 'option[value="' + $parent.data( 'taxonomy' ) + '"]' ).removeAttr( 'disabled' );
} else {
$parent.find( 'select, input[type=text]' ).val( '' );
$parent.hide();
}

Dokan_Editor.attribute.reArrangeAttribute();
Expand Down Expand Up @@ -1469,19 +1472,19 @@ jQuery(function($) {

sale_price_parent_div.remove();
sale_price_input_div.after( sale_price_input_msg );

sale_price_wrap.val('');
setTimeout(function(){
setTimeout(function(){
sale_price_parent_div.remove();
}, 5000);

} else if( parseFloat( product_price ) <= parseFloat( sale_price ) ) {

sale_price_parent_div.remove();
sale_price_input_div.after( sale_price_input_msg );

sale_price_wrap.val('');
setTimeout(function(){
setTimeout(function(){
sale_price_parent_div.remove();
}, 5000);

Expand All @@ -1490,7 +1493,7 @@ jQuery(function($) {
sale_price_parent_div.remove();

}

} ,600 ) );

});
Expand Down
15 changes: 9 additions & 6 deletions assets/src/js/product-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@
if ( $parent.is( '.taxonomy' ) ) {
$parent.find( 'select, input[type=text]' ).val( '' );
$( 'select.dokan_attribute_taxonomy' ).find( 'option[value="' + $parent.data( 'taxonomy' ) + '"]' ).removeAttr( 'disabled' );
} else {
$parent.find( 'select, input[type=text]' ).val( '' );
$parent.hide();
}

Dokan_Editor.attribute.reArrangeAttribute();
Expand Down Expand Up @@ -906,19 +909,19 @@

sale_price_parent_div.remove();
sale_price_input_div.after( sale_price_input_msg );

sale_price_wrap.val('');
setTimeout(function(){
setTimeout(function(){
sale_price_parent_div.remove();
}, 5000);

} else if( parseFloat( product_price ) <= parseFloat( sale_price ) ) {

sale_price_parent_div.remove();
sale_price_input_div.after( sale_price_input_msg );

sale_price_wrap.val('');
setTimeout(function(){
setTimeout(function(){
sale_price_parent_div.remove();
}, 5000);

Expand All @@ -927,7 +930,7 @@
sale_price_parent_div.remove();

}

} ,600 ) );

});
Expand Down

0 comments on commit e4c55e4

Please sign in to comment.