From 2a809d7855f4acd096f3881f3e935be1c48a0d15 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 4 Dec 2013 13:26:00 -0500 Subject: [PATCH] Migrate over slackRatio to vendored helper --- .../javascripts/discourse/controllers/topic_controller.js | 4 ++++ .../javascripts/discourse/templates/topic.js.handlebars | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 751c15564ea..56b0a663fcb 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -219,6 +219,10 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected }, + slackRatio: function() { + return Discourse.Capabilities.currentProp('slackRatio'); + }.property(), + jumpTopDisabled: function() { return (this.get('progressPosition') <= 3); }.property('progressPosition'), diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index bd910af6a16..b785637b65f 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -64,7 +64,7 @@ {{/if}} {{#unless postStream.loadingFilter}} - {{cloaked-collection cloakView="post" idProperty="post_number" defaultHeight="200" content=postStream.posts}} + {{cloaked-collection cloakView="post" idProperty="post_number" defaultHeight="200" content=postStream.posts slackRatio=slackRatio}} {{/unless}} {{#if postStream.loadingBelow}}