Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/views/layouts/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,27 @@
{{ HTML::script('assets/js/libs/bootstrap/bootstrap.min.js') }}
{{ HTML::script('assets/js/respond.min.js') }}
{{ HTML::script('assets/js/placeholder.js') }}
<script type="text/javascript">
(function (window, document) {
var copyables = [].slice.call(document.querySelectorAll('.copyable'));
var copy = function(event) {
window.getSelection().removeAllRanges();
var range = document.createRange();
document.createElement
range.selectNode(event.currentTarget);
window.getSelection().addRange(range);
document.execCommand('copy');
window.getSelection().removeAllRanges();
if (!window.LL.copyalert) {
window.alert('{{trans("Copied")}}');
window.LL.copyalert = true;
}
};
copyables.map(function (copyable) {
copyable.addEventListener('click', copy);
});
})(window, document);
</script>
@show
@show
</body>
Expand Down
4 changes: 2 additions & 2 deletions app/views/partials/client/item.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td>{{ $client->authority['name'] }}</td>
<td>{{ $client->api['basic_key'] }}</td>
<td>{{ $client->api['basic_secret'] }}</td>
<td><a href="#" class="copyable" title="Click to copy">{{ $client->api['basic_key'] }}</a></td>
<td><a href="#" class="copyable" title="Click to copy">{{ $client->api['basic_secret'] }}</a></td>
<td class="text-center">
<a
href="{{ URL() }}/lrs/{{ $lrs->_id }}/client/{{ $client->_id }}/edit"
Expand Down