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
7e4f12b3
Commit
7e4f12b3
authored
Feb 05, 2018
by
Alina Habibulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auth form -v4
parent
06e1d4c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
src/main/webapp/css/beau.css
src/main/webapp/css/beau.css
+1
-1
src/main/webapp/index.html
src/main/webapp/index.html
+1
-1
src/main/webapp/js/Player.js
src/main/webapp/js/Player.js
+14
-17
No files found.
src/main/webapp/css/beau.css
View file @
7e4f12b3
...
@@ -55,4 +55,4 @@
...
@@ -55,4 +55,4 @@
background-color
:
#49b785
;
background-color
:
#49b785
;
border-color
:
#49b785
;
border-color
:
#49b785
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
\ No newline at end of file
src/main/webapp/index.html
View file @
7e4f12b3
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
<div
id =
"form_player_container"
align =
"center"
>
<div
id =
"form_player_container"
align =
"center"
>
<div
id =
"form_player_div"
></div>
<div
id =
"form_player_div"
></div>
</div>
</div>
<div
id=
"authForm"
></div>
<div
id
=
"authForm"
></div>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/webapp/js/Player.js
View file @
7e4f12b3
...
@@ -7,22 +7,19 @@ var portal = {
...
@@ -7,22 +7,19 @@ var portal = {
player
:
null
,
player
:
null
,
clearPlayer
:
function
()
{
clearPlayer
:
function
()
{
if
(
portal
.
player
)
{
if
(
portal
.
player
)
{
portal
.
player
.
destroy
();
portal
.
player
.
destroy
();
}
}
},
},
createPlayer
:
function
(
formCode
){
createPlayer
:
function
(
dataId
){
portal
.
clearPlayer
();
portal
.
clearPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
portal
.
player
.
showFormByCode
(
formCode
);
portal
.
player
.
view
.
setEditable
(
_
.
isUndefined
(
dataId
));
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
portal
.
player
.
showFormData
(
"
097a00e2-430c-436d-92e5-c2ea8edc5b30
"
,
1
,
dataId
);
}
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
};
}
AS
.
SERVICES
.
unAuthorized
=
function
()
{
CreateAuthForm
();
};
};
function
CreateAuthForm
(){
function
CreateAuthForm
(){
...
@@ -81,19 +78,19 @@ var authFunc = function(){
...
@@ -81,19 +78,19 @@ var authFunc = function(){
jQuery
(
"
.submit
"
).
on
(
"
click
"
,
function
(
event
){
jQuery
(
"
.submit
"
).
on
(
"
click
"
,
function
(
event
){
AS
.
OPTIONS
.
login
=
$
(
"
input#login
"
).
val
();
AS
.
OPTIONS
.
login
=
$
(
"
input#login
"
).
val
();
AS
.
OPTIONS
.
password
=
$
(
"
input#password
"
).
val
();
AS
.
OPTIONS
.
password
=
$
(
"
input#password
"
).
val
();
var
xhr
=
new
XMLHttpRequest
();
portal
.
createPlayer
();
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
'
rest/api
'
,
xhr
);
if
(
xhr
.
status
!=
200
)
{
$
(
"
.form_player_container
"
).
show
();
$
(
"
.form_player_container
"
).
show
();
portal
.
createPlayer
(
"
timesheet
"
);
$
(
"
.login-form
"
).
remove
();
$
(
"
.login-form
"
).
remove
();
}
else
{
CreateAuthForm
();
}
});
});
};
};
AS
.
SERVICES
.
unAuthorized
=
function
()
{
$
(
"
.authForm
"
).
remove
();
CreateAuthForm
();
};
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
CreateAuthForm
();
CreateAuthForm
();
$
(
"
.error
"
).
hide
();
$
(
"
.error
"
).
hide
();
});
});
\ No newline at end of file
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