Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1216 from JoiNNN/fix-multiple-spaces
Browse files Browse the repository at this point in the history
FIX: Multiple spaces between Quick and Instant sell buttons
  • Loading branch information
jshackles authored Dec 9, 2016
2 parents 262c7f1 + a0bc3e4 commit 8d2e7e5
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions enhancedsteam.js
Original file line number Diff line number Diff line change
Expand Up @@ -5258,15 +5258,18 @@ function inventory_market_helper(response) {
if (market.highest_buy_order) {
$(thisItem).data("price-low", price_low);
}

$(thisItem).addClass("es-price-loaded");
// Add "Quick Sell" button
if (price_high > price_low) {
$("#es_quicksell" + item).attr("price", price_high).html("<span>" + localized_strings.quick_sell.replace("__amount__", formatCurrency(price_high, currency_number_to_type(wallet_currency))) + "</span>").show().before("<br class='es-btn-spacer'>");
}
// Add "Instant Sell" button
if (market.highest_buy_order) {
$("#es_instantsell" + item).attr("price", price_low).html("<span>" + localized_strings.instant_sell.replace("__amount__", formatCurrency(price_low, currency_number_to_type(wallet_currency))) + "</span>").show().before("<br class='es-btn-spacer'>");
// Fixes multiple buttons
//console.log($(".item.activeInfo").is($(thisItem)), $(".item.activeInfo").prop("id"), $(thisItem).prop("id"));
if ($(".item.activeInfo").is($(thisItem))) {
$(thisItem).addClass("es-price-loaded");
// Add "Quick Sell" button
if (price_high > price_low) {
$("#es_quicksell" + item).attr("price", price_high).html("<span>" + localized_strings.quick_sell.replace("__amount__", formatCurrency(price_high, currency_number_to_type(wallet_currency))) + "</span>").show().before("<br class='es-btn-spacer'>");
}
// Add "Instant Sell" button
if (market.highest_buy_order) {
$("#es_instantsell" + item).attr("price", price_low).html("<span>" + localized_strings.instant_sell.replace("__amount__", formatCurrency(price_low, currency_number_to_type(wallet_currency))) + "</span>").show().before("<br class='es-btn-spacer'>");
}
}
}).complete(function(){
$(thisItem).removeClass("es-loading");
Expand Down

0 comments on commit 8d2e7e5

Please sign in to comment.