Merchant look&feel.
This commit is contained in:
@@ -55,6 +55,23 @@ public class ParametrizedMerchantTest {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @Test
|
||||
public void plotPriceEasingFromSetup() {
|
||||
Date setupDate = new Date(0);
|
||||
|
||||
MerchantDAO merchantDao = new MockMerchantDAO();
|
||||
|
||||
ParametrizedMerchant merchant = new ParametrizedMerchant(new LotroCardBlueprintLibrary());
|
||||
merchant.setMerchantDao(merchantDao);
|
||||
merchant.setMerchantSetupDate(setupDate);
|
||||
|
||||
long hour = 1000 * 60 * 60;
|
||||
|
||||
for (long time = 0; time < hour * 24 * 35L; time += hour * 2)
|
||||
System.out.println(time / hour + "," + ((int) merchant.getCardSellPrice("1_1", new Date(time))) + "," + ((int) merchant.getCardBuyPrice("1_1", new Date(time))));
|
||||
}
|
||||
|
||||
private void assertEqualsMoreOrLess(int expected, int given) {
|
||||
assertTrue("Expected " + expected + " more or less, but received " + given, given <= expected + 1 && given >= expected - 1);
|
||||
}
|
||||
|
||||
@@ -46,20 +46,20 @@ var GempLotrMerchantUI = Class.extend({
|
||||
|
||||
this.infoDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information"
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information"
|
||||
});
|
||||
|
||||
this.questionDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
title: "Merchant operation"
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
title: "Merchant operation"
|
||||
});
|
||||
|
||||
var swipeOptions = {
|
||||
threshold: 20,
|
||||
@@ -230,7 +230,7 @@ var GempLotrMerchantUI = Class.extend({
|
||||
});
|
||||
cardDiv.append(buyBut);
|
||||
}
|
||||
if (sellPrice != null && sellPrice <= this.currencyCount) {
|
||||
if (sellPrice != null) {
|
||||
var formattedSellPrice = this.formatPrice(sellPrice);
|
||||
var sellBut = $("<div class='sellPrice'>Buy for<br/>" + this.formatPrice(sellPrice) + "</div>").button();
|
||||
sellBut.click(
|
||||
@@ -242,6 +242,10 @@ var GempLotrMerchantUI = Class.extend({
|
||||
});
|
||||
});
|
||||
});
|
||||
if (parseInt(sellPrice) > parseInt(this.currencyCount)) {
|
||||
sellBut.button({disabled: true});
|
||||
sellBut.css({color: "#ff0000"});
|
||||
}
|
||||
cardDiv.append(sellBut);
|
||||
}
|
||||
if (tradeFoil == "true") {
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.buyPrice.ui-state-disabled, .sellPrice.ui-state-disabled, .tradeFoil {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.owned {
|
||||
background-color: #000000;
|
||||
border: 1px solid #ffffff;
|
||||
|
||||
Reference in New Issue
Block a user