Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-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 39CB81848F for ; Sat, 29 Aug 2015 01:08:46 +0000 (UTC) Received: (qmail 2016 invoked by uid 500); 29 Aug 2015 01:08:46 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 1903 invoked by uid 500); 29 Aug 2015 01:08:46 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 1788 invoked by uid 99); 29 Aug 2015 01:08:46 -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; Sat, 29 Aug 2015 01:08:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E6F84E0F7C; Sat, 29 Aug 2015 01:08:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dblotsky@apache.org To: commits@cordova.apache.org Date: Sat, 29 Aug 2015 01:08:47 -0000 Message-Id: <9762e3c5b4c84fb99d31c7e235edf69d@git.apache.org> In-Reply-To: <2fbe36f7c4414978b4adfaf50f7850ec@git.apache.org> References: <2fbe36f7c4414978b4adfaf50f7850ec@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] docs commit: Improved maintainability of copy buttons on main page. This closes #321. Improved maintainability of copy buttons on main page. This closes #321. Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/cebafcc9 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/cebafcc9 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/cebafcc9 Branch: refs/heads/cordova-website Commit: cebafcc95c1729489b58631af99a4ab318eb2e78 Parents: 67fd0bf Author: riknoll Authored: Fri Aug 28 11:52:26 2015 -0700 Committer: Dmitry Blotsky Committed: Fri Aug 28 18:08:27 2015 -0700 ---------------------------------------------------------------------- www/index.html | 13 ++++++++----- www/static/css-src/_home.scss | 5 +++++ www/static/css-src/_plugins.scss | 5 ----- www/static/js/index.js | 13 +++---------- 4 files changed, 16 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/cebafcc9/www/index.html ---------------------------------------------------------------------- diff --git a/www/index.html b/www/index.html index 148d4a3..e6d2e4f 100644 --- a/www/index.html +++ b/www/index.html @@ -80,9 +80,10 @@ permalink: /
- +
$ npm install -g cordova +
npm install -g cordova
@@ -98,9 +99,10 @@ permalink: /
- +
$ cordova create MyApp +
cordova create MyApp
@@ -117,10 +119,11 @@ permalink: /
- +

$ cd MyApp

$ cordova platform add browser

+
cd MyApp cordova platform add browser
@@ -136,9 +139,10 @@ permalink: /
- +
$ cordova run browser +
cordova run browser
@@ -201,4 +205,3 @@ permalink: / {% include tools_and_samples.html %} - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/cebafcc9/www/static/css-src/_home.scss ---------------------------------------------------------------------- diff --git a/www/static/css-src/_home.scss b/www/static/css-src/_home.scss index 52984de..25af288 100644 --- a/www/static/css-src/_home.scss +++ b/www/static/css-src/_home.scss @@ -186,6 +186,11 @@ img#logo_top { margin:5px; } } + .copy-text { + width:0px; + height:0px; + overflow:hidden; + } } http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/cebafcc9/www/static/css-src/_plugins.scss ---------------------------------------------------------------------- diff --git a/www/static/css-src/_plugins.scss b/www/static/css-src/_plugins.scss index 71f7920..f2ef372 100644 --- a/www/static/css-src/_plugins.scss +++ b/www/static/css-src/_plugins.scss @@ -115,11 +115,6 @@ margin-bottom:20px; background-color:$gray-5; position: relative; - .plugin-cordova-command { - width:0px; - height:0px; - overflow:hidden; - } } .version_and_author { display: inline-block; http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/cebafcc9/www/static/js/index.js ---------------------------------------------------------------------- diff --git a/www/static/js/index.js b/www/static/js/index.js index 6816410..b2c18c2 100644 --- a/www/static/js/index.js +++ b/www/static/js/index.js @@ -109,17 +109,10 @@ $(document).ready(function () { document.getElementById("new_blog_count").innerHTML = new_blog_count; } - // code for copy text - var addCopyText = function(elementId, copyText) { - new ZeroClipboard(document.getElementById(elementId)) - .on("copy", function(event) { - event.clipboardData.setData("text/plain", copyText); - }); + var copyButtons = document.getElementsByClassName("btn-copy"); + for(var i = 0; i < copyButtons.length; i++) { + new ZeroClipboard(copyButtons[i]); } - addCopyText("copy-npm-install", "npm install -g cordova"); - addCopyText("copy-cordova-create", "cordova create MyApp"); - addCopyText("copy-cordova-platform-add", "cd MyApp\ncordova platform add browser"); - addCopyText("copy-cordova-run", "cordova run browser"); // Smooth scroll to anchor links $("a[href^='#']").on('click', function(e) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org