Apr 29th 2011, 12:34:28
short jquery solution to MAX button
easiest would be to add a class to the cells in the Can Sell column let's call it 'can_sell' then it would be nice to add a new column called Max or something and in that cell a <a href="#" class="sell_max">max</a> and if it is not to much trouble a class on the input box for "Amount to sell" let's call it 'amount_to_sell', do this for all rows in the table that should have a max button :)
then at the end of the page insert this!
<script type="text/javascript">
$('.sell_max').click(function(){
//copy!
var can_sell = $(this).closest('tr').find('.can_cell').html();
//paste!
$(this).closest('tr').find('.amount_to_sell').val(can_sell);
});
</script>
i have been seriously considering making a grease monkey script to handle this .. but alas my free time is limited :( and it would be way better if you could just implemnt it ;)