First attempt to remove JSP and move to Thymeleaf and update to Spring Boot. The Thymeleaf templates can be loaded as snippets which makes it more easy to move away from ECS and create normal HTML pages for a lesson.
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
define(['jquery',
|
||||
'underscore',
|
||||
'backbone',
|
||||
'goatApp/model/MenuModel'],
|
||||
function($,_,Backbone,MenuModel) {
|
||||
|
||||
return Backbone.Collection.extend({
|
||||
model: MenuModel,
|
||||
url:'service/lessonmenu.mvc',
|
||||
initialize: function () {
|
||||
var self = this;
|
||||
this.fetch();
|
||||
},
|
||||
|
||||
onDataLoaded: function() {
|
||||
this.trigger('menuData:loaded');
|
||||
},
|
||||
|
||||
fetch: function() {
|
||||
var self=this;
|
||||
Backbone.Collection.prototype.fetch.apply(this,arguments).then(
|
||||
function(data) {
|
||||
this.models = data;
|
||||
self.onDataLoaded();
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user