Make base URL copyable

pull/1972/head
phl0 2023-01-31 13:00:23 +01:00
rodzic 5e5136fa44
commit b9b0d0e483
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
2 zmienionych plików z 20 dodań i 2 usunięć

Wyświetl plik

@ -15,11 +15,11 @@
</tr>
<tr>
<td>Language</td>
<td><?php echo $this->config->item('language')."\n"; ?></td>
<td><?php echo ucfirst($this->config->item('language'))."\n"; ?></td>
</tr>
<tr>
<td>Base URL</td>
<td><?php echo $this->config->item('base_url')."\n"; ?></td>
<td><span id="baseUrl"><a href="<?php echo $this->config->item('base_url')?>" target="_blank"><?php echo $this->config->item('base_url'); ?></a></span> <span data-toggle="tooltip" data-original-title="<?php echo $this->lang->line('copy_to_clipboard'); ?>" onclick='copyURL("<?php echo $this->config->item('base_url'); ?>")'><i class="copy-icon fas fa-copy"></span></td>
</tr>
</table>
</div>

Wyświetl plik

@ -122,6 +122,24 @@ function load_was_map() {
<script src="<?php echo base_url() ;?>assets/js/sections/station_logbooks.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "debug") { ?>
<script type="text/javascript">
function copyURL(url) {
var urlField = $('#baseUrl');
navigator.clipboard.writeText(url).then(function() {
});
urlField.addClass('flash-copy')
.delay('1000').queue(function() {
urlField.removeClass('flash-copy').dequeue();
});
}
$(function () {
$('[data-toggle="tooltip"]').tooltip({'delay': { show: 500, hide: 0 }, 'placement': 'right'});
});
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?>
<script type="text/javascript">
function copyApiKey(apiKey) {