Add drag-and-drop to SASL webpage

This commit is contained in:
Alexey Sokolov
2015-04-03 23:38:11 +01:00
committed by J-P Nurmi
parent 72223febcf
commit cc0574b084
8 changed files with 447 additions and 35 deletions
+32 -19
View File
@@ -33,27 +33,40 @@
<div class="section">
<h3>Mechanisms</h3>
<div class="sectionbg">
<table class="data">
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<? LOOP MechanismLoop SORTASC=Name ?>
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
<td>
<input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" value="1"<? IF Checked ?> checked="checked"<? ENDIF ?> />
<label for="opt_<? VAR Name ?>"><? VAR Name ?></label>
</td>
<td><? VAR Description ?></td>
</tr>
<? ENDLOOP ?>
</tbody>
</table>
<div class="sectionbody">
<div class="subsection">
<table class="data">
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<? LOOP MechanismLoop SORTASC=Name ?>
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
<td><? VAR Name ?></td>
<td><? VAR Description ?></td>
</tr>
<? ENDLOOP ?>
</tbody>
</table>
</div>
<div class="subsection">
<div class="inputlabel">Selected mechanisms and their order:</div>
<input type="text" name="mechanisms" id="mechanisms" value="<? VAR Mechanisms ?>" class="half"/>
<script>
$("#mechanisms").selectize({
plugins: ["drag_drop"],
delimiter: " ",
options: [<? LOOP MechanismLoop SORTASC=Name ?>{value:"<? VAR Name ?>",text:"<? VAR Name ?>"},<? ENDLOOP ?>],
});
</script>
</div>
</div>
</div>
</div>
<div style="clear:both;"></div>
<div class="submitline">
<input type="hidden" name="submitted" value="1" />