Fix checkbox toggling, add nav tabs, fix broken domain quota when adding a new domain

This commit is contained in:
andryyy
2017-04-27 08:44:21 +02:00
parent 5586bd2bb5
commit e26304f6d0
5 changed files with 120 additions and 97 deletions

View File

@@ -2,7 +2,7 @@ $(document).ready(function() {
// add.php
// Get max. possible quota for a domain when domain field changes
$('#addSelectDomain').on('change', function() {
$.get("/api/v1/domain/" + this.value, function(data){
$.get("/api/v1/get/domain/" + this.value, function(data){
var result = jQuery.parseJSON( data );
max_new_mailbox_quota = ( result.max_new_mailbox_quota / 1048576);
if (max_new_mailbox_quota != '0') {

File diff suppressed because one or more lines are too long

View File

@@ -329,9 +329,14 @@ $(document).ready(function() {
});
}
});
$("tr").on('click',function(event) {
var checkbox = $(this).find(':checkbox');
checkbox.trigger('click');
$("tr").on('click',function(e) {
if (e.target.type == "checkbox") {
e.stopPropagation();
} else {
var $checkbox = $(this).find(':checkbox');
var checkbox = $(this).find(':checkbox');
checkbox.trigger('click');
}
});
});
}