app/soc/templates/soc/program/allocation/allocation.html
author Sverre Rabbelier <srabbelier@gmail.com>
Sun, 08 Mar 2009 14:38:24 +0000
changeset 1747 02f15a955c42
parent 1734 c9ecc7449632
child 2136 5d55e61dd338
permissions -rw-r--r--
Provide the 'return_url' in the allocate slots view This url can then be used to post and receive JSON data from. Patch by: Sverre Rabbelier

{% extends "soc/models/list.html" %}

{% block scripts %}
{{ block.super }}

<script type="text/javascript">
  var MAX_AVAILABLE_SLOTS = {{ total_slots }};
  var RETURN_URL = "{{ return_url }}";
  $(document).ready(function(){
    $('[id^=id_spin_slot_count_]').spin({min:0, max:MAX_AVAILABLE_SLOTS});
    $('[id^=id_spin_adjustment_count_]').spin();
    $(tooltip).purr({usingTransparentPNG: true, isSticky: true});
    $("#p_total_slots").html("<strong>Max slots:</strong> "+MAX_AVAILABLE_SLOTS);
    retrieveJSON();
  });
</script>
{% endblock %}

{% block body %}

<input type="button" class="button" onclick="javascript:reCalculate()" value="Recalculate slots" />

{{ block.super }}
{% endblock %}