mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding View Profile menu item to social subs.
This commit is contained in:
parent
a98e8fadde
commit
4d2e8fa9bc
3 changed files with 19 additions and 0 deletions
|
@ -4714,6 +4714,9 @@ background: transparent;
|
|||
.NB-menu-manage .NB-menu-manage-mark-read .NB-menu-manage-image {
|
||||
background: transparent url('/media/embed/icons/silk/cut.png') no-repeat 0 2px;
|
||||
}
|
||||
.NB-menu-manage .NB-menu-manage-social-profile .NB-menu-manage-image {
|
||||
background: transparent url('/media/embed/icons/silk/user_orange.png') no-repeat 0 1px;
|
||||
}
|
||||
.NB-menu-manage .NB-menu-manage-keyboard .NB-menu-manage-image {
|
||||
background: transparent url('/media/embed/icons/silk/keyboard.png') no-repeat 0 1px;
|
||||
}
|
||||
|
|
|
@ -4901,6 +4901,9 @@
|
|||
},
|
||||
|
||||
open_social_profile_modal: function(user_id) {
|
||||
if (_.string.contains(user_id, 'social:')) {
|
||||
user_id = parseInt(user_id.replace('social:', ''), 10);
|
||||
}
|
||||
NEWSBLUR.social_profile = new NEWSBLUR.ReaderSocialProfile(user_id);
|
||||
},
|
||||
|
||||
|
@ -5079,6 +5082,11 @@
|
|||
$.make('div', { className: 'NB-menu-manage-title' }, 'Fix this misbehaving site')
|
||||
])),
|
||||
(feed.has_exception && $.make('li', { className: 'NB-menu-separator-inverse' })),
|
||||
$.make('li', { className: 'NB-menu-manage-feed NB-menu-manage-social-profile' }, [
|
||||
$.make('div', { className: 'NB-menu-manage-image' }),
|
||||
$.make('div', { className: 'NB-menu-manage-title' }, 'View profile')
|
||||
]),
|
||||
$.make('li', { className: 'NB-menu-separator' }),
|
||||
(feed.exception_type != 'feed' && $.make('li', { className: 'NB-menu-manage-feed NB-menu-manage-mark-read NB-menu-manage-feed-mark-read' }, [
|
||||
$.make('div', { className: 'NB-menu-manage-image' }),
|
||||
$.make('div', { className: 'NB-menu-manage-title' }, 'Mark as read')
|
||||
|
@ -7422,6 +7430,11 @@
|
|||
self.open_mark_read_modal();
|
||||
}
|
||||
});
|
||||
$.targetIs(e, { tagSelector: '.NB-menu-manage-social-profile' }, function($t, $p){
|
||||
e.preventDefault();
|
||||
var feed_id = $t.parents('.NB-menu-manage').data('feed_id');
|
||||
self.open_social_profile_modal(feed_id);
|
||||
});
|
||||
$.targetIs(e, { tagSelector: '.NB-menu-manage-keyboard' }, function($t, $p){
|
||||
e.preventDefault();
|
||||
if (!$t.hasClass('NB-disabled')) {
|
||||
|
|
|
@ -16,6 +16,9 @@ NEWSBLUR.ReaderSocialProfile.prototype = new NEWSBLUR.Modal;
|
|||
_.extend(NEWSBLUR.ReaderSocialProfile.prototype, {
|
||||
|
||||
runner: function(user_id) {
|
||||
if (!this.model.user_profiles.find(user_id)) {
|
||||
this.model.add_user_profiles([{user_id: user_id}]);
|
||||
}
|
||||
this.profile = this.model.user_profiles.find(user_id).clone();
|
||||
this.make_modal();
|
||||
this.open_modal();
|
||||
|
|
Loading…
Add table
Reference in a new issue