Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
potage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
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
mathieu
potage
Commits
3a5f04a8
Commit
3a5f04a8
authored
Sep 19, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calcule le total
parent
98e3922c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/PotageBundle/Resources/views/Membre/today.js
src/PotageBundle/Resources/views/Membre/today.js
+13
-0
No files found.
src/PotageBundle/Resources/views/Membre/today.js
View file @
3a5f04a8
...
...
@@ -63,6 +63,19 @@ gridItems.forEach(function(item)
formItem
.
querySelector
(
"
input[id$=prix]
"
).
value
=
prix
;
});
// lorsqu'on relâche la souris
// recalcule le total
let
spanTotal
=
document
.
querySelector
(
"
span#total
"
);
input
.
addEventListener
(
'
mouseup
'
,
function
()
{
let
total
=
0
;
for
(
let
formItem
of
formItems
)
{
total
=
total
+
parseFloat
(
formItem
.
querySelector
(
"
input[id$=prix]
"
).
value
);
}
spanTotal
.
textContent
=
total
.
toFixed
(
2
);
});
}
});
...
...
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