Skip to content

Commit

Permalink
missing root propert
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Jun 23, 2012
1 parent 01c2a97 commit f92b93d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/app.js
Expand Up @@ -12,7 +12,10 @@ function($, _, Backbone) {

// Provide a global location to place configuration settings and module
// creation.
var app = {};
var app = {
// The root path to run the application through.
root: "/"
};

// Localize or create a new JavaScript Template object.
var JST = window.JST = window.JST || {};
Expand Down Expand Up @@ -51,6 +54,7 @@ function($, _, Backbone) {
return this.layout;
}

// If a layout already exists, remove it from the DOM.
if (this.layout) {
this.layout.remove();
}
Expand Down
3 changes: 3 additions & 0 deletions app/main.js
Expand Up @@ -25,6 +25,9 @@ function(app, Router) {
// Get the absolute root.
var root = location.protocol + "//" + location.host + app.root;

console.log(href);
console.log(root);

// Ensure the protocol is not part of URL, meaning it's relative.
if (href && href.indexOf(root) ) {
// Stop the default event to ensure the link will not cause a page
Expand Down

0 comments on commit f92b93d

Please sign in to comment.