diff --git a/app/assets/javascripts/app/views/preview_post_view.js b/app/assets/javascripts/app/views/preview_post_view.js index d3b975f65..41a793f7b 100644 --- a/app/assets/javascripts/app/views/preview_post_view.js +++ b/app/assets/javascripts/app/views/preview_post_view.js @@ -5,7 +5,6 @@ app.views.PreviewPost = app.views.Post.extend({ className: "stream-element loaded", subviews: { - ".feedback": "feedbackView", ".post-content": "postContentView", ".oembed": "oEmbedView", ".opengraph": "openGraphView", @@ -13,12 +12,6 @@ app.views.PreviewPost = app.views.Post.extend({ ".status-message-location": "postLocationStreamView" }, - tooltipSelector: [ - ".timeago", - ".delete", - ".permalink" - ].join(", "), - initialize: function() { this.model.set("preview", true); this.oEmbedView = new app.views.OEmbed({model: this.model}); @@ -26,10 +19,6 @@ app.views.PreviewPost = app.views.Post.extend({ this.pollView = new app.views.Poll({model: this.model}); }, - feedbackView: function() { - return new app.views.Feedback({model: this.model}); - }, - postContentView: function() { return new app.views.StatusMessage({model: this.model}); }, diff --git a/app/assets/stylesheets/publisher.scss b/app/assets/stylesheets/publisher.scss index 5887a76c4..93cd34d19 100644 --- a/app/assets/stylesheets/publisher.scss +++ b/app/assets/stylesheets/publisher.scss @@ -197,10 +197,16 @@ border: 0; } - // This rule is required until we switch to the newer release of bootstrap-markdown with - // the following commit in: - // https://github.com/toopay/bootstrap-markdown/commit/14a21c3837140144b27efc19c795d1a37fad70fb - .md-preview { min-height: 90px; } + .md-preview { + // This rule is required until we switch to the newer release of bootstrap-markdown with + // the following commit in: + // https://github.com/toopay/bootstrap-markdown/commit/14a21c3837140144b27efc19c795d1a37fad70fb + min-height: 90px; + + .stream-element .post-content .markdown-content { + padding-top: 0; + } + } } .publisher-textarea-wrapper { diff --git a/app/assets/templates/feedback_tpl.jst.hbs b/app/assets/templates/feedback_tpl.jst.hbs index cf824d367..b373b2a7e 100644 --- a/app/assets/templates/feedback_tpl.jst.hbs +++ b/app/assets/templates/feedback_tpl.jst.hbs @@ -13,29 +13,17 @@ – - -{{#if preview}} - {{t "stream.like"}} -{{else}} - - {{~#if userLike~}} - {{~t "stream.unlike"~}} - {{~else~}} - {{~t "stream.like"~}} - {{~/if~}} - -{{/if}} + + {{~#if userLike~}} + {{~t "stream.unlike"~}} + {{~else~}} + {{~t "stream.like"~}} + {{~/if~}} + · -{{#if preview}} - {{t "stream.reshare"}} - · -{{else if userCanReshare}} +{{#if userCanReshare}} {{t "stream.reshare"}} · {{/if}} -{{#if preview}} - {{t "stream.comment"}} -{{else}} - {{t "stream.comment"}} -{{/if}} +{{t "stream.comment"}} diff --git a/app/assets/templates/stream-element_tpl.jst.hbs b/app/assets/templates/stream-element_tpl.jst.hbs index bfba508f7..ed6b8083c 100644 --- a/app/assets/templates/stream-element_tpl.jst.hbs +++ b/app/assets/templates/stream-element_tpl.jst.hbs @@ -1,25 +1,26 @@
- {{#with author}} - - {{{personImage this}}} - - {{/with}} + + {{#unless preview}} + {{#with author}} + + {{{personImage this}}} + + {{/with}} + {{/unless}}
- {{#if loggedIn}} -
- {{/if}} + {{#unless preview}} + {{#if loggedIn}} +
+ {{/if}} -
- {{#linkToAuthor author}} - {{~name~}} - {{/linkToAuthor}} +
+ {{#linkToAuthor author}} + {{~name~}} + {{/linkToAuthor}} - - - - {{#if preview}} - - {{else}} + + - @@ -27,16 +28,18 @@ - {{/if}} - -
+ +
+ {{/unless}}
-
-
-
-
+ {{#unless preview}} +
+
+
+
+ {{/unless}}
diff --git a/spec/javascripts/app/views/preview_post_view_spec.js b/spec/javascripts/app/views/preview_post_view_spec.js index e2c1b5aec..af5f0a455 100644 --- a/spec/javascripts/app/views/preview_post_view_spec.js +++ b/spec/javascripts/app/views/preview_post_view_spec.js @@ -36,12 +36,6 @@ describe("app.views.PreviewPost", function() { }); describe("render", function() { - it("calls feedbackView", function() { - spyOn(app.views.PreviewPost.prototype, "feedbackView"); - this.view.render(); - expect(app.views.PreviewPost.prototype.feedbackView).toHaveBeenCalled(); - }); - it("calls postContentView", function() { spyOn(app.views.PreviewPost.prototype, "postContentView"); this.view.render(); @@ -55,14 +49,6 @@ describe("app.views.PreviewPost", function() { }); }); - describe("feedbackView", function() { - it("calls app.views.Feedback.initialise", function() { - spyOn(app.views.Feedback.prototype, "initialize"); - this.view.feedbackView(); - expect(app.views.Feedback.prototype.initialize).toHaveBeenCalledWith({model: this.model}); - }); - }); - describe("postContentView", function() { it("calls app.views.Feedback.initialise", function() { spyOn(app.views.StatusMessage.prototype, "initialize");