Disable take sell offer

This commit is contained in:
Manfred Karrer 2014-10-23 21:56:12 +02:00
parent 41143a81d4
commit 24ba66e665
7 changed files with 22 additions and 15 deletions

View File

@ -50,11 +50,11 @@ public class Popups {
private static OverlayManager overlayManager;
// Information
public static void openInfo(String message) {
openInfo(null, message);
public static void openInfoPopup(String message) {
openInfoPopup(null, message);
}
public static void openInfo(String masthead, String message) {
public static void openInfoPopup(String masthead, String message) {
overlayManager.blurContent();
List<Action> actions = new ArrayList<>();
actions.add(new AbstractAction(BSResources.get("shared.close")) {
@ -65,10 +65,10 @@ public class Popups {
overlayManager.removeBlurContent();
}
});
openInfo(masthead, message, actions);
openInfoPopup(masthead, message, actions);
}
public static void openInfo(String masthead, String message, List<Action> actions) {
public static void openInfoPopup(String masthead, String message, List<Action> actions) {
Dialogs.create()
.owner(BitSquareUI.getPrimaryStage())
.message(message)

View File

@ -180,7 +180,7 @@ public class FiatAccountViewCB extends CachedViewCB<FiatAccountPm> implements Co
InputValidator.ValidationResult result = presentationModel.requestSaveBankAccount();
if (result.isValid) {
selectionComboBox.getSelectionModel().select(null);
Popups.openInfo("Your payments account has been saved.",
Popups.openInfoPopup("Your payments account has been saved.",
"You can add more accounts or continue to the next step.");
}
}

View File

@ -124,7 +124,7 @@ public class IrcAccountViewCB extends CachedViewCB<IrcAccountPm> implements Cont
setupBindings();
Platform.runLater(() -> {
Popups.openInfo("Demo setup for simulating the banking transfer",
Popups.openInfoPopup("Demo setup for simulating the banking transfer",
"For demo purposes we use a special setup so that users can simulate the banking transfer when " +
"meeting in an IRC chat room.\n" +
"You need to define your IRC nickname and later in the trade process you can find your " +

View File

@ -130,7 +130,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
}
});
Popups.openInfo(BSResources.get("You have been successfully registered."),
Popups.openInfoPopup(BSResources.get("You have been successfully registered."),
BSResources.get("Congratulation you have been successfully registered.\n\n" +
" You can now start trading."),
actions);

View File

@ -195,7 +195,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
overlayManager.removeBlurContent();
}
});
Popups.openInfo("To ensure that both traders behave fair they need to pay a security deposit.",
Popups.openInfoPopup("To ensure that both traders behave fair they need to pay a security deposit.",
"The deposit will stay in your local trading wallet until the offer gets accepted by " +
"another trader. " +
"\nIt will be refunded to you after the trade has successfully completed.",
@ -374,7 +374,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
}
});
Popups.openInfo(BSResources.get("createOffer.success.headline"),
Popups.openInfoPopup(BSResources.get("createOffer.success.headline"),
BSResources.get("createOffer.success.info"),
actions);
}

View File

@ -245,15 +245,22 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
Navigation.Item.ACCOUNT_SETUP);
}
});
Popups.openInfo("You don't have setup a trading account.",
Popups.openInfoPopup("You don't have setup a trading account.",
"You need to setup your trading account before you can trade.",
actions);
}
private void takeOffer(Offer offer) {
if (presentationModel.isRegistered()) {
((TradeNavigator) parent).takeOffer(presentationModel.getAmountAsCoin(),
presentationModel.getPriceAsCoin(), offer);
if (offer.getDirection() == Direction.BUY) {
((TradeNavigator) parent).takeOffer(presentationModel.getAmountAsCoin(),
presentationModel.getPriceAsCoin(), offer);
}
else {
Popups.openInfoPopup("Not implemented yet",
"At the moment you can only take offers in the Sell BTC screen.");
}
}
else {
openSetupScreen();

View File

@ -211,7 +211,7 @@ public class TakeOfferViewCB extends CachedViewCB<TakeOfferPM> {
overlayManager.removeBlurContent();
}
});
Popups.openInfo("To ensure that both traders behave fair they need to pay a security deposit.",
Popups.openInfoPopup("To ensure that both traders behave fair they need to pay a security deposit.",
"The deposit will stay in your local trading wallet until the offer gets accepted by " +
"another trader. " +
"\nIt will be refunded to you after the trade has successfully completed.",
@ -350,7 +350,7 @@ public class TakeOfferViewCB extends CachedViewCB<TakeOfferPM> {
}
});
Popups.openInfo(BSResources.get("takeOffer.success.headline"),
Popups.openInfoPopup(BSResources.get("takeOffer.success.headline"),
BSResources.get("takeOffer.success.info"),
actions);
}