diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cards/CardFilter.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cards/CardFilter.js index 3f63354e0..810a2fee2 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cards/CardFilter.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cards/CardFilter.js @@ -434,27 +434,50 @@ var CardFilter = Class.extend({ this.filterDiv = $("
"); - this.filterDiv.append("
" + this.filterDiv.append("
" + "" + "" + "" + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" ); - //Additional Hobbit Draft cultures - //var hobbitFilterDiv = $("
"); - this.filterDiv.append("
" + + this.filterDiv.append("
" + + "" + ); + + this.filterDiv.append("
" + + "" + ); + + this.filterDiv.append("
" + + "" + ); + + this.filterDiv.append("
" + + "" + ); + + this.filterDiv.append("
" + + "" + + "" + ); + + this.filterDiv.append("
" + + "" + ); + + this.filterDiv.append("
" + + "" + + "" + ); + + this.filterDiv.append("
" + + "" + + "" + + "" + ); + + this.filterDiv.append("
" + "" + "" + "" @@ -542,11 +565,6 @@ var CardFilter = Class.extend({ ", #MEN, #ORC, #URUK_HAI, #WRAITH" + ", #ESGAROTH, #GUNDABAD, #MIRKWOOD, #SMAUG, #SPIDER, #TROLL").change(() => this.setFilterChanged(that)); - // $("#labelDWARVEN, #labelELVEN, #labelGANDALF, #labelGONDOR, #labelROHAN, #labelSHIRE" + - // ", #labelGOLLUM, #labelDUNLAND, #labelISENGARD, #labelMORIA, #labelRAIDER, #labelSAURON" + - // ", #labelMEN, #labelORC, #labelURUK_HAI, #labelWRAITH" + - // ", #labelESGAROTH, #labelGUNDABAD, #labelMIRKWOOD, #labelSMAUG, #labelSPIDER, #labelTROLL").click(setFilterChanged); - this.collectionDiv = $("
"); //collection-display pageElem.append(this.collectionDiv); @@ -565,18 +583,73 @@ var CardFilter = Class.extend({ this[id + "ValueInput"] = $(""); }, + movieBlocks: ["ttt_block", "king_block"], + expandedBlocks: ["war_block", "hunter_block"], + hobbitBlocks: ["hobbit"], + setFilterChanged: function(that) { - if (that.blocks.find((x) => x.filter == "hobbit")) { - $("#culture2").show(); - } else { + + //Show/hide Rohan + if (that.blocks.find((x) => that.movieBlocks.includes(x.filter) + || that.expandedBlocks.includes(x.filter))) { + $("#culture_freeps_movie1").show(); + } + else { + $("#labelROHAN-movie").removeClass("ui-state-active"); + $("#culture_freeps_movie1").hide(); + } + + //Show/hide Gollum + if (that.blocks.find((x) => that.movieBlocks.includes(x.filter) + || that.expandedBlocks.includes(x.filter) + || that.hobbitBlocks.includes(x.filter))) { + $("#culture_freeps_movie2").show(); + } + else { + $("#labelGOLLUM-movie").removeClass("ui-state-active"); + $("#culture_freeps_movie2").hide(); + } + + //Show/hide Movie-era Shadows + if (that.blocks.find((x) => that.movieBlocks.includes(x.filter))) { + $("#culture_shadow_movie1").show(); + $("#culture_shadow_movie2").show(); + } + else { + $("#labelDUNLAND-movie").removeClass("ui-state-active"); + $("#labelRAIDER-movie").removeClass("ui-state-active"); + $("#culture_shadow_movie1").hide(); + $("#culture_shadow_movie2").hide(); + } + + //Show/hide Expanded-era Shadows + if (that.blocks.find((x) => that.expandedBlocks.includes(x.filter))) { + $("#culture_shadows").show(); + } + else { + $("#labelMEN-movie").removeClass("ui-state-active"); + $("#labelORC-movie").removeClass("ui-state-active"); + $("#labelURUK_HAI-movie").removeClass("ui-state-active"); + $("#culture_shadows").hide(); + } + + + //Show/hide Hobbit-only cultures + + if (that.blocks.find((x) => that.hobbitBlocks.includes(x.filter))) { + $("#culture_hobbit").show(); + } + else { $("#labelESGAROTH").removeClass("ui-state-active"); $("#labelGUNDABAD").removeClass("ui-state-active"); $("#labelMIRKWOOD").removeClass("ui-state-active"); $("#labelSMAUG").removeClass("ui-state-active"); $("#labelSPIDER").removeClass("ui-state-active"); $("#labelTROLL").removeClass("ui-state-active"); - $("#culture2").hide(); + $("#culture_hobbit").hide(); } + + return that.fullFilterChanged(); }, @@ -743,78 +816,6 @@ var CardFilter = Class.extend({ }); this.blockSelect.change(); - - // setSelect = $("" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // + "" - // //+ "" - // + "" - // + "" - // + "" - - // + ""); }, layoutUi: function (x, y, width, height) { diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/src/DeckBuilder/deckBuilder.js b/gemp-lotr/gemp-lotr-async/src/main/web/src/DeckBuilder/deckBuilder.js index b94640088..cc3722c39 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/src/DeckBuilder/deckBuilder.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/src/DeckBuilder/deckBuilder.js @@ -7,7 +7,7 @@ $(document).ready( onresize:function () { ui.layoutUI(true); }, - east__minSize:400, + east__minSize:410, east__maxSize:"50%" });