Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
internship
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Skripnikov
internship
Commits
4f417583
Commit
4f417583
authored
Feb 12, 2018
by
Alina Habibulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ week score
parent
a3425dc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+1
-11
No files found.
src/main/webapp/js/Player.js
View file @
4f417583
...
@@ -158,13 +158,7 @@ var portal = {
...
@@ -158,13 +158,7 @@ var portal = {
};
};
function
countingScore
(){
function
countingScore
(){
////Расчет итогового количества часов
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
////in the "table" variable - array with the all data
//// 10 columns in row, 1st row - table headers
//// if we have only 1 full row - we have 20 values in array, every extra row - +10 value in array
/////first 3 columns - project and ect;
///// last 7 colums is what we need - the value of hours in day
var
table
=
portal
.
player
.
model
.
getModelWithId
(
"
ts_timesheet_table
"
).
getAsfData
().
findElement
().
data
;
var
table
=
portal
.
player
.
model
.
getModelWithId
(
"
ts_timesheet_table
"
).
getAsfData
().
findElement
().
data
;
var
score
=
0
,
monday
=
0
,
tuesday
=
0
,
wednesday
=
0
,
thursday
=
0
,
friday
=
0
,
saturday
=
0
,
sunday
=
0
;
var
score
=
0
,
monday
=
0
,
tuesday
=
0
,
wednesday
=
0
,
thursday
=
0
,
friday
=
0
,
saturday
=
0
,
sunday
=
0
;
for
(
var
i
=
10
;
i
<
table
.
length
;
i
++
){
for
(
var
i
=
10
;
i
<
table
.
length
;
i
++
){
...
@@ -180,13 +174,9 @@ function countingScore(){
...
@@ -180,13 +174,9 @@ function countingScore(){
else
if
(
table
[
i
].
id
==
(
"
saturday-b
"
+
row
))
{
saturday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
saturday
);}
else
if
(
table
[
i
].
id
==
(
"
saturday-b
"
+
row
))
{
saturday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
saturday
);}
else
if
(
table
[
i
].
id
==
(
"
sunday-b
"
+
row
))
{
sunday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
sunday
);}
else
if
(
table
[
i
].
id
==
(
"
sunday-b
"
+
row
))
{
sunday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
sunday
);}
}
}
portal
.
player
.
model
.
getModelWithId
(
"
ts_total_hours
"
).
setValue
(
score
.
toString
());
portal
.
player
.
model
.
getModelWithId
(
"
ts_total_hours
"
).
setValue
(
score
.
toString
());
ShowMessage
(
score
);
};
};
function
timeComputing
(
serverDateTime
){
function
timeComputing
(
serverDateTime
){
function
zeroCheck
(
num
){
function
zeroCheck
(
num
){
if
(
num
<
10
)
{
num
=
"
0
"
+
num
;}
if
(
num
<
10
)
{
num
=
"
0
"
+
num
;}
...
...
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