implemented hiding/unhiding of mailing lists on the database side
This commit is contained in:
@@ -11,22 +11,47 @@ function enableList(listEmail){
|
||||
}
|
||||
|
||||
function hideList(listEmail){
|
||||
console.log('hideList('+listEmail+')');
|
||||
$.post('/api/list/hide',{list:listEmail},showListResult,'json');
|
||||
}
|
||||
|
||||
function loadListAdminList(){
|
||||
$.getJSON('/api/list/list', showListAdminList);
|
||||
}
|
||||
|
||||
function loadListList(){
|
||||
$.getJSON("/api/list/list", showListList);
|
||||
$.getJSON('/api/list/list', showListAdminList);
|
||||
}
|
||||
|
||||
function loadUserList(){
|
||||
$.getJSON("/api/user/list", showUserList);
|
||||
$.getJSON('/api/user/list', showUserList);
|
||||
}
|
||||
|
||||
function reload(){
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
function showList(listEmail){
|
||||
console.log('showList('+listEmail+')');
|
||||
$.post('/api/list/show',{list:listEmail},showListResult,'json');
|
||||
}
|
||||
|
||||
function showListList(data){
|
||||
function showListResult(result){
|
||||
console.log(result);
|
||||
if ('error' in result){
|
||||
alert(result.error);
|
||||
return;
|
||||
}
|
||||
if ('success' in result){
|
||||
alert(result.success);
|
||||
reload();
|
||||
return;
|
||||
}
|
||||
alert("Api call did not return result");
|
||||
}
|
||||
|
||||
function showListAdminList(data){
|
||||
}
|
||||
|
||||
function showListAdminList(data){
|
||||
for (let i in data.lists){
|
||||
let list = data.lists[i];
|
||||
let row = $('<tr/>');
|
||||
|
||||
Reference in New Issue
Block a user