From 8969038387f1e5f7a739e457918f594a56e06873 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Fri, 25 Apr 2014 14:48:13 +0000 Subject: [PATCH] Fixed display of The One Ring in list of cards to add to deck, when not during special Ring selection. --- .../src/main/web/js/gemp-019/deckBuildingUi.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/deckBuildingUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/deckBuildingUi.js index 5bd4025c2..01a3f6796 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/deckBuildingUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/deckBuildingUi.js @@ -45,6 +45,8 @@ var GempLotrDeckBuildingUI = Class.extend({ collectionType:null, + specialSelection:false, + init:function () { var that = this; @@ -52,6 +54,9 @@ var GempLotrDeckBuildingUI = Class.extend({ this.cardFilter = new CardFilter($("#collectionDiv"), $("#collectionDiv"), function (filter, start, count, callback) { + if (!that.specialSelection) { + filter = "cardType:-THE_ONE_RING " + filter; + } that.comm.getCollection(that.collectionType, filter, start, count, function (xml) { callback(xml); }, { @@ -266,7 +271,7 @@ var GempLotrDeckBuildingUI = Class.extend({ this.getCollectionTypes(); - this.cardFilter.setFilter("cardType:-THE_ONE_RING"); + this.cardFilter.setFilter(""); this.cardFilter.getCollection(); this.checkDeckStatsDirty(); @@ -573,6 +578,7 @@ var GempLotrDeckBuildingUI = Class.extend({ showPredefinedFilter:function (filter, container) { this.cardFilter.enableDetailFilters(false); + this.specialSelection = true; this.cardFilter.setFilter(filter); var that = this; @@ -588,7 +594,8 @@ var GempLotrDeckBuildingUI = Class.extend({ showNormalFilter:function () { this.cardFilter.enableDetailFilters(true); - this.cardFilter.setFilter("cardType:-THE_ONE_RING"); + this.specialSelection = false; + this.cardFilter.setFilter(""); this.selectionFunc = this.addCardToDeckAndLayout; },