added copy-to-clipboard directive that does not require Flash

This commit is contained in:
alecmerdler 2017-05-24 21:42:06 -07:00
parent 6ed5235dfd
commit 062c1a1626
13 changed files with 186 additions and 74 deletions

View file

@ -66,17 +66,15 @@
<div ng-if="getCommand(currentFormat, currentRobot)">
Command:
<pre class="command">{{ getCommand(currentFormat, currentRobot) }}</pre>
<pre id="command-data" class="command">{{ getCommand(currentFormat, currentRobot) }}</pre>
</div>
</div>
<div class="modal-footer">
<div class="clipboard-copied-message" style="display: none">
Copied
</div>
<input type="hidden" name="command-data" id="command-data"
value="{{ getCommand(currentFormat, currentRobot) }}">
<button id="copyClipboard" type="button" class="btn btn-primary"
data-clipboard-target="command-data"
<button type="button" class="btn btn-primary"
clipboard-copy="#command-data"
ng-show="getCommand(currentFormat, currentRobot)">Copy Command</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>