Fixing hall.
This commit is contained in:
@@ -187,6 +187,14 @@ public class DefaultCardCollection implements MutableCardCollection {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void waitTillLoaded() {
|
||||
try {
|
||||
_collectionReadyLatch.await();
|
||||
} catch (InterruptedException exp) {
|
||||
throw new RuntimeException(exp);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> getAll() {
|
||||
return Collections.unmodifiableMap(_counts);
|
||||
|
||||
@@ -78,6 +78,7 @@ public class LotroServer extends AbstractServer {
|
||||
}
|
||||
|
||||
public CardCollection getDefaultCollection() {
|
||||
_defaultCollection.waitTillLoaded();
|
||||
return _defaultCollection;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,11 @@ public class HallServer extends AbstractServer {
|
||||
}
|
||||
|
||||
// Now check if player owns all the cards
|
||||
CardCollection collection = _collectionDao.getCollectionForPlayer(player, collectionType.getCode());
|
||||
CardCollection collection;
|
||||
if (collectionType.getCode().equals("default"))
|
||||
collection = _lotroServer.getDefaultCollection();
|
||||
else
|
||||
collection = _collectionDao.getCollectionForPlayer(player, collectionType.getCode());
|
||||
|
||||
Map<String, Integer> deckCardCounts = CollectionUtils.getTotalCardCountForDeck(lotroDeck);
|
||||
final Map<String, Integer> collectionCardCounts = collection.getAll();
|
||||
|
||||
@@ -78,6 +78,15 @@
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
table.tables {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.tables td, table.tables th {
|
||||
padding: 2px;
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ var GempLotrHallUI = Class.extend({
|
||||
|
||||
var tables = root.getElementsByTagName("table");
|
||||
var tablesTable = $("<table class='tables'></table>");
|
||||
tablesTable.append("<tr><th>Format</th><th>Tournament</th><th>Status</th><th>Players</th><th>Actions</th></tr>");
|
||||
tablesTable.append("<tr><th width='20%'>Format</th><th width='30%'>Tournament</th><th width='10%'>Status</th><th width='20%'>Players</th><th width='20%'>Actions</th></tr>");
|
||||
|
||||
for (var i = 0; i < tables.length; i++) {
|
||||
var table = tables[i];
|
||||
@@ -257,6 +257,6 @@ var GempLotrHallUI = Class.extend({
|
||||
|
||||
row.append(actionsField);
|
||||
|
||||
this.container.append(row);
|
||||
container.append(row);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user