From 85160590257f44f585d7d269d78fcdea3f3d13a8 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 11 Sep 2013 15:58:55 +1000 Subject: [PATCH] remove global check --- .../javascripts/discourse/templates/topic.js.handlebars | 4 +++- app/assets/javascripts/discourse/views/quote_button_view.js | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index 0554adf5507..c6c17ffde32 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -125,7 +125,9 @@ {{render share}} -{{render quoteButton}} +{{#if currentUser.enable_quoting}} + {{render quoteButton}} +{{/if}} {{#if currentUser.staff}} {{render topicAdminMenu content}} diff --git a/app/assets/javascripts/discourse/views/quote_button_view.js b/app/assets/javascripts/discourse/views/quote_button_view.js index 9f2b1a4b01c..e85f5ac7d10 100644 --- a/app/assets/javascripts/discourse/views/quote_button_view.js +++ b/app/assets/javascripts/discourse/views/quote_button_view.js @@ -47,8 +47,6 @@ Discourse.QuoteButtonView = Discourse.View.extend({ .on("mousedown.quote-button", function(e) { view.set('isMouseDown', true); if ($(e.target).hasClass('quote-button') || $(e.target).hasClass('create')) return; - // do *not* deselect when quoting has been disabled by the user - if (!Discourse.User.currentProp('enable_quoting')) return; // deselects only when the user left click // (allows anyone to `extend` their selection using shift+click) if (e.which === 1 && !e.shiftKey) controller.deselectText();