diff options
author | Russell Branca <chewbranca@gmail.com> | 2012-12-17 17:03:05 -0800 |
---|---|---|
committer | Russell Branca <chewbranca@gmail.com> | 2012-12-18 10:03:41 -0800 |
commit | b62b5d7dc5f1294d5c65d3bb9e0162cf11b74882 (patch) | |
tree | 72aff61faaf61c85603675d4eccfb85aaebf9e8b /src/fauxton/app/addons/logs | |
parent | 4a85f0d319a29c84014f35e10ac7f4d600f6a331 (diff) | |
download | couchdb-b62b5d7dc5f1294d5c65d3bb9e0162cf11b74882.tar.gz |
Mostly working _config and _logs
Diffstat (limited to 'src/fauxton/app/addons/logs')
-rw-r--r-- | src/fauxton/app/addons/logs/resources.js | 18 | ||||
-rw-r--r-- | src/fauxton/app/addons/logs/routes.js | 8 | ||||
-rw-r--r-- | src/fauxton/app/addons/logs/views.js | 20 |
3 files changed, 14 insertions, 32 deletions
diff --git a/src/fauxton/app/addons/logs/resources.js b/src/fauxton/app/addons/logs/resources.js index 97fb9bc73..7fa6b42f7 100644 --- a/src/fauxton/app/addons/logs/resources.js +++ b/src/fauxton/app/addons/logs/resources.js @@ -1,17 +1,11 @@ define([ "app", - - // Libs - "backbone", - - // Modules - "modules/fauxton/base" - + "api" ], -function (app, backbone, Fauxton) { +function (app, FauxtonAPI) { - var Log = app.module(); + var Log = FauxtonAPI.addon(); Log.Model = Backbone.Model.extend({ }); @@ -58,7 +52,7 @@ function (app, backbone, Fauxton) { Log.events = {}; _.extend(Log.events, Backbone.Events); - Log.View = Backbone.View.extend({ + Log.View = FauxtonAPI.View.extend({ template: "templates/log/dashboard", initialize: function (options) { @@ -140,7 +134,7 @@ function (app, backbone, Fauxton) { } }); - Log.FilterView = Backbone.View.extend({ + Log.FilterView = FauxtonAPI.View.extend({ template: "templates/log/sidebar", events: { @@ -163,7 +157,7 @@ function (app, backbone, Fauxton) { }); - Log.FilterItemView = Backbone.View.extend({ + Log.FilterItemView = FauxtonAPI.View.extend({ template: "templates/log/filterItem", tagName: "li", diff --git a/src/fauxton/app/addons/logs/routes.js b/src/fauxton/app/addons/logs/routes.js index 2298c74df..77f870ade 100644 --- a/src/fauxton/app/addons/logs/routes.js +++ b/src/fauxton/app/addons/logs/routes.js @@ -12,7 +12,6 @@ function(app, FauxtonAPI, Log) { Log.Routes = { "_log": function() { var logs = new Log.Collection(); - var deferred = FauxtonAPI.Deferred(); return { layout: "one_pane", @@ -26,10 +25,7 @@ function(app, FauxtonAPI, Log) { }, apiUrl: logs.url(), establish: function() { - logs.fetch().done(function(resp) { - deferred.resolve(); - }); - return [deferred]; + return [logs.fetch()]; } }; } @@ -37,4 +33,4 @@ function(app, FauxtonAPI, Log) { return Log; -});
\ No newline at end of file +}); diff --git a/src/fauxton/app/addons/logs/views.js b/src/fauxton/app/addons/logs/views.js index 4e1adc540..9a74f863a 100644 --- a/src/fauxton/app/addons/logs/views.js +++ b/src/fauxton/app/addons/logs/views.js @@ -1,20 +1,12 @@ define([ "app", - - // Libs - "backbone", - "codemirror", - "jshint", - - // Plugins - "plugins/codemirror-javascript", - "plugins/prettify" + "api" ], -function(app, Backbone, Codemirror, JSHint) { +function(app, FauxtonAPI) { var Views = {}; - Views.View = Backbone.View.extend({ + Views.View = FauxtonAPI.View.extend({ template: "log/dashboard", initialize: function (options) { @@ -96,7 +88,7 @@ function(app, Backbone, Codemirror, JSHint) { } }); - Views.FilterView = Backbone.View.extend({ + Views.FilterView = FauxtonAPI.View.extend({ template: "log/sidebar", events: { @@ -119,7 +111,7 @@ function(app, Backbone, Codemirror, JSHint) { }); - Views.FilterItemView = Backbone.View.extend({ + Views.FilterItemView = FauxtonAPI.View.extend({ template: "log/filterItem", tagName: "li", @@ -147,4 +139,4 @@ function(app, Backbone, Codemirror, JSHint) { }); return Views; -});
\ No newline at end of file +}); |