mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
Correctly saving story layout and view settings for both feeds and folders. Now to get RSS feeds.
This commit is contained in:
parent
09c950ef89
commit
5dda0617f6
2 changed files with 53 additions and 22 deletions
|
@ -8579,22 +8579,27 @@ form.opml_import_form input {
|
|||
.NB-modal-exception .NB-exception-block-only {
|
||||
display: block;
|
||||
}
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-modal-title {
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-modal-title,
|
||||
.NB-modal-exception.NB-modal-folder-settings .NB-modal-title {
|
||||
display: block;
|
||||
}
|
||||
.NB-modal-exception .NB-modal-title.NB-exception-block-only {
|
||||
display: block;
|
||||
}
|
||||
.NB-modal-exception.NB-modal-folder-settings .NB-exception-block-only,
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-exception-block-only {
|
||||
display: none;
|
||||
}
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-exception-only,
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-exception-block-only {
|
||||
.NB-modal-exception.NB-modal-folder-settings .NB-exception-only,
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-exception-block-only,
|
||||
.NB-modal-exception.NB-modal-folder-settings .NB-exception-block-only {
|
||||
display: none;
|
||||
}
|
||||
.NB-modal-exception .NB-settings-only {
|
||||
display: none;
|
||||
}
|
||||
.NB-modal-exception.NB-modal-folder-settings .NB-settings-only,
|
||||
.NB-modal-exception.NB-modal-feed-settings .NB-settings-only {
|
||||
display: block;
|
||||
}
|
||||
|
@ -8653,20 +8658,23 @@ form.opml_import_form input {
|
|||
.NB-modal-exception .NB-fieldset-fields .NB-error {
|
||||
padding: 6px 0 6px 4px;
|
||||
}
|
||||
.NB-modal-feed-settings .NB-exception-option-status {
|
||||
.NB-modal-feed-settings .NB-exception-option-status,
|
||||
.NB-modal-folder-settings .NB-exception-option-status {
|
||||
color: #3945C0;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.NB-modal-feed-settings .NB-preference-label {
|
||||
.NB-modal-feed-settings .NB-preference-label,
|
||||
.NB-modal-folder-settings .NB-preference-label {
|
||||
float: left;
|
||||
margin: 10px 0;
|
||||
width: 102px;
|
||||
clear: both;
|
||||
}
|
||||
.NB-modal-feed-settings .NB-preference-options {
|
||||
.NB-modal-feed-settings .NB-preference-options,
|
||||
.NB-modal-folder-settings .NB-preference-options {
|
||||
margin: 6px 0;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -27,15 +27,16 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
NEWSBLUR.Modal.prototype.initialize_feed.call(this, this.feed_id);
|
||||
}
|
||||
this.make_modal();
|
||||
this.show_recommended_options_meta();
|
||||
if (this.feed) {
|
||||
this.show_recommended_options_meta();
|
||||
_.delay(_.bind(function() {
|
||||
this.get_feed_settings();
|
||||
}, this), 50);
|
||||
}
|
||||
this.handle_cancel();
|
||||
this.open_modal();
|
||||
this.initialize_feed(this.feed_id);
|
||||
|
||||
_.delay(_.bind(function() {
|
||||
this.get_feed_settings();
|
||||
}, this), 50);
|
||||
|
||||
this.$modal.bind('click', $.rescope(this.handle_click, this));
|
||||
this.$modal.bind('change', $.rescope(this.handle_change, this));
|
||||
},
|
||||
|
@ -43,9 +44,17 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
initialize_feed: function(feed_id) {
|
||||
var view_setting = this.model.view_setting(feed_id, 'view');
|
||||
var story_layout = this.model.view_setting(feed_id, 'layout');
|
||||
NEWSBLUR.Modal.prototype.initialize_feed.call(this, feed_id);
|
||||
$('input[name=feed_link]', this.$modal).val(this.feed.get('feed_link'));
|
||||
$('input[name=feed_address]', this.$modal).val(this.feed.get('feed_address'));
|
||||
|
||||
if (this.feed) {
|
||||
NEWSBLUR.Modal.prototype.initialize_feed.call(this, feed_id);
|
||||
$('input[name=feed_link]', this.$modal).val(this.feed.get('feed_link'));
|
||||
$('input[name=feed_address]', this.$modal).val(this.feed.get('feed_address'));
|
||||
$(".NB-exception-option-page", this.$modal).toggle(this.feed.is_feed() || this.feed.is_social());
|
||||
$(".NB-view-setting-original", this.$modal).toggle(this.feed.is_feed() || this.feed.is_social());
|
||||
} else if (this.folder) {
|
||||
NEWSBLUR.Modal.prototype.initialize_folder.call(this, feed_id);
|
||||
}
|
||||
|
||||
$('input[name=view_settings]', this.$modal).each(function() {
|
||||
if ($(this).val() == view_setting) {
|
||||
$(this).attr('checked', true);
|
||||
|
@ -59,14 +68,20 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
}
|
||||
});
|
||||
|
||||
$(".NB-exception-option-page", this.$modal).toggle(this.feed.is_feed() || this.feed.is_social());
|
||||
$(".NB-view-setting-original", this.$modal).toggle(this.feed.is_feed() || this.feed.is_social());
|
||||
if (this.feed.get('exception_type')) {
|
||||
if (this.folder) {
|
||||
this.$modal.addClass('NB-modal-folder-settings');
|
||||
this.$modal.removeClass('NB-modal-feed-settings');
|
||||
$(".NB-modal-title", this.$modal).text("Folder Settings");
|
||||
} else if (this.feed.get('exception_type')) {
|
||||
this.$modal.removeClass('NB-modal-folder-settings');
|
||||
this.$modal.removeClass('NB-modal-feed-settings');
|
||||
$(".NB-modal-title", this.$modal).text("Fix a misbehaving site");
|
||||
} else {
|
||||
this.$modal.removeClass('NB-modal-folder-settings');
|
||||
this.$modal.addClass('NB-modal-feed-settings');
|
||||
$(".NB-modal-title", this.$modal).text("Site Settings");
|
||||
}
|
||||
|
||||
|
||||
this.resize();
|
||||
},
|
||||
|
||||
|
@ -202,7 +217,7 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-fieldset NB-exception-option NB-exception-option-feed NB-modal-submit' }, [
|
||||
(this.feed && $.make('div', { className: 'NB-fieldset NB-exception-option NB-exception-option-feed NB-modal-submit' }, [
|
||||
$.make('h5', [
|
||||
$.make('div', { className: 'NB-exception-option-meta' }),
|
||||
$.make('span', { className: 'NB-exception-option-option NB-exception-only' }, 'Option 2:'),
|
||||
|
@ -223,8 +238,8 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
$.make('div', { className: 'NB-exception-feed-history' })
|
||||
]))
|
||||
])
|
||||
]),
|
||||
($.make('div', { className: 'NB-fieldset NB-exception-option NB-exception-option-page NB-modal-submit' }, [
|
||||
])),
|
||||
(this.feed && $.make('div', { className: 'NB-fieldset NB-exception-option NB-exception-option-page NB-modal-submit' }, [
|
||||
$.make('h5', [
|
||||
$.make('div', { className: 'NB-exception-option-meta' }),
|
||||
$.make('span', { className: 'NB-exception-option-option NB-exception-only' }, 'Option 3:'),
|
||||
|
@ -488,11 +503,19 @@ _.extend(NEWSBLUR.ReaderFeedException.prototype, {
|
|||
});
|
||||
|
||||
$.targetIs(e, { tagSelector: 'input[name=view_settings]' }, function($t, $p){
|
||||
self.model.view_setting(self.feed_id, {'view': $t.val()});
|
||||
if (self.folder) {
|
||||
self.folder.view_setting({'view': $t.val()});
|
||||
} else {
|
||||
NEWSBLUR.assets.view_setting(self.feed_id, {'view': $t.val()});
|
||||
}
|
||||
self.animate_saved();
|
||||
});
|
||||
$.targetIs(e, { tagSelector: 'input[name=story_layout]' }, function($t, $p){
|
||||
self.model.view_setting(self.feed_id, {'layout': $t.val()});
|
||||
if (self.folder) {
|
||||
self.folder.view_setting({'layout': $t.val()});
|
||||
} else {
|
||||
NEWSBLUR.assets.view_setting(self.feed_id, {'layout': $t.val()});
|
||||
}
|
||||
self.animate_saved();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue