Prevent event propagation for remaining tables

master
friedPotat0 2019-07-27 18:56:51 +02:00
parent bcad71cfaa
commit 1b54d75716
3 changed files with 14 additions and 5 deletions

View File

@ -52,12 +52,12 @@ $(document).ready(function() {
auto_fill_quota = function(domain) { auto_fill_quota = function(domain) {
$.get("/api/v1/get/domain/" + domain, function(data){ $.get("/api/v1/get/domain/" + domain, function(data){
var result = $.parseJSON(JSON.stringify(data)); var result = $.parseJSON(JSON.stringify(data));
def_new_mailbox_quota = ( result.def_new_mailbox_quota / 1048576); def_new_mailbox_quota = ( result.def_new_mailbox_quota / 1048576);
max_new_mailbox_quota = ( result.max_new_mailbox_quota / 1048576); max_new_mailbox_quota = ( result.max_new_mailbox_quota / 1048576);
if (max_new_mailbox_quota != '0') { if (max_new_mailbox_quota != '0') {
$("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB'); $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
$('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": max_new_mailbox_quota}); $('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": max_new_mailbox_quota});
$('#addInputQuota').val(def_new_mailbox_quota); $('#addInputQuota').val(def_new_mailbox_quota);
} }
else { else {
$("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB'); $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB');
@ -230,7 +230,7 @@ jQuery(function($){
return Number(res[0]); return Number(res[0]);
}, },
}, },
{"name":"def_quota_for_mbox","title":lang.mailbox_defquota,"breakpoints":"xs sm md","style":{"width":"125px"}}, {"name":"def_quota_for_mbox","title":lang.mailbox_defquota,"breakpoints":"xs sm md","style":{"width":"125px"}},
{"name":"max_quota_for_mbox","title":lang.mailbox_quota,"breakpoints":"xs sm","style":{"width":"125px"}}, {"name":"max_quota_for_mbox","title":lang.mailbox_quota,"breakpoints":"xs sm","style":{"width":"125px"}},
{"name":"rl","title":"RL","breakpoints":"xs sm md lg","style":{"maxWidth":"100px","width":"100px"}}, {"name":"rl","title":"RL","breakpoints":"xs sm md lg","style":{"maxWidth":"100px","width":"100px"}},
{"name":"backupmx","filterable": false,"style":{"maxWidth":"120px","width":"120px"},"title":lang.backup_mx,"breakpoints":"xs sm md lg"}, {"name":"backupmx","filterable": false,"style":{"maxWidth":"120px","width":"120px"},"title":lang.backup_mx,"breakpoints":"xs sm md lg"},
@ -256,7 +256,7 @@ jQuery(function($){
return e; return e;
}).join('/1'); }).join('/1');
} }
item.def_quota_for_mbox = humanFileSize(item.def_quota_for_mbox); item.def_quota_for_mbox = humanFileSize(item.def_quota_for_mbox);
item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox); item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox);
item.chkbox = '<input type="checkbox" data-id="domain" name="multi_select" value="' + encodeURIComponent(item.domain_name) + '" />'; item.chkbox = '<input type="checkbox" data-id="domain" name="multi_select" value="' + encodeURIComponent(item.domain_name) + '" />';
item.action = '<div class="btn-group">'; item.action = '<div class="btn-group">';
@ -1068,6 +1068,10 @@ jQuery(function($){
}); });
}; };
$('body').on('click', 'span.footable-toggle', function () {
event.stopPropagation();
})
draw_domain_table(); draw_domain_table();
draw_mailbox_table(); draw_mailbox_table();
draw_resource_table(); draw_resource_table();

View File

@ -114,7 +114,7 @@ jQuery(function($){
}); });
}); });
$('table tbody').on('click', 'span.footable-toggle', function () { $('body').on('click', 'span.footable-toggle', function () {
event.stopPropagation(); event.stopPropagation();
}) })

View File

@ -236,6 +236,11 @@ jQuery(function($){
} }
}); });
} }
$('body').on('click', 'span.footable-toggle', function () {
event.stopPropagation();
})
draw_sync_job_table(); draw_sync_job_table();
draw_tla_table(); draw_tla_table();
draw_wl_policy_mailbox_table(); draw_wl_policy_mailbox_table();