Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,712
Issues
1,712
List
Boards
Labels
Service Desk
Milestones
Merge Requests
87
Merge Requests
87
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
b2243695
Commit
b2243695
authored
Jun 16, 2014
by
Marc Duez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database.js : flash message
parent
ebcaad26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
browser/css/vidjil.less
browser/css/vidjil.less
+20
-0
browser/index.html
browser/index.html
+3
-0
browser/js/database.js
browser/js/database.js
+18
-3
No files found.
browser/css/vidjil.less
View file @
b2243695
...
...
@@ -1080,4 +1080,24 @@ span.logo
@-webkit-keyframes move {
to { background-position: 50px 50px; }
}
#flash_mes {
position : absolute;
display : block;
bottom : 0px;
right : 0px;
}
.flash {
width: 350px;
min-height: 20px;
border: solid;
border-width: 1px;
display: block;
border-radius: 5px;
padding: 5px;
margin: 5px;
background: @background;
border-color: @border;
}
\ No newline at end of file
browser/index.html
View file @
b2243695
...
...
@@ -273,6 +273,9 @@
</div>
</div>
<div
id=
"flash_mes"
>
</div>
<form
id=
"form"
></form>
</body>
...
...
browser/js/database.js
View file @
b2243695
...
...
@@ -68,9 +68,8 @@ Database.prototype = {
var
res
=
jQuery
.
parseJSON
(
result
);
if
(
res
.
redirect
)
this
.
call
(
res
.
redirect
,
res
.
args
)
//TODO : implémenter un flash message
if
(
res
.
message
)
console
.
log
(
"
database log :
"
+
res
.
message
)
if
(
res
.
message
)
this
.
flash
(
"
database :
"
+
res
.
message
)
return
res
}
...
...
@@ -404,6 +403,22 @@ Database.prototype = {
fixedHeader
.
css
(
"
top
"
,
offset
)
});
},
flash
:
function
(
str
){
var
div
=
jQuery
(
'
<div/>
'
,
{
text
:
str
,
style
:
'
display : none
'
,
class
:
'
flash
'
}).
appendTo
(
'
#flash_mes
'
)
.
slideDown
(
200
);
setTimeout
(
function
(){
div
.
fadeOut
(
'
slow
'
,
function
()
{
div
.
remove
();});
},
5000
);
}
}
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