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
8717250d
Commit
8717250d
authored
Feb 14, 2018
by
Alina Habibulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ week score v4
parent
d353e507
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
src/main/webapp/css/beau.css
src/main/webapp/css/beau.css
+1
-0
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+25
-16
No files found.
src/main/webapp/css/beau.css
View file @
8717250d
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
background-color
:
#49b785
;
background-color
:
#49b785
;
border-color
:
#49b785
;
border-color
:
#49b785
;
color
:
#ffffff
;
color
:
#ffffff
;
left
:
40%
;
}
}
.container
{
.container
{
...
...
src/main/webapp/js/Player.js
View file @
8717250d
...
@@ -163,22 +163,31 @@ var portal = {
...
@@ -163,22 +163,31 @@ var portal = {
function
countingScore
(){
function
countingScore
(){
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
var
table
=
portal
.
player
.
model
.
getModelWithId
(
"
ts_timesheet_table
"
).
getAsfData
().
findElement
().
data
;;
var
tsTable
=
portal
.
player
.
model
.
playerModel
.
getModelWithId
(
'
ts_timesheet_table
'
);
var
score
=
0
,
monday
=
0
,
tuesday
=
0
,
wednesday
=
0
,
thursday
=
0
,
friday
=
0
,
saturday
=
0
,
sunday
=
0
;
var
thModel
=
portal
.
player
.
model
.
playerModel
.
getModelWithId
(
'
ts_total_hours
'
);
for
(
var
i
=
10
;
i
<
table
.
length
;
i
++
){
var
days
=
{
'
monday
'
:
0
,
'
tuesday
'
:
0
,
'
wednesday
'
:
0
,
'
thursday
'
:
0
,
'
friday
'
:
0
,
'
saturday
'
:
0
,
'
sunday
'
:
0
};;
var
row
=
Number
.
parseInt
(
i
/
10
);
if
(
table
[
i
].
id
==
(
"
project-b
"
+
row
)
||
table
[
i
].
id
==
(
"
task-b
"
+
row
)
||
table
[
i
].
id
==
(
"
result-b
"
+
row
))
for
(
var
i
in
days
)
{
{
tsTable
.
modelBlocks
.
forEach
(
function
(
modelBlock
)
{
continue
;
modelBlock
.
forEach
(
function
(
m
)
{
}
else
if
(
table
[
i
].
id
==
(
"
monday-b
"
+
row
))
{
monday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
monday
);}
if
(
m
.
asfProperty
.
id
===
i
)
{
else
if
(
table
[
i
].
id
==
(
"
tuesday-b
"
+
row
))
{
tuesday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
tuesday
);}
var
n
=
parseFloat
(
m
.
getValue
());
else
if
(
table
[
i
].
id
==
(
"
wednesday-b
"
+
row
))
{
wednesday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
wednesday
);}
if
(
_
.
isNaN
(
n
)){
else
if
(
table
[
i
].
id
==
(
"
thursday-b
"
+
row
))
{
thursday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
thursday
);}
n
=
0
;
else
if
(
table
[
i
].
id
==
(
"
friday-b
"
+
row
))
{
friday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
friday
);}
}
else
if
(
table
[
i
].
id
==
(
"
saturday-b
"
+
row
))
{
saturday
=
table
[
i
].
value
;
score
=
Number
.
parseFloat
(
score
)
+
Number
.
parseFloat
(
saturday
);}
days
[
i
]
=
days
[
i
]
+
n
;
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
());
});
}
var
totalHours
=
0
;
for
(
var
n
in
days
)
{
totalHours
+=
days
[
n
];
jQuery
(
'
#ts_timesheet_table_total_
'
+
n
).
text
(
days
[
n
]);
}
thModel
.
setValue
(
totalHours
.
toString
());
};
};
function
timeComputing
(
serverDateTime
){
function
timeComputing
(
serverDateTime
){
...
...
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