Restyle flash message. Not it does not overflow head panel

This commit is contained in:
Dmitriy Zaporozhets 2013-02-28 11:06:52 +02:00
parent e6b5f4ade9
commit 54d95f5897
12 changed files with 34 additions and 36 deletions

View file

@ -54,10 +54,10 @@ $ ->
$(@).parents('form').submit()
# Flash
if (flash = $("#flash-container")).length > 0
flash.click -> $(@).slideUp("slow")
flash.slideDown "slow"
setTimeout (-> flash.slideUp("slow")), 3000
if (flash = $(".flash-container")).length > 0
flash.click -> $(@).fadeOut()
flash.show()
setTimeout (-> flash.fadeOut()), 3000
# Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->

View file

@ -67,27 +67,17 @@ table a code {
}
/** FLASH message **/
#flash-container {
height: 50px;
position: fixed;
z-index: 10001;
top: 0px;
width: 100%;
margin-bottom: 15px;
overflow: hidden;
background: white;
cursor: pointer;
border-bottom: 1px solid #ccc;
text-align: center;
.flash-container {
display: none;
.alert {
cursor: pointer;
margin: 0;
text-align: center;
border-radius: 0;
h4 {
color: #666;
font-size: 18px;
line-height: 38px;
padding-top: 5px;
margin: 2px;
font-weight: normal;
span {
font-size: 14px;
}
}
}

View file

@ -1,7 +1,7 @@
/* Login Page */
body.login-page{
padding-top: 7%;
background: #666;
background: #EEE;
.container .content { padding-top: 5%; }
}
.login-box{

View file

@ -1,3 +1,8 @@
- if text = alert || notice
#flash-container
%h4= text
.flash-container
- if alert
.alert
%span= alert
- elsif notice
.alert.alert-info
%span= notice

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "Admin area"
%body{class: "#{app_theme} admin"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Admin area"
= render "layouts/flash"
.container
%ul.main_menu
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "Dashboard"
%body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Dashboard"
= render "layouts/flash"
.container
%ul.main_menu
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do

View file

@ -3,4 +3,7 @@
= render "layouts/head"
%body.ui_basic.login-page
= render "layouts/flash"
.container= yield
.container
.content
%center
= yield

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "Error"
%body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: ""
= render "layouts/flash"
.container
.content
%center.padded.prepend-top-20

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "#{@group.name}"
%body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash"
.container
%ul.main_menu
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "Profile"
%body{class: "#{app_theme} profile"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Profile"
= render "layouts/flash"
.container
%ul.main_menu
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: @project.name_with_namespace
%body{class: "#{app_theme} project"}
= render "layouts/flash"
= render "layouts/head_panel", title: project_title(@project)
= render "layouts/flash"
- if can?(current_user, :download_code, @project)
= render 'shared/no_ssh'

View file

@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "#{@team.name}"
%body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "team: #{@team.name}"
= render "layouts/flash"
.container
%ul.main_menu
= nav_link(path: 'teams#show', html_options: {class: 'home'}) do