mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-15 18:52:20 +01:00
Merged #47.
This commit is contained in:
commit
fdaa16ea1b
1 changed files with 9 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue