Network addnode table updates
-Added "copy to clipboard" buttons to addnode tables -Addnode table data no longer wraps onto multiple lines when the data cannot fit on the screen
This commit is contained in:
@@ -1092,4 +1092,33 @@ tr {
|
|||||||
|
|
||||||
#showClaimInstructions:hover {
|
#showClaimInstructions:hover {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-copy {
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
font-size: 0.85em;
|
||||||
|
color: #24292f;
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
border: 1px solid #ccced1;
|
||||||
|
border-radius: .25rem;
|
||||||
|
line-height: normal;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ebecf0;
|
||||||
|
color: #24292f;
|
||||||
|
border: 1px solid #ccced1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active, &:active:focus, &:focus {
|
||||||
|
border: 1px solid #ccced1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.btn:not(.disabled):hover {
|
||||||
|
margin-top: 0;
|
||||||
|
border: 1px solid #ccced1;
|
||||||
|
}
|
||||||
|
|
||||||
|
> i {
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -118,6 +118,9 @@ block content
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: addNodeRows,
|
data: addNodeRows,
|
||||||
|
rowCallback: function(row, data, index) {
|
||||||
|
$("td:eq(0)", row).css('white-space', 'nowrap').html(`<button class="btn btn-sm btn-copy" type="button"><i class="far fa-copy"></i></button> <span>${data.nodes}</span>`);
|
||||||
|
},
|
||||||
fnDrawCallback: function(settings) {
|
fnDrawCallback: function(settings) {
|
||||||
fixDataTableColumns();
|
fixDataTableColumns();
|
||||||
fixFooterHeightAndPosition();
|
fixFooterHeightAndPosition();
|
||||||
@@ -166,6 +169,9 @@ block content
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: oneTryRows,
|
data: oneTryRows,
|
||||||
|
rowCallback: function(row, data, index) {
|
||||||
|
$("td:eq(0)", row).css('white-space', 'nowrap').html(`<button class="btn btn-sm btn-copy" type="button"><i class="far fa-copy"></i></button> <span>${data.nodes}</span>`);
|
||||||
|
},
|
||||||
fnDrawCallback: function(settings) {
|
fnDrawCallback: function(settings) {
|
||||||
fixDataTableColumns();
|
fixDataTableColumns();
|
||||||
fixFooterHeightAndPosition();
|
fixFooterHeightAndPosition();
|
||||||
@@ -199,6 +205,26 @@ block content
|
|||||||
}
|
}
|
||||||
if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.network_page.page_header.show_img} == true)
|
if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.network_page.page_header.show_img} == true)
|
||||||
startRotateElement('img#header-img');
|
startRotateElement('img#header-img');
|
||||||
|
|
||||||
|
$('#addnodes').on('click', 'button.btn-copy', function (event) {
|
||||||
|
var btn = $(this);
|
||||||
|
|
||||||
|
if (btn.html().indexOf('fa-copy') > -1) {
|
||||||
|
var tmp = $('<input>');
|
||||||
|
$('body').append(tmp);
|
||||||
|
tmp.val(btn.parent().find('span').html()).select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
tmp.remove();
|
||||||
|
|
||||||
|
btn.tooltip({title: 'Copied!', placement: 'top', trigger: 'manual'}).tooltip('show');
|
||||||
|
btn.html('<i class="fas fa-check"></i>');
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
btn.html('<i class="far fa-copy"></i>');
|
||||||
|
btn.tooltip('dispose');
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
- var theadClasses = [];
|
- var theadClasses = [];
|
||||||
if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != ''
|
if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != ''
|
||||||
|
|||||||
Reference in New Issue
Block a user