Commits

Isaac Bythewood committed 6539b41 Merge

Merged in rocco_storm/pinry (pull request #1)

show edit buttons only on mouse over (new)

Comments (0)

Files changed (1)

pinry/static/js/pinry.js

         // Delete pin if trash icon clicked
         $('.icon-trash').each(function() {
             var thisPin = $(this);
+            $(this).off('click');
             $(this).click(function() {
                 $(this).off('click');
                 var promise = deletePinData($(this).data('id'));
             });
         });
 
+        // Show edit-buttons only on mouse over
+        $('.pin').each(function(){
+            var thisPin = $(this);
+            thisPin.find('.editable').hide();
+            thisPin.off('hover');
+            thisPin.hover(function() {
+                thisPin.find('.editable').toggle();
+            });
+        });
+
         $('.spinner').css('display', 'none');
         blockContainer.css('height', colHeights.sort().slice(-1)[0]);
     }