Fixed URL for attachment thumbnail and XHR
This commit is contained in:
parent
0b96ca3d59
commit
7923e84fba
@ -23,11 +23,11 @@ $(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(' <img style="display: inline; vertical-align: middle" src="/theme/base/images/icons/clip-inline.png" alt="Attachment" />');
|
||||
$('a.thumbnail').hover(function() {
|
||||
$('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('/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
|
||||
$.get($('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
|
||||
anchor.append(data);
|
||||
$('#thumbnail').fadeIn('def');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user