Merged #47.
This commit is contained in:
commit
fdaa16ea1b
|
@ -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-trash').click(trashClicked);
|
||||||
$('#table-records>tbody>tr').last().find('span.glyphicon-share').click(remoteClicked);
|
$('#table-records>tbody>tr').last().find('span.glyphicon-share').click(remoteClicked);
|
||||||
requestSerial();
|
requestSerial();
|
||||||
$('#addName').val("");
|
|
||||||
$('#addType').val("A").change();
|
|
||||||
$('#addContent').val("");
|
|
||||||
$('#addPrio').val("");
|
|
||||||
$('#addTtl').val("");
|
|
||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
|
@ -344,11 +339,20 @@ function requestDomainName() {
|
||||||
$('#domain-name').text(data.name);
|
$('#domain-name').text(data.name);
|
||||||
$('#add-domain-name').text("." + data.name);
|
$('#add-domain-name').text("." + data.name);
|
||||||
domainName = data.name;
|
domainName = data.name;
|
||||||
|
setDefaultRecordType();
|
||||||
$('#addButton').unbind().click(addRecord);
|
$('#addButton').unbind().click(addRecord);
|
||||||
},
|
},
|
||||||
"json"
|
"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) {
|
function enableFilter(enable) {
|
||||||
if(enable) {
|
if(enable) {
|
||||||
$('#searchName').prop("disabled", false);
|
$('#searchName').prop("disabled", false);
|
||||||
|
|
Loading…
Reference in a new issue