You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/07/02 16:52:03 UTC
[1/2] git commit: updated refs/heads/master to c86d73f
Updated Branches:
refs/heads/master 2f5ae0513 -> c86d73f03
Fauxton: watch assets path
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5f86eca6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5f86eca6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5f86eca6
Branch: refs/heads/master
Commit: 5f86eca6fe514c4ce31b68269c729e15f6820440
Parents: 2f5ae05
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 2 09:30:02 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 2 09:30:02 2013 +0200
----------------------------------------------------------------------
src/fauxton/Gruntfile.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5f86eca6/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 700246f..7c9d4ec 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -206,7 +206,7 @@ module.exports = function(grunt) {
},
watch: {
- files: helper.watchFiles(["./app/**/*"]),
+ files: helper.watchFiles(["./app/**/*", "./assets/**/*"]),
tasks: ['debug', 'template']
},
[2/2] git commit: updated refs/heads/master to c86d73f
Posted by ga...@apache.org.
Fauxton: remove route events from main.js
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c86d73f0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c86d73f0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c86d73f0
Branch: refs/heads/master
Commit: c86d73f03a640b50efe46da79baeba482db12b08
Parents: 5f86eca
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 2 09:38:39 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 2 09:38:39 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/main.js | 33 ++++++++++++---------------------
1 file changed, 12 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/c86d73f0/src/fauxton/app/main.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/main.js b/src/fauxton/app/main.js
index 203b295..2f8f8fa 100644
--- a/src/fauxton/app/main.js
+++ b/src/fauxton/app/main.js
@@ -1,9 +1,9 @@
require([
- // Application.
- "app",
+ // Application.
+ "app",
- // Main Router.
- "router"
+ // Main Router.
+ "router"
],
function(app, Router) {
@@ -23,25 +23,16 @@ function(app, Router) {
// Get the absolute root.
var root = location.protocol + "//" + location.host + app.root;
- var routeEvent = $(this).attr("route-event");
- if (routeEvent) {
+ // Ensure the root is part of the anchor href, meaning it's relative.
+ if (href.prop && href.prop.slice(0, root.length) === root) {
+ // Stop the default event to ensure the link will not cause a page
+ // refresh.
evt.preventDefault();
- // TODO:: change to false when route events are functional
- Backbone.history.navigate(href.attr, true);
- // Trigger route events after update of history so that we can get params from url
- app.router.triggerRouteEvent("route:"+routeEvent, href);
- } else {
- // Ensure the root is part of the anchor href, meaning it's relative.
- if (href.prop && href.prop.slice(0, root.length) === root) {
- // Stop the default event to ensure the link will not cause a page
- // refresh.
- evt.preventDefault();
- // `Backbone.history.navigate` is sufficient for all Routers and will
- // trigger the correct events. The Router's internal `navigate` method
- // calls this anyways. The fragment is sliced from the root.
- Backbone.history.navigate(href.attr, true);
- }
+ // `Backbone.history.navigate` is sufficient for all Routers and will
+ // trigger the correct events. The Router's internal `navigate` method
+ // calls this anyways. The fragment is sliced from the root.
+ Backbone.history.navigate(href.attr, true);
}
});
});