summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@csarven-laptop.(none)>2009-05-25 12:55:17 -0400
committerSarven Capadisli <csarven@csarven-laptop.(none)>2009-05-25 12:55:17 -0400
commitb7d051280e41117d800b7d0e0429cc75eb38d0f5 (patch)
treeefac0f02a9e0cab70a97da789c07277d4041b743 /js/util.js
parent31743dd36807e520702c29973eacd067717a74b7 (diff)
parent01ce677ae399874e81dc21991faf821a539fa00a (diff)
Merge branch '0.8.x' of git://gitorious.org/laconica/dev into 0.8.x
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/js/util.js b/js/util.js
index 6511c0380..9ee2a1963 100644
--- a/js/util.js
+++ b/js/util.js
@@ -20,7 +20,24 @@ $(document).ready(function(){
// attachments and attachment pages not used at the moment except for attachment_ajax version
// $('.attachments').click(function() {$().jOverlay({zIndex:999, success:function(html) {$('.attachment').click(function() {$().jOverlay({url:$(this).attr('href') + '/ajax'}); return false; });
// }, url:$(this).attr('href') + '/ajax'}); return false; });
- $('.attachment').click(function() {$().jOverlay({url:'../attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; });
+
+ //FIXME
+ //need to link to proper url depending on site config (path name and theme, for instance)
+ $('a.attachment').click(function() {$().jOverlay({url:'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; });
+ $('.entry-title a.attachment').append('&nbsp;<img style="display: inline; vertical-align: middle" src="/theme/base/images/icons/clip-inline.png" alt="Attachment" />');
+ $('a.thumbnail').hover(function() {
+ anchor = $(this);
+ $.get('/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
+ anchor.append(data);
+ $('#thumbnail').fadeIn('def');
+ });
+ },
+ function() {
+ setTimeout(function() {
+ $('#thumbnail').fadeOut('slow', function() {$(this).remove();});
+ }, 500);
+ }
+ );
// count character on keyup
function counter(event){