Commit 54d95f58 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle flash message. Not it does not overflow head panel

parent e6b5f4ad
...@@ -54,10 +54,10 @@ $ -> ...@@ -54,10 +54,10 @@ $ ->
$(@).parents('form').submit() $(@).parents('form').submit()
# Flash # Flash
if (flash = $("#flash-container")).length > 0 if (flash = $(".flash-container")).length > 0
flash.click -> $(@).slideUp("slow") flash.click -> $(@).fadeOut()
flash.slideDown "slow" flash.show()
setTimeout (-> flash.slideUp("slow")), 3000 setTimeout (-> flash.fadeOut()), 3000
# Disable form buttons while a form is submitting # Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) -> $('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
......
...@@ -67,27 +67,17 @@ table a code { ...@@ -67,27 +67,17 @@ table a code {
} }
/** FLASH message **/ /** FLASH message **/
#flash-container { .flash-container {
height: 50px; display: none;
position: fixed; .alert {
z-index: 10001;
top: 0px;
width: 100%;
margin-bottom: 15px;
overflow: hidden;
background: white;
cursor: pointer; cursor: pointer;
border-bottom: 1px solid #ccc; margin: 0;
text-align: center; text-align: center;
display: none; border-radius: 0;
h4 { span {
color: #666; font-size: 14px;
font-size: 18px; }
line-height: 38px;
padding-top: 5px;
margin: 2px;
font-weight: normal;
} }
} }
......
/* Login Page */ /* Login Page */
body.login-page{ body.login-page{
padding-top: 7%; background: #EEE;
background: #666; .container .content { padding-top: 5%; }
} }
.login-box{ .login-box{
......
- if text = alert || notice .flash-container
#flash-container - if alert
%h4= text .alert
%span= alert
- elsif notice
.alert.alert-info
%span= notice
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "Admin area" = render "layouts/head", title: "Admin area"
%body{class: "#{app_theme} admin"} %body{class: "#{app_theme} admin"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Admin area" = render "layouts/head_panel", title: "Admin area"
= render "layouts/flash"
.container .container
%ul.main_menu %ul.main_menu
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "Dashboard" = render "layouts/head", title: "Dashboard"
%body{class: "#{app_theme} application"} %body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Dashboard" = render "layouts/head_panel", title: "Dashboard"
= render "layouts/flash"
.container .container
%ul.main_menu %ul.main_menu
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
......
...@@ -3,4 +3,7 @@ ...@@ -3,4 +3,7 @@
= render "layouts/head" = render "layouts/head"
%body.ui_basic.login-page %body.ui_basic.login-page
= render "layouts/flash" = render "layouts/flash"
.container= yield .container
.content
%center
= yield
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "Error" = render "layouts/head", title: "Error"
%body{class: "#{app_theme} application"} %body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "" = render "layouts/head_panel", title: ""
= render "layouts/flash"
.container .container
.content .content
%center.padded.prepend-top-20 %center.padded.prepend-top-20
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "#{@group.name}" = render "layouts/head", title: "#{@group.name}"
%body{class: "#{app_theme} application"} %body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "group: #{@group.name}" = render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash"
.container .container
%ul.main_menu %ul.main_menu
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "Profile" = render "layouts/head", title: "Profile"
%body{class: "#{app_theme} profile"} %body{class: "#{app_theme} profile"}
= render "layouts/flash"
= render "layouts/head_panel", title: "Profile" = render "layouts/head_panel", title: "Profile"
= render "layouts/flash"
.container .container
%ul.main_menu %ul.main_menu
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: @project.name_with_namespace = render "layouts/head", title: @project.name_with_namespace
%body{class: "#{app_theme} project"} %body{class: "#{app_theme} project"}
= render "layouts/flash"
= render "layouts/head_panel", title: project_title(@project) = render "layouts/head_panel", title: project_title(@project)
= render "layouts/flash"
- if can?(current_user, :download_code, @project) - if can?(current_user, :download_code, @project)
= render 'shared/no_ssh' = render 'shared/no_ssh'
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "#{@team.name}" = render "layouts/head", title: "#{@team.name}"
%body{class: "#{app_theme} application"} %body{class: "#{app_theme} application"}
= render "layouts/flash"
= render "layouts/head_panel", title: "team: #{@team.name}" = render "layouts/head_panel", title: "team: #{@team.name}"
= render "layouts/flash"
.container .container
%ul.main_menu %ul.main_menu
= nav_link(path: 'teams#show', html_options: {class: 'home'}) do = nav_link(path: 'teams#show', html_options: {class: 'home'}) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment