summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-16 17:09:34 +0100
committerSarven Capadisli <csarven@status.net>2010-02-16 17:09:34 +0100
commit3b8d060c293014dd252ef33de8eb0bf6b4d35d32 (patch)
tree0cab0f2daceb70ff1d0045b6b0615613f1ccfb47
parentf414544d0d289df2c103d9b16400e1ed91d35e91 (diff)
Fix to allow any notice item with an attachment to use the overlay view
-rw-r--r--js/util.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/util.js b/js/util.js
index 639049668..3021872d4 100644
--- a/js/util.js
+++ b/js/util.js
@@ -404,12 +404,10 @@ var SN = { // StatusNet
},
NoticeWithAttachment: function(notice) {
- if ($('.attachment', notice).length === 0) {
+ if (notice.find('.attachment').length === 0) {
return;
}
- var notice_id = notice.attr('id');
-
$.fn.jOverlay.options = {
method : 'GET',
data : '',
@@ -429,13 +427,13 @@ var SN = { // StatusNet
css : {'max-width':'542px', 'top':'5%', 'left':'32.5%'}
};
- $('#'+notice_id+' a.attachment').click(function() {
+ notice.find('a.attachment').click(function() {
$().jOverlay({url: $('address .url')[0].href+'attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'});
return false;
});
var t;
- $("body:not(#shownotice) #"+notice_id+" a.thumbnail").hover(
+ $("body:not(#shownotice) .notice a.thumbnail").hover(
function() {
var anchor = $(this);
$("a.thumbnail").children('img').hide();