mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 19:15:30 +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.
|
||||
} else {
|
||||
{% for record in records %}
|
||||
var origrecordttl = '{{ record.ttl }}';
|
||||
var origrecordname = '{{ (record.name,domain.name) | display_record_name }}';
|
||||
var origrecorddata = '{{ record.data }}';
|
||||
origrecorddata = origrecorddata.replace(/"/g, '\"');
|
||||
var origrecordtype = '{{ record.type }}';
|
||||
var origrecordstatus = '{{ record.status }}';
|
||||
var origrecordttl = '{{ record.ttl }}';
|
||||
var origrecorddata = '{{ record.data }}';
|
||||
origrecorddata = origrecorddata.replace(/"/g, '\"');
|
||||
var origrecordcomment = '{{ record.comment }}';
|
||||
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.
|
||||
@ -409,7 +409,7 @@
|
||||
var editrecordttl = table.row(index).data()[3];
|
||||
var editrecorddata = table.row(index).data()[4];
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user