git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_2.2.3@29 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -6,7 +6,7 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewT
|
||||
categoryName: null,
|
||||
//initialize template
|
||||
template: _.template(categoryViewTemplate),
|
||||
itemtemplate: _.template(categoryItemTemplate),
|
||||
itemtemplate: _.template(categoryItemTemplate, {variable: 'item'}),
|
||||
initialize: function (options) {
|
||||
var self = this;
|
||||
CategoryView.__super__.initialize.call(this);
|
||||
@@ -16,15 +16,18 @@ define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewT
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
self.renderItem();
|
||||
}
|
||||
//success: function(){ self.renderItem(); }
|
||||
});
|
||||
},
|
||||
renderItem: function () {
|
||||
var $ul = $('#allRicette');
|
||||
var self = this;
|
||||
var html = "";
|
||||
_.each(this.collection.toJSON(), function(d) {
|
||||
html += self.itemtemplate(d);
|
||||
});
|
||||
//var items = this.itemtemplate({data: this.collection.toJSON()});
|
||||
|
||||
var items = this.itemtemplate({data: this.collection.toJSON()});
|
||||
|
||||
$ul.html(items);
|
||||
$ul.html(html);
|
||||
$ul.listview("refresh");
|
||||
$ul.trigger("updatelayout");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user