Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
archery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
archery
Commits
ca355adb
Commit
ca355adb
authored
Oct 10, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Colors are now also available on scores editing page
parent
8284a61b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
coffee/scores.coffee
coffee/scores.coffee
+9
-0
templates/match/scores.latte
templates/match/scores.latte
+7
-4
No files found.
coffee/scores.coffee
View file @
ca355adb
...
...
@@ -43,6 +43,11 @@ $ ->
match_total
.
text
(
sum
)
match_avg
.
text
(
Math
.
round
(
sum
/ count * 10) /
10
)
cell
=
$
(
@
).
closest
(
'td'
)
cls
=
cell
.
attr
(
'class'
).
replace
(
/\s*val-\d+\s*/
,
''
)
console
.
log
cell
.
attr
(
'class'
),
cls
cell
.
attr
(
'class'
,
cls
).
addClass
(
'val-'
+
$
(
@
).
val
())
inputs
.
filter
(
'[value=""]:first'
).
focus
()
$
(
'textarea'
).
on
'keyup'
,
->
...
...
@@ -53,3 +58,7 @@ $ ->
if
$
(
document
).
scrollTop
()
<
desired_scroll
$
(
window
).
scrollTop
(
desired_scroll
)
.
keyup
()
$
(
'#toggle-colored'
).
on
'click'
,
->
$
(
@
).
toggleClass
(
'active'
)
$
(
'#match'
).
toggleClass
(
'colored'
)
templates/match/scores.latte
View file @
ca355adb
...
...
@@ -18,7 +18,7 @@
<form method="post" action="match/{$match->id}/scores">
<table
class="table table-bordered table-condensed match
">
<table
id="match" class="table table-bordered table-condensed match {$match->discipline}
">
<thead>
<tr>
<th class="separator"></th>
...
...
@@ -30,7 +30,7 @@
<tr n:foreach="$rows as $i => $row">
<th class="separator">{$i + 1}</th>
<td n:foreach="$row as $j => $arrow"
n:class="$j == $match->arrows - 1 ? separator
">
class="val-{$arrow} {$j == $match->arrows - 1 ? separator}
">
<input type="number" min="0" max="10" name="scores[]"
value="{$arrow ? $arrow}">
</td>
...
...
@@ -64,10 +64,13 @@
</div>
</div>
<div class="actions actions-responsive">
<div class="btn-group actions">
<a href="javascript:void(0)" id="toggle-colored" class="btn btn-default"
title="{_'Show/hide colors'}">
<span class="glyphicon glyphicon-tint"></span>
</a>
<button type="submit" class="btn btn-primary" title="{_'Save'}">
<span class="glyphicon glyphicon-ok"></span>
<span class="text">{_'Save'}</span>
</button>
</div>
...
...
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