Removed console.log + added auto-update
Cette révision appartient à :
Parent
402fce9f02
révision
29056496d0
4 fichiers modifiés avec 2 ajouts et 4 suppressions
|
@ -6,7 +6,6 @@ var Query = {
|
|||
xhr.responseType = 'json';
|
||||
xhr.onload = function(e) {
|
||||
if (this.status == 200) {
|
||||
console.log("Getting results...")
|
||||
renderer(this.response);
|
||||
callback(this.response)
|
||||
}
|
||||
|
|
|
@ -5,12 +5,10 @@ var Templates = {
|
|||
this.tmpl[templateName] = template
|
||||
},
|
||||
Render: function(templateName, model) {
|
||||
console.log(model)
|
||||
return this.tmpl[templateName](model)
|
||||
},
|
||||
ApplyItemListRenderer: function(params) {
|
||||
return function(models) {
|
||||
console.log("Parsing results...")
|
||||
for (var i=0; i < models.length; i++) {
|
||||
var object = Templates.Render(params.templateName, models[i]);
|
||||
if (params.method == "append") {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var Torrents = {
|
||||
CanRefresh: false,
|
||||
timeout: undefined,
|
||||
Seconds: 3,
|
||||
Seconds: 300,
|
||||
SearchURL: "/api/search",
|
||||
Method: "prepend",
|
||||
LastID: 0,
|
||||
|
|
|
@ -120,5 +120,6 @@ Your browser does not support the audio element.
|
|||
"</tr>";
|
||||
});
|
||||
Torrents.LastID = {{ lastID .URL .Models }};
|
||||
if (Torrents.LastID > 0) Torrents.StartRefresh()
|
||||
</script>
|
||||
{{end}}
|
Référencer dans un nouveau ticket