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
d353e507
Commit
d353e507
authored
Feb 14, 2018
by
Alina Habibulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ week score v3
parent
088145dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
33 deletions
+34
-33
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+34
-33
No files found.
src/main/webapp/js/Player.js
View file @
d353e507
...
@@ -92,7 +92,6 @@ var portal = {
...
@@ -92,7 +92,6 @@ var portal = {
});
});
var
formExistance
;
var
formExistance
;
////формирование Пн и Вскр для формирования поискового запроса по форме
////формирование Пн и Вскр для формирования поискового запроса по форме
var
cur_date
=
new
Date
();
var
cur_date
=
new
Date
();
var
StrPeriod
=
timeComputing
(
cur_date
);
//строка Пнд+" "+Вскр
var
StrPeriod
=
timeComputing
(
cur_date
);
//строка Пнд+" "+Вскр
...
@@ -100,10 +99,10 @@ var portal = {
...
@@ -100,10 +99,10 @@ var portal = {
var
StrSunday
=
StrPeriod
.
substring
(
11
);
var
StrSunday
=
StrPeriod
.
substring
(
11
);
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/person/auth
"
,
function
(
userData
){
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/person/auth
"
,
function
(
userData
){
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/asforms/search?modifiedFrom=
"
+
StrMonday
+
"
&modifiedTo=
"
+
StrSunday
+
"
&formCode=timesheet&field=ts_author&type=partial&recordsCount=1&search=
"
+
userData
.
lastname
,
function
(
success
){
////rest/api/asforms/search?modifiedFrom=2018-02-12&modifiedTo=2018-02-18&formCode=timesheet&field=ts_author&type=partial&recordsCount=1&search=Хабибулина
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/asforms/search?modifiedFrom=
"
+
StrMonday
+
"
&modifiedTo=
"
+
StrSunday
+
"
&formCode=timesheet&field=ts_author&type=partial&recordsCount=1&search=
"
+
userData
.
lastname
,
function
(
success
){
AS
.
SERVICES
.
hideWaitWindow
();
AS
.
SERVICES
.
hideWaitWindow
();
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
showFormData
(
"
6af6bf3d-a093-4a33-990c-2ec98c15423a
"
,
1
,
success
);
portal
.
player
.
showFormData
(
"
097a00e2-430c-436d-92e5-c2ea8edc5b30
"
,
1
,
success
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
ShowMessage
(
"
Документ успешно открыт!
"
);
ShowMessage
(
"
Документ успешно открыт!
"
);
var
formExistance
=
true
;
var
formExistance
=
true
;
...
@@ -118,10 +117,10 @@ var portal = {
...
@@ -118,10 +117,10 @@ var portal = {
return
;
return
;
}
else
{
}
else
{
AS
.
SERVICES
.
hideWaitWindow
();
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Документ успешно создан!
"
);
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
showFormData
(
result
.
documentID
,
0
,
result
.
dataUUID
);
portal
.
player
.
showFormData
(
result
.
documentID
,
0
,
result
.
dataUUID
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
ShowMessage
(
"
Документ успешно создан!
"
);
}
}
},
'
json
'
);
},
'
json
'
);
}
}
...
@@ -136,8 +135,6 @@ var portal = {
...
@@ -136,8 +135,6 @@ var portal = {
return
;
return
;
}
}
countingScore
();
var
data
=
portal
.
player
.
model
.
asfDataId
;
var
data
=
portal
.
player
.
model
.
asfDataId
;
portal
.
player
.
saveFormData
(
function
(
data
){
portal
.
player
.
saveFormData
(
function
(
data
){
if
(
_
.
isUndefined
(
data
)){
if
(
_
.
isUndefined
(
data
)){
...
@@ -157,12 +154,16 @@ var portal = {
...
@@ -157,12 +154,16 @@ var portal = {
var
StrSunday
=
period
.
substring
(
11
);
var
StrSunday
=
period
.
substring
(
11
);
portal
.
player
.
model
.
getModelWithId
(
"
ts_period_date_from
"
).
setValue
(
StrMonday
);
portal
.
player
.
model
.
getModelWithId
(
"
ts_period_date_from
"
).
setValue
(
StrMonday
);
portal
.
player
.
model
.
getModelWithId
(
"
ts_period_date_to
"
).
setValue
(
StrSunday
);
portal
.
player
.
model
.
getModelWithId
(
"
ts_period_date_to
"
).
setValue
(
StrSunday
);
portal
.
player
.
model
.
on
(
"
valueChange
"
,
function
(){
countingScore
();
});
}
}
};
};
function
countingScore
(){
function
countingScore
(){
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
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
++
){
var
row
=
Number
.
parseInt
(
i
/
10
);
var
row
=
Number
.
parseInt
(
i
/
10
);
...
@@ -251,7 +252,7 @@ var authFunc = function(){
...
@@ -251,7 +252,7 @@ var authFunc = function(){
AS
.
SERVICES
.
showWaitWindow
();
AS
.
SERVICES
.
showWaitWindow
();
AS
.
OPTIONS
.
login
=
$
(
"
input#login
"
).
val
();
AS
.
OPTIONS
.
login
=
$
(
"
input#login
"
).
val
();
AS
.
OPTIONS
.
password
=
$
(
"
input#password
"
).
val
();
AS
.
OPTIONS
.
password
=
$
(
"
input#password
"
).
val
();
portal
.
createPlayer
(
user
);
portal
.
createPlayer
();
$
(
"
.form_player_container
"
).
show
();
$
(
"
.form_player_container
"
).
show
();
$
(
"
.login-form
"
).
remove
();
$
(
"
.login-form
"
).
remove
();
$
(
"
.saveBtn
"
).
show
();
$
(
"
.saveBtn
"
).
show
();
...
...
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