Adding new buttons for adding and removing dashboard story list modules. Finally get to use the right-side dashboard module. Looks great in 3 column as well.

This commit is contained in:
Samuel Clay 2022-05-17 13:45:51 -04:00
parent e7c507bae9
commit 9c115ebbb7
13 changed files with 228 additions and 32 deletions

View file

@ -2135,24 +2135,37 @@ class MDashboardRiver(mongo.Document):
def get_user_rivers(cls, user_id):
return cls.objects(user_id=user_id)
@classmethod
def remove_river(cls, user_id, river_side, river_order):
try:
river = cls.objects.get(user_id=user_id, river_side=river_side, river_order=river_order)
except cls.DoesNotExist:
return
river.delete()
for r, river in enumerate(cls.objects.filter(user_id=user_id, river_side=river_side)):
if river.river_order != r:
logging.debug(f" ---> Rebalancing {river} from {river.river_order} to {r}")
river.river_order = r
river.save()
@classmethod
def save_user(cls, user_id, river_id, river_side, river_order):
try:
river = cls.objects.get(user_id=user_id, river_side=river_side, river_order=river_order)
except cls.DoesNotExist:
river = None
if not river:
river = cls.objects.create(user_id=user_id, river_id=river_id,
river_side=river_side, river_order=river_order)
river_side=river_side, river_order=river_order)
river.river_id = river_id
river.river_side = river_side
river.river_order = river_order
river.save()
return river
class RNewUserQueue:
KEY = "new_user_queue"

View file

@ -64,4 +64,5 @@ urlpatterns = [
url(r'^save_search', views.save_search, name='save-search'),
url(r'^delete_search', views.delete_search, name='delete-search'),
url(r'^save_dashboard_river', views.save_dashboard_river, name='save-dashboard-river'),
url(r'^remove_dashboard_river', views.remove_dashboard_river, name='remove-dashboard-river'),
]

View file

@ -2877,7 +2877,7 @@ def delete_search(request):
def save_dashboard_river(request):
river_id = request.POST['river_id']
river_side = request.POST['river_side']
river_order = request.POST['river_order']
river_order = int(request.POST['river_order'])
logging.user(request, "~FCSaving dashboard river: ~SB%s~SN (%s %s)" % (river_id, river_side, river_order))
@ -2887,3 +2887,19 @@ def save_dashboard_river(request):
return {
'dashboard_rivers': dashboard_rivers,
}
@required_params('river_id', 'river_side', 'river_order')
@json.json_view
def remove_dashboard_river(request):
river_id = request.POST['river_id']
river_side = request.POST['river_side']
river_order = int(request.POST['river_order'])
logging.user(request, "~FRRemoving~FC dashboard river: ~SB%s~SN (%s %s)" % (river_id, river_side, river_order))
MDashboardRiver.remove_river(request.user.pk, river_side, river_order)
dashboard_rivers = MDashboardRiver.get_user_rivers(request.user.pk)
return {
'dashboard_rivers': dashboard_rivers,
}

View file

