Commit 4caaa595b4adf4b39a1157139711635c42acb223

Fix existing content not updating

  Even with previous the bug was not fixed. Hopefully fixed now.
  
109109 _.bindAll(this);
110110 _.bind(this.render, this);
111111 this.editing = false;
112 this.edit_idx = -1;
112113 $('#page').remove();
113114 $('#content-container').append(this.$el);
114115 this.template = _.template($('#page-template').html());
169169 var content = this.model.get('content')[idx];
170170 content = new M.types.model[content.type](content);
171171 this.editing = true;
172 this.edit_idx = idx;
172173 var contentview = new ContentView({model: content});
173174 contentview.render();
174175 M.editor.contentview = contentview;
183183 data: ''
184184 });
185185 this.editing = true;
186 this.edit_idx = -1;
186187 var contentview = new ContentView({model: content});
187188 contentview.render();
188189 M.editor.contentview = contentview;
195195 }
196196 //console.log('updateContent in Pageview');
197197 var content = this.model.get('content');
198 content.push(json);
198 if(this.edit_idx > -1) {
199 content[this.edit_idx] = json;
200 }
201 else {
202 content.push(json);
203 }
204
199205 this.editing = false;
206 this.edit_idx = -1;
200207 //console.log('setting content in page: ', content);
201208 this.model.set({'content': content});
202209 this.render();