aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index c1e7bd4ec..7ef373b66 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1096,18 +1096,21 @@ function dostar(ident) {
if(data.result == 1) {
$('#starred-' + ident).addClass('starred');
$('#starred-' + ident).removeClass('unstarred');
- $('#starred-' + ident).addClass('fa-star-full');
+ $('#starred-' + ident).addClass('fa-star');
$('#starred-' + ident).removeClass('fa-star-o');
$('#star-' + ident).addClass('hidden');
$('#unstar-' + ident).removeClass('hidden');
+ var btn_tpl = '<div class="btn-group" id="star-button-' + ident + '"><button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar(' + ident + ');"><i class="fa fa-star"></i></button></div>'
+ $('#wall-item-tools-left-' + ident).prepend(btn_tpl);
}
else {
$('#starred-' + ident).addClass('unstarred');
$('#starred-' + ident).removeClass('starred');
$('#starred-' + ident).addClass('fa-star-o');
- $('#starred-' + ident).removeClass('fa-star-full');
+ $('#starred-' + ident).removeClass('fa-star');
$('#star-' + ident).removeClass('hidden');
$('#unstar-' + ident).addClass('hidden');
+ $('#star-button-' + ident).remove();
}
$('#like-rotator-' + ident).hide();
});