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
03942d7d
Commit
03942d7d
authored
Feb 07, 2018
by
Alina Habibulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+save and bubbles v1
parent
55b90248
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
22 deletions
+183
-22
src/main/webapp/css/beau.css
src/main/webapp/css/beau.css
+58
-0
src/main/webapp/index.html
src/main/webapp/index.html
+11
-0
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+114
-22
No files found.
src/main/webapp/css/beau.css
View file @
03942d7d
...
...
@@ -9,6 +9,7 @@
border-style
:
none
solid
solid
;
border-width
:
1px
;
top
:
150px
;
z-index
:
1
;
}
.header
{
...
...
@@ -56,3 +57,60 @@
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
:
10000
;
}
src/main/webapp/index.html
View file @
03942d7d
...
...
@@ -19,5 +19,16 @@
<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>
</body>
</html>
\ No newline at end of file
src/main/webapp/js/Player.js
View file @
03942d7d
...
...
@@ -3,30 +3,15 @@
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 +59,117 @@ function CreateAuthForm(){
authFunc
();
};
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
();
alert
(
"
Ошибка во время создания документа..
"
);
return
;
}
else
{
AS
.
SERVICES
.
hideWaitWindow
();
alert
(
"
Документ успешно создан!
"
);
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
();
alert
(
"
Введите все обязательные поля
"
);
return
;
}
var
data
=
portal
.
player
.
model
.
asfDataId
;
portal
.
player
.
saveFormData
(
function
(
data
){
if
(
_
.
isUndefined
(
data
)){
AS
.
SERVICES
.
hideWaitWindow
();
alert
(
"
Во время сохранения данных возникла ошибка
"
);
}
else
{
AS
.
SERVICES
.
hideWaitWindow
();
alert
(
"
Данные сохранены
"
);
}
});
}
};
//переменные для 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 +177,12 @@ AS.SERVICES.unAuthorized = function()
$
(
document
).
ready
(
function
(){
CreateAuthForm
();
$
(
"
.error
"
).
hide
();
});
\ No newline at end of file
$
(
"
.saveBtn
"
).
hide
();
$
(
"
.container
"
).
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