aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-12-04 11:53:37 +0100
committerMax Kostikov <max@kostikov.co>2019-12-04 11:53:37 +0100
commit4038b78377ed9a66eb100cefd9e9df759af17a24 (patch)
treed8dbe176255d0746363d12e91d4bde69cd8d9474
parentd439dee7367e2decd73fafa81fab5d670bc1efe6 (diff)
parentdce8516da45036e6216d1303c7476bcd0b838787 (diff)
downloadvolse-hubzilla-4038b78377ed9a66eb100cefd9e9df759af17a24.tar.gz
volse-hubzilla-4038b78377ed9a66eb100cefd9e9df759af17a24.tar.bz2
volse-hubzilla-4038b78377ed9a66eb100cefd9e9df759af17a24.zip
Merge branch 'dev' into 'dev'
More pinned items frontend processing fixes See merge request hubzilla/core!1797
-rw-r--r--view/js/main.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js
index f45a06b24..b14befffa 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1128,15 +1128,17 @@ function dopin(id) {
.done(function() {
var i = $('#wall-item-pinned-' + id);
var me = $('#item-pinnable-' + id);
- if($('.pinned-item').length) {
+ var pin = $('#pinned-wrapper-' + id);
+ if(pin.length) {
$('html, body').animate({ scrollTop: $('#region_2').offset().top }, 'slow', function() {
- $('.pinned-item').fadeTo('fast', 0.33, function() { this.remove(); });
+ pin.fadeTo('fast', 0.33, function() { this.remove(); });
});
};
- $('.wall-item-pinned').remove();
+ pin.remove();
$('.dropdown-item-pinnable').html($('.dropdown-item-pinnable').html().replace(aStr['unpin_item'],aStr['pin_item']));
+ $('.wall-item-pinned').remove()
if(i.length == 0) {
- $('<span class="float-right wall-item-pinned" title="' + aStr['pinned'] + '" id="wall-item-pinned-' + id + '"><i class="fa fa-thumb-tack">&nbsp;</i></span>')
+ $('<span class="float-right wall-item-pinned" title="' + aStr['pinned'] + '" id="wall-item-pinned-' + id + '"><i class="fa fa-thumb-tack">&nbsp;</i></span>').insertBefore('#wall-item-info-' + id);
me.html(me.html().replace(aStr['pin_item'],aStr['unpin_item']));
};
})