Skip to content

Commit

Permalink
Allow the feed list pane to be resized narrower than before. Also hid…
Browse files Browse the repository at this point in the history
…ing intelligence controls text if too narrow.
  • Loading branch information
samuelclay committed Jul 27, 2012
1 parent b99d5f2 commit e79a4eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 6 additions & 1 deletion media/css/reader.css
Expand Up @@ -3693,14 +3693,19 @@ form.opml_import_form input {
color: white;
text-shadow: 0 1px 0 #303030;
}

.NB-narrow .NB-intelligence-slider .NB-intelligence-label {
display: none;
}
.NB-intelligence-slider img {
width: 16px;
height: 16px;
margin: 1px 0 0 -8px;
float: left;
vertical-align: bottom;
}
.NB-intelligence-slider img:last-child {
.NB-narrow .NB-intelligence-slider img {
margin: 1px 3px 0;
}
/* ===================== */
/* = Add Feeds/Folders = */
Expand Down
6 changes: 4 additions & 2 deletions media/js/newsblur/reader/reader.js
Expand Up @@ -66,7 +66,8 @@
this.constants = {
FEED_REFRESH_INTERVAL: (1000 * 60) * 1, // 1 minute
FILL_OUT_PAGES: 50,
RIVER_STORIES_FOR_STANDARD_ACCOUNT: 5
RIVER_STORIES_FOR_STANDARD_ACCOUNT: 5,
MIN_FEED_LIST_SIZE: 206
};

// ==================
Expand Down Expand Up @@ -190,7 +191,7 @@
center__paneSelector: ".right-pane",
west__paneSelector: ".left-pane",
west__size: this.model.preference('feed_pane_size'),
west__minSize: 240,
west__minSize: this.constants.MIN_FEED_LIST_SIZE,
west__onresize_end: $.rescope(this.save_feed_pane_size, this),
spacing_open: 4,
resizerDragOpacity: 0.6,
Expand Down Expand Up @@ -314,6 +315,7 @@
var feed_pane_size = state.size;

$('#NB-splash').css('left', feed_pane_size);
$pane.toggleClass("NB-narrow", this.layout.outerLayout.state.west.size < 240);
this.flags.set_feed_pane_size = this.flags.set_feed_pane_size || _.debounce( _.bind(function() {
var feed_pane_size = this.layout.outerLayout.state.west.size;
this.model.preference('feed_pane_size', feed_pane_size);
Expand Down
4 changes: 2 additions & 2 deletions templates/reader/feeds.xhtml
Expand Up @@ -524,11 +524,11 @@
</li>
<li class="NB-intelligence-slider-control NB-intelligence-slider-yellow">
<img src="{{ MEDIA_URL }}embed/icons/silk/bullet_yellow.png">
Unread
<span class="NB-intelligence-label">Unread</span>
</li>
<li class="NB-intelligence-slider-control NB-intelligence-slider-green">
<img src="{{ MEDIA_URL }}embed/icons/silk/bullet_green.png">
Focus
<span class="NB-intelligence-label">Focus</span>
</li>
</ul>
</div>
Expand Down

0 comments on commit e79a4eb

Please sign in to comment.