Commit b56891b4a69560b5aa53d687c7f38d6b61a340ae
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/editor.js
(1 / 1)
  | |||
91 | 91 | ||
92 | 92 | var Pages = Backbone.Collection.extend({ | |
93 | 93 | model: M.types.model.Page, | |
94 | url: '/page' | ||
94 | url: M.PageURL() | ||
95 | 95 | }); | |
96 | 96 | ||
97 | 97 | /* view to manage each page and their properties - change page properties, |
mouchak/static/js/models.js
(1 / 1)
  | |||
117 | 117 | customMenu: false | |
118 | 118 | }, | |
119 | 119 | url: function() { | |
120 | return '/menu/' + this.id; | ||
120 | return M.MenuURL() + this.id; | ||
121 | 121 | }, | |
122 | 122 | initialize: function() { | |
123 | 123 | this.id = this.get('id'); |
mouchak/templates/index.html
(2 / 0)
  | |||
34 | 34 | <script> | |
35 | 35 | //Code to initialize the framework | |
36 | 36 | window.M = window.M || {}; | |
37 | M.MenuURL = function() { return "{{ url_for('insertPage') }}"}; | ||
38 | M.PageURL = function() { return "{{ url_for('updateMenu') }}"; }; | ||
37 | 39 | M.site_content = {{ content|tojson|safe }}; | |
38 | 40 | window.onload = function() { | |
39 | 41 | M.init(); |