Save if user prefers readme or activity tab.
This commit is contained in:
parent
31e50ed3e4
commit
49157242ed
1 changed files with 9 additions and 0 deletions
|
@ -51,3 +51,12 @@ $ ->
|
|||
$(@).toggleClass('on').find('.count').html(data.star_count)
|
||||
.on 'ajax:error', (e, xhr, status, error) ->
|
||||
new Flash('Star toggle failed. Try again later.', 'alert')
|
||||
|
||||
$("a[data-toggle='tab']").on "shown.bs.tab", (e) ->
|
||||
$.cookie "default_view", $(e.target).attr("href")
|
||||
|
||||
defaultView = $.cookie("default_view")
|
||||
if defaultView
|
||||
$("a[href=" + defaultView + "]").tab "show"
|
||||
else
|
||||
$("a[data-toggle='tab']:first").tab "show"
|
||||
|
|
Loading…
Reference in a new issue