This commit is contained in:
Maurice Meyer 2017-09-02 23:28:59 +02:00
commit fdaa16ea1b

View file

@ -304,11 +304,6 @@ function addRecord() {
$('#table-records>tbody>tr').last().find('span.glyphicon-trash').click(trashClicked);
$('#table-records>tbody>tr').last().find('span.glyphicon-share').click(remoteClicked);
requestSerial();
$('#addName').val("");
$('#addType').val("A").change();
$('#addContent').val("");
$('#addPrio').val("");
$('#addTtl').val("");
},
"json"
);
@ -344,11 +339,20 @@ function requestDomainName() {
$('#domain-name').text(data.name);
$('#add-domain-name').text("." + data.name);
domainName = data.name;
setDefaultRecordType();
$('#addButton').unbind().click(addRecord);
},
"json"
);
}
function setDefaultRecordType() {
var reverseZone = false;
if(domainName.endsWith('.in-addr.arpa')) reverseZone = true;
if(domainName.endsWith('.ip6.arpa')) reverseZone = true;
if(reverseZone) {
$('#addType').val('PTR').change();
}
}
function enableFilter(enable) {
if(enable) {
$('#searchName').prop("disabled", false);