Github user robertkowalski commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/33#discussion_r16429250
--- Diff: app/addons/indexes/views.js ---
@@ -34,8 +34,241 @@ function(app, FauxtonAPI, Components, Documents,
Databases, pouchdb,
var Views = {};
+
+//right header
+ Views.RightHeader = FauxtonAPI.View.extend({
+ className: "header-right",
+ template: "addons/indexes/templates/header_right",
+ initialize:function(options){
+ _.bindAll(this);
+ this.database = options.database;
+ this.title = options.title;
+ this.api = options.api;
+ this.endpoint = options.endpoint;
+ this.documentation = options.documentation;
+ this.eventer = _.extend({}, Backbone.Events);
+ FauxtonAPI.Events.on('advancedOptions:updateView', this.updateView);
+ },
+ updateApiUrl: function(api){
+ //this will update the api bar when the route changes
+ //you can find the method that updates it in components.js
Components.ApiBar()
+ this.apiBar && this.apiBar.update(api);
+ },
+ beforeRender: function(){
+
+ this.apiBar = this.insertView("#header-api-bar", new
Components.ApiBar({
+ endpoint: this.endpoint,
+ documentation: this.documentation
+ }));
+
+ this.advancedOptions = this.insertView('#query-options', new
QueryOptions.AdvancedOptions({
+ database: this.database,
+ viewName: this.viewName,
+ ddocName: this.model.id,
+ hasReduce: this.hasReduce(),
+ eventer: this.eventer,
+ showStale: true
+ }));
+ },
+ hasReduce: function(){
--- End diff --
this is called in a few places, but always returns `undefined`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---