Added copy button to link field (#216)
Co-authored-by: Adam Bem <adam.bem@zoho.eu> Reviewed-on: #216 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com>
This commit is contained in:
		@@ -40,6 +40,13 @@ $('#btn-newRow').click(
 | 
			
		||||
    }   
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
$('#btn-copy').click(
 | 
			
		||||
    ()=> {
 | 
			
		||||
        var link = $("#messageLink").html();
 | 
			
		||||
        navigator.clipboard.writeText(link);
 | 
			
		||||
    }   
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
    Functions segment
 | 
			
		||||
*/
 | 
			
		||||
@@ -146,8 +153,8 @@ function loadFetchedMessage(){
 | 
			
		||||
 | 
			
		||||
function fillStaticFields(uuid, contentType, body, httpStatus){
 | 
			
		||||
    let link = createLink(uuid);
 | 
			
		||||
    let linkHtml = '<a class="hyperlink" target="_blank" href="'+link+'">'+link+'</a>';
 | 
			
		||||
    $('#messageLink').html(linkHtml);
 | 
			
		||||
    $('#messageLink').attr("href", link);
 | 
			
		||||
    $('#messageLink').html(link);
 | 
			
		||||
    $('#httpStatus').val(httpStatus);
 | 
			
		||||
    $('#typeSelector').val(contentType);
 | 
			
		||||
    $('#bodyEditor').val(body);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user