[Web] Add refresh button and counter to mailbox tables
[Web] Fix multiple "no results" rows when refreshing an empty table [Web] Remember page when going back to a table with pagination, fixes #1598master
parent
649ab6c6fc
commit
3f0aca7a35
|
@ -35,3 +35,6 @@ table.footable>tbody>tr.footable-empty>td {
|
|||
.inputMissingAttr {
|
||||
border-color: #FF4136;
|
||||
}
|
||||
.table-lines {
|
||||
vertical-align: inherit;
|
||||
}
|
|
@ -43,3 +43,6 @@ table.footable>tbody>tr.footable-empty>td {
|
|||
max-width: 150px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.table-lines {
|
||||
vertical-align: inherit;
|
||||
}
|
|
@ -116,11 +116,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-postfix-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Postfix <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Postfix <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="postfix_log" data-log-url="postfix" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="postfix_log" data-log-url="postfix" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_postfix_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_postfix_logs" data-table="postfix_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -133,11 +133,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-dovecot-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Dovecot <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Dovecot <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="dovecot_log" data-log-url="dovecot" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="dovecot_log" data-log-url="dovecot" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_dovecot_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_dovecot_logs" data-table="dovecot_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -150,11 +150,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-sogo-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">SOGo <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">SOGo <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="sogo_log" data-log-url="sogo" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="sogo_log" data-log-url="sogo" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_sogo_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_sogo_logs" data-table="sogo_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -167,11 +167,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-netfilter-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Netfilter <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Netfilter <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="netfilter_log" data-log-url="netfilter" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="netfilter_log" data-log-url="netfilter" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_netfilter_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_netfilter_logs" data-table="netfilter_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -184,11 +184,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-rspamd-history">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Rspamd history <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Rspamd history <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="rspamd_history" data-table="rspamd_history" data-log-url="rspamd-history" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="rspamd_history" data-table="rspamd_history" data-log-url="rspamd-history" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_rspamd_history"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_rspamd_history" data-table="rspamd_history"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -202,11 +202,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-autodiscover-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Autodiscover <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Autodiscover <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="autodiscover_log" data-table="autodiscover_log" data-log-url="autodiscover" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="autodiscover_log" data-table="autodiscover_log" data-log-url="autodiscover" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_autodiscover_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_autodiscover_logs" data-table="autodiscover_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -219,11 +219,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-watchdog-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Watchdog <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">Watchdog <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="watchdog" data-table="watchdog_log" data-log-url="watchdog" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="watchdog" data-table="watchdog_log" data-log-url="watchdog" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_watchdog_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_watchdog_logs" data-table="watchdog_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -236,11 +236,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-acme-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">ACME <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">ACME <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="acme_log" data-log-url="acme" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="acme_log" data-log-url="acme" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_acme_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_acme_logs" data-table="acme_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
@ -253,11 +253,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-api-logs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">API <span class="badge badge-info log-lines"></span>
|
||||
<div class="panel-heading">API <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="apilog" data-table="api_log" data-log-url="api" data-nrows="100">+ 100</button>
|
||||
<button class="btn btn-xs btn-default add_log_lines" data-post-process="apilog" data-table="api_log" data-log-url="api" data-nrows="1000">+ 1000</button>
|
||||
<button class="btn btn-xs btn-default" id="refresh_api_log"><?=$lang['admin']['refresh'];?></button>
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_api_logs" data-table="api_log"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
|
|
@ -1,44 +1,35 @@
|
|||
jQuery(function($){
|
||||
if (localStorage.getItem("current_page") === null) {
|
||||
var current_page = {};
|
||||
} else {
|
||||
var current_page = JSON.parse(localStorage.getItem('current_page'));
|
||||
}
|
||||
// http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
||||
var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};
|
||||
function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})}
|
||||
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
||||
$("#refresh_postfix_log").on('click', function(e) {
|
||||
$(".refresh_table").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_postfix_logs();
|
||||
});
|
||||
$("#refresh_autodiscover_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_autodiscover_logs();
|
||||
});
|
||||
$("#refresh_dovecot_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_dovecot_logs();
|
||||
});
|
||||
$("#refresh_sogo_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_sogo_logs();
|
||||
});
|
||||
$("#refresh_watchdog_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_watchdog_logs();
|
||||
});
|
||||
$("#refresh_api_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_api_logs();
|
||||
});
|
||||
$("#refresh_acme_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_acme_logs();
|
||||
});
|
||||
$("#refresh_netfilter_log").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_netfilter_logs();
|
||||
});
|
||||
$("#refresh_rspamd_history").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
draw_rspamd_history();
|
||||
var table_name = $(this).data('table');
|
||||
$('#' + table_name).find("tr.footable-empty").remove();
|
||||
draw_table = $(this).data('draw');
|
||||
eval(draw_table + '()');
|
||||
});
|
||||
function table_log_ready(ft, name) {
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
$(heading).children('.table-lines').text(function(){
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
if (current_page[name]) {
|
||||
ft_paging.goto(parseInt(current_page[name]))
|
||||
}
|
||||
}
|
||||
function table_log_paging(ft, name) {
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
current_page[name] = ft_paging.current;
|
||||
localStorage.setItem('current_page', JSON.stringify(current_page));
|
||||
}
|
||||
function draw_autodiscover_logs() {
|
||||
ft_autodiscover_logs = FooTable.init('#autodiscover_log', {
|
||||
"columns": [
|
||||
|
@ -62,12 +53,12 @@ jQuery(function($){
|
|||
"paging": {"enabled": true,"limit": 5,"size": log_pagination_size},
|
||||
"filtering": {"enabled": true,"delay": 1,"position": "left","placeholder": lang.filter_table},
|
||||
"sorting": {"enabled": true},
|
||||
"on": {"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_log_ready(ft, 'autodiscover_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'autodiscover_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -96,11 +87,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'postfix_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'postfix_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -130,11 +120,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'postfix_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'postfix_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -165,11 +154,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'api_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'api_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -197,11 +185,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'acme_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'acme_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -230,11 +217,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'netfilter_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'netfilter_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -263,11 +249,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'sogo_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'sogo_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -296,11 +281,10 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
table_log_ready(ft, 'dovecot_logs');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'dovecot_logs');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -338,8 +322,9 @@ jQuery(function($){
|
|||
"sorting": {"enabled": true},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_log_ready(ft, 'rspamd_history');
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
$(heading).children('.log-lines').text(function(){
|
||||
$(heading).children('.table-lines').text(function(){
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
|
@ -377,6 +362,9 @@ jQuery(function($){
|
|||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_log_paging(ft, 'rspamd_history');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -516,7 +504,7 @@ jQuery(function($){
|
|||
if (data.length === undefined) { mailcow_alert_box(lang.no_new_rows, "info"); return; }
|
||||
var rows = process_table_data(data, post_process);
|
||||
var rows_now = (ft_paging.totalRows + data.length);
|
||||
$(heading).children('.log-lines').text(rows_now)
|
||||
$(heading).children('.table-lines').text(rows_now)
|
||||
mailcow_alert_box(data.length + lang.additional_rows, "success");
|
||||
ft.rows.load(rows, true);
|
||||
});
|
||||
|
|
|
@ -189,6 +189,11 @@ jQuery(function($){
|
|||
return entityMap[s];
|
||||
});
|
||||
}
|
||||
if (localStorage.getItem("current_page") === null) {
|
||||
var current_page = {};
|
||||
} else {
|
||||
var current_page = JSON.parse(localStorage.getItem('current_page'));
|
||||
}
|
||||
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||
function validateEmail(email) {
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
|
@ -211,6 +216,28 @@ jQuery(function($){
|
|||
var date = new Date(tm ? tm * 1000 : 0);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
$(".refresh_table").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var table_name = $(this).data('table');
|
||||
$('#' + table_name).find("tr.footable-empty").remove();
|
||||
draw_table = $(this).data('draw');
|
||||
eval(draw_table + '()');
|
||||
});
|
||||
function table_mailbox_ready(ft, name) {
|
||||
heading = ft.$el.parents('.tab-pane').find('.panel-heading')
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
$(heading).children('.table-lines').text(function(){
|
||||
return ft_paging.totalRows;
|
||||
})
|
||||
if (current_page[name]) {
|
||||
ft_paging.goto(parseInt(current_page[name]))
|
||||
}
|
||||
}
|
||||
function table_mailbox_paging(ft, name) {
|
||||
var ft_paging = ft.use(FooTable.Paging)
|
||||
current_page[name] = ft_paging.current;
|
||||
localStorage.setItem('current_page', JSON.stringify(current_page));
|
||||
}
|
||||
function draw_domain_table() {
|
||||
ft_domain_table = FooTable.init('#domain_table', {
|
||||
"columns": [
|
||||
|
@ -273,6 +300,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'domain_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'domain_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -351,6 +386,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'mailbox_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'mailbox_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -408,6 +451,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'resource_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'resource_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -462,6 +513,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'bcc_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'bcc_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -511,6 +570,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'recipient_map_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'recipient_map_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -572,6 +639,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'alias_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'alias_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -616,11 +691,16 @@ jQuery(function($){
|
|||
"connectors": false,
|
||||
"placeholder": lang.filter_table
|
||||
},
|
||||
"components": {
|
||||
"filtering": FooTable.domainFilter
|
||||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'aliasdomain_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'aliasdomain_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -688,6 +768,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'sync_job_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'sync_job_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -743,6 +831,14 @@ jQuery(function($){
|
|||
},
|
||||
"sorting": {
|
||||
"enabled": true
|
||||
},
|
||||
"on": {
|
||||
"ready.ft.table": function(e, ft){
|
||||
table_mailbox_ready(ft, 'filter_table');
|
||||
},
|
||||
"after.ft.paging": function(e, ft){
|
||||
table_mailbox_paging(ft, 'filter_table');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -30,7 +30,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane active" id="tab-domains">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['domains'];?></h3>
|
||||
<?=$lang['mailbox']['domains'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_domain_table" data-table="domain_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="domain_table" class="table table-striped"></table>
|
||||
|
@ -58,7 +61,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-mailboxes">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['mailboxes'];?></h3>
|
||||
<?=$lang['mailbox']['mailboxes'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_mailbox_table" data-table="mailbox_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="mailbox_table" class="table table-striped"></table>
|
||||
|
@ -82,7 +88,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-resources">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['resources'];?></h3>
|
||||
<?=$lang['mailbox']['resources'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_resource_table" data-table="resource_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="resource_table" class="table table-striped"></table>
|
||||
|
@ -112,10 +121,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-domain-aliases">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-right">
|
||||
<a href="#" data-toggle="modal" data-target="#addAliasDomainModal" ><span class="glyphicon glyphicon-plus"></span></a>
|
||||
<?=$lang['mailbox']['domain_aliases'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_aliasdomain_table" data-table="aliasdomain_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['domain_aliases'];?></h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="aliasdomain_table" class="table table-striped"></table>
|
||||
|
@ -139,7 +148,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-mbox-aliases">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['aliases'];?></h3>
|
||||
<?=$lang['mailbox']['aliases'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_alias_table" data-table="alias_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="alias_table" class="table table-striped"></table>
|
||||
|
@ -163,7 +175,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-syncjobs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['sync_jobs'];?></h3>
|
||||
<?=$lang['mailbox']['sync_jobs'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_sync_job_table" data-table="sync_job_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="sync_job_table"></table>
|
||||
|
@ -189,7 +204,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-filters">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['filters'];?></h3>
|
||||
<?=$lang['mailbox']['filters'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_filter_table" data-table="filter_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<p style="margin:10px" class="help-block"><?=$lang['mailbox']['sieve_info'];?></p>
|
||||
<div class="table-responsive">
|
||||
|
@ -217,7 +235,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
<div role="tabpanel" class="tab-pane" id="tab-bcc">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['bcc_maps'];?></h3>
|
||||
<?=$lang['mailbox']['bcc_maps'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_bcc_table" data-table="bcc_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<p style="margin:10px" class="help-block"><?=$lang['mailbox']['bcc_info'];?></p>
|
||||
<div class="table-responsive">
|
||||
|
@ -242,7 +263,10 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?=$lang['mailbox']['recipient_maps'];?></h3>
|
||||
<?=$lang['mailbox']['recipient_maps'];?> <span class="badge badge-info table-lines"></span>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_recipient_map_table" data-table="recipient_map_table"><?=$lang['admin']['refresh'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
<p style="margin:10px" class="help-block"><?=$lang['mailbox']['recipient_map_info'];?></p>
|
||||
<div class="table-responsive">
|
||||
|
|
Loading…
Reference in New Issue