mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-04-21 02:57:31 +00:00
Fix ordering and type
Fixes the ordering of variables for cosmetic, and adds the missing code for the compare of changes.
This commit is contained in:
parent
6fc2279c3b
commit
e88a836f26
@ -393,12 +393,12 @@
|
|||||||
unsavedChanges = true; //a record was either added or deleted.
|
unsavedChanges = true; //a record was either added or deleted.
|
||||||
} else {
|
} else {
|
||||||
{% for record in records %}
|
{% for record in records %}
|
||||||
var origrecordttl = '{{ record.ttl }}';
|
|
||||||
var origrecordname = '{{ (record.name,domain.name) | display_record_name }}';
|
var origrecordname = '{{ (record.name,domain.name) | display_record_name }}';
|
||||||
var origrecorddata = '{{ record.data }}';
|
|
||||||
origrecorddata = origrecorddata.replace(/"/g, '\"');
|
|
||||||
var origrecordtype = '{{ record.type }}';
|
var origrecordtype = '{{ record.type }}';
|
||||||
var origrecordstatus = '{{ record.status }}';
|
var origrecordstatus = '{{ record.status }}';
|
||||||
|
var origrecordttl = '{{ record.ttl }}';
|
||||||
|
var origrecorddata = '{{ record.data }}';
|
||||||
|
origrecorddata = origrecorddata.replace(/"/g, '\"');
|
||||||
var origrecordcomment = '{{ record.comment }}';
|
var origrecordcomment = '{{ record.comment }}';
|
||||||
if (!table.row(index) || typeof table.row(index) == 'undefined') {
|
if (!table.row(index) || typeof table.row(index) == 'undefined') {
|
||||||
unsavedChanges = true; //sanity check otherwise below code throws error if row at that index doesn't exist.
|
unsavedChanges = true; //sanity check otherwise below code throws error if row at that index doesn't exist.
|
||||||
@ -409,7 +409,7 @@
|
|||||||
var editrecordttl = table.row(index).data()[3];
|
var editrecordttl = table.row(index).data()[3];
|
||||||
var editrecorddata = table.row(index).data()[4];
|
var editrecorddata = table.row(index).data()[4];
|
||||||
var editrecordcomment = table.row(index).data()[5];
|
var editrecordcomment = table.row(index).data()[5];
|
||||||
if (origrecordttl != editrecordttl || origrecordname != editrecordname || origrecorddata != editrecorddata || origrecordtype != editrecordtype |>
|
if (origrecordname != editrecordname || origrecordtype != editrecordtype || origrecordstatus != editrecordstatus || origrecordttl != editrecordttl || origrecorddata != editrecorddata || origrecordcomment != editrecordcomment) {
|
||||||
unsavedChanges = true;
|
unsavedChanges = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user