kopia lustrzana https://github.com/magicbug/Cloudlog
Make base URL copyable
rodzic
5e5136fa44
commit
b9b0d0e483
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue