|
| 1 | +<div class="row-fluid"> |
| 2 | + <div class="pull-left"> |
| 3 | + <a class="btn" id="home" href="/news" title="<%= t('partials.feed_action_bar.home') %>"> |
| 4 | + <i class="icon-reply"></i> |
| 5 | + </a> |
| 6 | + <a class="btn" id="mark-all" title="<%= t('partials.action_bar.mark_all') %>"> |
| 7 | + <i class="icon-ok"></i> |
| 8 | + <%= render_partial :mark_all_as_read_form, |
| 9 | + {stories: stories} %> |
| 10 | + </a> |
| 11 | + <a class="btn" href="/feed/<%= @feed_id %>" id="refresh" title="<%= t('partials.action_bar.refresh') %>"> |
| 12 | + <i class="icon-repeat"></i> |
| 13 | + </a> |
| 14 | + </div> |
| 15 | + |
| 16 | + <div class="pull-right"> |
| 17 | + <a class="btn btn-primary" id="starred" href="/starred" title="<%= t('partials.action_bar.starred_stories') %>"> |
| 18 | + <i class="icon-star"></i> |
| 19 | + </a> |
| 20 | + <a class="btn btn-primary" id="archive" href="/archive" title="<%= t('partials.action_bar.archived_stories') %>"> |
| 21 | + <i class="icon-time"></i> |
| 22 | + </a> |
| 23 | + <a class="btn btn-primary" id="feeds" href="/feeds" title="<%= t('partials.action_bar.view_feeds') %>"> |
| 24 | + <i class="icon-list"></i> |
| 25 | + </a> |
| 26 | + <a class="btn btn-primary" id="add-feed" href="/feeds/new" title="<%= t('partials.action_bar.add_feed') %>"> |
| 27 | + <i class="icon-plus"></i> |
| 28 | + </a> |
| 29 | + </div> |
| 30 | +</div> |
| 31 | + |
| 32 | +<script type="text/javascript"> |
| 33 | + $(document).ready(function() { |
| 34 | + $("#mark-all").click(function(e) { |
| 35 | + e.preventDefault(); |
| 36 | + |
| 37 | + $("form#mark-all-as-read").submit(); |
| 38 | + }); |
| 39 | + |
| 40 | + Mousetrap.bind("r", function() { |
| 41 | + var refresh = $("a#refresh")[0]; |
| 42 | + if (refresh) refresh.click(); |
| 43 | + }); |
| 44 | + |
| 45 | + Mousetrap.bind("a", function() { |
| 46 | + var add_feed = $("a#add-feed")[0]; |
| 47 | + if (add_feed) add_feed.click(); |
| 48 | + }); |
| 49 | + |
| 50 | + Mousetrap.bind("shift+a", function() { |
| 51 | + $("form#mark-all-as-read").submit(); |
| 52 | + }); |
| 53 | + }); |
| 54 | +</script> |
0 commit comments