working on list management
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
function dropList(email){
|
||||
console.log('dopList('+email+')');
|
||||
function disableList(listEmail){
|
||||
console.log('disableList('+listEmail+')');
|
||||
}
|
||||
|
||||
function dropList(listEmail){
|
||||
console.log('dopList('+listEmail+')');
|
||||
}
|
||||
|
||||
function enableList(listEmail){
|
||||
console.log('enableList('+listEmail+')');
|
||||
}
|
||||
|
||||
function loadListList(){
|
||||
$.getJSON("/api/list/list", showListList);
|
||||
}
|
||||
@@ -14,10 +23,18 @@ function showListList(data){
|
||||
let list = data.lists[i];
|
||||
let row = $('<tr/>');
|
||||
let drop = $('<button/>').text('drop list').click(() => dropList(list.email))
|
||||
let start = $('<button/>').text('enable').click(() => enableList(list.email))
|
||||
let stop = $('<button/>').text('disable').click(() => disableList(list.email))
|
||||
|
||||
let actions = $('<td/>');
|
||||
$('<td/>').text(list.name).appendTo(row);
|
||||
$('<td/>').text(list.email).appendTo(row);
|
||||
$('<td/>').text(list.state).appendTo(row);
|
||||
drop.appendTo($('<td/>')).appendTo(row);
|
||||
|
||||
start.appendTo(actions);
|
||||
stop.appendTo(actions);
|
||||
drop.appendTo(actions);
|
||||
actions.appendTo(row);
|
||||
$('<td/>').text(list.imap_host).appendTo(row);
|
||||
$('<td/>').text(list.imap_port).appendTo(row);
|
||||
$('<td/>').text(list.imap_user).appendTo(row);
|
||||
@@ -53,4 +70,7 @@ function start(){
|
||||
console.log("application started");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$(start); // document.on ready
|
||||
Reference in New Issue
Block a user