author | Sverre Rabbelier <srabbelier@gmail.com> |
Sun, 08 Mar 2009 02:04:08 +0000 | |
changeset 1734 | c9ecc7449632 |
child 1747 | 02f15a955c42 |
permissions | -rw-r--r-- |
1734
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
1 |
{% extends "soc/models/list.html" %} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
2 |
|
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
3 |
{% block scripts %} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
4 |
{{ block.super }} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
5 |
|
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
6 |
<script type="text/javascript"> |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
7 |
var MAX_AVAILABLE_SLOTS = {{ total_slots }}; |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
8 |
$(document).ready(function(){ |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
9 |
$('[id^=id_spin_slot_count_]').spin({min:0, max:MAX_AVAILABLE_SLOTS}); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
10 |
$('[id^=id_spin_adjustment_count_]').spin(); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
11 |
$(tooltip).purr({usingTransparentPNG: true, isSticky: true}); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
12 |
$("#p_total_slots").html("<strong>Max slots:</strong> "+MAX_AVAILABLE_SLOTS); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
13 |
retrieveJSON(); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
14 |
}); |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
15 |
</script> |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
16 |
{% endblock %} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
17 |
|
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
18 |
{% block body %} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
|
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
20 |
<input type="button" class="button" onclick="javascript:reCalculate()" value="Recalculate slots" /> |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
21 |
|
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
22 |
{{ block.super }} |
c9ecc7449632
Add a slot allocation script and template
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
23 |
{% endblock %} |