Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21FCEF01E for ; Thu, 28 Mar 2013 22:44:44 +0000 (UTC) Received: (qmail 3319 invoked by uid 500); 28 Mar 2013 22:44:43 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 3185 invoked by uid 500); 28 Mar 2013 22:44:43 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 2866 invoked by uid 99); 28 Mar 2013 22:44:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2013 22:44:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7AEE78336AB; Thu, 28 Mar 2013 22:44:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: metson@apache.org To: commits@couchdb.apache.org Date: Thu, 28 Mar 2013 22:44:49 -0000 Message-Id: <09e949f3d16e4194b25c7e8aa4f61288@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/10] git commit: updated refs/heads/1720-move-to-backbone-1.0 to 5fcc173 footer as view Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fe44c6ef Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fe44c6ef Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fe44c6ef Branch: refs/heads/1720-move-to-backbone-1.0 Commit: fe44c6ef56c928725896182fa813c3b44ae8a54f Parents: c6b0e8d Author: Simon Metson Authored: Thu Mar 28 08:52:34 2013 +0000 Committer: Simon Metson Committed: Thu Mar 28 12:23:11 2013 +0000 ---------------------------------------------------------------------- src/fauxton/app/app.js | 3 ++- src/fauxton/app/modules/fauxton/base.js | 9 +++++++++ src/fauxton/app/router.js | 4 ++++ src/fauxton/app/templates/fauxton/footer.html | 1 + src/fauxton/assets/index.underscore | 4 +--- 5 files changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe44c6ef/src/fauxton/app/app.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/app.js b/src/fauxton/app/app.js index 5046096..e754c5f 100644 --- a/src/fauxton/app/app.js +++ b/src/fauxton/app/app.js @@ -23,7 +23,8 @@ function($, _, Backbone, Helpers) { // creation. var app = { // The root path to run the application. - root: "/" + root: "/", + version: "0.0.1" }; // Localize or create a new JavaScript Template object. http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe44c6ef/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 a8bf430..0297dac 100644 --- a/src/fauxton/app/modules/fauxton/base.js +++ b/src/fauxton/app/modules/fauxton/base.js @@ -36,6 +36,15 @@ function(app, Backbone) { } }); + Fauxton.Footer = Backbone.View.extend({ + template: "templates/fauxton/footer", + serialize: function() { + return { + version: app.version + }; + } + }); + Fauxton.NavBar = Backbone.View.extend({ template: "templates/fauxton/nav_bar", // TODO: can we generate this list from the router? http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe44c6ef/src/fauxton/app/router.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/router.js b/src/fauxton/app/router.js index 2e994e5..77cc36b 100644 --- a/src/fauxton/app/router.js +++ b/src/fauxton/app/router.js @@ -140,10 +140,12 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents }, initialize: function() { + //TODO: It would be nice to handle this with a router this.navBar = app.navBar = new Fauxton.NavBar(); this.apiBar = app.apiBar = new Fauxton.ApiBar(); app.masterLayout = this.masterLayout = new Layout(this.navBar, this.apiBar); + app.footer = new Fauxton.Footer({el: "#footer-content"}); // NOTE: This must be below creation of the layout // FauxtonAPI header links and others depend on existence of the layout @@ -152,6 +154,8 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents $("#app-container").html(this.masterLayout.el); this.masterLayout.render(); + + app.footer.render(); } }); http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe44c6ef/src/fauxton/app/templates/fauxton/footer.html ---------------------------------------------------------------------- diff --git a/src/fauxton/app/templates/fauxton/footer.html b/src/fauxton/app/templates/fauxton/footer.html new file mode 100644 index 0000000..6af1bcf --- /dev/null +++ b/src/fauxton/app/templates/fauxton/footer.html @@ -0,0 +1 @@ +

Fauxton <%=version%> on Apache CouchDB

\ No newline at end of file http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe44c6ef/src/fauxton/assets/index.underscore ---------------------------------------------------------------------- diff --git a/src/fauxton/assets/index.underscore b/src/fauxton/assets/index.underscore index 8a62006..2b5c009 100644 --- a/src/fauxton/assets/index.underscore +++ b/src/fauxton/assets/index.underscore @@ -43,9 +43,7 @@