Permalink
Browse files

Messing with relative paths (https://github.com/tbranyen/backbone-boi…

  • Loading branch information...
1 parent 63d73cf commit 9ec66a4ca377e08c1b39a306fcc7ab5178049433 @narze committed Jul 23, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −4 app/app.js
  2. +1 −1 app/main.js
  3. +1 −1 app/router.js
  4. +1 −1 app/templates/todo/item.html
View
@@ -14,7 +14,7 @@ function($, _, Backbone) {
// creation.
var app = {
// The root path to run the application.
- root: "/"
+ root: "simskoy/"
};
// Localize or create a new JavaScript Template object.
@@ -31,11 +31,11 @@ function($, _, Backbone) {
path = path + ".html";
if (!JST[path]) {
- $.ajax({ url: app.root + path, async: false }).then(function(contents) {
+ $.ajax({ url: path, async: false }).then(function(contents) {
JST[path] = _.template(contents);
});
- }
-
+ }
+
return JST[path];
}
});
View
@@ -22,7 +22,7 @@ function(app, Router) {
$(document).on("click", "a:not([data-bypass])", function(evt) {
// Get the absolute anchor href.
var href = $(this).attr("href");
-
+
// If the href exists and is a hash route, run it through Backbone.
if (href && href.indexOf("#") === 0) {
// Stop the default event to ensure the link will not cause a page
View
@@ -16,7 +16,7 @@ function(app, Todo) {
// Defining the application router, you can attach sub routers here.
var Router = Backbone.Router.extend({
routes: {
- "": "index"
+ "simskoy/": "index"
},
index: function() {
@@ -1,7 +1,7 @@
<div class="todo <%= done && "done" %>">
<div class="display">
<label class="todo-content <%= me && "align-right" %>">
- <% if(!me) { %> <img src="/assets/img/simskoy.png" /> <% } %> <%= content %>
+ <% if(!me) { %> <img src="assets/img/simskoy.png" /> <% } %> <%= content %>
</label><% if(!me) { %> <a style="font-size: 8px" target="_blank" href="<%= ggt %>">(<%= thai %>)</a> <% } %>
</div>
</div>

0 comments on commit 9ec66a4

Please sign in to comment.