From 7923e84fba66d8e3e7ec24a8a663f0c2c0f0e533 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 25 May 2009 18:54:45 +0000 Subject: Fixed URL for attachment thumbnail and XHR --- js/util.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'js') diff --git a/js/util.js b/js/util.js index 9ee2a1963..ffaedc690 100644 --- a/js/util.js +++ b/js/util.js @@ -23,20 +23,20 @@ $(document).ready(function(){ //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(' 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); - } + $('a.attachment').click(function() {$().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; }); + $('a.thumbnail').hover( + function() { + anchor = $(this); + $.get($('address .url')[0].href+'/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 -- cgit v1.2.3-54-g00ecf