mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing accidental truncation on story when saved.
This commit is contained in:
parent
1d73ba6703
commit
cdf90ed5be
2 changed files with 10 additions and 5 deletions
|
@ -437,16 +437,21 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
|||
this.model.on('change:images_loaded', _.bind(function() {
|
||||
this.resize_starred_tags();
|
||||
}, this));
|
||||
var is_truncatable = this.is_truncatable();
|
||||
|
||||
if (!this.is_truncatable()) return;
|
||||
if (!is_truncatable && !this.model.get('starred')) return;
|
||||
|
||||
this.truncate_delay = 100;
|
||||
this.images_to_load = this.$('img').length;
|
||||
this.truncate_story_height();
|
||||
|
||||
if (is_truncatable) this.truncate_story_height();
|
||||
this.$('img').load(_.bind(function() {
|
||||
this.images_to_load -= 1;
|
||||
this.truncate_story_height();
|
||||
if (is_truncatable) this.truncate_story_height();
|
||||
if (this.images_to_load <= 0) {
|
||||
this.model.set('images_loaded', true);
|
||||
} else {
|
||||
this.model.set('images_loaded', false);
|
||||
}
|
||||
}, this));
|
||||
},
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ NEWSBLUR.Views.StorySaveView = Backbone.View.extend({
|
|||
if (!NEWSBLUR.reader.flags.narrow_content &&
|
||||
!options.close && !options.force && new_sideoptions_height >= original_height) {
|
||||
// Sideoptions too big, embiggen left side
|
||||
console.log(["Sideoption too big, embiggening", content_height, sideoptions_height]);
|
||||
console.log(["Sideoption too big, embiggening", content_height, sideoptions_height, new_sideoptions_height]);
|
||||
$story_content.stop(true, true).animate({
|
||||
'height': new_sideoptions_height
|
||||
}, {
|
||||
|
|
Loading…
Add table
Reference in a new issue