diff --git a/media/css/reader.css b/media/css/reader.css index a91cc00ab..bca4bd714 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -4069,8 +4069,8 @@ background: transparent; .NB-menu-manage .NB-menu-manage-story-train .NB-menu-manage-image { background: transparent url('../img/icons/silk/bricks.png') no-repeat 0 2px; } -.NB-menu-manage .NB-menu-manage-story-train .NB-menu-manage-image { - background: transparent url('../img/icons/silk/bricks.png') no-repeat 0 2px; +.NB-menu-manage .NB-menu-manage-feed-settings .NB-menu-manage-image { + background: transparent url('../img/icons/silk/calculator.png') no-repeat 0 1px; } .NB-menu-manage .NB-menu-manage-feed-reload .NB-menu-manage-image { background: transparent url('../img/icons/silk/car.png') no-repeat 0 1px; @@ -4752,11 +4752,24 @@ background: transparent; margin-bottom: 6px; } -.NB-modal-exception input[type=text] { - width: 200px; - margin: 0 10px; +.NB-modal-exception .NB-exception-input-wrapper { + position: relative; + margin: 4px 0 0; +} +.NB-modal-exception .NB-exception-label { + position: absolute; + top: 2px; + left: 0; } +.NB-modal-exception input[type=text] { + width: 400px; + margin: 0 0 12px 104px; +} + +.NB-modal-exception .NB-exception-submit-wrapper { + margin: 0 0 2px 100px; +} /* ===================== */ /* = Feedchooser Modal = */ /* ===================== */ diff --git a/media/js/newsblur/reader.js b/media/js/newsblur/reader.js index 0dbed7cd0..1c0acb03b 100644 --- a/media/js/newsblur/reader.js +++ b/media/js/newsblur/reader.js @@ -3821,6 +3821,10 @@ $.make('div', { className: 'NB-menu-manage-image' }), $.make('div', { className: 'NB-menu-manage-title' }, 'Statistics') ]), + $.make('li', { className: 'NB-menu-manage-feed NB-menu-manage-feed-settings' }, [ + $.make('div', { className: 'NB-menu-manage-image' }), + $.make('div', { className: 'NB-menu-manage-title' }, 'Feed settings') + ]), $.make('li', { className: 'NB-menu-separator' }), $.make('li', { className: 'NB-menu-manage-feed NB-menu-manage-feed-train' }, [ $.make('div', { className: 'NB-menu-manage-image' }), @@ -4207,7 +4211,8 @@ var in_folder = $feed.parents('li.folder').eq(0).find('.folder_title_text').eq(0).text(); var duplicate_feed = this.find_feed_in_feed_list(feed_id).length > 1; - + + this.delete_feed(feed_id, $feed); this.model.delete_feed(feed_id, in_folder, function() { self.delete_feed(feed_id, $feed); }, duplicate_feed); @@ -5577,6 +5582,13 @@ self.open_feed_statistics_modal(feed_id); } }); + $.targetIs(e, { tagSelector: '.NB-menu-manage-feed-settings' }, function($t, $p){ + e.preventDefault(); + if (!$t.hasClass('NB-disabled')) { + var feed_id = $t.parents('.NB-menu-manage').data('feed_id'); + self.open_feed_exception_modal(feed_id, $t); + } + }); $.targetIs(e, { tagSelector: '.NB-menu-manage-feed-reload' }, function($t, $p){ e.preventDefault(); if (!$t.hasClass('NB-disabled')) { diff --git a/media/js/newsblur/reader_feed_exception.js b/media/js/newsblur/reader_feed_exception.js index f2a3824dd..0426b7f81 100644 --- a/media/js/newsblur/reader_feed_exception.js +++ b/media/js/newsblur/reader_feed_exception.js @@ -1,14 +1,18 @@ NEWSBLUR.ReaderFeedException = function(feed_id, options) { var defaults = {}; - + this.options = $.extend({}, defaults, options); - this.model = NEWSBLUR.AssetModel.reader(); + this.model = NEWSBLUR.AssetModel.reader(); this.feed_id = feed_id; - this.feed = this.model.get_feed(feed_id); + this.feed = this.model.get_feed(feed_id); + this.runner(); }; -NEWSBLUR.ReaderFeedException.prototype = { +NEWSBLUR.ReaderFeedException.prototype = new NEWSBLUR.Modal; +NEWSBLUR.ReaderFeedException.prototype.constructor = NEWSBLUR.ReaderFeedException; + +_.extend(NEWSBLUR.ReaderFeedException.prototype, { runner: function() { this.make_modal(); @@ -17,8 +21,6 @@ NEWSBLUR.ReaderFeedException.prototype = { this.open_modal(); this.$modal.bind('click', $.rescope(this.handle_click, this)); - - NEWSBLUR.log(['Exception Modal', this.feed]); }, make_modal: function() { @@ -52,13 +54,15 @@ NEWSBLUR.ReaderFeedException.prototype = { 'Change Website Address' ]), $.make('div', { className: 'NB-fieldset-fields' }, [ - $.make('div', [ + $.make('div', { className: 'NB-exception-input-wrapper' }, [ $.make('div', { className: 'NB-loading' }), - $.make('label', { 'for': 'NB-exception-input-link' }, [ + $.make('label', { 'for': 'NB-exception-input-link', className: 'NB-exception-label' }, [ $.make('div', { className: 'NB-folder-icon' }), 'Website URL: ' ]), - $.make('input', { type: 'text', id: 'NB-exception-input-link', className: 'NB-exception-input-link', name: 'feed_link', value: this.feed['feed_link'] }), + $.make('input', { type: 'text', id: 'NB-exception-input-link', className: 'NB-exception-input-link NB-input', name: 'feed_link', value: this.feed['feed_link'] }) + ]), + $.make('div', { className: 'NB-exception-submit-wrapper' }, [ $.make('input', { type: 'submit', value: 'Fetch Feed From Website', className: 'NB-modal-submit-green NB-modal-submit-link' }), $.make('div', { className: 'NB-error' }) ]) @@ -71,13 +75,15 @@ NEWSBLUR.ReaderFeedException.prototype = { 'Change RSS Feed Address' ]), $.make('div', { className: 'NB-fieldset-fields' }, [ - $.make('div', [ + $.make('div', { className: 'NB-exception-input-wrapper' }, [ $.make('div', { className: 'NB-loading' }), - $.make('label', { 'for': 'NB-exception-input-address' }, [ + $.make('label', { 'for': 'NB-exception-input-address', className: 'NB-exception-label' }, [ $.make('div', { className: 'NB-folder-icon' }), 'RSS/XML URL: ' ]), - $.make('input', { type: 'text', id: 'NB-exception-input-address', className: 'NB-exception-input-address', name: 'feed_address', value: this.feed['feed_address'] }), + $.make('input', { type: 'text', id: 'NB-exception-input-address', className: 'NB-exception-input-address NB-input', name: 'feed_address', value: this.feed['feed_address'] }) + ]), + $.make('div', { className: 'NB-exception-submit-wrapper' }, [ $.make('input', { type: 'submit', value: 'Parse this RSS/XML Feed', className: 'NB-modal-submit-green NB-modal-submit-address' }), $.make('div', { className: 'NB-error' }) ]) @@ -125,34 +131,6 @@ NEWSBLUR.ReaderFeedException.prototype = { } }, - open_modal: function() { - var self = this; - - this.$modal.modal({ - 'minWidth': 600, - 'maxWidth': 600, - 'overlayClose': true, - 'onOpen': function (dialog) { - dialog.overlay.fadeIn(200, function () { - dialog.container.fadeIn(200); - dialog.data.fadeIn(200); - }); - }, - 'onShow': function(dialog) { - $('#simplemodal-container').corner('6px'); - }, - 'onClose': function(dialog) { - dialog.data.hide().empty().remove(); - dialog.container.hide().empty().remove(); - dialog.overlay.fadeOut(200, function() { - dialog.overlay.empty().remove(); - $.modal.close(); - }); - $('.NB-modal-holder').empty().remove(); - } - }); - }, - handle_cancel: function() { var $cancel = $('.NB-modal-cancel', this.$modal); @@ -255,4 +233,4 @@ NEWSBLUR.ReaderFeedException.prototype = { }); } -}; \ No newline at end of file +}); \ No newline at end of file