mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-08 03:15:40 +00:00
Fix domain datatable. #468
This commit is contained in:
parent
122b9e4dfe
commit
3b168047c4
@ -68,14 +68,14 @@
|
|||||||
{% if domain.type != 'Slave' %}
|
{% if domain.type != 'Slave' %}
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
{% if record.is_allowed_edit() %}
|
{% if record.is_allowed_edit() %}
|
||||||
<button type="button" class="btn btn-flat btn-warning button_edit" id="{{ (record.name,domain.name)|display_record_name }}">Edit <i class="fa fa-edit"></i></button>
|
<button type="button" class="btn btn-flat btn-warning button_edit">Edit <i class="fa fa-edit"></i></button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" class="btn btn-flat btn-warning""> <i class="fa fa-exclamation-circle"></i> </button>
|
<button type="button" class="btn btn-flat btn-warning""> <i class="fa fa-exclamation-circle"></i> </button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
{% if record.is_allowed_delete() %}
|
{% if record.is_allowed_delete() %}
|
||||||
<button type="button" class="btn btn-flat btn-danger button_delete" id="{{ (record.name,domain.name)|display_record_name }}">Delete <i class="fa fa-trash"></i></button>
|
<button type="button" class="btn btn-flat btn-danger button_delete">Delete <i class="fa fa-trash"></i></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
@ -201,6 +201,13 @@
|
|||||||
|
|
||||||
// handle apply changes button
|
// handle apply changes button
|
||||||
$(document.body).on("click",".button_apply_changes", function() {
|
$(document.body).on("click",".button_apply_changes", function() {
|
||||||
|
if (nNew || nEditing) {
|
||||||
|
var modal = $("#modal_error");
|
||||||
|
modal.find('.modal-body p').text("Previous record not saved. Please save it before applying the changes.");
|
||||||
|
modal.modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var modal = $("#modal_apply_changes");
|
var modal = $("#modal_apply_changes");
|
||||||
var table = $("#tbl_records").DataTable();
|
var table = $("#tbl_records").DataTable();
|
||||||
var domain = $(this).prop('id');
|
var domain = $(this).prop('id');
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for record in records %}
|
{% for record in records %}
|
||||||
<tr class="odd row_record" id="{{ record.name }}">
|
<tr class="odd row_record">
|
||||||
<td>
|
<td>
|
||||||
{{ record.name }}
|
{{ record.name }}
|
||||||
</td>
|
</td>
|
||||||
@ -65,12 +65,12 @@
|
|||||||
{{ record.data }}
|
{{ record.data }}
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" class="btn btn-flat btn-warning button_edit" id="{{ record.name }}">
|
<button type="button" class="btn btn-flat btn-warning button_edit">
|
||||||
Edit <i class="fa fa-edit"></i>
|
Edit <i class="fa fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td width="6%">
|
<td width="6%">
|
||||||
<button type="button" class="btn btn-flat btn-danger button_delete" id="{{ record.name }}">
|
<button type="button" class="btn btn-flat btn-danger button_delete">
|
||||||
Delete <i class="fa fa-trash"></i>
|
Delete <i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
@ -187,6 +187,13 @@
|
|||||||
|
|
||||||
// handle apply changes button
|
// handle apply changes button
|
||||||
$(document.body).on("click",".button_apply_changes", function() {
|
$(document.body).on("click",".button_apply_changes", function() {
|
||||||
|
if (nNew || nEditing) {
|
||||||
|
var modal = $("#modal_error");
|
||||||
|
modal.find('.modal-body p').text("Previous record not saved. Please save it before applying the changes.");
|
||||||
|
modal.modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var modal = $("#modal_apply_changes");
|
var modal = $("#modal_apply_changes");
|
||||||
var table = $("#tbl_records").DataTable();
|
var table = $("#tbl_records").DataTable();
|
||||||
var template = $(this).prop('id');
|
var template = $(this).prop('id');
|
||||||
|
Loading…
Reference in New Issue
Block a user