1
{% extends "wlscreens/base.html" %}
11
<script type="text/javascript" src="{{ MEDIA_URL }}js/jqModal.js"></script>
12
<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/modal_windows.css" />
14
<script type="text/javascript">
15
// {{{ Javascript Stuff
17
// if initial_show is true, the resize_dialog function
18
// will not animate the resize. This is set by the hide and show
19
// function of our dialog
20
var initial_show = true;
21
var current_size = "";
23
function determine_image_size() {
24
// We decide by the client width which size we are going // to show
25
cw = document.body.clientWidth;
26
ch = document.body.clientHeight;
31
} else if( (cw-80) > (800) ) {
40
function resize_dialog() {
42
image_w = determine_image_size();
44
cw = document.body.clientWidth;
46
img = $(".image_display");
48
if( current_size == image_w ) {
52
// reposition and resize the dialog
56
dialog = $("#dialog");
58
dialog.css("width",dw + "px");
59
dialog.css("left",x + "px");
60
dialog.css("top",(document.body.scrollTop + 5) + "px");
68
top: (document.body.scrollTop+5)+"px",
81
$().ready(function() {
86
/* Enter image address */
87
h.w.css('opacity',1.00).fadeIn();
93
function() { if(h.o) h.o.remove(); })
97
$('.image_display').click( function() {
98
$('#dialog').jqmHide();
102
$("a.displayimage").click( function() {
104
src = $(this).attr("href");
105
img = $(".image_display");
108
// Set the image comment
109
comment = $($(this).find("span.comment")).html();
110
$(".image_comment").html(comment);
112
// Set the image title
113
title = $(this).attr("name");
114
$("h3.screenshot_title").html(title);
118
$('#dialog').jqmShow();
124
$('a.sizelink').click( function() {
125
size = $(this).html().split("x");
126
w = parseInt(size[0]);
138
<!-- Image Dialog -->
139
<div class="jqmDialog" id="dialog">
140
<img src="{{ MEDIA_URL }}/img/close_icon.png" alt="close" class="jqmClose" />
142
<div class="box_title">
143
<h3 class="box_title screenshot_title"></h3>
146
<div class="box_content">
148
<a class="sizelink" href="#">1024 x 768</a>
149
| <a class="sizelink" href="#">800 x 600</a>
150
| <a class="sizelink" href="#">640 x 480</a>
153
<img class="image_display" src="#" />
155
<div class="image_comment"></div>
159
<!-- True content -->
160
{% for c in categories %}
162
<h1 class="category">{{ c.name }}</h1>
164
<ul class="screenshot_list">
165
{% for s in c.screenshots.all %}
167
<a class="displayimage" name="{{s.name}}" href="{{ s.screenshot.url }}"><img src="{{ s.thumbnail.url }}" />
168
<span class="comment" style="display: none;">{{ s.comment|wl_markdown }}</span></a>