whatever I made there

This commit is contained in:
Martin Zimmermann 2013-09-01 23:40:55 +02:00
parent 26c74cb521
commit 57fa577e54

View File

@ -37,7 +37,7 @@ function form(id, defaults, func) {
event.stop(); event.stop();
}); });
return rv; return rv;
}; }
function extract(form, parent) { function extract(form, parent) {
@ -53,7 +53,7 @@ function extract(form, parent) {
function edit() { function edit() {
}; }
function commit(form, parent) { function commit(form, parent) {
@ -62,7 +62,7 @@ function commit(form, parent) {
insert(JSON.parse(rv)); insert(JSON.parse(rv));
} }
}); });
}; }
var insert = function insert(post) { var insert = function insert(post) {
@ -148,10 +148,10 @@ var insert = function insert(post) {
}); });
} else { } else {
$('#issoform_' + post['id']).remove(); $('#issoform_' + post['id']).remove();
}; }
event.stop(); event.stop();
}); });
}; }
// ability to answer directly to a comment // ability to answer directly to a comment
$('footer > a:first-child', '#isso_' + post['id']).on('click', function(event) { $('footer > a:first-child', '#isso_' + post['id']).on('click', function(event) {
@ -164,10 +164,10 @@ var insert = function insert(post) {
})); }));
} else { } else {
$('#issoform_' + post['id']).remove(); $('#issoform_' + post['id']).remove();
}; }
event.stop(); event.stop();
}); });
}; }
/* /*
@ -182,7 +182,7 @@ function initialize(thread) {
html = form(null, {}, commit); html = form(null, {}, commit);
thread.append(html); thread.append(html);
}; }
function fetch(thread) { function fetch(thread) {
@ -191,12 +191,12 @@ function fetch(thread) {
if (status != 200) { if (status != 200) {
return return
}; }
rv = JSON.parse(rv); rv = JSON.parse(rv);
for (var item in rv) { for (var item in rv) {
insert(rv[item]); insert(rv[item]);
}; }
}); });
} }