Commit 097c283a authored by Mike Greiling's avatar Mike Greiling

remove left_align setting from notification setting dropdown in favor of a pure css solution

parent 69ffa814
.notification-list-item {
line-height: 34px;
.dropdown-menu {
@extend .dropdown-menu-align-right;
}
}
.notification {
......
......@@ -188,6 +188,10 @@
margin-left: 10px;
}
.notification-dropdown .dropdown-menu {
@extend .dropdown-menu-align-right;
}
.download-button {
@media (max-width: $screen-md-max) {
margin-left: 0;
......
......@@ -37,11 +37,7 @@ class NotificationSettingsController < ApplicationController
def render_response
render json: {
html: view_to_html_string(
"shared/notifications/_button",
notification_setting: @notification_setting,
left_align: @notification_setting.source.nil?
),
html: view_to_html_string("shared/notifications/_button", notification_setting: @notification_setting),
saved: @saved
}
end
......
......@@ -30,7 +30,7 @@
%br
.clearfix
.form-group.pull-left.global-notification-setting
= render 'shared/notifications/button', notification_setting: @global_notification_setting, left_align: true
= render 'shared/notifications/button', notification_setting: @global_notification_setting
.clearfix
......
- left_align = local_assigns[:left_align]
- if notification_setting
.dropdown.notification-dropdown
= form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f|
......@@ -19,7 +18,7 @@
= notification_title(notification_setting.level)
= icon("caret-down")
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting, left_align: left_align
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting
= content_for :scripts_body do
= render "shared/notifications/custom_notifications", notification_setting: notification_setting
- left_align = local_assigns[:left_align]
%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting), ("dropdown-menu-align-right" unless left_align)] }
%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting)] }
- NotificationSetting.levels.each_key do |level|
- next if level == "custom"
- next if level == "global" && notification_setting.source.nil?
......
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