Commit 40ce98990085093b03795627ad3f98b10091f41e

Fix JS config and path relate issues
  
9595 return flask.jsonify(error=res['err'], status='error')
9696
9797
98#@app.route('/menu', methods=['POST'])
99#def insertMenu():
100# newmenu = flask.request.json
101# print newmenu
102# res = siteMenu.insert(newmenu)
103# print res
104# return flask.jsonify(status='success')#, content=getContent())
105#
98@app.route('/menu', methods=['POST'])
99def insertMenu():
100 #newmenu = flask.request.json
101 #print newmenu
102 #res = siteMenu.insert(newmenu)
103 #print res
104 #return flask.jsonify(status='success')#, content=getContent())
105 return '200 OK'
106
106107
107108@app.route('/menu/<_id>', methods=['PUT'])
108109def updateMenu(_id):
  
9191
9292 var Pages = Backbone.Collection.extend({
9393 model: M.types.model.Page,
94 url: M.PageURL()
94 url: M.PageURL() + '/'
9595 });
9696
9797 /* view to manage each page and their properties - change page properties,
  
117117 customMenu: false
118118 },
119119 url: function() {
120 return M.MenuURL() + this.id;
120 return M.MenuURL() + '/' + this.id;
121121 },
122122 initialize: function() {
123123 this.id = this.get('id');
  
3838 <script>
3939 // initialize editor
4040 window.M = window.M || {};
41 M.MenuURL = function() { return "{{ url_for('updateMenu') }}"};
41 M.MenuURL = function() { return "{{ url_for('insertMenu') }}"};
4242 M.PageURL = function() { return "{{ url_for('insertPage') }}"};
4343 M.site_content = {{ content|tojson|safe }};
4444 window.onload = function() {
  
3434 <script>
3535 //Code to initialize the framework
3636 window.M = window.M || {};
37 M.MenuURL = function() { return "{{ url_for('updateMenu') }}"};
37 M.MenuURL = function() { return "{{ url_for('insertMenu') }}"};
3838 M.PageURL = function() { return "{{ url_for('insertPage') }}"; };
3939 M.site_content = {{ content|tojson|safe }};
4040 window.onload = function() {