summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-02-16 13:15:09 -0500
committerCraig Andrews <candrews@integralblue.com>2010-02-16 13:15:09 -0500
commit20d6a7caed6636c28cc7b95c584549691dff4388 (patch)
treebcf44f5f31a38ff08b363ab45ab486ace9ff1a99 /js
parent32084e33a266797b306158df29e48f057651b410 (diff)
parentd5cbfe8071d56438cfa168dc3db56a959317eae0 (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: lib/queuemanager.php lib/xmppmanager.php plugins/Xmpp/Fake_XMPP.php scripts/imdaemon.php
Diffstat (limited to 'js')
-rw-r--r--js/util.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/js/util.js b/js/util.js
index 639049668..3623337b9 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,35 +427,37 @@ 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(
- function() {
- var anchor = $(this);
- $("a.thumbnail").children('img').hide();
- anchor.closest(".entry-title").addClass('ov');
-
- if (anchor.children('img').length === 0) {
- t = setTimeout(function() {
- $.get($('address .url')[0].href+'attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
- anchor.append(data);
- });
- }, 500);
- }
- else {
- anchor.children('img').show();
+ if ($('#shownotice').length == 0) {
+ var t;
+ notice.find('a.thumbnail').hover(
+ function() {
+ var anchor = $(this);
+ $('a.thumbnail').children('img').hide();
+ anchor.closest(".entry-title").addClass('ov');
+
+ if (anchor.children('img').length === 0) {
+ t = setTimeout(function() {
+ $.get($('address .url')[0].href+'attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
+ anchor.append(data);
+ });
+ }, 500);
+ }
+ else {
+ anchor.children('img').show();
+ }
+ },
+ function() {
+ clearTimeout(t);
+ $('a.thumbnail').children('img').hide();
+ $(this).closest('.entry-title').removeClass('ov');
}
- },
- function() {
- clearTimeout(t);
- $("a.thumbnail").children('img').hide();
- $(this).closest(".entry-title").removeClass('ov');
- }
- );
+ );
+ }
},
NoticeDataAttach: function() {