Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E374A17476 for ; Thu, 1 Oct 2015 12:59:35 +0000 (UTC) Received: (qmail 9397 invoked by uid 500); 1 Oct 2015 12:59:35 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 9299 invoked by uid 500); 1 Oct 2015 12:59:35 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 9166 invoked by uid 99); 1 Oct 2015 12:59:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 12:59:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8545CE153B; Thu, 1 Oct 2015 12:59:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robertkowalski@apache.org To: commits@couchdb.apache.org Date: Thu, 01 Oct 2015 12:59:37 -0000 Message-Id: <06d1699a553548c5a90990d860e817b2@git.apache.org> In-Reply-To: <1ff6438a419e43cea0909f4d233ce350@git.apache.org> References: <1ff6438a419e43cea0909f4d233ce350@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] fauxton commit: updated refs/heads/master to ebd9ced fix loading of zeroclipboard the swf was not loaded when no change to the element happened, e.g. a static element. additionally add a simple callback function to confirm a copy PR: #535 PR-URL: https://github.com/apache/couchdb-fauxton/pull/535 Reviewed-By: Benjamin Keen Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/685d6f82 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/685d6f82 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/685d6f82 Branch: refs/heads/master Commit: 685d6f82d60f7d020c64bdf5010dc1f84d77bf5e Parents: d1d9832 Author: Robert Kowalski Authored: Thu Sep 24 13:14:32 2015 +0200 Committer: Robert Kowalski Committed: Thu Oct 1 14:59:11 2015 +0200 ---------------------------------------------------------------------- app/addons/fauxton/components.react.jsx | 18 +++++++++++++----- .../fauxton/navigation/components.react.jsx | 5 ++--- 2 files changed, 15 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/685d6f82/app/addons/fauxton/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx index f1bff68..d877ce1 100644 --- a/app/addons/fauxton/components.react.jsx +++ b/app/addons/fauxton/components.react.jsx @@ -65,8 +65,14 @@ function (app, FauxtonAPI, React, ZeroClipboard) { ZeroClipboard.config({ moviePath: getZeroClipboardSwfPath() }); }, - componentDidUpdate: function () { - this.clipboard = new ZeroClipboard(document.getElementById("copy-text-" + this.props.uniqueKey)); + componentDidMount: function () { + var el = this.refs["copy-text-" + this.props.uniqueKey].getDOMNode(); + this.clipboard = new ZeroClipboard(el); + this.clipboard.on('load', function () { + this.clipboard.on('mouseup', function () { + this.props.onClipBoardClick(); + }.bind(this)); + }.bind(this)); }, render: function () { @@ -79,10 +85,12 @@ function (app, FauxtonAPI, React, ZeroClipboard) { value={this.props.textToCopy} /> + data-bypass="true" + ref={"copy-text-" + this.props.uniqueKey} + title="Copy to clipboard" + > Copy

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/685d6f82/app/addons/fauxton/navigation/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/navigation/components.react.jsx b/app/addons/fauxton/navigation/components.react.jsx index 9732893..b3b80c6 100644 --- a/app/addons/fauxton/navigation/components.react.jsx +++ b/app/addons/fauxton/navigation/components.react.jsx @@ -14,11 +14,10 @@ define([ 'api', 'react', 'addons/fauxton/navigation/stores', - 'addons/fauxton/navigation/actions', - 'addons/fauxton/dependencies/ZeroClipboard' + 'addons/fauxton/navigation/actions' ], -function (app, FauxtonAPI, React, Stores, Actions, ZeroClipboard) { +function (app, FauxtonAPI, React, Stores, Actions) { var navBarStore = Stores.navBarStore; var Footer = React.createClass({