I updated today my code to 2.0.10 and now i am getting this error:
Uncaught SyntaxError: missing ) after argument list
at Template7Class.compile (framework7.js:574)
at Function.Template7.compile (framework7.js:623)
at new t (framework7.js:12748)
at Object.create (framework7.js:10218)
at Object.success (:199:50)
at r (framework7.js:3512)
at XMLHttpRequest.Request.f.onload (framework7.js:3680)
I have figured out what is cousing this error its my virtuallist code:
self.virtualList = self.$app.virtualList.create({
el: self.$el.find('.virtual-list'),
items: self.items,
setListHeight: false,
searchAll: function (query, items) {
var found = [];
for (var i = 0; i < items.length; i++) {
if (items[i].title.toLowerCase().indexOf(query.toLowerCase()) >= 0 || items[i].text.toLowerCase().indexOf(query.toLowerCase()) >= 0 || query.trim() === '') found.push(i);
}
return found;
},
itemTemplate: '<div data-id="{{id}}">' +
'{{#if this_week}}<div class="block-title"><h1>Diese Woche</h1></div>{{/if}}' +
'{{#if last_week}}<div class="block-title"><h1>Letzte Woche</h1></div>{{/if}}' +
'{{#if old}}<div class="block-title"><h1>Ältere</h1></div>{{/if}}' +
'{{#if day}}<div class="block-title">{{date timestamp}}</div>{{/if}}' +
'<div class="card {{#if pictures}}has-background{{/if}}" {{#if pictures}}style="background-image:url({{pictures.0.url}})"{{/if}} >' +
'<div class="card-header">' +
'<div class="user-avatar">' +
'<img src="{{user.picture}}" width="22" height="22"/>' +
'</div>' +
'<div class="user-name">{{user.first_name}}</div>' +
'<div class="post-date">{{time_ago timestamp}}</div>' +
'</div>' +
'<div class="card-content">' +
'<div class="card-content-inner">' +
'<h1>{{title}}</h1>' +
'<p class="description">{{text}}</p>' +
'</div>' +
'</div>' +
'<div class="card-footer">' +
'<div>{{#if distance}}<i class="fa fa-map-marker-alt "></i> {{format distance decimal="2"}} km{{/if}}</div>' +
'<div class="revenue">{{display_amount amount}}</div>' +
'</div>' +
'</div>' +
'</div>',
height: function (item) {
var height = 234
if (item.this_week || item.last_week || item.old) {
height = height + 73
if(item.day) {
height = height + 14
}
return height;
}
if(item.day) {
height = height + 49
}
return height;
}
});