mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 19:15:30 +00:00
Merge pull request #472 from ngoduykhanh/fix_domain_datatable
Fix domain datatable. #468
This commit is contained in:
commit
343190b684
@ -68,14 +68,14 @@
|
||||
{% if domain.type != 'Slave' %}
|
||||
<td width="6%">
|
||||
{% 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 %}
|
||||
<button type="button" class="btn btn-flat btn-warning""> <i class="fa fa-exclamation-circle"></i> </button>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="6%">
|
||||
{% 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 %}
|
||||
{% else %}
|
||||
<td width="6%">
|
||||
@ -201,6 +201,13 @@
|
||||
|
||||
// handle apply changes button
|
||||
$(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 table = $("#tbl_records").DataTable();
|
||||
var domain = $(this).prop('id');
|
||||
|
@ -48,7 +48,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for record in records %}
|
||||
<tr class="odd row_record" id="{{ record.name }}">
|
||||
<tr class="odd row_record">
|
||||
<td>
|
||||
{{ record.name }}
|
||||
</td>
|
||||
@ -65,12 +65,12 @@
|
||||
{{ record.data }}
|
||||
</td>
|
||||
<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>
|
||||
</button>
|
||||
</td>
|
||||
<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>
|
||||
</button>
|
||||
</td>
|
||||
@ -187,6 +187,13 @@
|
||||
|
||||
// handle apply changes button
|
||||
$(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 table = $("#tbl_records").DataTable();
|
||||
var template = $(this).prop('id');
|
||||
|
Loading…
Reference in New Issue
Block a user