mirror of
https://github.com/pi-hole/web.git
synced 2025-12-23 04:08:39 +00:00
Add tooltips for creation and modification times for domains and adlists.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -35,6 +35,11 @@ $.fn.redraw = function(){
|
||||
});
|
||||
};
|
||||
|
||||
function datetime(date)
|
||||
{
|
||||
return moment.unix(Math.floor(date)).format("Y-MM-DD HH:mm:ss z");
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#btnAdd').on('click', addAdlist);
|
||||
@@ -61,8 +66,8 @@ $(document).ready(function() {
|
||||
$('.deleteAdlist').on('click', deleteAdlist);
|
||||
},
|
||||
"rowCallback": function( row, data ) {
|
||||
$('td:eq(0)', row).html( '<code>'+data["address"]+'</code>' );
|
||||
|
||||
const tooltip = 'Added: '+datetime(data["date_added"])+'\nLast modified: '+datetime(data["date_modified"]);
|
||||
$('td:eq(0)', row).html( '<code title="'+tooltip+'">'+data["address"]+'</code>' );
|
||||
|
||||
const disabled = data["enabled"] === 0;
|
||||
$('td:eq(1)', row).html( '<input type="checkbox" id="status"'+(disabled?'':' checked')+'>');
|
||||
|
||||
Reference in New Issue
Block a user