WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000516WeBidBiddingpublic2015-09-25 11:172015-09-25 11:17
Reporterrenlok 
Assigned Torenlok 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.1.1 
Target VersionFixed in Version1.2.0 
Summary0000516: Javascript bug in bid.tpl
DescriptionOn the top of the bid.tpl there is the following javascript




[HTML]<!-- IF TQTY gt 1 -->
<script type="text/javascript">
$(document).ready(function(){
    $("#qty").keydown(function(){
        $("#bidcost").text(($("#qty").val())*($("#bid").val()) + ' {CURRENCY}');
    });
    $("#bid").keydown(function(){
        $("#bidcost").text(($("#qty").val())*($("#bid").val()) + ' {CURRENCY}');
    });
});
</script>
<!-- ENDIF -->[/HTML]




Which has the following problems
1. It does not work when the little up or down arrows for quantity are clicked
2. It messes up if you enter a two digit number in quantity.
3. It does not work for regular auctions if you change your bid.
4. Occasionally gets effected by the javascript rounding error.
5. If you change anything the Currency after the amount in the bottom is no longer a link




Here is the fixed one just replace all of the above code with this code




[HTML]<script type="text/javascript">
$(document).ready(function(){
<!-- IF TQTY gt 1 -->
    $("#qty").keyup(function(){
        $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
    });
    $("#qty").click(function(){
        $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
    });
    $("#bid").keyup(function(){
        $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
    });
    <!-- ELSE -->
    $("#bid").keyup(function(){
        $("#bidcost").html((parseFloat({QTY} * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat({QTY} * ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
    });
<!-- ENDIF -->
});
</script>[/HTML]




TESTED ONLY with WeBid 1.1.1
TagsNo tags attached.
import_id
Threadhttp://webidsupport.com/forums/index.php?threads/javascript-bug-in-bid-tpl.8030/ [^]
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-09-25 11:17 renlok New Issue
2015-09-25 11:17 renlok Status new => resolved
2015-09-25 11:17 renlok Fixed in Version => 1.2.0
2015-09-25 11:17 renlok Resolution open => fixed
2015-09-25 11:17 renlok Assigned To => renlok
2015-09-25 11:17 renlok Thread => http://webidsupport.com/forums/index.php?threads/javascript-bug-in-bid-tpl.8030/ [^]


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker