Skip to content

Commit 1b00a6f

Browse files
committed
Add an "open" button to the entry bar.
1 parent b1c49ca commit 1b00a6f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

public/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,10 @@ body.publicmode.notloggedin .entry-unread {
737737
display:block;
738738
}
739739

740+
.entry-newwindow {
741+
display:none;
742+
}
743+
740744
.entry-content {
741745
display:none;
742746
-moz-column-count: 1;

public/js/selfoss-events.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,12 @@ selfoss.events = {
446446
return false;
447447
});
448448

449+
// open in new window
450+
parent.find('.entry-newwindow').unbind('click').click(function(e) {
451+
window.open($(this).parents(".entry").children("a").eq(0).attr("href"));
452+
e.preventDefault();
453+
return false;
454+
});
449455

450456
// only loggedin users
451457
if($('body').hasClass('loggedin')==true) {

templates/item.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<ul class="entry-toolbar">
5858
<li class="entry-starr <?PHP echo $this->item['starred']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['starred']==1 ? 'unstar' : 'star'; ?></li>
5959
<li class="entry-unread <?PHP echo $this->item['unread']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['unread']==1 ? 'mark as read' : 'mark as unread'; ?></li>
60+
<li class="entry-newwindow">open</li>
6061
<li class="entry-loadimages">load images</li>
6162
<li class="entry-close"></li>
6263
</ul>

0 commit comments

Comments
 (0)