mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Opening share dialog in story titles if easier.
This commit is contained in:
parent
c4ad789263
commit
aeabb2171e
5 changed files with 22 additions and 10 deletions
|
@ -5834,9 +5834,9 @@ form.opml_import_form input {
|
|||
width: 100%;
|
||||
}
|
||||
.NB-menu-manage .NB-menu-manage-confirm .NB-menu-manage-story-share-unshare {
|
||||
width: 95%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
margin: 4px 0 0;
|
||||
}
|
||||
.NB-menu-manage .NB-menu-manage-confirm .NB-sideoption-share-comments {
|
||||
height: 28px;
|
||||
|
|
|
@ -59,11 +59,18 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
|
|||
window.focus();
|
||||
},
|
||||
|
||||
open_share_dialog: function(e) {
|
||||
var $story = this.latest_story_detail_view.$el;
|
||||
this.latest_story_detail_view.share_view.toggle_feed_story_share_dialog({
|
||||
animate_scroll: true
|
||||
});
|
||||
open_share_dialog: function(e, view) {
|
||||
if (view == 'title') {
|
||||
var $story_title = this.story_title_view.$st;
|
||||
this.story_title_view.mouseenter_manage_icon();
|
||||
NEWSBLUR.reader.show_manage_menu('story', $story_title, {story_id: this.id});
|
||||
NEWSBLUR.reader.show_confirm_story_share_menu_item(this.id);
|
||||
} else {
|
||||
var $story = this.latest_story_detail_view.$el;
|
||||
this.latest_story_detail_view.share_view.toggle_feed_story_share_dialog({
|
||||
animate_scroll: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
change_selected: function(model, selected) {
|
||||
|
|
|
@ -5591,7 +5591,12 @@
|
|||
$document.bind('keydown', 'shift+s', function(e) {
|
||||
e.preventDefault();
|
||||
if (self.active_story) {
|
||||
self.active_story.open_share_dialog(e);
|
||||
var view = 'feed';
|
||||
if (NEWSBLUR.assets.preference('story_layout') == 'split' &&
|
||||
_.contains(['page', 'story'], self.story_view)) {
|
||||
view = 'title';
|
||||
}
|
||||
self.active_story.open_share_dialog(e, view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -127,8 +127,7 @@ NEWSBLUR.Views.StoryShareView = Backbone.View.extend({
|
|||
queue: false,
|
||||
easing: 'easeInOutQuint',
|
||||
offset: this.model.latest_story_detail_view.$el.height() -
|
||||
$scroll_container.height() +
|
||||
dialog_height
|
||||
$scroll_container.height()
|
||||
});
|
||||
}
|
||||
$share.animate({
|
||||
|
|
|
@ -302,6 +302,7 @@ NEWSBLUR.Views.StoryTitleView = Backbone.View.extend({
|
|||
|
||||
mouseenter_manage_icon: function() {
|
||||
var menu_height = 270;
|
||||
// console.log(["mouseenter_manage_icon", this.$el.offset().top, $(window).height(), menu_height]);
|
||||
if (this.$el.offset().top > $(window).height() - menu_height) {
|
||||
this.$st.addClass('NB-hover-inverse');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue