commit | 25fa1dcd8c341822de7fd9ee838f08acbd523691 | [log] [tgz] |
---|---|---|
author | Steven Burrows <sburrows@villa-technologies.com> | Mon Apr 17 18:29:22 2017 -0400 |
committer | Steven Burrows <sburrows@villa-technologies.com> | Mon Apr 17 18:29:22 2017 -0400 |
tree | 2c35e6f9ba7e85ffac78fd43dc0070f878fd5ed6 | |
parent | c5a088cc270d560cfa349907e7010bc7a6f8f66c [diff] |
Topo2: Improved extensibility of Collections Change-Id: I07f48e8d4bb74e4ebee78690ac2b102609c4f16d
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Collection.js b/web/gui/src/main/webapp/app/view/topo2/topo2Collection.js index 369da23..c3662e6 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2Collection.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2Collection.js
@@ -31,6 +31,8 @@ this.models = []; this._reset(); + this.initialize.apply(this, arguments); + if (opts.comparator) { this.comparator = opts.comparator; } @@ -42,6 +44,7 @@ Collection.prototype = { model: Model, + initialize: function () {}, addModel: function (data) { if (Object.getPrototypeOf(data) !== Object.prototype) { this.models.push(data);