@ -4436,6 +4436,10 @@ body {
text-align: center;
width: 132px;
line-height: 12px;
transition: width 0.12s ease-out;
}
.NB-story-starred .NB-feed-story-sideoptions-container {
width: 194px;
}
.NB-narrow-content .NB-feed-story-sideoptions-container {
@ -4576,7 +4580,7 @@ body {
margin: 0;
}
.NB-sideoption-save {
padding: 4px 12px 6px;
padding: 4px 6px 6px;
border: 1px solid #DBE6EA;
text-align: left;
color: #606060;
@ -4586,14 +4590,13 @@ body {
margin: 11px 2px 0 0;
width: 16px;
height: 16px;
background: transparent url("/media/img/icons/nouncs/tag.svg") no-repeat 0 0;
background: transparent url("/media/img/icons/nouns/tag.svg") no-repeat 0 0;
background-size: 14px;
}
.NB-sideoption-save .NB-sideoption-save-title {
text-transform: uppercase;
font-size: 10px;
text-align: left;
text-shadow: 0 1px 0 #F6F6F6;
color: #202020;
margin: 12px 0 4px;
}
@ -4618,6 +4621,7 @@ body {
color: white;
font-weight: bold;
cursor: pointer;
display: inline-block;
}
.NB-sideoption-save .NB-sideoption-save-populate:hover {
background-color: rgba(205, 205, 205, .8);
@ -5949,7 +5953,8 @@ form.opml_import_form input {
.NB-dashboard-columns-triple .NB-splash-modules .NB-account-wide {
margin: 0 24px;
}
.NB-dashboard-columns-triple .NB-dashboard-rivers-left {
.NB-dashboard-columns-triple .NB-dashboard-rivers-left,
.NB-dashboard-columns-triple .NB-dashboard-rivers-right {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
@ -5957,16 +5962,20 @@ form.opml_import_form input {
justify-content: center;
gap: 24px;
}
.NB-density-compact.NB-dashboard-columns-triple .NB-dashboard-rivers-left {
.NB-density-compact.NB-dashboard-columns-triple .NB-dashboard-rivers-left,
.NB-density-compact.NB-dashboard-columns-triple .NB-dashboard-rivers-right {
gap: 4px;
}
.NB-dashboard-columns-triple .NB-dashboard-rivers-left .NB-dashboard-river {
.NB-dashboard-columns-triple .NB-dashboard-rivers-left .NB-dashboard-river,
.NB-dashboard-columns-triple .NB-dashboard-rivers-right .NB-dashboard-river {
flex-basis: 100%;
}
.NB-dashboard-columns-triple .NB-dashboard-rivers-left > * {
.NB-dashboard-columns-triple .NB-dashboard-rivers-left > *,
.NB-dashboard-columns-triple .NB-dashboard-rivers-right > * {
flex: 1;
}
.NB-dashboard-columns-triple .NB-dashboard-rivers-left .NB-feedbar-options {
.NB-dashboard-columns-triple .NB-dashboard-rivers-left .NB-feedbar-options,
.NB-dashboard-columns-triple .NB-dashboard-rivers-right .NB-feedbar-options {
text-indent: 258%;
white-space: nowrap;
overflow: hidden;
@ -7635,7 +7644,8 @@ form.opml_import_form input {
.NB-module-header {
transition: margin 0.24s ease-out;
}
.NB-modules-center .NB-module {
.NB-dashboard-rivers-left .NB-module,
.NB-dashboard-rivers-right .NB-module {
margin: 0 0 34px;
clear: both;
}
@ -7648,7 +7658,7 @@ form.opml_import_form input {
.NB-module-river .NB-module-river-favicon {
display: inline-block;
cursor: pointer;
/* flex: 1; */}
}
.NB-module-river .NB-module-river-favicon img {
width: 16px;
height: 16px;
@ -7659,12 +7669,15 @@ form.opml_import_form input {
display: inline-block;
cursor: pointer;
text-align: left;
display: flex;justify-content: center;}
display: flex;
justify-content: center;
}
.NB-module-river .NB-dashboard-column-control {
float: left;
line-height: 0;
display: none;
margin-right: 6px;}
margin-right: 6px;
}
.NB-module-river .NB-dashboard-column-control.NB-active {
display: inline-block;
}
@ -13444,6 +13457,48 @@ margin-right: 6px;}
}
.NB-filter-popover .NB-modal-feed-chooser {
width: 100%;
margin: 0 0 6px;
}
.NB-filter-popover .NB-filter-popover-manage-dashboard-modules {
display: flex;
gap: 6px;
}
.NB-filter-popover .NB-filter-popover-manage-button {
flex: 1 2 0;
border-radius: 4px;
font-size: 12px;
margin: 2px 0;
padding: 4px 6px;
display: flex;
gap: 6px;
}
.NB-filter-popover .NB-filter-popover-manage-button:hover {
cursor: pointer;
background-color: #d5d6d2;
}
.NB-filter-popover .NB-filter-popover-manage-button .NB-icon {
/* flex: 1 1 0; */
width: 16px;
height: 16px;
}
.NB-filter-popover .NB-filter-popover-manage-button .NB-text {
flex: 2 1 0;
}
.NB-filter-popover .NB-filter-popover-dashboard-add-module-left .NB-icon {
background: transparent url('/media/embed/icons/nouns/add-list.svg') no-repeat 0 0;
background-size: 16px;
}
.NB-filter-popover .NB-filter-popover-dashboard-add-module-right .NB-icon {
background: transparent url('/media/embed/icons/nouns/add-list-right.svg') no-repeat 0 0;
background-size: 16px;
order: 2;
}
.NB-filter-popover .NB-filter-popover-dashboard-remove-module .NB-icon {
background: transparent url('/media/embed/icons/nouns/remove-list.svg') no-repeat 0 0;
background-size: 16px;
}
.NB-filter-popover .NB-filter-popover-dashboard-add-module-right .NB-text {
text-align: right;
}
.NB-feedbar-options-stat {
position: relative;

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="107px" height="107px" viewBox="0 0 107 107" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>add-list-right</title>
<g id="add-list-right" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="noun-add-to-list-1913842-95978E" transform="translate(11.000000, 17.000000)" fill="#95968E" fill-rule="nonzero">
<path d="M4,8 L49.332,8 C51.5429,8 53.332,6.2109 53.332,4 C53.332,1.7891 51.5429,0 49.332,0 L4,0 C1.7891,0 0,1.7891 0,4 C0,6.2109 1.7891,8 4,8 Z" id="Path"></path>
<path d="M4,24 L49.332,24 C51.5429,24 53.332,22.2109 53.332,20 C53.332,17.7891 51.5429,16 49.332,16 L4,16 C1.7891,16 0,17.7891 0,20 C0,22.2109 1.7891,24 4,24 Z" id="Path"></path>
<path d="M4,40 L49.332,40 C51.5429,40 53.332,38.2109 53.332,36 C53.332,33.7891 51.5429,32 49.332,32 L4,32 C1.7891,32 0,33.7891 0,36 C0,38.2109 1.7891,40 4,40 Z" id="Path"></path>
<path d="M33.332,48 L4,48 C1.7891,48 0,49.7891 0,52 C0,54.2109 1.7891,56 4,56 L33.332,56 C35.5429,56 37.332,54.2109 37.332,52 C37.332,49.7891 35.5429,48 33.332,48 Z" id="Path"></path>
<path d="M81.332,48 L69.332,48 L69.332,36 C69.332,33.7891 67.5429,32 65.332,32 C63.1211,32 61.332,33.7891 61.332,36 L61.332,48 L49.332,48 C47.1211,48 45.332,49.7891 45.332,52 C45.332,54.2109 47.1211,56 49.332,56 L61.332,56 L61.332,68 C61.332,70.2109 63.1211,72 65.332,72 C67.5429,72 69.332,70.2109 69.332,68 L69.332,56 L81.332,56 C83.5429,56 85.332,54.2109 85.332,52 C85.332,49.7891 83.5429,48 81.332,48 Z" id="Path"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="107px" height="107px" viewBox="0 0 107 107" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>add-list</title>
<g id="add-list" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="noun-add-to-list-1913842-95978E" transform="translate(53.666000, 53.000000) scale(-1, 1) translate(-53.666000, -53.000000) translate(11.000000, 17.000000)" fill="#95968E" fill-rule="nonzero">
<path d="M4,8 L49.332,8 C51.5429,8 53.332,6.2109 53.332,4 C53.332,1.7891 51.5429,0 49.332,0 L4,0 C1.7891,0 0,1.7891 0,4 C0,6.2109 1.7891,8 4,8 Z" id="Path"></path>
<path d="M4,24 L49.332,24 C51.5429,24 53.332,22.2109 53.332,20 C53.332,17.7891 51.5429,16 49.332,16 L4,16 C1.7891,16 0,17.7891 0,20 C0,22.2109 1.7891,24 4,24 Z" id="Path"></path>
<path d="M4,40 L49.332,40 C51.5429,40 53.332,38.2109 53.332,36 C53.332,33.7891 51.5429,32 49.332,32 L4,32 C1.7891,32 0,33.7891 0,36 C0,38.2109 1.7891,40 4,40 Z" id="Path"></path>
<path d="M33.332,48 L4,48 C1.7891,48 0,49.7891 0,52 C0,54.2109 1.7891,56 4,56 L33.332,56 C35.5429,56 37.332,54.2109 37.332,52 C37.332,49.7891 35.5429,48 33.332,48 Z" id="Path"></path>
<path d="M81.332,48 L69.332,48 L69.332,36 C69.332,33.7891 67.5429,32 65.332,32 C63.1211,32 61.332,33.7891 61.332,36 L61.332,48 L49.332,48 C47.1211,48 45.332,49.7891 45.332,52 C45.332,54.2109 47.1211,56 49.332,56 L61.332,56 L61.332,68 C61.332,70.2109 63.1211,72 65.332,72 C67.5429,72 69.332,70.2109 69.332,68 L69.332,56 L81.332,56 C83.5429,56 85.332,54.2109 85.332,52 C85.332,49.7891 83.5429,48 81.332,48 Z" id="Path"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="107px" height="107px" viewBox="0 0 107 107" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>remove-list</title>
<g id="remove-list" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="noun-add-to-list-1913842-95978E" transform="translate(11.000000, 17.000000)" fill="#95968E" fill-rule="nonzero">
<path d="M4,8 L49.332,8 C51.5429,8 53.332,6.2109 53.332,4 C53.332,1.7891 51.5429,0 49.332,0 L4,0 C1.7891,0 0,1.7891 0,4 C0,6.2109 1.7891,8 4,8 Z" id="Path"></path>
<path d="M4,24 L49.332,24 C51.5429,24 53.332,22.2109 53.332,20 C53.332,17.7891 51.5429,16 49.332,16 L4,16 C1.7891,16 0,17.7891 0,20 C0,22.2109 1.7891,24 4,24 Z" id="Path"></path>
<path d="M2.77506938,40 L34.2249306,40 C35.7587808,40 37,38.2109 37,36 C37,33.7891 35.7587808,32 34.2249306,32 C31.0571156,32 28.6812543,32 27.0973468,32 C21.6923963,32 13.5849705,32 2.77506938,32 C1.24121916,32 0,33.7891 0,36 C0,38.2109 1.24121916,40 2.77506938,40 Z" id="Path"></path>
<path d="M33.332,48 L4,48 C1.7891,48 0,49.7891 0,52 C0,54.2109 1.7891,56 4,56 L33.332,56 C35.5429,56 37.332,54.2109 37.332,52 C37.332,49.7891 35.5429,48 33.332,48 Z" id="Path"></path>
<path d="M81.332,48 L69.332,48 L69.332,36 C69.332,33.7891 67.5429,32 65.332,32 C63.1211,32 61.332,33.7891 61.332,36 L61.332,48 L49.332,48 C47.1211,48 45.332,49.7891 45.332,52 C45.332,54.2109 47.1211,56 49.332,56 L61.332,56 L61.332,68 C61.332,70.2109 63.1211,72 65.332,72 C67.5429,72 69.332,70.2109 69.332,68 L69.332,56 L81.332,56 C83.5429,56 85.332,54.2109 85.332,52 C85.332,49.7891 83.5429,48 81.332,48 Z" id="Path" transform="translate(65.332000, 52.000000) rotate(-315.000000) translate(-65.332000, -52.000000) "></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

View file

@ -1850,6 +1850,17 @@ NEWSBLUR.AssetModel = Backbone.Router.extend({
}, this), error_callback);
},
remove_dashboard_river: function (river_id, river_side, river_order, callback, error_callback) {
this.make_request('/reader/remove_dashboard_river', {
river_id: river_id,
river_side: river_side,
river_order: river_order
}, _.bind(function (response) {
this.dashboard_rivers.reset(response.dashboard_rivers);
callback && callback(response);
}, this), error_callback);
},
follow_user: function(user_id, callback) {
this.make_request('/social/follow', {'user_id': user_id}, _.bind(function(data) {
NEWSBLUR.log(["follow data", data]);

View file

@ -4851,13 +4851,13 @@
NEWSBLUR.assets.save_dashboard_river("river:global", "left", 2, _.bind(function () {
this.load_dashboard_rivers();
}, this), function (e) {
console.log(['Error saving dashbaord river', e]);
console.log(['Error saving dashboard river', e]);
});
}, this), function (e) {
console.log(['Error saving dashbaord river', e]);
console.log(['Error saving dashboard river', e]);
});
}, this), function (e) {
console.log(['Error saving dashbaord river', e]);
console.log(['Error saving dashboard river', e]);
});
}
},

View file

@ -438,6 +438,8 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
NEWSBLUR.FeedOptionsPopover.create({
anchor: this.$(".NB-feedbar-options"),
feed_id: this.model.get('river_id'),
river_side: this.model.get('river_side'),
river_order: this.model.get('river_order'),
on_dashboard: this,
show_markscroll: false
});

View file

@ -25,6 +25,9 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
"click .NB-filter-popover-filter-icon": "open_site_settings",
"click .NB-filter-popover-stats-icon": "open_site_statistics",
"click .NB-filter-popover-notifications-icon": "open_notifications",
"click .NB-filter-popover-dashboard-add-module-left": "add_dashboard_module_left",
"click .NB-filter-popover-dashboard-add-module-right": "add_dashboard_module_right",
"click .NB-filter-popover-dashboard-remove-module": "remove_dashboard_module",
"change .NB-modal-feed-chooser": "change_feed"
},
@ -35,7 +38,7 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
if (NEWSBLUR.reader.active_feed == "read") {
this.options['show_readfilter'] = false;
}
if (NEWSBLUR.reader.active_feed == "river:infrequent") {
if (_.contains([NEWSBLUR.reader.active_feed, this.options.feed_id], "river:infrequent")) {
this.options['show_infrequent'] = true;
}
if (NEWSBLUR.reader.flags['starred_view']) {
@ -81,16 +84,32 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
include_special_folders: true
})
]),
$.make('ul', { className: 'segmented-control NB-menu-manage-view-setting-dashboardcount' }, [
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-5 NB-active', role: "button" }, '5 stories'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-10', role: "button" }, '10'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-15', role: "button" }, '15'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-20', role: "button" }, '20'),
$.make('div', { className: 'NB-filter-popover-manage-dashboard-modules' }, [
$.make('div', { className: 'NB-filter-popover-manage-button NB-filter-popover-dashboard-add-module-left' }, [
$.make('div', { className: 'NB-icon' }),
$.make('div', { className: 'NB-text' }, "Add story list")
]),
$.make('div', { className: 'NB-filter-popover-manage-button NB-filter-popover-dashboard-add-module-right' }, [
$.make('div', { className: 'NB-icon' }),
$.make('div', { className: 'NB-text' }, "Add story list")
])
]),
$.make('div', { className: 'NB-filter-popover-manage-dashboard-modules' }, [
$.make('div', { className: 'NB-filter-popover-manage-button NB-filter-popover-dashboard-remove-module' }, [
$.make('div', { className: 'NB-icon' }),
$.make('div', { className: 'NB-text' }, "Remove this list")
]),
])
])),
$.make('div', { className: 'NB-popover-section' }, [
(is_feed && $.make('div', { className: 'NB-section-icon NB-filter-popover-filter-icon' })),
$.make('div', { className: 'NB-popover-section-title' }, 'Filter stories'),
(this.options.on_dashboard && $.make('ul', { className: 'segmented-control NB-menu-manage-view-setting-dashboardcount' }, [
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-5 NB-active', role: "button" }, '5 stories'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-10', role: "button" }, '10'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-15', role: "button" }, '15'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-dashboardcount-20', role: "button" }, '20'),
])),
(this.options.show_readfilter && $.make('ul', { className: 'segmented-control NB-menu-manage-view-setting-readfilter' }, [
$.make('li', { className: 'NB-view-setting-option NB-view-setting-readfilter-all NB-active', role: "button" }, 'All stories'),
$.make('li', { className: 'NB-view-setting-option NB-view-setting-readfilter-unread', role: "button" }, 'Unread only')
@ -344,19 +363,19 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
NEWSBLUR.reader.apply_story_styling(true);
} else if ($target.hasClass("NB-view-setting-infrequent-5")) {
NEWSBLUR.assets.preference('infrequent_stories_per_month', 5);
NEWSBLUR.reader.reload_feed();
this.reload_feed();
} else if ($target.hasClass("NB-view-setting-infrequent-15")) {
NEWSBLUR.assets.preference('infrequent_stories_per_month', 15);
NEWSBLUR.reader.reload_feed();
this.reload_feed();
} else if ($target.hasClass("NB-view-setting-infrequent-30")) {
NEWSBLUR.assets.preference('infrequent_stories_per_month', 30);
NEWSBLUR.reader.reload_feed();
this.reload_feed();
} else if ($target.hasClass("NB-view-setting-infrequent-60")) {
NEWSBLUR.assets.preference('infrequent_stories_per_month', 60);
NEWSBLUR.reader.reload_feed();
this.reload_feed();
} else if ($target.hasClass("NB-view-setting-infrequent-90")) {
NEWSBLUR.assets.preference('infrequent_stories_per_month', 90);
NEWSBLUR.reader.reload_feed();
this.reload_feed();
} else if ($target.hasClass("NB-options-feed-size-xs")) {
this.update_feed_font_size('xs');
} else if ($target.hasClass("NB-options-feed-size-s")) {
@ -396,6 +415,10 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
var changed = NEWSBLUR.assets.view_setting(this.options.feed_id, setting);
if (!changed) return;
this.reload_feed();
},
reload_feed: function () {
if (this.options.on_dashboard) {
this.options.on_dashboard.initialize();
} else {
@ -422,6 +445,41 @@ NEWSBLUR.FeedOptionsPopover = NEWSBLUR.ReaderPopover.extend({
}, this));
},
add_dashboard_module: function (side) {
var count = NEWSBLUR.assets.dashboard_rivers.side(side).length;
var folder_names = NEWSBLUR.assets.folders.child_folder_names();
var random_feed = "river:";
if (folder_names.length) {
random_feed = "river:" + folder_names[_.random(folder_names.length)];;
}
NEWSBLUR.assets.save_dashboard_river(random_feed, side, count, _.bind(function () {
NEWSBLUR.reader.load_dashboard_rivers(true);
this.close();
}, this), function (e) {
console.log(['Error saving dashboard river', e]);
});
},
add_dashboard_module_left: function () {
this.add_dashboard_module("left");
},
add_dashboard_module_right: function () {
this.add_dashboard_module("right");
},
remove_dashboard_module: function () {
var river_id = this.options.feed_id;
var river_side = this.options.river_side;
var river_order = this.options.river_order;
NEWSBLUR.assets.remove_dashboard_river(river_id, river_side, river_order, _.bind(function () {
NEWSBLUR.reader.load_dashboard_rivers(true);
this.close();
}, this), function (e) {
console.log(['Error saving dashboard river', e]);
});
},
change_feed: function () {
var feed_id = this.$(".NB-modal-feed-chooser").val();
console.log(['Changing feed', feed_id])

View file

@ -159,6 +159,7 @@ NEWSBLUR.Views.StorySaveView = Backbone.View.extend({
var sideoption_content_height = $save_clone.height();
$save_clone.remove();
var new_sideoptions_height = $sideoption_container.height() - $save_wrapper.height() + sideoption_content_height;
// console.log(['Save options height', new_sideoptions_height, $sideoption_container.height(), $save_wrapper.height(), sideoption_content_height])
if (!options.close) {
$sideoption.addClass('NB-active');
$save_wrapper.addClass('NB-active');
@ -278,4 +279,4 @@ NEWSBLUR.Views.StorySaveView = Backbone.View.extend({
}
});
});