From d3e4a187630b4b410c5e0435656c44a9193365bb Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Fri, 14 Feb 2014 18:24:48 -0200 Subject: [PATCH] fixed the variation bulk edit, closes #4807 solved the issue with increase and decrease values forcing to be string the prompt return value --- assets/js/admin/meta-boxes-variations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/admin/meta-boxes-variations.js b/assets/js/admin/meta-boxes-variations.js index 92435fde79e..a2ed3a99b46 100644 --- a/assets/js/admin/meta-boxes-variations.js +++ b/assets/js/admin/meta-boxes-variations.js @@ -87,7 +87,7 @@ jQuery( function($){ $('#variable_product_options').load( this_page + ' #variable_product_options_inner', function() { $('#variable_product_options').unblock(); jQuery('#variable_product_options').trigger('woocommerce_variations_added'); - + jQuery(".tips").tipTip({ 'attribute' : 'data-tip', 'fadeIn' : 50, @@ -205,7 +205,7 @@ jQuery( function($){ jQuery( ':input[name^="' + edit_field + '["]').each(function() { var current_value = Number( jQuery(this).val() ); - if ( value.indexOf("%") >= 0 ) + if ( value.toString().indexOf("%") >= 0 ) value = Number( ( Number( current_value ) / 100 ) * Number( value.replace(/\%/, "" ) ) ); else value = Number( value ); @@ -343,4 +343,4 @@ jQuery( function($){ wp.media.model.settings.post.id = wp_media_post_id; } ); -}); \ No newline at end of file +});