From 53bc0477f9b0217c87676103361b1633e9b12f19 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 31 Mar 2013 13:11:58 +0200 Subject: added account page --- module/web/static/js/collections/AccountList.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 module/web/static/js/collections/AccountList.js (limited to 'module/web/static/js/collections') diff --git a/module/web/static/js/collections/AccountList.js b/module/web/static/js/collections/AccountList.js new file mode 100644 index 000000000..1bcf87c1e --- /dev/null +++ b/module/web/static/js/collections/AccountList.js @@ -0,0 +1,23 @@ +define(['jquery', 'backbone', 'underscore', 'app', 'models/Account'], function($, Backbone, _, App, Account) { + + return Backbone.Collection.extend({ + + model: Account, + + comparator: function(account) { + return account.get('plugin'); + }, + + initialize: function() { + + }, + + fetch: function(options) { + // TODO: refresh options? + options = App.apiRequest('getAccounts/false', null, options); + return Backbone.Collection.prototype.fetch.call(this, options); + } + + }); + +}); \ No newline at end of file -- cgit v1.2.3