Pins are now editable

This commit is contained in:
Isaac Bythewood
2013-03-12 06:12:09 +00:00
parent bcf480e639
commit 28c791fd1e
2 changed files with 77 additions and 24 deletions

View File

@@ -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);