From a2a7c8093b7fb2966a40c6c6be45c4dd52683ab4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 27 Aug 2013 12:18:53 +0300 Subject: Use flash message for notification across app --- app/views/profiles/design.html.haml | 6 ------ app/views/profiles/notifications/show.html.haml | 9 --------- app/views/profiles/notifications/update.js.haml | 4 ++-- 3 files changed, 2 insertions(+), 17 deletions(-) (limited to 'app/views') diff --git a/app/views/profiles/design.html.haml b/app/views/profiles/design.html.haml index 75f00ab10a2..0d8075b7d43 100644 --- a/app/views/profiles/design.html.haml +++ b/app/views/profiles/design.html.haml @@ -8,9 +8,6 @@ %fieldset.application-theme %legend Application theme - .update-feedback.hide - %i.icon-ok - Saved .themes_opts = label_tag do .prev.default @@ -42,9 +39,6 @@ %fieldset.code-preview-theme %legend Code preview theme - .update-feedback.hide - %i.icon-ok - Saved .code_highlight_opts - color_schemes.each do |color_scheme_id, color_scheme| = label_tag do diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 356d5499f07..8353b2f5f23 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -56,12 +56,3 @@ - @users_projects.each do |users_project| - notification = Notification.new(users_project) = render 'settings', type: 'project', membership: users_project, notification: notification - - -.save-status-fixed - %span.update-success.cgreen.hide - %i.icon-ok - Saved - %span.update-failed.cred.hide - %i.icon-remove - Failed diff --git a/app/views/profiles/notifications/update.js.haml b/app/views/profiles/notifications/update.js.haml index 88e74d50671..84c6ab25599 100644 --- a/app/views/profiles/notifications/update.js.haml +++ b/app/views/profiles/notifications/update.js.haml @@ -1,6 +1,6 @@ - if @saved :plain - $('.save-status-fixed .update-success').showAndHide(); + new Flash("Notification settings saved", "notice") - else :plain - $('.save-status-fixed .update-failed').showAndHide(); + new Flash("Failed to save new settings", "alert") -- cgit v1.2.1