Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
election
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
services
V
voting.typo3.org
extensions
election
Commits
4eb1cb63
Commit
4eb1cb63
authored
Mar 14, 2020
by
Marco Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shuffle nominees in frontend list
parent
ef969c41
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
Resources/Private/Templates/FeElection/Show.html
Resources/Private/Templates/FeElection/Show.html
+1
-1
Resources/Public/Css/election.css
Resources/Public/Css/election.css
+3
-0
Resources/Public/JavaScript/election.js
Resources/Public/JavaScript/election.js
+11
-0
ext_typoscript_setup.txt
ext_typoscript_setup.txt
+8
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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