app/assets/javascripts/documents.js in social_stream-documents-0.1.5 vs app/assets/javascripts/documents.js in social_stream-documents-0.1.6
- old
+ new
@@ -1,6 +1,9 @@
$('.attachment_tile a').live("click",function(e){
+ if(this.type ==""){
+ return true;
+ }
e.preventDefault();
var download_link = this;
if($('.player').length > 0 && $('.attachment_tile.selected').length==1){
@@ -26,10 +29,10 @@
if(this.type == "Picture"){
removePlayers();
$(this).parent().parent().addClass("selected");
$('body').append("<img class='player' id='picture_player' src='"+download_link+"' />");
$('body').append("<a href='"+download_link+"'><img id='downloadButton' src='assets/formats/default.png' /></a>");
- }
+ }
});
function removePlayers(){
$('.attachment_tile').removeClass("selected");
$('.player').remove();
\ No newline at end of file