Update the slot allocation view and template
Patch by: Sverre Rabbelier, "Mario Ferraro" <fadinlight@gmail.com>
Reviewed by: Sverre Rabbelier
--- a/app/soc/templates/soc/base.html Sun Mar 08 02:04:08 2009 +0000
+++ b/app/soc/templates/soc/base.html Sun Mar 08 02:04:46 2009 +0000
@@ -88,6 +88,9 @@
<script type="text/javascript" src="/soc/content/js/datetime-loader-090304.js"></script>
<script type="text/javascript" src="/soc/content/js/datetimepicker-090304.js"></script>
{% endif %}
+ {% if uses_slot_allocator %}
+ <script type="text/javascript" src="/soc/content/js/slot-allocator.js"></script>
+ {% endif %}
</head>
{% endblock %}
--- a/app/soc/templates/soc/program/allocation/heading.html Sun Mar 08 02:04:08 2009 +0000
+++ b/app/soc/templates/soc/program/allocation/heading.html Sun Mar 08 02:04:46 2009 +0000
@@ -2,4 +2,5 @@
<th>Name</th>
<th>Locked?</th>
<th>Slots</th>
+ <th>Adjustment</th>
</tr>
--- a/app/soc/templates/soc/program/allocation/row.html Sun Mar 08 02:04:08 2009 +0000
+++ b/app/soc/templates/soc/program/allocation/row.html Sun Mar 08 02:04:46 2009 +0000
@@ -1,5 +1,21 @@
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" name="name">
<td><div class="name">{{ list.item.name }}</div></td>
- <td><div class="locked" id="locked_slot_count_{{ list.item.link_id }}">unlocked</div></td>
- <td><div class="slots" id="id_slot_count_{{ list.item.link_id }}">0</div></td>
+ <td>
+ <div class="locked" id="locked_slot_count_{{ list.item.link_id }}">
+ <input type="checkbox" id="id_locked_slot_{{ list.item.link_id }}"
+ onchange="javascript:lockSlots(this);" />
+ </div>
+ </td>
+ <td>
+ <div class="slots" id="id_slot_count_{{ list.item.link_id }}">
+ <input type="text" id="id_spin_slot_count_{{ list.item.link_id }}"
+ size="3" value="0" onchange="javascript:assignSlots(this)"/>
+ </div>
+ </td>
+ <td>
+ <div class="slots" id="id_adjustment_count_{{ list.item.link_id }}">
+ <input type="text" id="id_spin_adjustment_count_{{ list.item.link_id }}"
+ size="3" value="0" onchange="javascript:assignAdjustment(this)"/>
+ </div>
+ </td>
</tr>