use app.router.navagate for nav elements that don't expand (i.e. aspects, tags)
This commit is contained in:
parent
e0f8959647
commit
665517abfc
5 changed files with 18 additions and 25 deletions
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
%ul#aspect_nav.left_nav
|
||||
%li.all_aspects
|
||||
.root_element
|
||||
= link_to t('aspects.index.your_aspects'), aspects_path
|
||||
= link_to t('aspects.index.your_aspects'), aspects_path, :class => 'home_selector'
|
||||
|
||||
- if @stream.is_a?(Stream::Aspect)
|
||||
%ul.sub_nav
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
#aspect_stream_header
|
||||
%h3
|
||||
= stream.title
|
||||
%h3#aspect_stream_header.stream_title
|
||||
= stream.title
|
||||
|
||||
= render 'shared/publisher', :selected_aspects => stream.aspects, :aspect_ids => stream.aspect_ids, :for_all_aspects => stream.for_all_aspects?, :aspect => stream.aspect
|
||||
= render 'aspects/no_posts_message'
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#selected_aspect_contacts.section
|
||||
.title.no_icon
|
||||
%h5
|
||||
= @stream.contacts_title
|
||||
|
||||
.content
|
||||
- if @stream.people.size > 0
|
||||
- for person in @stream.people.sample(15)
|
||||
= person_image_link(person)
|
||||
= link_to @stream.contacts_link_title, @stream.contacts_link, :id => "view_all_contacts_link"
|
||||
- else
|
||||
= t('.no_contacts')
|
||||
= link_to t('.manage_your_aspects'), contacts_link
|
||||
|
||||
|
|
@ -31,21 +31,21 @@
|
|||
.section
|
||||
%ul.left_nav
|
||||
%li
|
||||
= link_to t("streams.multi.title"), multi_path, :class => 'home_selector'
|
||||
= link_to t("streams.multi.title"), multi_path, :class => 'home_selector', :rel => 'backbone'
|
||||
|
||||
= render 'aspects/aspect_listings', :stream => @stream
|
||||
|
||||
%ul.left_nav
|
||||
%li
|
||||
= link_to t('streams.mentions.title'), mentions_path, :class => 'home_selector'
|
||||
= link_to t('streams.mentions.title'), mentions_path, :class => 'home_selector', :rel => 'backbone'
|
||||
|
||||
%ul.left_nav
|
||||
%li
|
||||
= link_to t('streams.comment_stream.title'), comment_stream_path, :class => 'home_selector'
|
||||
= link_to t('streams.comment_stream.title'), comment_stream_path, :class => 'home_selector', :rel => 'backbone'
|
||||
|
||||
%ul.left_nav
|
||||
%li
|
||||
= link_to t('streams.like_stream.title'), like_stream_path, :class => 'home_selector'
|
||||
= link_to t('streams.like_stream.title'), like_stream_path, :class => 'home_selector', :rel => 'backbone'
|
||||
|
||||
#followed_tags_listing
|
||||
= render 'tags/followed_tags_listings'
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
/= render 'aspects/selected_contacts', :stream => @stream
|
||||
#selected_aspect_contacts.section
|
||||
.title.no_icon
|
||||
%h5
|
||||
%h5.stream_title
|
||||
= @stream.title
|
||||
.content
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ var app = {
|
|||
},
|
||||
|
||||
initialize: function() {
|
||||
app.router = new app.Router;
|
||||
app.router = new app.Router();
|
||||
|
||||
if(this._user){
|
||||
app.header = new app.views.Header;
|
||||
|
|
@ -19,6 +19,15 @@ var app = {
|
|||
}
|
||||
|
||||
Backbone.history.start({pushState: true});
|
||||
|
||||
// there's probably a better way to do this...
|
||||
$("a[rel=backbone]").bind("click", function(evt){
|
||||
evt.preventDefault();
|
||||
var link = $(this);
|
||||
|
||||
$(".stream_title").text(link.text())
|
||||
app.router.navigate(link.attr("href").substring(1) ,true)
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue