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
fa2d3497
Commit
fa2d3497
authored
Feb 08, 2018
by
Valentin Skripnikov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'a.habibulina-dev' into 'a.habibulina'
+save and bubbles v1 See merge request
!37
parents
fa5b129b
2aaa9b5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
221 additions
and
23 deletions
+221
-23
src/main/webapp/css/beau.css
src/main/webapp/css/beau.css
+78
-0
src/main/webapp/index.html
src/main/webapp/index.html
+17
-0
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+126
-23
No files found.
src/main/webapp/css/beau.css
View file @
fa2d3497
...
...
@@ -9,6 +9,7 @@
border-style
:
none
solid
solid
;
border-width
:
1px
;
top
:
150px
;
z-index
:
1
;
}
.header
{
...
...
@@ -56,3 +57,80 @@
border-color
:
#49b785
;
color
:
#ffffff
;
}
.saveBtn
{
margin-top
:
15px
;
width
:
100px
;
position
:
relative
;
height
:
35px
;
border-radius
:
5px
;
background-color
:
#49b785
;
border-color
:
#49b785
;
color
:
#ffffff
;
}
.container
{
position
:
absolute
;
top
:
-160px
;
left
:
520px
;
z-index
:
10000
;
}
#main-circle
{
width
:
90px
;
height
:
90px
;
border-radius
:
50%
;
background
:
transparent
;
position
:
relative
;
top
:
50px
;
z-index
:
10000
;
}
.circle1
{
width
:
20px
;
height
:
20px
;
border-radius
:
50%
;
background
:
#49b785
;
position
:
absolute
;
display
:
block
;
z-index
:
10000
;
}
.circle2
{
width
:
15px
;
height
:
15px
;
border-radius
:
50%
;
background
:
#49b785
;
position
:
absolute
;
z-index
:
10000
;
}
.circle3
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
background
:
#49b785
;
position
:
absolute
;
z-index
:
1000
;
}
#rectangle
{
width
:
300px
;
height
:
50px
;
position
:
absolute
;
top
:
30px
;
left
:
530px
;
z-index
:
10
;
background
:
#F0FFFF
;
border-style
:
solid
solid
solid
solid
;
border-radius
:
10px
;
border-width
:
4px
;
border-color
:
#B0C4DE
;
}
#msg
{
font-family
:
"Сomic Sans MS"
;
font-size
:
16px
;
position
:
relative
;
top
:
34%
;
}
src/main/webapp/index.html
View file @
fa2d3497
...
...
@@ -19,5 +19,22 @@
<div
id =
"form_player_div"
></div>
</div>
<div
id =
"authForm"
></div>
<button
class =
"saveBtn"
>
Сохранить
</button>
<!--WaitFunc-->
<div
class=
"container"
align=
"center"
>
<div
class=
"col-xs-12"
align=
"center"
>
<div
id=
"main-circle"
align=
"center"
>
<div
class=
"circle1"
></div>
<div
class=
"circle2"
></div>
<div
class=
"circle3"
></div>
</div>
</div>
</div>
<!--MsgRect-->
<div
class=
"MsgRect"
>
<div
id=
"rectangle"
>
<div
class=
"msg"
id=
"msg"
align=
"center"
></>
</div>
</div>
</body>
</html>
\ No newline at end of file
src/main/webapp/js/Player.js
View file @
fa2d3497
...
...
@@ -3,30 +3,14 @@
AS
.
OPTIONS
.
locale
=
"
ru
"
;
AS
.
OPTIONS
.
coreUrl
=
"
http://intern-dev.arta.kz/Synergy/
"
;
var
portal
=
{
player
:
null
,
clearPlayer
:
function
()
{
if
(
portal
.
player
)
{
portal
.
player
.
destroy
();
}
},
createPlayer
:
function
(
dataId
){
portal
.
clearPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
portal
.
player
.
view
.
setEditable
(
_
.
isUndefined
(
dataId
));
portal
.
player
.
showFormData
(
"
097a00e2-430c-436d-92e5-c2ea8edc5b30
"
,
1
,
dataId
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
}
};
function
CreateAuthForm
(){
$
(
"
.saveBtn
"
).
hide
();
var
forma
=
document
.
createElement
(
"
form
"
);
forma
.
className
=
"
login-form
"
;
forma
.
setAttribute
(
'
id
'
,
"
login-form
"
);
forma
.
setAttribute
(
'
id
'
,
"
login-form
"
);
forma
.
setAttribute
(
'
align
'
,
"
center
"
);
var
authHeader
=
document
.
createTextNode
(
'
Введите логин и пароль
'
);
...
...
@@ -74,18 +58,128 @@ function CreateAuthForm(){
authFunc
();
};
function
ShowMessage
(
message
){
if
(
message
.
length
>
30
){
$
(
"
.msg
"
).
css
({
'
top
'
:
'
20%
'
})
}
else
$
(
"
.msg
"
).
css
({
'
top
'
:
'
34%
'
})
$
(
"
.MsgRect
"
).
show
();
document
.
getElementById
(
"
msg
"
).
innerHTML
=
message
;
setTimeout
(
function
(){
$
(
"
.MsgRect
"
).
hide
();
},
3000
);
};
var
portal
=
{
player
:
null
,
clearPlayer
:
function
()
{
if
(
portal
.
player
)
{
portal
.
player
.
destroy
();
}
},
createPlayer
:
function
(){
portal
.
clearPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
'
rest/api/registry/create_doc?registryCode=registry_timesheets
'
,
function
(
result
){
if
(
result
.
errorCode
!=
"
0
"
)
{
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Ошибка во время создания документа..
"
);
return
;
}
else
{
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Документ успешно создан!
"
);
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
showFormData
(
result
.
documentID
,
0
,
result
.
dataUUID
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
}},
'
json
'
);
},
saveData
:
function
(){
var
errors
=
portal
.
player
.
model
.
getErrors
();
if
(
errors
.
length
>
0
)
{
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Введите все обязательные поля
"
);
return
;
}
var
data
=
portal
.
player
.
model
.
asfDataId
;
portal
.
player
.
saveFormData
(
function
(
data
){
if
(
_
.
isUndefined
(
data
)){
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Во время сохранения данных возникла ошибка
"
);
}
else
{
AS
.
SERVICES
.
hideWaitWindow
();
ShowMessage
(
"
Данные сохранены
"
);
}
});
}
};
//переменные для WaitCircles();
var
currentTime
=
Date
.
now
(),
r
=
40
,
left
=
''
,
Top
=
''
,
alpha
=
2
*
3.14
;
function
WaitCircles
(
num
){
var
count
=
num
;
var
t
;
let
startTime
=
setInterval
(
function
(
count
){
switch
(
num
){
case
'
1
'
:
t
=
Date
.
now
()
-
currentTime
;
left
=
150
+
r
*
Math
.
cos
(
alpha
*
t
);
Top
=
350
+
r
*
Math
.
sin
(
-
alpha
*
t
);
$
(
'
.circle1
'
).
css
({
'
left
'
:
left
,
'
top
'
:
Top
});
break
;
case
'
2
'
:
t
=
Date
.
now
()
-
currentTime
+
500
;
left
=
150
+
r
*
Math
.
cos
(
alpha
*
t
);
Top
=
350
+
r
*
Math
.
sin
(
-
alpha
*
t
);
$
(
'
.circle2
'
).
css
({
'
left
'
:
left
,
'
top
'
:
Top
});
break
;
case
'
3
'
:
t
=
Date
.
now
()
-
currentTime
+
1200
;
left
=
150
+
r
*
Math
.
cos
(
alpha
*
t
);
Top
=
350
+
r
*
Math
.
sin
(
-
alpha
*
t
);
$
(
'
.circle3
'
).
css
({
'
left
'
:
left
,
'
top
'
:
Top
});
break
;
case
'
stop
'
:
clearInterval
(
startTime
);
break
;
}
},
1
);
};
AS
.
SERVICES
.
showWaitWindow
=
function
(){
WaitCircles
(
'
1
'
);
WaitCircles
(
'
2
'
);
WaitCircles
(
'
3
'
);
$
(
"
.container
"
).
show
();
};
AS
.
SERVICES
.
hideWaitWindow
=
function
(){
WaitCircles
(
'
stop
'
);
$
(
"
.container
"
).
hide
();
};
var
authFunc
=
function
(){
jQuery
(
"
.submit
"
).
on
(
"
click
"
,
function
(
event
){
AS
.
SERVICES
.
showWaitWindow
();
AS
.
OPTIONS
.
login
=
$
(
"
input#login
"
).
val
();
AS
.
OPTIONS
.
password
=
$
(
"
input#password
"
).
val
();
portal
.
createPlayer
();
$
(
"
.form_player_container
"
).
show
();
$
(
"
.login-form
"
).
remove
();
portal
.
createPlayer
();
$
(
"
.form_player_container
"
).
show
();
$
(
"
.login-form
"
).
remove
();
$
(
"
.saveBtn
"
).
show
();
});
};
AS
.
SERVICES
.
unAuthorized
=
function
()
{
$
(
"
.container
"
).
hide
();
$
(
"
.login-form
"
).
remove
();
CreateAuthForm
();
};
...
...
@@ -93,4 +187,13 @@ AS.SERVICES.unAuthorized = function()
$
(
document
).
ready
(
function
(){
CreateAuthForm
();
$
(
"
.error
"
).
hide
();
});
\ No newline at end of file
$
(
"
.saveBtn
"
).
hide
();
$
(
"
.container
"
).
hide
();
$
(
"
.MsgRect
"
).
hide
();
$
(
"
.saveBtn
"
).
on
(
"
click
"
,
function
(
event
){
AS
.
SERVICES
.
showWaitWindow
();
portal
.
saveData
();
});
});
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