@@ -190,7 +190,7 @@ textarea { | |||||
width: 240px; | width: 240px; | ||||
} | } | ||||
.pin .editable { | |||||
.pin .editor { | |||||
background: rgba(255, 255, 255, 0.4); | background: rgba(255, 255, 255, 0.4); | ||||
border: 2px solid rgba(255, 255, 255, 0.4); | border: 2px solid rgba(255, 255, 255, 0.4); | ||||
-webkit-border-radius: 4px; | -webkit-border-radius: 4px; | ||||
@@ -202,11 +202,11 @@ textarea { | |||||
color: white; | color: white; | ||||
} | } | ||||
.pin:hover .editable { | |||||
.pin:hover .editor { | |||||
display: block; | display: block; | ||||
} | } | ||||
.pin .editable .borderable { | |||||
.pin .editor .borderable { | |||||
background: rgba(0, 0, 0, 0.8); | background: rgba(0, 0, 0, 0.8); | ||||
-webkit-border-radius: 4px; | -webkit-border-radius: 4px; | ||||
-moz-border-radius: 4px; | -moz-border-radius: 4px; | ||||
@@ -78,12 +78,12 @@ $(window).load(function() { | |||||
// Show edit-buttons only on mouse over | // Show edit-buttons only on mouse over | ||||
$('.pin').each(function(){ | $('.pin').each(function(){ | ||||
var thisPin = $(this); | var thisPin = $(this); | ||||
thisPin.find('.editable').hide(); | |||||
thisPin.find('.editor').hide(); | |||||
thisPin.off('hover'); | thisPin.off('hover'); | ||||
thisPin.hover(function() { | thisPin.hover(function() { | ||||
thisPin.find('.editable').stop(true, true).fadeIn(300); | |||||
thisPin.find('.editor').stop(true, true).fadeIn(300); | |||||
}, function() { | }, function() { | ||||
thisPin.find('.editable').stop(true, false).fadeOut(300); | |||||
thisPin.find('.editor').stop(true, false).fadeOut(300); | |||||
}); | }); | ||||
}); | }); | ||||
@@ -2,16 +2,20 @@ | |||||
<script id="pins-template" type="text/x-handlebars-template"> | <script id="pins-template" type="text/x-handlebars-template"> | ||||
{{#each pins}} | {{#each pins}} | ||||
<div class="pin" data-id="{{id}}"> | <div class="pin" data-id="{{id}}"> | ||||
<div class="editor"> | |||||
<div class="borderable"> | |||||
<span class="glyphicon glyphicon-heart" data-id="{{id}}"></span> | |||||
</div> | |||||
{{#if editable}} | {{#if editable}} | ||||
<div class="editable"> | |||||
<div class="borderable"> | |||||
<span class="glyphicon glyphicon-trash" data-id="{{id}}"></span> | |||||
</div> | |||||
<div class="borderable"> | |||||
<span class="glyphicon glyphicon-pencil" data-id="{{id}}"></span> | |||||
</div> | |||||
<div class="borderable"> | |||||
<span class="glyphicon glyphicon-trash" data-id="{{id}}"></span> | |||||
</div> | |||||
<div class="borderable"> | |||||
<span class="glyphicon glyphicon-pencil" data-id="{{id}}"></span> | |||||
</div> | </div> | ||||
{{/if}} | {{/if}} | ||||
</div> | |||||
<a href="{{image.standard.image}}" class="lightbox" data-id="{{id}}"> | <a href="{{image.standard.image}}" class="lightbox" data-id="{{id}}"> | ||||
<div class="image-wrapper" style="width: {{image.thumbnail.width}}px; height: {{image.thumbnail.height}}px;"> | <div class="image-wrapper" style="width: {{image.thumbnail.width}}px; height: {{image.thumbnail.height}}px;"> | ||||
<img src="{{image.thumbnail.image}}" width="{{image.thumbnail.width}}" height="{{image.thumbnail.height}}"/> | <img src="{{image.thumbnail.image}}" width="{{image.thumbnail.width}}" height="{{image.thumbnail.height}}"/> | ||||