diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/GameUtils.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/GameUtils.java index 067a94ae5..8dacccc07 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/GameUtils.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/GameUtils.java @@ -55,7 +55,11 @@ public class GameUtils { public static String getCardLink(PhysicalCard card) { LotroCardBlueprint blueprint = card.getBlueprint(); - return "
" + (blueprint.isUnique() ? "•" : "") + GameUtils.getFullName(blueprint) + "
"; + return getCardLink(card.getBlueprintId(), blueprint); + } + + public static String getCardLink(String blueprintId, LotroCardBlueprint blueprint) { + return "
" + (blueprint.isUnique() ? "•" : "") + GameUtils.getFullName(blueprint) + "
"; } public static String getAppendedTextNames(Collection cards) { diff --git a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/HallResource.java b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/HallResource.java index b1b70cf88..51289534a 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/HallResource.java +++ b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/HallResource.java @@ -57,18 +57,14 @@ public class HallResource extends AbstractResource { result.append("
  • sites from block: " + lotroFormat.getSiteBlock().getHumanReadable() + "
  • "); result.append("
  • Ring-bearer skirmish can be cancelled: " + (lotroFormat.canCancelRingBearerSkirmish() ? "yes" : "no") + "
  • "); result.append("
  • X-listed: "); - for (String blueprintId : lotroFormat.getBannedCards()) { - String fullName = GameUtils.getFullName(_library.getLotroCardBlueprint(blueprintId)); - result.append("" + fullName + ", "); - } + for (String blueprintId : lotroFormat.getBannedCards()) + result.append(GameUtils.getCardLink(blueprintId, _library.getLotroCardBlueprint(blueprintId)) + ", "); if (lotroFormat.getBannedCards().size() == 0) result.append("none,"); result.append("
  • "); result.append("
  • R-listed: "); - for (String blueprintId : lotroFormat.getRestrictedCards()) { - String fullName = GameUtils.getFullName(_library.getLotroCardBlueprint(blueprintId)); - result.append("" + fullName + ", "); - } + for (String blueprintId : lotroFormat.getRestrictedCards()) + result.append(GameUtils.getCardLink(blueprintId, _library.getLotroCardBlueprint(blueprintId)) + ", "); if (lotroFormat.getRestrictedCards().size() == 0) result.append("none,"); result.append("
  • "); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html index 41f669ecf..9f54c43d2 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html @@ -20,6 +20,12 @@ opacity: 0.2; } + .cardHint { + display: inline; + color: #6f6fff; + cursor: pointer; + } + .pocket { background-color: #000000; border: 1px solid #ffffff; @@ -194,6 +200,50 @@ }); resizeHall(); + + var infoDialog = $("
    ") + .dialog({ + autoOpen: false, + closeOnEscape: true, + resizable: false, + title: "Card information" + }); + + $("body").click( + function (event) { + var tar = $(event.target); + + if (tar.hasClass("cardHint")) { + var blueprintId = tar.attr("value"); + var card = new Card(blueprintId, "SPECIAL", "hint", ""); + + infoDialog.html(""); + infoDialog.html("
    "); + var floatCardDiv = $("
    "); + floatCardDiv.append(createFullCardDiv(card.imageUrl, card.foil, card.horizontal)); + infoDialog.append(floatCardDiv); + + var windowWidth = $(window).width(); + var windowHeight = $(window).height(); + + var horSpace = 30; + var vertSpace = 45; + + if (card.horizontal) { + // 500x360 + infoDialog.dialog({width: Math.min(500 + horSpace, windowWidth), height: Math.min(360 + vertSpace, windowHeight)}); + } else { + // 360x500 + infoDialog.dialog({width: Math.min(360 + horSpace, windowWidth), height: Math.min(500 + vertSpace, windowHeight)}); + } + infoDialog.dialog("open"); + + event.stopPropagation(); + return false; + } + + return true; + }); }); function resizeHall() {