Commit 4eb1cb63 authored by Marco Huber's avatar Marco Huber

Shuffle nominees in frontend list

parent ef969c41
......@@ -28,7 +28,7 @@
</th>
</tr>
</thead>
<tbody>
<tbody class="shuffle-rows">
<f:for each="{election.nominees}" as="nominee">
<tr>
<td>
......
.shuffle-rows {
display: none;
}
\ No newline at end of file
$(function () {
$(document).ready(function () {
$('.shuffle-rows').each(function(){
var parent = $(this);
var elements = parent.children();
while (elements.length) {
parent.append(elements.splice(Math.floor(Math.random() * elements.length), 1)[0]);
}
}).show();
});
});
\ No newline at end of file
......@@ -231,3 +231,11 @@ plugin {
}
}
}
page {
includeCSS {
t3olayout = EXT:election/Resources/Public/Css/election.css
}
includeJSFooter {
shuffleRows = EXT:election/Resources/Public/JavaScript/election.js
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment