Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
10034a1a
Commit
10034a1a
authored
Sep 11, 2020
by
Давид Добряков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability for no comment when workTime is null
parent
ead64239
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
timer.js
js/etersoft/timer.js
+7
-2
timersplash.html.tmpl
template/en/default/etersoft/timersplash.html.tmpl
+1
-1
timersplash.html.tmpl
template/ru/default/etersoft/timersplash.html.tmpl
+1
-1
No files found.
js/etersoft/timer.js
View file @
10034a1a
...
...
@@ -187,10 +187,10 @@ window.addEventListener("load", function() {
workTime
===
parseInt
(
btn
.
dataset
[
"time"
])
?
parseInt
(
btn
.
dataset
[
"time"
])
:
workTime
;
workTime
=
workTime
>
0
?
workTime
:
1
;
workTime
=
workTime
>
0
?
workTime
:
0
;
let
workTimeValue
=
Math
.
ceil
((
workTime
/
60
)
*
100
)
/
100
;
let
productiveTime
=
parseInt
(
document
.
querySelector
(
"#ProductTime"
).
value
);
productiveTime
=
productiveTime
>
0
?
productiveTime
:
1
;
productiveTime
=
productiveTime
>
0
?
productiveTime
:
0
;
let
productiveTimeValue
=
Math
.
ceil
((
productiveTime
/
60
)
*
100
)
/
100
;
document
.
querySelector
(
"#work_time"
).
value
=
workTimeValue
;
document
.
querySelector
(
"#productive_time"
).
value
=
productiveTimeValue
;
...
...
@@ -223,6 +223,11 @@ window.addEventListener("load", function() {
timer
.
clear
();
localStorage
.
removeItem
(
"time"
);
}
}
else
if
(
!
comment
.
length
&&
workTimeValue
===
0
&&
productiveTimeValue
===
0
)
{
let
bugForm
=
etersoft_create
===
1
?
"#Create"
:
"#changeform"
;
document
.
querySelector
(
bugForm
).
submit
();
timer
.
clear
();
localStorage
.
removeItem
(
"time"
);
}
else
{
alert
(
"Поле комментария не может быть пустым!"
);
}
...
...
template/en/default/etersoft/timersplash.html.tmpl
View file @
10034a1a
...
...
@@ -46,4 +46,4 @@
<script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020
_
"></script>
template/ru/default/etersoft/timersplash.html.tmpl
View file @
10034a1a
...
...
@@ -46,4 +46,4 @@
<script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020
_
"></script>
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