mirror of
https://github.com/pinry/pinry.git
synced 2025-11-15 09:25:50 +01:00
Pins are now editable
This commit is contained in:
@@ -13,7 +13,7 @@ $(window).load(function() {
|
||||
* was put into a function in order to adjust frequently on screen size
|
||||
* changes.
|
||||
*/
|
||||
function tileLayout() {
|
||||
window.tileLayout = function() {
|
||||
var blockContainer = $('#pins'),
|
||||
blocks = blockContainer.children('.pin'),
|
||||
blockMargin = 15,
|
||||
@@ -48,6 +48,16 @@ $(window).load(function() {
|
||||
colHeights[sCol] += block.height()+(blockMargin);
|
||||
}
|
||||
|
||||
// Edit pin if pencil icon clicked
|
||||
$('.icon-pencil').each(function() {
|
||||
var thisPin = $(this);
|
||||
$(this).off('click');
|
||||
$(this).click(function() {
|
||||
$(this).off('click');
|
||||
pinForm($(this).data('id'));
|
||||
});
|
||||
});
|
||||
|
||||
// Delete pin if trash icon clicked
|
||||
$('.icon-trash').each(function() {
|
||||
var thisPin = $(this);
|
||||
|
||||
Reference in New Issue
Block a user