From b56891b4a69560b5aa53d687c7f38d6b61a340ae Mon Sep 17 00:00:00 2001 From: Anon Ray Date: Fri, 6 Sep 2013 23:50:06 +0530 Subject: [PATCH] Add JS config for model URLs --- mouchak/static/js/editor.js | 2 +- mouchak/static/js/models.js | 2 +- mouchak/templates/index.html | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mouchak/static/js/editor.js b/mouchak/static/js/editor.js index abf22e9..c17b685 100644 --- a/mouchak/static/js/editor.js +++ b/mouchak/static/js/editor.js @@ -91,7 +91,7 @@ var Pages = Backbone.Collection.extend({ model: M.types.model.Page, - url: '/page' + url: M.PageURL() }); /* view to manage each page and their properties - change page properties, diff --git a/mouchak/static/js/models.js b/mouchak/static/js/models.js index 9573732..8b81422 100644 --- a/mouchak/static/js/models.js +++ b/mouchak/static/js/models.js @@ -117,7 +117,7 @@ customMenu: false }, url: function() { - return '/menu/' + this.id; + return M.MenuURL() + this.id; }, initialize: function() { this.id = this.get('id'); diff --git a/mouchak/templates/index.html b/mouchak/templates/index.html index 7903c11..8d8f116 100644 --- a/mouchak/templates/index.html +++ b/mouchak/templates/index.html @@ -34,6 +34,8 @@