| 1 |
(function($) { |
| 2 |
|
| 3 |
$('#the-list').on('click', '.editinline', function(){ |
| 4 |
|
| 5 |
// extract metadata and put it as the value for the custom field form |
| 6 |
inlineEditPost.revert(); |
| 7 |
|
| 8 |
// get post id |
| 9 |
var post_id = $(this).closest('tr').attr('id'); |
| 10 |
post_id = post_id.replace("post-", ""); |
| 11 |
|
| 12 |
// get ignore value |
| 13 |
var ignore_enabled = $( '#ml_ignore_product_inline_' + post_id + ' #_ml_ignore_product').text(); |
| 14 |
|
| 15 |
$('#ml_ignore_product').prop('checked', false); |
| 16 |
|
| 17 |
// set checked if value is yes |
| 18 |
if (ignore_enabled === 'yes') { |
| 19 |
|
| 20 |
$('#ml_ignore_product').prop('checked', true); |
| 21 |
} |
| 22 |
}); |
| 23 |
})(jQuery); |