working changing password for admins
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/628a1b5c Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/628a1b5c Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/628a1b5c Branch: refs/heads/route-events Commit: 628a1b5cf6df7cc6993de6dbdf2f081e75e1c352 Parents: ce2f879 Author: Garren Smith <[email protected]> Authored: Tue Apr 2 16:43:41 2013 +0200 Committer: Garren Smith <[email protected]> Committed: Tue Apr 2 16:43:41 2013 +0200 ---------------------------------------------------------------------- src/fauxton/app/modules/fauxton/base.js | 23 ++++++++++++------ src/fauxton/app/templates/fauxton/nav_bar.html | 20 +-------------- 2 files changed, 17 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/628a1b5c/src/fauxton/app/modules/fauxton/base.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/fauxton/base.js b/src/fauxton/app/modules/fauxton/base.js index e01c344..91ea581 100644 --- a/src/fauxton/app/modules/fauxton/base.js +++ b/src/fauxton/app/modules/fauxton/base.js @@ -11,10 +11,10 @@ // the License. define([ - "app", + "app", - // Libs - "backbone" + // Libs + "backbone" ], @@ -62,14 +62,21 @@ function(app, Backbone) { this.render(); }, - afterRender: function () { + beforeRender: function () { + this.addLinkViews(); + }, + + addLinkViews: function () { + var self = this; + _.each(this.navLinks, function (link) { - if (link.view) { - this.insertView('#nav-links', link.view).render(); - } + if (!link.view) { return; } + var establish = link.establish || []; + $.when.apply(null, establish).done( function () { + self.insertView('#nav-links', link.view).render(); + }); }, this); - } // TODO: ADD ACTIVE CLASS http://git-wip-us.apache.org/repos/asf/couchdb/blob/628a1b5c/src/fauxton/app/templates/fauxton/nav_bar.html ---------------------------------------------------------------------- diff --git a/src/fauxton/app/templates/fauxton/nav_bar.html b/src/fauxton/app/templates/fauxton/nav_bar.html index 5282e68..ebe57d0 100644 --- a/src/fauxton/app/templates/fauxton/nav_bar.html +++ b/src/fauxton/app/templates/fauxton/nav_bar.html @@ -24,26 +24,10 @@ the License. <div class="nav-collapse"> <ul id="nav-links" class="nav pull-right"> <% _.each(navLinks, function(link) { %> - <% if (!link.view) { %> - <li><a href="<%= link.href %>"><%= link.title %></a></li> + <% if (!link.view) { %> + <li><a href="<%= link.href %>"><%= link.title %></a></li> <% } %> <% }); %> - <!-- TODO: pick this up from code - nested dicts in the above --> - - <!-- <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">drsm79 <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="account.html#account">Account Info</a></li> - <li><a href="account.html#password">Password</a></li> - <li><a href="account.html#indexing-rate">Indexing rate</a></li> - <li><a href="account.html#support-level">Support level</a></li> - <li><a href="account.html#location">Location for your data</a></li> - <li><a href="account.html#email-notifications">Email notifications</a></li> - <li><a href="account.html#design">Design</a></li> - <li class="divider"></li> - <li><a href="/sign-out.html">Sign Out</a></li> - </ul> - </li> --> </ul> </div><!--/.nav-collapse --> </div>
