From 749ccaeb13fe52019a7c8906daecbbd666921ea9 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 24 Oct 2011 19:15:21 +0000 Subject: [PATCH] Fixing some deck builder issues. --- .../gempukku/lotro/server/ServerResource.java | 4 +-- .../src/main/webapp/js/deckBuildingUi.js | 27 ++++++++++--------- .../src/main/webapp/js/hallUi.js | 3 ++- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java index 59c3f7238..1fe16bef9 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java +++ b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java @@ -426,9 +426,9 @@ public class ServerResource { LotroFormat format = _hallServer.getSupportedFormat(supportedFormats.getKey()); try { format.validateDeck(deck); - sb.append("" + formatName + ": valid "); + sb.append("" + formatName + ": valid
"); } catch (DeckInvalidException exp) { - sb.append("" + formatName + ": " + exp.getMessage() + " "); + sb.append("" + formatName + ": " + exp.getMessage() + "
"); } } diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/deckBuildingUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/deckBuildingUi.js index 52e8a4f80..8d2890344 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/deckBuildingUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/deckBuildingUi.js @@ -226,6 +226,7 @@ var GempLotrDeckBuildingUI = Class.extend({ this.shadowDeckGroup.maxCardHeight = 200; this.bottomBarDiv = $("
"); + this.bottomBarDiv.css({overflow: "auto"}); this.bottomBarDiv.append(""); this.bottomBarDiv.append("
") this.deckDiv.append(this.bottomBarDiv); @@ -261,15 +262,15 @@ var GempLotrDeckBuildingUI = Class.extend({ this.infoDialog = $("
") .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: true, - title: "Card information", - minHeight: 80, - minWidth: 200, - width: 600, - height: 300 - }); + autoOpen: false, + closeOnEscape: true, + resizable: true, + title: "Card information", + minHeight: 80, + minWidth: 200, + width: 600, + height: 300 + }); var swipeOptions = { threshold: 20, @@ -544,7 +545,7 @@ var GempLotrDeckBuildingUI = Class.extend({ }, layoutUI: function() { - var manageHeight = 20; + var manageHeight = 30; var padding = 5; var collectionWidth = this.collectionDiv.width(); @@ -557,9 +558,11 @@ var GempLotrDeckBuildingUI = Class.extend({ var sitesWidth = Math.floor(1.5 * deckHeight / 5); sitesWidth = Math.min(sitesWidth, 150); + this.manageDecksDiv.css({position: "absolute", left: padding, top: padding, width: deckWidth, height: manageHeight}); + this.ringBearerDiv.css({ position: "absolute", left: padding, top: manageHeight + 2 * padding, width: Math.floor((sitesWidth - padding) / 2), height: rowHeight }); this.ringBearerGroup.setBounds(0, 0, Math.floor((sitesWidth - padding) / 2), rowHeight); - this.ringDiv.css({ position: "absolute", left: Math.floor((sitesWidth + 3 * padding) / 2), top: manageHeight + 2 * padding, width: Math.floor(sitesWidth - padding / 2), height: rowHeight }); + this.ringDiv.css({ position: "absolute", left: Math.floor((sitesWidth + 3 * padding) / 2), top: manageHeight + 2 * padding, width: Math.floor((sitesWidth - padding) / 2), height: rowHeight }); this.ringGroup.setBounds(0, 0, Math.floor((sitesWidth - padding) / 2), rowHeight); for (var i = 0; i < 4; i++) { this.siteDivs[i].css({ position: "absolute", left: padding, top: manageHeight + 2 * padding + (rowHeight + padding) * (i + 1), width: sitesWidth, height: rowHeight }); @@ -573,7 +576,7 @@ var GempLotrDeckBuildingUI = Class.extend({ this.fpDeckGroup.setBounds(0, 0, deckWidth - (sitesWidth + padding) * 2 - padding, (deckHeight - 2 * padding - 50) / 2); this.shadowDeckGroup.setBounds(0, (deckHeight - 2 * padding - 50) / 2, deckWidth - (sitesWidth + padding) * 2 - padding, (deckHeight - 2 * padding - 50) / 2); - this.bottomBarDiv.css({ position: "absolute", left: padding * 3 + sitesWidth * 2, top: deckHeight - 50, width: deckWidth - (sitesWidth + padding) * 2 - padding, height: 50 }); + this.bottomBarDiv.css({ position: "absolute", left: padding * 3 + sitesWidth * 2, top: manageHeight + padding + deckHeight - 50, width: deckWidth - (sitesWidth + padding) * 2 - padding, height: 50 }); this.filterDiv.css({ position: "absolute", left: padding, top: 50, width: collectionWidth - padding, height: 80 }); this.normalCollectionDiv.css({ position: "absolute", left: padding, top: 130, width: collectionWidth - padding * 2, height: collectionHeight - 130 }); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js index e2eae9dff..03d19deb6 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js @@ -42,7 +42,7 @@ var GempLotrHallUI = Class.extend({ var that = this; - var editDeck = $(""); + var editDeck = $(""); editDeck.button().click( function() { location.href = 'deckBuild.html'; @@ -57,6 +57,7 @@ var GempLotrHallUI = Class.extend({ $(this.createTableButton).button().click( function() { that.supportedFormatsSelect.hide(); + that.decksSelect.hide(); that.createTableButton.hide(); var format = that.supportedFormatsSelect.val(); var deck = that.decksSelect.val();