aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/store
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/store')
-rw-r--r--web/src/js/store/store.js6
-rw-r--r--web/src/js/store/view.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/web/src/js/store/store.js b/web/src/js/store/store.js
index 0f94e496..30932f18 100644
--- a/web/src/js/store/store.js
+++ b/web/src/js/store/store.js
@@ -29,7 +29,7 @@ _.extend(ListStore.prototype, EventEmitter.prototype, {
reset: function (elems) {
this.list = elems || [];
this._build_map();
- this.emit("recalculate", this.list);
+ this.emit("recalculate");
},
_build_map: function () {
this._pos_map = {};
@@ -54,11 +54,11 @@ function DictStore() {
_.extend(DictStore.prototype, EventEmitter.prototype, {
update: function (dict) {
_.merge(this.dict, dict);
- this.emit("recalculate", this.dict);
+ this.emit("recalculate");
},
reset: function (dict) {
this.dict = dict || {};
- this.emit("recalculate", this.dict);
+ this.emit("recalculate");
}
});
diff --git a/web/src/js/store/view.js b/web/src/js/store/view.js
index 56bc4dbd..4dba09e9 100644
--- a/web/src/js/store/view.js
+++ b/web/src/js/store/view.js
@@ -23,7 +23,7 @@ function StoreView(store, filt, sortfun) {
this.store.addListener("remove", this.remove);
this.store.addListener("recalculate", this.recalculate);
- this.recalculate(this.store.list, filt, sortfun);
+ this.recalculate(filt, sortfun);
}
_.extend(StoreView.prototype, EventEmitter.prototype, {
@@ -33,7 +33,7 @@ _.extend(StoreView.prototype, EventEmitter.prototype, {
this.store.removeListener("remove", this.remove);
this.store.removeListener("recalculate", this.recalculate);
},
- recalculate: function (elems, filt, sortfun) {
+ recalculate: function (filt, sortfun) {
if (filt) {
this.filt = filt;
}
@@ -41,7 +41,7 @@ _.extend(StoreView.prototype, EventEmitter.prototype, {
this.sortfun = sortfun.bind(this);
}
- this.list = elems.filter(this.filt);
+ this.list = this.store.list.filter(this.filt);
this.list.sort(function (a, b) {
return this.sortfun(a) - this.sortfun(b);
}.bind(this));