aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/store/view.js
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-12-30 21:51:07 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-12-30 21:51:07 +1300
commitbc8687deb5f0f9273fc771e79b070f3b49e39fed (patch)
tree07e67eb7c9f732c0419e57b337c31d2372d12cff /web/src/js/store/view.js
parentd2c7411f065435e2b2b62a70447cb01895fe69d1 (diff)
downloadmitmproxy-bc8687deb5f0f9273fc771e79b070f3b49e39fed.tar.gz
mitmproxy-bc8687deb5f0f9273fc771e79b070f3b49e39fed.tar.bz2
mitmproxy-bc8687deb5f0f9273fc771e79b070f3b49e39fed.zip
Basic conversion: browserified web app now works.
Diffstat (limited to 'web/src/js/store/view.js')
-rw-r--r--web/src/js/store/view.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/web/src/js/store/view.js b/web/src/js/store/view.js
index 9619f994..e96d1bcc 100644
--- a/web/src/js/store/view.js
+++ b/web/src/js/store/view.js
@@ -1,3 +1,7 @@
+var _ = require("lodash");
+
+var utils = require("../utils.js");
+
function SortByStoreOrder(elem) {
return this.store.index(elem.id);
}
@@ -8,7 +12,7 @@ var default_filt = function(elem){
};
function StoreView(store, filt, sortfun) {
- EventEmitter.call(this);
+ utils.EventEmitter.call(this);
filt = filt || default_filt;
sortfun = sortfun || default_sort;
@@ -26,7 +30,7 @@ function StoreView(store, filt, sortfun) {
this.recalculate(filt, sortfun);
}
-_.extend(StoreView.prototype, EventEmitter.prototype, {
+_.extend(StoreView.prototype, utils.EventEmitter.prototype, {
close: function () {
this.store.removeListener("add", this.add);
this.store.removeListener("update", this.update);
@@ -96,4 +100,8 @@ _.extend(StoreView.prototype, EventEmitter.prototype, {
}
}
}
-}); \ No newline at end of file
+});
+
+module.exports = {
+ StoreView: StoreView
+}; \ No newline at end of file