You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by me...@apache.org on 2013/03/28 13:27:46 UTC
[2/8] git commit: updated refs/heads/1720-move-to-backbone-1.0 to
1a11487
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/1a11487d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1a11487d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1a11487d
Branch: refs/heads/1720-move-to-backbone-1.0
Commit: 1a11487d5d9f26a14bc9e12044b4621a1dd04c2a
Parents: c6b0e8d
Author: Simon Metson <me...@apache.org>
Authored: Thu Mar 28 08:52:34 2013 +0000
Committer: Simon Metson <me...@apache.org>
Committed: Thu Mar 28 12:23:11 2013 +0000
----------------------------------------------------------------------
src/fauxton/app/app.js | 3 ++-
src/fauxton/app/modules/fauxton/base.js | 12 ++++++++++++
src/fauxton/app/router.js | 6 ++++++
src/fauxton/app/templates/fauxton/footer.html | 1 +
src/fauxton/assets/index.underscore | 4 +---
5 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a11487d/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/1a11487d/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..c9f6df5 100644
--- a/src/fauxton/app/modules/fauxton/base.js
+++ b/src/fauxton/app/modules/fauxton/base.js
@@ -36,6 +36,18 @@ function(app, Backbone) {
}
});
+ Fauxton.Footer = Backbone.View.extend({
+ template: "templates/fauxton/footer",
+ initialize: function() {
+ console.log("footer init");
+ },
+ 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/1a11487d/src/fauxton/app/router.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/router.js b/src/fauxton/app/router.js
index 2e994e5..92118f8 100644
--- a/src/fauxton/app/router.js
+++ b/src/fauxton/app/router.js
@@ -140,9 +140,11 @@ 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);
// NOTE: This must be below creation of the layout
@@ -152,6 +154,10 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
$("#app-container").html(this.masterLayout.el);
this.masterLayout.render();
+
+ footer = new Fauxton.Footer({el: "#footer-content"});
+ footer.render();
+ // "#": this.footer
}
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a11487d/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 @@
+<p>Fauxton <%=version%> on <a href="http://couchdb.apache.org/">Apache CouchDB</a></p>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1a11487d/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 @@
<hr>
<footer>
- <div id="footer-content" class="container">
- <p>© Project Fauxton 2012</p>
- </div>
+ <div id="footer-content" class="container"></div>
</footer>
</div>