From 9de1c331d3d3f082fc7c84e9c475229855087818 Mon Sep 17 00:00:00 2001 From: "marcin.sciesinski" Date: Thu, 19 Sep 2019 22:03:28 -0700 Subject: [PATCH] Placeholder for card name filter --- .../src/main/web/js/gemp-022/cardFilter.js | 116 +++++++++--------- 1 file changed, 56 insertions(+), 60 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cardFilter.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cardFilter.js index 2bd2fef5e..c487f99fc 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cardFilter.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/cardFilter.js @@ -1,29 +1,29 @@ var CardFilter = Class.extend({ - clearCollectionFunc:null, - addCardFunc:null, - finishCollectionFunc:null, - getCollectionFunc:null, + clearCollectionFunc: null, + addCardFunc: null, + finishCollectionFunc: null, + getCollectionFunc: null, - collectionType:null, + collectionType: null, - filter:null, - start:0, - count:18, + filter: null, + start: 0, + count: 18, - pageDiv:null, - fullFilterDiv:null, - filterDiv:null, + pageDiv: null, + fullFilterDiv: null, + filterDiv: null, - previousPageBut:null, - nextPageBut:null, - countSlider:null, + previousPageBut: null, + nextPageBut: null, + countSlider: null, - setSelect:null, - nameInput:null, - sortSelect:null, - raritySelect:null, + setSelect: null, + nameInput: null, + sortSelect: null, + raritySelect: null, - init:function (elem, pageElem, getCollectionFunc, clearCollectionFunc, addCardFunc, finishCollectionFunc) { + init: function (elem, pageElem, getCollectionFunc, clearCollectionFunc, addCardFunc, finishCollectionFunc) { this.getCollectionFunc = getCollectionFunc; this.clearCollectionFunc = clearCollectionFunc; this.addCardFunc = addCardFunc; @@ -34,35 +34,35 @@ var CardFilter = Class.extend({ this.buildUi(elem, pageElem); }, - enableDetailFilters:function (enable) { + enableDetailFilters: function (enable) { $("#culture1").buttonset("option", "disabled", !enable); $("#culture2").buttonset("option", "disabled", !enable); $("#cardType").prop("disabled", !enable); $("#keyword").prop("disabled", !enable); }, - setFilter:function (filter) { + setFilter: function (filter) { this.filter = filter; this.start = 0; this.getCollection(); }, - setType:function (typeValue) { + setType: function (typeValue) { $("#type").val(typeValue); }, - buildUi:function (elem, pageElem) { + buildUi: function (elem, pageElem) { var that = this; this.pageDiv = $("
"); this.previousPageBut = $("").button({ - text:false, - icons:{ - primary:"ui-icon-circle-triangle-w" + text: false, + icons: { + primary: "ui-icon-circle-triangle-w" }, - disabled:true + disabled: true }).click( function () { that.disableNavigation(); @@ -71,11 +71,11 @@ var CardFilter = Class.extend({ }); this.nextPageBut = $("").button({ - text:false, - icons:{ - primary:"ui-icon-circle-triangle-e" + text: false, + icons: { + primary: "ui-icon-circle-triangle-e" }, - disabled:true + disabled: true }).click( function () { that.disableNavigation(); @@ -84,12 +84,12 @@ var CardFilter = Class.extend({ }); this.countSlider = $("
").slider({ - value:18, - min:4, - max:40, - step:1, - disabled:true, - slide:function (event, ui) { + value: 18, + min: 4, + max: 40, + step: 1, + disabled: true, + slide: function (event, ui) { that.start = 0; that.count = ui.value; that.getCollection(); @@ -148,7 +148,7 @@ var CardFilter = Class.extend({ + "" + "" + ""); - this.nameInput = $(""); + this.nameInput = $(""); this.sortSelect = $("