Commit 5040dbfb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve-flash-message' into 'master'

Improve flash message

* dont fadeout so user can read
* show inside content block so user can notice it

See merge request !1119
parents 8ebe769f 20d6f969
......@@ -149,7 +149,6 @@ $ ->
if (flash = $(".flash-container")).length > 0
flash.click -> $(@).fadeOut()
flash.show()
setTimeout (-> flash.fadeOut()), 5000
# Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
......
......@@ -10,6 +10,5 @@ class Flash
flash.click -> $(@).fadeOut()
flash.show()
setTimeout (-> flash.fadeOut()), 5000
@Flash = Flash
.flash-container {
display: none;
cursor: pointer;
margin: 0;
text-align: center;
color: #fff;
font-size: 14px;
position: fixed;
bottom: 0;
width: 100%;
opacity: 0.8;
z-index: 100;
.flash-notice {
background: #49C;
padding: 10px;
text-shadow: 0 1px 1px #178;
@extend .alert;
@extend .alert-info;
}
.flash-alert {
background: #C67;
text-shadow: 0 1px 1px #945;
padding: 10px;
@extend .alert;
@extend .alert-danger;
}
}
......@@ -4,10 +4,10 @@
%body{class: "#{app_theme} admin", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: "Admin area"
= render "layouts/flash"
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/admin'
.container
.content= yield
.content
= render "layouts/flash"
= yield
= yield :embedded_scripts
......@@ -4,9 +4,9 @@
%body{class: "#{app_theme} application", :'data-page' => body_data_page }
= render "layouts/broadcast"
= render "layouts/head_panel", title: "Dashboard"
= render "layouts/flash"
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/dashboard'
.container
.content= yield
.content
= render "layouts/flash"
= yield
......@@ -2,7 +2,6 @@
%html{ lang: "en"}
= render "layouts/head"
%body.ui_basic.login-page
= render "layouts/flash"
.container
.content
.login-title
......@@ -10,6 +9,7 @@
%hr
.container
.content
= render "layouts/flash"
.row
.col-md-7.brand-holder
- if brand_item
......
......@@ -3,7 +3,7 @@
= render "layouts/head", title: "Error"
%body{class: "#{app_theme} application"}
= render "layouts/head_panel", title: "" if current_user
= render "layouts/flash"
.container.navless-container
= render "layouts/flash"
.error-page
= yield
......@@ -4,9 +4,9 @@
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash"
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/group'
.container
.content= yield
.content
= render "layouts/flash"
= yield
......@@ -4,8 +4,7 @@
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: @title
= render "layouts/flash"
.container.navless-container
.content
= render "layouts/flash"
= yield
......@@ -4,9 +4,9 @@
%body{class: "#{app_theme} profile", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: "Profile"
= render "layouts/flash"
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/profile'
.container
.content= yield
.content
= render "layouts/flash"
= yield
......@@ -5,15 +5,13 @@
= render "layouts/broadcast"
= render "layouts/head_panel", title: project_title(@project)
= render "layouts/init_auto_complete"
= render "layouts/flash"
- if can?(current_user, :download_code, @project)
= render 'shared/no_ssh'
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/project'
.container
.content
= render "layouts/flash"
.row
.col-md-2
= render "projects/settings_nav"
......
......@@ -5,13 +5,12 @@
= render "layouts/broadcast"
= render "layouts/head_panel", title: project_title(@project)
= render "layouts/init_auto_complete"
= render "layouts/flash"
- if can?(current_user, :download_code, @project)
= render 'shared/no_ssh'
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/project'
.container
.content= yield
.content
= render "layouts/flash"
= yield
= yield :embedded_scripts
......@@ -4,8 +4,7 @@
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: "Search"
= render "layouts/flash"
.container.navless-container
.content
= render "layouts/flash"
= yield
!!! 5
%html{ lang: "en"}
= render "layouts/head", title: "#{@team.name}"
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/head_panel", title: "team: #{@team.name}"
= render "layouts/flash"
%nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/team'
.container
.content= yield
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