From 1ed6406a7d35d20ca21ff65133d1e62db701f923 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 25 Mar 2013 18:54:00 -0400 Subject: [PATCH] Add twitter, facebook, and google plus links to share dialog --- .../discourse/controllers/share_controller.js | 11 +++++++++++ .../discourse/templates/share.js.handlebars | 13 +++++++++++-- .../javascripts/discourse/views/share_view.js | 12 ++++++++++++ .../stylesheets/application/share_link.css.scss | 11 ++++++++--- 4 files changed, 42 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/share_controller.js b/app/assets/javascripts/discourse/controllers/share_controller.js index 93811b37e55..6dedc2e04ec 100644 --- a/app/assets/javascripts/discourse/controllers/share_controller.js +++ b/app/assets/javascripts/discourse/controllers/share_controller.js @@ -27,6 +27,17 @@ Discourse.ShareController = Discourse.Controller.extend({ close: function() { this.set('link', ''); return false; + }, + + popupHeights: { + twitter: 265, + facebook: 315, + googlePlus: 600 + }, + + sharePopup: function(target, url) { + window.open(url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=600,height=' + this.popupHeights[target]); + return false; } }); diff --git a/app/assets/javascripts/discourse/templates/share.js.handlebars b/app/assets/javascripts/discourse/templates/share.js.handlebars index 914538db04b..dedd3be98b6 100644 --- a/app/assets/javascripts/discourse/templates/share.js.handlebars +++ b/app/assets/javascripts/discourse/templates/share.js.handlebars @@ -1,5 +1,14 @@

{{view.title}}

-