Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
archery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
archery
Commits
23f8adb4
Commit
23f8adb4
authored
7 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary dots from coffeescript
parent
18ad13ac
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
coffee/forms.coffee
+5
-5
5 additions, 5 deletions
coffee/forms.coffee
coffee/scores.coffee
+9
-9
9 additions, 9 deletions
coffee/scores.coffee
with
14 additions
and
14 deletions
coffee/forms.coffee
+
5
−
5
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]'
...
...
This diff is collapsed.
Click to expand it.
coffee/scores.coffee
+
9
−
9
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment