Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 86b5d7a

Browse files
committed
Copy ontology with separate button to clipboard
1 parent 8ea9cec commit 86b5d7a

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/main/web/app/Ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Ui {
2727
on: "click",
2828
target: Ui.urlType
2929
});
30-
Ui.ontologyText.click(() => Ui.ontologyText.select());
30+
new Clipboard("#copy-ontology-to-clipboard-button");
3131
}
3232

3333
static displayFormats(formats) {

src/main/web/app/assets/index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,18 @@ <h1 class="ui header page">
9090
<div class="ui divider"></div>
9191

9292
<div class="ui doubling stackable grid">
93-
<div class=" sixteen wide column">
93+
<div class="twelve wide column">
9494
<a id="webvowl-button" class="ui tiny fluid teal labeled icon button">
9595
<i class="external icon"></i>
9696
Visualize with WebVOWL
9797
</a>
9898
</div>
99+
<div class="four wide column">
100+
<button id="copy-ontology-to-clipboard-button" class="ui tiny fluid button" data-clipboard-action="copy" data-clipboard-target="#ontology-text">
101+
<i class="copy icon"></i>
102+
Copy ontology
103+
</button>
104+
</div>
99105
</div>
100106

101107
<div id="initial-ontology-info" class="ui icon message">

src/main/web/bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"babel-polyfill": "https://bitbucket.org/linkvt/babel-polyfill.git#master",
88
"jquery": "~2.2.3",
99
"semantic-ui": "git://github.com/linkvt/Semantic-UI.git#master",
10-
"js-cookie": "~2.1.1"
10+
"js-cookie": "~2.1.1",
11+
"clipboard": "^1.5.12"
1112
}
1213
}

0 commit comments

Comments
 (0)