tpherndon / django-fedora
A Django web UI for Fedora 3.1 (http://www.fedora-commons.org)
Clone this repository (size: 156.8 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/tpherndon/django-fedora/
| commit 60: | de9e1881988c |
| parent 59: | e09ad7af0a99 |
| branch: | default |
Cleanup new window open for IE, plus going from 'bookmark me' to 'bookmark this image'
8 months ago
Changed (Δ45 bytes):
raw changeset »
djadora/templates/fedora/image_fragment.html (1 lines added, 1 lines removed)
djadora/templates/fedora/object_view_minimal.html (2 lines added, 2 lines removed)
djadora/views/bookmarks.py (1 lines added, 1 lines removed)
Up to file-list djadora/templates/fedora/image_fragment.html:
10 |
10 |
{% else %} |
11 |
11 |
<a href="#"> |
12 |
12 |
<!--<img class="add_bookmark" id="{{ img.pid }}" src="/site_media/images/book_add.png" alt="Bookmark this image" title="Bookmark this image">--> |
13 |
<span class="add_bookmark" id="{{ img.pid }}">Bookmark |
|
13 |
<span class="add_bookmark" id="{{ img.pid }}">Bookmark Image</span> |
|
14 |
14 |
</a><br> |
15 |
15 |
{% endif %} |
16 |
16 |
{% if perms.fedora.can_view_phi %} |
Up to file-list djadora/templates/fedora/object_view_minimal.html:
24 |
24 |
</a><br> |
25 |
25 |
{% else %} |
26 |
26 |
<a href="#"> |
27 |
<span class="add_bookmark" id="{{ obj.pid }}">Bookmark |
|
27 |
<span class="add_bookmark" id="{{ obj.pid }}">Bookmark this image</span> |
|
28 |
28 |
<!--<img class="add_bookmark" id="{{ obj.pid }}" src="/site_media/images/book_add.png" alt="Bookmark this image" title="Bookmark this image">--> |
29 |
29 |
</a><br> |
30 |
30 |
{% endif %} |
78 |
78 |
<script type="text/javascript"> |
79 |
79 |
$(document).ready(function() { |
80 |
80 |
$("#orig_url").livequery('click', function(event){ |
81 |
window.open('{{ orig_url }}' |
|
81 |
window.open('{{ orig_url }}'); |
|
82 |
82 |
return false; |
83 |
83 |
}); |
84 |
84 |
Up to file-list djadora/views/bookmarks.py:
| … | … | @@ -62,7 +62,7 @@ def remove_bookmark(request): |
62 |
62 |
img = get_object_or_404(MSKImage, pk=pid) |
63 |
63 |
|
64 |
64 |
img.bookmarkers.remove(request.user) |
65 |
resp = u'<span class="add_bookmark" id="%s">Bookmark |
|
65 |
resp = u'<span class="add_bookmark" id="%s">Bookmark this Image</span>' |
|
66 |
66 |
#return HttpResponse(u'<img class="add_bookmark" id="%s" src="/site_media/images/book_add.png" alt="Bookmark this image" title="Bookmark this image">' % img.pid, mimetype='text/plain') |
67 |
67 |
return HttpResponse(resp % img.pid, mimetype='text/plain') |
68 |
68 |
