git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_2.2.3@29 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2015-02-01 22:28:34 +00:00
parent 12bfd218c2
commit 6ce1700ef4
20 changed files with 338 additions and 265 deletions
+8 -5
View File
@@ -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");