aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-04-13 11:58:12 +0200
committerMario Vavti <mario@mariovavti.com>2018-04-13 11:58:12 +0200
commite04d3c45a4fe7e503ea727c54e4c541d40e14661 (patch)
tree5e773cdb978fe1778cb4906620f6f3a4aa2ec2cd /view/js/main.js
parent4aaea422bc78b351f055df66b1491e476bf65e12 (diff)
downloadvolse-hubzilla-e04d3c45a4fe7e503ea727c54e4c541d40e14661.tar.gz
volse-hubzilla-e04d3c45a4fe7e503ea727c54e4c541d40e14661.tar.bz2
volse-hubzilla-e04d3c45a4fe7e503ea727c54e4c541d40e14661.zip
provide visible star status for starred posts
Diffstat (limited to 'view/js/main.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 02f2f6a3d..6493d2f0f 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1075,18 +1075,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();
});