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
23f8adb4
Commit
23f8adb4
authored
Oct 07, 2017
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary dots from coffeescript
parent
18ad13ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
coffee/forms.coffee
coffee/forms.coffee
+5
-5
coffee/scores.coffee
coffee/scores.coffee
+9
-9
No files found.
coffee/forms.coffee
View file @
23f8adb4
...
...
@@ -20,7 +20,7 @@ document.querySelector('form:not(.nofocus)')?.querySelector('input')?.focus()
for
e
in
document
.
querySelectorAll
'input[type=range]'
create_addon
e
cb
=
->
@
.
nextElementSibling
.
innerHTML
=
@
.
value
cb
=
->
@
nextElementSibling
.
innerHTML
=
@
value
e
.
addEventListener
'change'
,
cb
e
.
addEventListener
'input'
,
cb
...
...
@@ -30,11 +30,11 @@ for e in document.querySelectorAll 'input[type=range]'
for
e
in
document
.
querySelectorAll
'input[type^=date]'
addon
=
create_addon
e
addon
.
innerHTML
=
'<span class="glyphicon glyphicon-calendar"></span>'
addon
.
addEventListener
'click'
,
->
@
.
previousElementSibling
.
focus
()
addon
.
addEventListener
'click'
,
->
@
previousElementSibling
.
focus
()
# always select the whole number on a number type input to avoid backspacing
for
e
in
document
.
querySelectorAll
'input[type=number]'
e
.
addEventListener
'focus'
,
->
@
.
select
()
e
.
addEventListener
'focus'
,
->
@
select
()
# inline radio labels
for
e
in
document
.
querySelectorAll
'.radio > label > input[type=radio][data-inline]'
...
...
@@ -46,12 +46,12 @@ for e in document.querySelectorAll '.radio > label > input[type=radio][data-inli
# make abbreviations clickable on mobile devices (since there is no hover)
if
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
.
test
navigator
.
userAgent
for
e
in
document
.
getElementsByTagName
'abbr'
e
.
addEventListener
'click'
,
->
alert
@
.
getAttribute
'title'
e
.
addEventListener
'click'
,
->
alert
@
getAttribute
'title'
# allow table rows to be links through the data-href attribute
for
e
in
document
.
querySelectorAll
'[data-href]'
e
.
addEventListener
'click'
,
->
document
.
location
=
@
.
getAttribute
'data-href'
document
.
location
=
@
getAttribute
'data-href'
# fix class names on select boxes with multiple="multiple"
for
e
in
document
.
querySelectorAll
'select[multiple]'
...
...
coffee/scores.coffee
View file @
23f8adb4
...
...
@@ -49,12 +49,12 @@ if table.classList.contains 'match-editable'
((
col
,
row
)
->
cell
=
input
.
parentNode
cb
=
->
value
=
num
@
.
value
value
=
num
@
value
if
set_score
col
,
row
,
value
cell
.
dataset
.
score
=
value
if
value
!=
10
@
.
nextElementSibling
.
value
=
0
@
.
parentNode
.
querySelector
(
'.cross-popup'
)
@
nextElementSibling
.
value
=
0
@
parentNode
.
querySelector
(
'.cross-popup'
)
.
classList
.
remove
'enabled'
input
.
addEventListener
'change'
,
cb
input
.
addEventListener
'keyup'
,
cb
...
...
@@ -77,8 +77,8 @@ if table.classList.contains 'match-editable'
toggle_totals
.
classList
.
remove
'active'
toggle_totals
.
addEventListener
'click'
,
->
@
.
classList
.
toggle
'active'
@
.
blur
()
@
classList
.
toggle
'active'
@
blur
()
hide
=
table
.
classList
.
toggle
'hide-total-scores'
if
'localStorage'
of
window
...
...
@@ -91,8 +91,8 @@ if table.classList.contains 'match-editable'
# notes area grows automatically with each added line
if
notes
=
document
.
getElementById
(
'notes'
)
cb
=
->
@
.
style
.
height
=
0
@
.
style
.
height
=
@
.
scrollHeight
+
'px'
@
style
.
height
=
0
@
style
.
height
=
@
scrollHeight
+
'px'
notes
.
addEventListener
'keyup'
,
cb
cb
.
call
notes
...
...
@@ -104,8 +104,8 @@ if 'localStorage' of window and localStorage.getItem 'colored-scores'
toggle_color
.
classList
.
add
'active'
toggle_color
.
addEventListener
'click'
,
->
@
.
classList
.
toggle
'active'
@
.
blur
()
@
classList
.
toggle
'active'
@
blur
()
colored
=
table
.
classList
.
toggle
'colored'
if
'localStorage'
of
window
...
...
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