mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 00:55:43 +01:00
Allow pin deleting from interface
This commit is contained in:
@@ -44,6 +44,19 @@ $(window).load(function() {
|
||||
colHeights[sCol] += block.height()+(blockMargin);
|
||||
}
|
||||
|
||||
// Delete pin if trash icon clicked
|
||||
$('.icon-trash').each(function() {
|
||||
var thisPin = $(this);
|
||||
$(this).click(function() {
|
||||
$(this).off('click');
|
||||
var promise = deletePinData($(this).data('id'));
|
||||
promise.success(function() {
|
||||
thisPin.parent().parent().parent().remove();
|
||||
tileLayout();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('.spinner').css('display', 'none');
|
||||
blockContainer.css('height', colHeights.sort().slice(-1)[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user