Commit 54d95f5897235009f670a8de262333fe528875cf
1 parent
e6b5f4ad
Exists in
master
and in
4 other branches
Restyle flash message. Not it does not overflow head panel
Showing
12 changed files
with
34 additions
and
36 deletions
Show diff stats
app/assets/javascripts/main.js.coffee
| ... | ... | @@ -54,10 +54,10 @@ $ -> |
| 54 | 54 | $(@).parents('form').submit() |
| 55 | 55 | |
| 56 | 56 | # Flash |
| 57 | - if (flash = $("#flash-container")).length > 0 | |
| 58 | - flash.click -> $(@).slideUp("slow") | |
| 59 | - flash.slideDown "slow" | |
| 60 | - setTimeout (-> flash.slideUp("slow")), 3000 | |
| 57 | + if (flash = $(".flash-container")).length > 0 | |
| 58 | + flash.click -> $(@).fadeOut() | |
| 59 | + flash.show() | |
| 60 | + setTimeout (-> flash.fadeOut()), 3000 | |
| 61 | 61 | |
| 62 | 62 | # Disable form buttons while a form is submitting |
| 63 | 63 | $('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) -> | ... | ... |
app/assets/stylesheets/common.scss
| ... | ... | @@ -67,27 +67,17 @@ table a code { |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** FLASH message **/ |
| 70 | -#flash-container { | |
| 71 | - height: 50px; | |
| 72 | - position: fixed; | |
| 73 | - z-index: 10001; | |
| 74 | - top: 0px; | |
| 75 | - width: 100%; | |
| 76 | - margin-bottom: 15px; | |
| 77 | - overflow: hidden; | |
| 78 | - background: white; | |
| 79 | - cursor: pointer; | |
| 80 | - border-bottom: 1px solid #ccc; | |
| 81 | - text-align: center; | |
| 70 | +.flash-container { | |
| 82 | 71 | display: none; |
| 72 | + .alert { | |
| 73 | + cursor: pointer; | |
| 74 | + margin: 0; | |
| 75 | + text-align: center; | |
| 76 | + border-radius: 0; | |
| 83 | 77 | |
| 84 | - h4 { | |
| 85 | - color: #666; | |
| 86 | - font-size: 18px; | |
| 87 | - line-height: 38px; | |
| 88 | - padding-top: 5px; | |
| 89 | - margin: 2px; | |
| 90 | - font-weight: normal; | |
| 78 | + span { | |
| 79 | + font-size: 14px; | |
| 80 | + } | |
| 91 | 81 | } |
| 92 | 82 | } |
| 93 | 83 | ... | ... |
app/assets/stylesheets/sections/login.scss
app/views/layouts/_flash.html.haml
app/views/layouts/admin.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "Admin area" |
| 4 | 4 | %body{class: "#{app_theme} admin"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "Admin area" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | %ul.main_menu |
| 9 | 9 | = nav_link(controller: :dashboard, html_options: {class: 'home'}) do | ... | ... |
app/views/layouts/application.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "Dashboard" |
| 4 | 4 | %body{class: "#{app_theme} application"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "Dashboard" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | %ul.main_menu |
| 9 | 9 | = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do | ... | ... |
app/views/layouts/devise.html.haml
app/views/layouts/errors.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "Error" |
| 4 | 4 | %body{class: "#{app_theme} application"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | .content |
| 9 | 9 | %center.padded.prepend-top-20 | ... | ... |
app/views/layouts/group.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "#{@group.name}" |
| 4 | 4 | %body{class: "#{app_theme} application"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "group: #{@group.name}" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | %ul.main_menu |
| 9 | 9 | = nav_link(path: 'groups#show', html_options: {class: 'home'}) do | ... | ... |
app/views/layouts/profile.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "Profile" |
| 4 | 4 | %body{class: "#{app_theme} profile"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "Profile" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | %ul.main_menu |
| 9 | 9 | = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do | ... | ... |
app/views/layouts/project_resource.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: @project.name_with_namespace |
| 4 | 4 | %body{class: "#{app_theme} project"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: project_title(@project) |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | - if can?(current_user, :download_code, @project) |
| 8 | 8 | = render 'shared/no_ssh' |
| 9 | 9 | ... | ... |
app/views/layouts/user_team.html.haml
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | %html{ lang: "en"} |
| 3 | 3 | = render "layouts/head", title: "#{@team.name}" |
| 4 | 4 | %body{class: "#{app_theme} application"} |
| 5 | - = render "layouts/flash" | |
| 6 | 5 | = render "layouts/head_panel", title: "team: #{@team.name}" |
| 6 | + = render "layouts/flash" | |
| 7 | 7 | .container |
| 8 | 8 | %ul.main_menu |
| 9 | 9 | = nav_link(path: 'teams#show', html_options: {class: 'home'}) do | ... | ... |