From 418b1529ed1118e8bb4cc9969617a907b96a7093 Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 8 Nov 2016 19:18:26 -0500 Subject: [PATCH 1/2] Updating copying style to match designs. --- client/coral-admin/src/containers/Configure.css | 15 ++++++++++++--- client/coral-admin/src/containers/Configure.js | 17 ++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/client/coral-admin/src/containers/Configure.css b/client/coral-admin/src/containers/Configure.css index 2c65fd5bc..6fd3e39f7 100644 --- a/client/coral-admin/src/containers/Configure.css +++ b/client/coral-admin/src/containers/Configure.css @@ -25,10 +25,19 @@ .configSettingEmbed { border: 1px solid #ccc; border-radius: 4px; - height: 90px; margin-bottom: 10px; display: block; - height: 170px; +} + +.copiedText { + color: #008000; + float: right; + padding: 20px; + font-size: 14px; +} + +.copyButton { + float: right; } .embedInput { @@ -40,6 +49,6 @@ margin-bottom: 10px; color: #555; padding: 14px; - font-size: 16px; + font-size: 14px; letter-spacing: 0.03em; } diff --git a/client/coral-admin/src/containers/Configure.js b/client/coral-admin/src/containers/Configure.js index f90e8c747..822a6fa0c 100644 --- a/client/coral-admin/src/containers/Configure.js +++ b/client/coral-admin/src/containers/Configure.js @@ -18,7 +18,8 @@ import translations from '../translations' class Configure extends React.Component { constructor (props) { super(props) - this.state = {activeSection: 'comments'} + this.state = {activeSection: 'comments', copied: false} + this.copyToClipBoard = this.copyToClipBoard.bind(this); } getCommentSettings () { @@ -48,22 +49,24 @@ class Configure extends React.Component { try { document.execCommand('copy') + this.setState({copied: true}) } catch (err) { - console.error('Unable to copy') + console.error('Unable to copy', err) } } getEmbed () { const embedText = - `
` + `
` return

Copy and paste code below into your CMS to embed your comment box in your articles

- - +