From 86b5d7ab8a91980858c44dccf7feecb902aa1fb6 Mon Sep 17 00:00:00 2001 From: Vincent Link Date: Fri, 17 Jun 2016 22:07:40 +0200 Subject: [PATCH] Copy ontology with separate button to clipboard --- src/main/web/app/Ui.js | 2 +- src/main/web/app/assets/index.html | 8 +++++++- src/main/web/bower.json | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/web/app/Ui.js b/src/main/web/app/Ui.js index 83b9b1c..b51a481 100644 --- a/src/main/web/app/Ui.js +++ b/src/main/web/app/Ui.js @@ -27,7 +27,7 @@ export default class Ui { on: "click", target: Ui.urlType }); - Ui.ontologyText.click(() => Ui.ontologyText.select()); + new Clipboard("#copy-ontology-to-clipboard-button"); } static displayFormats(formats) { diff --git a/src/main/web/app/assets/index.html b/src/main/web/app/assets/index.html index b11e708..888e101 100644 --- a/src/main/web/app/assets/index.html +++ b/src/main/web/app/assets/index.html @@ -90,12 +90,18 @@

-
+ +
+ +
diff --git a/src/main/web/bower.json b/src/main/web/bower.json index 95c39fc..8dd9f0d 100644 --- a/src/main/web/bower.json +++ b/src/main/web/bower.json @@ -7,6 +7,7 @@ "babel-polyfill": "https://bitbucket.org/linkvt/babel-polyfill.git#master", "jquery": "~2.2.3", "semantic-ui": "git://github.com/linkvt/Semantic-UI.git#master", - "js-cookie": "~2.1.1" + "js-cookie": "~2.1.1", + "clipboard": "^1.5.12" } }