mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Adding preference for story button placement.
This commit is contained in:
parent
fbd8659eed
commit
ad83318ca8
4 changed files with 28 additions and 2 deletions
|
@ -3187,7 +3187,7 @@ body {
|
|||
}
|
||||
.NB-sideoption .NB-sideoption-icon {
|
||||
width: 24px;
|
||||
padding: 7px 4px;
|
||||
padding: 9px 4px;
|
||||
height: 100%;
|
||||
float: right;
|
||||
background: transparent url('/media/embed/icons/circular/clock.png') no-repeat 8px center;
|
||||
|
@ -3207,7 +3207,7 @@ body {
|
|||
}
|
||||
|
||||
.NB-sideoption .NB-sideoption-title {
|
||||
padding: 7px 24px 8px 8px;
|
||||
padding: 10px 24px 8px 8px;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
height: 32px;
|
||||
|
|
|
@ -221,6 +221,9 @@
|
|||
}
|
||||
if (center) {
|
||||
var narrow = center.width() < 780;
|
||||
if (NEWSBLUR.assets.preference('story_button_placement') == "bottom") {
|
||||
narrow = true;
|
||||
}
|
||||
$windows.toggleClass('NB-narrow-content', narrow);
|
||||
this.flags.narrow_content = !!narrow;
|
||||
content_width = center.width() + (west ? west.width() : 0);
|
||||
|
|
|
@ -655,6 +655,21 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
'Show all comments'
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference NB-preference-story-button-placement' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-story-button-placement-1', type: 'radio', name: 'story_button_placement', value: 'bottom' }),
|
||||
$.make('label', { 'for': 'NB-preference-story-button-placement-1' }, 'Always show Train/Save/Share buttons below stories')
|
||||
]),
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-story-button-placement-2', type: 'radio', name: 'story_button_placement', value: 'right' }),
|
||||
$.make('label', { 'for': 'NB-preference-story-button-placement-2' }, 'Show buttons on the right (when there is room)')
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
'Story button placement'
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-tab NB-tab-keyboard' }, [
|
||||
|
@ -911,6 +926,12 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=story_button_placement]', $modal).each(function() {
|
||||
if ($(this).val() == ""+NEWSBLUR.Preferences.story_button_placement) {
|
||||
$(this).attr('checked', true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=keyboard_verticalarrows]', $modal).each(function() {
|
||||
if ($(this).val() == NEWSBLUR.Preferences.keyboard_verticalarrows) {
|
||||
$(this).attr('checked', true);
|
||||
|
@ -1042,6 +1063,7 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
NEWSBLUR.reader.switch_feed_view_unread_view();
|
||||
NEWSBLUR.reader.apply_story_styling(true);
|
||||
NEWSBLUR.reader.apply_tipsy_titles();
|
||||
NEWSBLUR.reader.adjust_for_narrow_window();
|
||||
NEWSBLUR.app.story_list.show_stories_preference_in_feed_view();
|
||||
NEWSBLUR.app.sidebar_header.count();
|
||||
if (self.original_preferences['feed_order'] != form['feed_order'] ||
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
'story_size' : 's',
|
||||
'story_line_spacing' : 'm',
|
||||
'hide_public_comments' : false,
|
||||
'story_button_placement' : "right",
|
||||
'timezone' : "{{ user_profile.timezone }}",
|
||||
'title_counts' : true,
|
||||
'truncate_story' : 'social',
|
||||
|
|
Loading…
Add table
Reference in a new issue