Display of information about leagues.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"set": [1,2,3]
|
||||
},
|
||||
{
|
||||
"name": "Fellowship block - Part 1",
|
||||
"name": "Fellowship block - Set 1",
|
||||
"code": "fotr1_block",
|
||||
"sites": "FELLOWSHIP",
|
||||
"cancelRingBearerSkirmish": true,
|
||||
@@ -17,7 +17,7 @@
|
||||
"hall": false
|
||||
},
|
||||
{
|
||||
"name": "Fellowship block - Part 2",
|
||||
"name": "Fellowship block - Sets 1&2",
|
||||
"code": "fotr2_block",
|
||||
"sites": "FELLOWSHIP",
|
||||
"cancelRingBearerSkirmish": true,
|
||||
@@ -33,7 +33,7 @@
|
||||
"set":[4,5,6]
|
||||
},
|
||||
{
|
||||
"name": "Towers block - Part 1",
|
||||
"name": "Towers block - Set 4",
|
||||
"code": "ttt1_block",
|
||||
"sites": "TWO_TOWERS",
|
||||
"cancelRingBearerSkirmish": true,
|
||||
@@ -41,7 +41,7 @@
|
||||
"hall": false
|
||||
},
|
||||
{
|
||||
"name": "Towers block - Part 2",
|
||||
"name": "Towers block - Sets 4&5",
|
||||
"code": "ttt2_block",
|
||||
"sites": "TWO_TOWERS",
|
||||
"cancelRingBearerSkirmish": true,
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gempukku.lotro.server;
|
||||
|
||||
import com.gempukku.lotro.db.LeagueDAO;
|
||||
import com.gempukku.lotro.db.vo.League;
|
||||
import com.gempukku.lotro.game.formats.LotroFormatLibrary;
|
||||
import com.gempukku.lotro.league.LeagueSerieData;
|
||||
import com.gempukku.lotro.league.LeagueService;
|
||||
import com.gempukku.lotro.league.LeagueStanding;
|
||||
@@ -25,6 +26,8 @@ public class LeagueResource extends AbstractResource {
|
||||
private LeagueDAO _leagueDao;
|
||||
@Context
|
||||
private LeagueService _leagueService;
|
||||
@Context
|
||||
private LotroFormatLibrary _formatLibrary;
|
||||
|
||||
@GET
|
||||
public Document getLeagueInformation() throws ParserConfigurationException {
|
||||
@@ -48,6 +51,9 @@ 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("format", _formatLibrary.getFormat(serie.getFormat()).getName());
|
||||
serieElem.setAttribute("collection", serie.getCollectionType().getFullName());
|
||||
serieElem.setAttribute("limited", String.valueOf(serie.isLimited()));
|
||||
|
||||
final List<LeagueStanding> standings = _leagueService.getLeagueSerieStandings(league, serie);
|
||||
for (LeagueStanding standing : standings) {
|
||||
|
||||
@@ -60,10 +60,17 @@ var LeagueResultsUI = Class.extend({
|
||||
var serieStart = serie.getAttribute("start");
|
||||
var serieEnd = serie.getAttribute("end");
|
||||
var maxMatches = serie.getAttribute("maxMatches");
|
||||
var format = serie.getAttribute("format");
|
||||
var collection = serie.getAttribute("collection");
|
||||
var limited = serie.getAttribute("limited");
|
||||
|
||||
var serieText = serieName + " - " + this.getDateString(serieStart) + " to " + this.getDateString(serieEnd);
|
||||
tabContent.append("<h2 class='serieName'>" + serieText + "</h2>");
|
||||
tabContent.append("<sub>Maximum ranked matches in serie: " + maxMatches + "</sub>");
|
||||
|
||||
tabContent.append("<div>Format: " + ((limited == "true") ? "Limited" : "Constructed") + " " + format + "</div>");
|
||||
tabContent.append("<div>Collection: " + collection + "</div>");
|
||||
|
||||
tabContent.append("<div>Maximum ranked matches in serie: " + maxMatches + "</div>");
|
||||
|
||||
var standings = serie.getElementsByTagName("standing");
|
||||
if (standings.length > 0)
|
||||
|
||||
Reference in New Issue
Block a user