diff --git a/media/css/reader.css b/media/css/reader.css index 2f7130503..cde9f53dc 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -8821,6 +8821,10 @@ form.opml_import_form input { /* = Notifications Modal = */ /* ======================= */ +.NB-modal.NB-modal-notifications .NB-fieldset { + border-bottom: none; + width: 100%; +} .NB-modal-notifications .NB-preference-label { float: left; margin: 10px 0; @@ -8832,6 +8836,50 @@ form.opml_import_form input { float: left; overflow: hidden; } +.NB-feed-notification { + width: 100%; +} +.NB-feed-notification .NB-feed-notification-filter { + float: right; + margin: 0 12px; +} +.NB-feed-notification .NB-feed-title { + font-size: 12px; +} +.NB-feed-notification .NB-feed-icon { + width: 16px; + height: 16px; + float: left; + margin: 0 7px 0 0; +} +.NB-feed-notification .NB-feed-notification-filter .NB-unread-icon, +.NB-feed-notification .NB-feed-notification-filter .NB-focus-icon { + width: 8px; + height: 12px; + display: block; + float: left; + margin: 0 5px 0 2px; + background: transparent url('/media/embed/icons/circular/g_icn_unread.png') no-repeat 0 center; + background-size: 8px; +} +.NB-feed-notification .NB-feed-notification-filter .NB-focus-icon { + background: transparent url('/media/embed/icons/circular/g_icn_focus.png') no-repeat 0 center; + background-size: 8px; +} +.NB-feed-notification .segmented-control { + margin-top: -2px; + margin-bottom: 2px; +} +.NB-feed-notification .segmented-control li { + padding: 2px 6px; + font-size: 10px; +} +.NB-feed-notification .NB-feed-notifications { + float: right; +} +.NB-modal-notifications .NB-modal-section-site { + margin: 12px 0 0; +} /* ===================== */ diff --git a/media/js/newsblur/reader/reader_notifications.js b/media/js/newsblur/reader/reader_notifications.js index af290e727..5e7d8f222 100644 --- a/media/js/newsblur/reader/reader_notifications.js +++ b/media/js/newsblur/reader/reader_notifications.js @@ -55,8 +55,6 @@ _.extend(NEWSBLUR.ReaderNotifications.prototype, { populate_settings: function(data) { var $submit = $('.NB-modal-submit-save', this.$modal); var $loading = $('.NB-modal-loading', this.$modal); - var $page_history = $(".NB-exception-page-history", this.$modal); - var $feed_history = $(".NB-exception-feed-history", this.$modal); $loading.removeClass('NB-active'); this.resize(); @@ -71,29 +69,20 @@ _.extend(NEWSBLUR.ReaderNotifications.prototype, { ])), $.make('div', { className: 'NB-modal-loading' }), $.make('h2', { className: 'NB-modal-title' }, 'Notifications'), - $.make('h2', { className: 'NB-modal-subtitle' }, [ - $.make('img', { className: 'NB-modal-feed-image feed_favicon' }), - $.make('div', { className: 'NB-modal-feed-heading' }, [ - $.make('span', { className: 'NB-modal-feed-title' }), - $.make('span', { className: 'NB-modal-feed-subscribers' }) - ]) - ]), (this.feed && $.make('div', { className: 'NB-fieldset NB-modal-submit' }, [ - $.make('h5', [ - $.make('div', { className: 'NB-exception-option-status NB-right' }), - $.make('div', { className: 'NB-exception-option-meta' }), - 'Site Notifications' - ]), - $.make('div', { className: 'NB-fieldset-fields' }, [ - this.make_feed_notification(this.feed) + $.make('fieldset', [ + $.make('legend', 'Site Notifications'), + $.make('div', { className: 'NB-modal-section NB-modal-section-site'}, [ + this.make_feed_notification(this.feed) + ]) ]) ])), $.make('div', { className: 'NB-fieldset NB-modal-submit' }, [ - $.make('h5', [ - 'All notifications' - ]), - $.make('div', { className: 'NB-fieldset-fields' }, [ - this.make_feed_notifications() + $.make('fieldset', [ + $.make('legend', 'All Notifications'), + $.make('div', { className: 'NB-modal-section'}, [ + this.make_feed_notifications() + ]) ]) ]) ]); diff --git a/media/js/newsblur/views/feed_list_view.js b/media/js/newsblur/views/feed_list_view.js index a7940bf3b..701918f8e 100644 --- a/media/js/newsblur/views/feed_list_view.js +++ b/media/js/newsblur/views/feed_list_view.js @@ -232,6 +232,10 @@ NEWSBLUR.Views.FeedList = Backbone.View.extend({ NEWSBLUR.reader.open_feedchooser_modal({'premium_only': true}); } else if (next == 'password') { NEWSBLUR.reader.open_account_modal({'change_password': true}); + } else if (next == 'notifications') { + _.delay(function() { + NEWSBLUR.reader.open_notifications_modal(NEWSBLUR.assets.active_feed && NEWSBLUR.assets.active_feed.id); + }, 200); } var url = $.getQueryString('url') || $.getQueryString('add'); diff --git a/media/js/newsblur/views/feed_notification_view.js b/media/js/newsblur/views/feed_notification_view.js index 2a2abc105..6b04eed0f 100644 --- a/media/js/newsblur/views/feed_notification_view.js +++ b/media/js/newsblur/views/feed_notification_view.js @@ -12,14 +12,25 @@ NEWSBLUR.Views.FeedNotificationView = Backbone.View.extend({ render: function() { var feed = this.model; - var $feed = $(_.template('