# HG changeset patch # User Mads Kiilerich # Date 1497740958 -7200 # Node ID 80ae9f5e9b326dde1da9ed7ed1564a9c2e3bd151 # Parent f2c7bf6f72d5615e9f9bd5504dee62df1e497ad0 notifications: remove custom 'container' class to avoid conflict with Bootstrap ... and rewrite things to use plain Bootstrap Most of the markup and styling turned out to be easy to replace with plain Bootstrap markup. diff -r f2c7bf6f72d5 -r 80ae9f5e9b32 kallithea/public/css/style.css --- a/kallithea/public/css/style.css Sun Jun 18 01:09:18 2017 +0200 +++ b/kallithea/public/css/style.css Sun Jun 18 01:09:18 2017 +0200 @@ -2956,46 +2956,6 @@ border-radius: 4px !important; } -.notification-header { - padding-top: 6px; -} -.notification-header .desc { - font-size: 16px; - height: 24px; - float: left -} -.notification-list .container.unread { - background: none repeat scroll 0 0 rgba(255, 255, 180, 0.6); -} -.notification-header .gravatar { - background: none repeat scroll 0 0 transparent; - padding: 0px 0px 0px 8px; -} -.notification-list .container .notification-header .desc { - font-weight: bold; - font-size: 17px; -} -.notification-header .delete-notifications { - float: right; - padding-top: 8px; - cursor: pointer; -} -.notification-header .read-notifications { - float: right; - padding-top: 8px; - cursor: pointer; -} -.notification-subject { - clear: both; - border-bottom: 1px solid #eee; - padding: 5px 0px; -} - -.notification-body { - clear: both; - margin: 34px 2px 2px 8px -} - /**** PULL REQUESTS *****/ diff -r f2c7bf6f72d5 -r 80ae9f5e9b32 kallithea/public/js/base.js --- a/kallithea/public/js/base.js Sun Jun 18 01:09:18 2017 +0200 +++ b/kallithea/public/js/base.js Sun Jun 18 01:09:18 2017 +0200 @@ -971,7 +971,7 @@ var readNotification = function(url, notification_id, callbacks){ var success = function(o){ var $obj = $("#notification_"+notification_id); - $obj.removeClass('unread'); + $obj.removeClass('list-group-item-warning'); $obj.find('.read-notification').remove(); _run_callbacks(callbacks); }; diff -r f2c7bf6f72d5 -r 80ae9f5e9b32 kallithea/templates/admin/notifications/notifications.html --- a/kallithea/templates/admin/notifications/notifications.html Sun Jun 18 01:09:18 2017 +0200 +++ b/kallithea/templates/admin/notifications/notifications.html Sun Jun 18 01:09:18 2017 +0200 @@ -21,9 +21,9 @@
%if c.notifications: ${_('Mark All Read')} diff -r f2c7bf6f72d5 -r 80ae9f5e9b32 kallithea/templates/admin/notifications/notifications_data.html --- a/kallithea/templates/admin/notifications/notifications_data.html Sun Jun 18 01:09:18 2017 +0200 +++ b/kallithea/templates/admin/notifications/notifications_data.html Sun Jun 18 01:09:18 2017 +0200 @@ -1,27 +1,18 @@ - %if c.notifications: -<% -unread = lambda n:{False:'unread'}.get(n) -%> -
+
%for notification in c.notifications: -
-
+
${h.gravatar_div(notification.notification.created_by_user.email, size=24)} - + ${notification.notification.description} - - + + %if not notification.read: + ${_('Mark as read')} + %endif + ${_('Delete')} - %if not notification.read: - - - - %endif -
-
%endfor
diff -r f2c7bf6f72d5 -r 80ae9f5e9b32 kallithea/templates/admin/notifications/show_notification.html --- a/kallithea/templates/admin/notifications/show_notification.html Sun Jun 18 01:09:18 2017 +0200 +++ b/kallithea/templates/admin/notifications/show_notification.html Sun Jun 18 01:09:18 2017 +0200 @@ -22,17 +22,17 @@
-
+
${h.gravatar_div(c.notification.created_by_user.email, size=24)} - + ${c.notification.description} - - - + ${_('Delete')}
-
-
${h.literal(c.notification.subject)}
+
+ %if c.notification.subject: +
${h.literal(c.notification.subject)}
+ %endif
%if c.notification.body: ${h.render_w_mentions(c.notification.body)}