From 20360b5cc57aa65608acb4e3f2e72a345822997d Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 22 May 2012 15:47:03 -0700 Subject: [PATCH] DG MS; added interactions & permalink in the new stream [ci skip] --- .../javascripts/app/views/post/stream_frame.js | 7 +++++-- .../app/views/post/stream_interactions_view.js | 2 -- app/assets/stylesheets/new_styles/_canvas.scss | 11 +++++++++-- .../stylesheets/new_styles/_interactions.scss | 17 ++++++++++++++--- app/assets/templates/stream-frame.jst.hbs | 7 +++++++ 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/app/views/post/stream_frame.js b/app/assets/javascripts/app/views/post/stream_frame.js index e80ac0df3..6d2decc25 100644 --- a/app/assets/javascripts/app/views/post/stream_frame.js +++ b/app/assets/javascripts/app/views/post/stream_frame.js @@ -4,12 +4,15 @@ app.views.Post.StreamFrame = app.views.Base.extend({ templateName : "stream-frame", subviews : { - ".small-frame" : "smallFrameView" + ".small-frame" : "smallFrameView", + '.stream-frame-feedback' : 'feedbackView' }, + initialize : function(options) { this.stream = options.stream - this.smallFrameView = new app.views.Post.SmallFrame({model : this.model, stream: this.stream}) + this.smallFrameView = new app.views.Post.SmallFrame({model : this.model}) + this.feedbackView = new app.views.FeedbackActions({ model: this.model }) }, events : _.extend({ diff --git a/app/assets/javascripts/app/views/post/stream_interactions_view.js b/app/assets/javascripts/app/views/post/stream_interactions_view.js index 657f80d1f..8a3da7a34 100644 --- a/app/assets/javascripts/app/views/post/stream_interactions_view.js +++ b/app/assets/javascripts/app/views/post/stream_interactions_view.js @@ -2,7 +2,6 @@ app.views.StreamInteractions = app.views.Base.extend({ id : "post-info", subviews:{ - ".feedback" : "feedback", ".comments" : "comments", ".new-comment" : "newCommentView" }, @@ -15,7 +14,6 @@ app.views.StreamInteractions = app.views.Base.extend({ this.render() }, this)); - this.feedback = new app.views.FeedbackActions({ model: model }) this.comments = new app.views.PostViewerReactions({ model: model.interactions }) this.newCommentView = new app.views.PostViewerNewComment({ model : model }) } diff --git a/app/assets/stylesheets/new_styles/_canvas.scss b/app/assets/stylesheets/new_styles/_canvas.scss index 5fac4e51b..a42dd6072 100644 --- a/app/assets/stylesheets/new_styles/_canvas.scss +++ b/app/assets/stylesheets/new_styles/_canvas.scss @@ -387,8 +387,15 @@ .stream-frame { margin-bottom : 40px; - .info { - display : none; + .stream-frame-feedback { + float : right; + margin-top : 8px; + } + + .canvas-frame { + .info { + display : none; + } } /* a media box object */ diff --git a/app/assets/stylesheets/new_styles/_interactions.scss b/app/assets/stylesheets/new_styles/_interactions.scss index a8cc86ff4..93b97a031 100644 --- a/app/assets/stylesheets/new_styles/_interactions.scss +++ b/app/assets/stylesheets/new_styles/_interactions.scss @@ -227,6 +227,7 @@ } } +.permalink-wrapper, #user-controls { height: 30px; @@ -236,10 +237,9 @@ width: 27px; } - .label { + a { @include opacity(0.6); @include transition(opacity, 0.3s); - @include box-shadow(0, 0, 2px, rgba(255,255,255,0.9)); position: relative; @@ -257,9 +257,13 @@ margin: 0; } - background-color: #000; color: #fff; + &.label { + @include box-shadow(0, 0, 2px, rgba(255,255,255,0.9)); + background-color: #000; + } + &.comment { padding-right: 5px; margin-right: 0; @@ -325,4 +329,11 @@ #user-controls { padding : 7px; } +} + +.permalink-wrapper { + float : right; + margin-top : 9px; + margin-right : -5px; + margin-left : 4px; } \ No newline at end of file diff --git a/app/assets/templates/stream-frame.jst.hbs b/app/assets/templates/stream-frame.jst.hbs index ee0e4842c..1d58685fb 100644 --- a/app/assets/templates/stream-frame.jst.hbs +++ b/app/assets/templates/stream-frame.jst.hbs @@ -1,3 +1,10 @@ + +
+
{{#linkToPerson author}}