mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Updating all rivers on column change.
This commit is contained in:
parent
0463e5418c
commit
7d1fdb330a
1 changed files with 10 additions and 1 deletions
|
@ -28,7 +28,9 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
|||
// NEWSBLUR.assets.stories.bind('change:selected', this.check_read_stories, this);
|
||||
this.model.unbind('change:river_id');
|
||||
this.model.bind('change:river_id', _.bind(this.initialize, this));
|
||||
|
||||
this.model.unbind("change:columns");
|
||||
this.model.bind("change:columns", _.bind(this.on_column_change, this));
|
||||
|
||||
this.render();
|
||||
|
||||
return this;
|
||||
|
@ -197,6 +199,13 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
|||
var columns = single_column ? 1 : 2;
|
||||
|
||||
NEWSBLUR.assets.preference('dashboard_columns', columns);
|
||||
NEWSBLUR.app.dashboard_rivers.left.rivers.forEach(function (river) {
|
||||
console.log('Set river columns', river, columns);
|
||||
river.model.set('columns', columns);
|
||||
});
|
||||
},
|
||||
|
||||
on_column_change: function () {
|
||||
this.render_columns();
|
||||
this.redraw();
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue