diff --git a/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/LeagueResource.java b/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/LeagueResource.java index 52662d3d2..037bda39e 100644 --- a/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/LeagueResource.java +++ b/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/LeagueResource.java @@ -122,6 +122,7 @@ public class LeagueResource extends AbstractResource { serieElem.setAttribute("maxMatches", String.valueOf(serie.getMaxMatches())); serieElem.setAttribute("start", String.valueOf(serie.getStart())); serieElem.setAttribute("end", String.valueOf(serie.getEnd())); + serieElem.setAttribute("formatType", serie.getFormat()); serieElem.setAttribute("format", _formatLibrary.getFormat(serie.getFormat()).getName()); serieElem.setAttribute("collection", serie.getCollectionType().getFullName()); serieElem.setAttribute("limited", String.valueOf(serie.isLimited())); 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 5e0a0e003..f209a11f8 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html @@ -38,6 +38,11 @@ cursor: pointer; } + .clickableFormat { + cursor: pointer; + color: #6f6fff; + } + .pocket { background-color: #000000; border: 1px solid #ffffff; @@ -220,11 +225,11 @@ var infoDialog = $("
") .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - title: "Card information" - }); + autoOpen: false, + closeOnEscape: true, + resizable: false, + title: "Card information" + }); $("body").click( function (event) { diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html index 67df5ae8c..f075df6c3 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html @@ -1,4 +1,8 @@
+2 Jun. 2012
+- The drop-downs for deck and format in Game Hall no longer reset periodically.
+- The formats for each week in League tab are now clickable to show the details for the format.
+
30 May 2012
- "Pippin, Friend to Frodo" now prevents only Shadow player from discarding Tales, not the FP player, if a Shadow card
makes FP player to discard it.
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/communication.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/communication.js
index 4dae618c6..2fc166fa7 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/communication.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/communication.js
@@ -470,6 +470,18 @@ var GempLotrCommunication = Class.extend({
dataType: "xml"
});
},
+ getFormat: function(formatCode, callback, errorMap) {
+ $.ajax({
+ type: "GET",
+ url: this.url + "/hall/format/" + formatCode,
+ cache: false,
+ data: {
+ participantId: getUrlParam("participantId")},
+ success: this.deliveryCheck(callback),
+ error: this.errorCheck(errorMap),
+ dataType: "html"
+ });
+ },
getStatus: function(callback, errorMap) {
$.ajax({
type: "GET",
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/leagueResultsUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/leagueResultsUi.js
index fbee2d03a..f3005be4c 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/leagueResultsUi.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-005/leagueResultsUi.js
@@ -1,6 +1,7 @@
var LeagueResultsUI = Class.extend({
communication: null,
questionDialog: null,
+ formatDialog: null,
init: function(url) {
this.communication = new GempLotrCommunication(url,
@@ -16,6 +17,15 @@ var LeagueResultsUI = Class.extend({
title: "League operation"
});
+ this.formatDialog = $("")
+ .dialog({
+ autoOpen: false,
+ closeOnEscape: true,
+ resizable: false,
+ modal: true,
+ title: "Format description"
+ });
+
this.loadResults();
},
@@ -99,6 +109,7 @@ var LeagueResultsUI = Class.extend({
var serieStart = serie.getAttribute("start");
var serieEnd = serie.getAttribute("end");
var maxMatches = serie.getAttribute("maxMatches");
+ var formatType = serie.getAttribute("formatType");
var format = serie.getAttribute("format");
var collection = serie.getAttribute("collection");
var limited = serie.getAttribute("limited");
@@ -106,7 +117,21 @@ var LeagueResultsUI = Class.extend({
var serieText = serieName + " - " + getDateString(serieStart) + " to " + getDateString(serieEnd);
$("#leagueExtraInfo").append("" + serieText + "");
- $("#leagueExtraInfo").append("Format: " + ((limited == "true") ? "Limited" : "Constructed") + " " + format + "");
+ var formatName = $("" + ((limited == "true") ? "" : "Constructed ") + format + "");
+ var formatDiv = $("Format: ");
+ formatDiv.append(formatName);
+ formatName.click(
+ (function(ft) {
+ return function() {
+ that.formatDialog.html("");
+ that.formatDialog.dialog("open");
+ that.communication.getFormat(ft,
+ function(html) {
+ that.formatDialog.html(html);
+ });
+ };
+ })(formatType));
+ $("#leagueExtraInfo").append(formatDiv);
$("#leagueExtraInfo").append("Collection: " + collection + "");
tabContent.append("Maximum ranked matches in serie: " + maxMatches + "");