diff --git a/html/early.js b/html/early.js index e68b067..af498b1 100644 --- a/html/early.js +++ b/html/early.js @@ -660,3 +660,35 @@ if (!Object.entries) { return resArray; }; } + +const filters = {}; + +function Filter(arg) { + this.key = arg.key; + this.name = arg.name || arg.key; + + this.id = 'filters_' + this.key; + + filters[this.key] = this; + + this.init(); +} + +Filter.prototype.reset = function() { + jQuery('#' + this.id).val(""); + jQuery('#' + this.id).blur(); + this.update(); +} + +Filter.prototype.init = function() { + jQuery(this.container).append(( + '