diff options
author | suelockwood <deathbear@apache.org> | 2013-12-05 15:46:28 -0500 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2013-12-10 17:42:58 +0200 |
commit | 6f5580a6811ee07bcb80124956c720a4bc735c4d (patch) | |
tree | e143c232bad16f99eab12aee50d3c55069e803ce /src | |
parent | 204551c220f7bfecd8a7c000ef22cfd94e4fe46b (diff) | |
download | couchdb-6f5580a6811ee07bcb80124956c720a4bc735c4d.tar.gz |
extensions added for sidebar
Diffstat (limited to 'src')
-rw-r--r-- | src/fauxton/app/modules/documents/views.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js index 64e304cdf..b621e5098 100644 --- a/src/fauxton/app/modules/documents/views.js +++ b/src/fauxton/app/modules/documents/views.js @@ -1637,7 +1637,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum }, serialize: function() { - var docLinks = FauxtonAPI.getExtensions('docLinks'); + var docLinks = FauxtonAPI.getExtensions('docLinks'), + addLinks = FauxtonAPI.getExtensions('sidebar:links'), + extensionList = FauxtonAPI.getExtensions('sidebar:list'); return { changes_url: '#' + this.database.url('changes'), permissions_url: '#' + this.database.url('app') + '/permissions', @@ -1646,7 +1648,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum database_url: '#' + this.database.url('app'), docLinks: docLinks, showNewView: this.showNewView, - docLimit: Databases.DocLimit + docLimit: Databases.DocLimit, + addLinks: addLinks, + extensionList: extensionList > 0 }; }, @@ -1663,6 +1667,15 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum }, beforeRender: function(manage) { + + var sidebarListViews = FauxtonAPI.getExtensions('sidebar:list'); + _.each(sidebarListViews, function (view) { + var extension = this.insertView('#extension-navs', view); + extension.update(this.database, this.collection, this.viewName); + extension.render(); + }, this); + + this.collection.each(function(design) { if (design.has('doc')){ var ddoc = design.id.split('/')[1]; |