Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
voting.typo3.org
extensions
election
Commits
4eb1cb63
Commit
4eb1cb63
authored
Mar 14, 2020
by
Marco Huber
Browse files
Shuffle nominees in frontend list
parent
ef969c41
Changes
4
Hide whitespace changes
Inline
Side-by-side
Resources/Private/Templates/FeElection/Show.html
View file @
4eb1cb63
...
...
@@ -28,7 +28,7 @@
</th>
</tr>
</thead>
<tbody>
<tbody
class=
"shuffle-rows"
>
<f:for
each=
"{election.nominees}"
as=
"nominee"
>
<tr>
<td>
...
...
Resources/Public/Css/election.css
0 → 100644
View file @
4eb1cb63
.shuffle-rows
{
display
:
none
;
}
\ No newline at end of file
Resources/Public/JavaScript/election.js
0 → 100644
View file @
4eb1cb63
$
(
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
ext_typoscript_setup.txt
View file @
4eb1cb63
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment