aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js44
1 files changed, 21 insertions, 23 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 0bc4261f5..4c8cd0adf 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1149,30 +1149,28 @@ function justifyPhotosAjax(id) {
function dolike(ident, verb) {
$('#like-rotator-' + ident.toString()).show();
- if(! localUser) {
- $.get('like/' + ident.toString() + '?verb=' + verb, updateInit);
- }
- else {
- $.get('like/' + ident.toString() + '?verb=' + verb, function (data) {
- data = JSON.parse(data);
- if(data.success) {
- // this is a bit tricky since the top level thread wrapper wraps the whole thread
- if($('#thread-wrapper-' + data.orig_id).hasClass('toplevel_item')) {
- var wrapper = $('<div></div>').html( data.html ).find('#wall-item-outside-wrapper-' + data.id);
- $('#wall-item-outside-wrapper-' + data.orig_id).html(wrapper[0].innerHTML);
- // those were not replaced - swap the id
- $('#thread-wrapper-' + data.orig_id).attr('id', 'thread-wrapper-' + data.id);
- $('#wall-item-outside-wrapper-' + data.orig_id).attr('id', 'wall-item-outside-wrapper-' + data.id);
- }
- else {
- $('#thread-wrapper-' + data.orig_id).replaceWith(data.html);
- }
- $('#wall-item-ago-' + data.id + ' .autotime').timeago();
- collapseHeight();
- liking = 0;
+ if(typeof conv_mode == typeof undefined)
+ conv_mode = '';
+
+ $.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode, function (data) {
+ data = JSON.parse(data);
+ if(data.success) {
+ // this is a bit tricky since the top level thread wrapper wraps the whole thread
+ if($('#thread-wrapper-' + data.orig_id).hasClass('toplevel_item')) {
+ var wrapper = $('<div></div>').html( data.html ).find('#wall-item-outside-wrapper-' + data.id);
+ $('#wall-item-outside-wrapper-' + data.orig_id).html(wrapper[0].innerHTML);
+ // those were not replaced - swap the id
+ $('#thread-wrapper-' + data.orig_id).attr('id', 'thread-wrapper-' + data.id);
+ $('#wall-item-outside-wrapper-' + data.orig_id).attr('id', 'wall-item-outside-wrapper-' + data.id);
}
- });
- }
+ else {
+ $('#thread-wrapper-' + data.orig_id).replaceWith(data.html);
+ }
+ $('#wall-item-ago-' + data.id + ' .autotime').timeago();
+ collapseHeight();
+ liking = 0;
+ }
+ });
liking = 1;
}