diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index 818834679a979d9c50b9839bf07029c8dffe9679..b4b74eb7f7af2b09b0558c1ddfe34cabcdb88b1a 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -93,7 +93,6 @@ app.Router = Backbone.Router.extend({ }, aspects_stream : function(){ - var ids = app.aspects.selectedAspects('id'); app.stream = new app.models.StreamAspects([], { aspects_ids: ids }); app.stream.fetch(); diff --git a/app/assets/javascripts/app/views/stream_view.js b/app/assets/javascripts/app/views/stream_view.js index b1400179992423bbeb27ff4ebeaa2f7e01bd881e..0cd222bd88a6ee74084bfe8faba02fae8438d99b 100644 --- a/app/assets/javascripts/app/views/stream_view.js +++ b/app/assets/javascripts/app/views/stream_view.js @@ -13,6 +13,7 @@ app.views.Stream = app.views.InfScroll.extend(_.extend( this.setupLightbox() this.setupInfiniteScroll() this.setupShortcuts() + this.markNavSelected() }, postClass : app.views.StreamPost, @@ -28,5 +29,12 @@ app.views.Stream = app.views.InfScroll.extend(_.extend( function reRenderPostViews() { _.map(this.postViews, function(view){ view.render() }) } + }, + + markNavSelected : function() { + var activeStream = Backbone.history.fragment; + var streamSelection = $("#stream_selection"); + streamSelection.find("[data-stream]").removeClass("selected"); + streamSelection.find("[data-stream='" + activeStream + "']").addClass("selected"); } })); diff --git a/app/assets/stylesheets/sidebar.css.scss b/app/assets/stylesheets/sidebar.css.scss index 1e8ec7a5d63a1247c5304a64c343dbadf7fdc5c1..177c6039873b2b41a2ce0c33b6c5ddbaec6e18c0 100644 --- a/app/assets/stylesheets/sidebar.css.scss +++ b/app/assets/stylesheets/sidebar.css.scss @@ -3,17 +3,17 @@ $bluebg: #e7f2f7; #home_user_badge { min-height: 50px; margin-bottom: 20px; - + img { float: left; } - + h4 { margin-left: 60px; padding-top: 15px; overflow: hidden; text-overflow: ellipsis; - + a { color: inherit; font-weight: bold; @@ -26,7 +26,7 @@ $bluebg: #e7f2f7; margin: 0px; margin-right: 10px; color: #222222; - + ul { margin: 0px; padding: 0px; @@ -37,17 +37,17 @@ $bluebg: #e7f2f7; font-weight: bold; text-decoration: none; } - + + .selected { color: $black; } + .selected a { color: $black; } + .hoverable { display: block; margin-right: 6px; - padding: 4px; - - &:hover { - background-color: $bluebg; - } + padding: 4px 4px 4px 0; + &:hover { background-color: $bluebg; } } - + .selectable { display: block; margin-left: 21px; diff --git a/app/views/aspects/_aspect_listings.haml b/app/views/aspects/_aspect_listings.haml index 60e3c96057f4b92193c04aa829999cf398675f6f..4cae09865827802efdd0edba6ddd3bda83471158 100644 --- a/app/views/aspects/_aspect_listings.haml +++ b/app/views/aspects/_aspect_listings.haml @@ -2,5 +2,5 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= link_to t('streams.aspects.title'), aspects_path, :class => 'hoverable', :rel => 'backbone' += link_to t('streams.aspects.title'), aspects_path, :class => 'hoverable', :rel => 'backbone', :data => {:stream => 'aspects'} %ul#aspects_list diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index 7a7771cf8daf21c522af6df63f1c24194345ee97..5b63ae75dd4d1364319ac7130823ea65fcbf2a39 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -29,11 +29,11 @@ = link_to current_user.first_name, local_or_remote_person_path(current_user.person) %ul#stream_selection - %li.hoverable + %li.hoverable{:data => {:stream => 'activity'}} = link_to t("streams.activity.title"), activity_stream_path, :rel => 'backbone' - %li.hoverable + %li.hoverable{:data => {:stream => 'mentions'}} = link_to t('streams.mentions.title'), mentioned_stream_path, :rel => 'backbone' - %li.hoverable + %li.hoverable{:data => {:stream => 'stream'}} = link_to t("streams.multi.title"), stream_path, :rel => 'backbone' %li.all_aspects = render 'aspects/aspect_listings', :stream => @stream diff --git a/app/views/tags/_followed_tags_listings.haml b/app/views/tags/_followed_tags_listings.haml index 5c07cf8e8db5abb799edfb4ed58f0dc962df36b6..f242159ed57108a0c07374fb066d632dadd2bf9c 100644 --- a/app/views/tags/_followed_tags_listings.haml +++ b/app/views/tags/_followed_tags_listings.haml @@ -2,5 +2,5 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= link_to t('streams.followed_tag.title'), followed_tags_stream_path, :class => 'hoverable' += link_to t('streams.followed_tag.title'), followed_tags_stream_path, :class => 'hoverable', :data => {:stream => 'followed_tags'} %ul#tags_list