working on forwarding mail
This commit is contained in:
@@ -27,6 +27,10 @@ function hideList(listEmail){
|
||||
$.post('/api/list/hide',{list:listEmail},showListResult,'json');
|
||||
}
|
||||
|
||||
function loadListDetail(listEmail){
|
||||
$.post('/api/list/detail',{list:listEmail},showListDetail,'json');
|
||||
}
|
||||
|
||||
function loadListOfEditableLists(){
|
||||
$.getJSON('/api/list/editable', showListOfEditableLists);
|
||||
}
|
||||
@@ -51,6 +55,10 @@ function showList(listEmail){
|
||||
$.post('/api/list/show',{list:listEmail},showListResult,'json');
|
||||
}
|
||||
|
||||
function showListDetail(data){
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
function showListOfEditableLists(data){
|
||||
for (let i in data.lists){
|
||||
let list = data.lists[i];
|
||||
@@ -63,7 +71,11 @@ function showListOfEditableLists(data){
|
||||
td = $('<td/>');
|
||||
$('<a/>',{href:inspect}).text(addr).appendTo(td)
|
||||
td.appendTo(row);
|
||||
$('<td/>').text(list.state).appendTo(row);
|
||||
let states = [];
|
||||
for (let state in list.state){
|
||||
if (list.state[state] > 0) states.push(state);
|
||||
}
|
||||
$('<td/>').text(states.toString()).appendTo(row);
|
||||
|
||||
let select = $('<select/>',{name:addr}).change(function () {
|
||||
let action = $(this).children("option:selected").val();
|
||||
@@ -99,7 +111,11 @@ function showListList(data){
|
||||
$('<td/>',{class:'right'}).text(list.email.prefix).appendTo(row);
|
||||
$('<td/>',{class:'right'}).text('@').appendTo(row);
|
||||
$('<td/>').text(list.email.domain).appendTo(row);
|
||||
$('<td/>').text(list.state).appendTo(row);
|
||||
let states = [];
|
||||
for (let state in list.state){
|
||||
if (list.state[state] > 0) states.push(state);
|
||||
}
|
||||
$('<td/>').text(states.toString()).appendTo(row);
|
||||
let td = $('<td/>',{class:'actions'});
|
||||
$('<button/>',{onclick:"subscribeTo('"+list.email.domain+"', '"+list.email.prefix+"');"}).text('subscribe').appendTo(td);
|
||||
$('<button/>',{onclick:"unsubscribeFrom('"+list.email.domain+"', '"+list.email.prefix+"');"}).text('unsubcribe').appendTo(td);
|
||||
|
||||
Reference in New Issue
Block a user