CheckStatus + UI fejlesztése
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
|
||||
<div class="card shadow p-4">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-primary float-right">Új elem hozzáadása</button>
|
||||
<button class="btn btn-primary float-right new-btn" data-bs-toggle="tooltip" data-bs-placement="top" title="Új elem hozzáadása">
|
||||
<i class="bi bi-plus-square"></i>
|
||||
</button>
|
||||
</div>
|
||||
<table id="tbCheckPointsPage" class="table table-bordered table-hover table-sm" style="width:100%">
|
||||
<thead class="table-primary">
|
||||
@@ -48,13 +50,7 @@
|
||||
sortable: false,
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
if (data === true) {
|
||||
return '<input type="checkbox" class="form-check-input no-click" checked>';
|
||||
}
|
||||
if (data === false) {
|
||||
return '<input type="checkbox" class="form-check-input no-click" >';
|
||||
}
|
||||
return data;
|
||||
return renderCheckBox(data);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<thead class="table-primary">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Status</th>
|
||||
<th>IsEditable</th>
|
||||
<th>DocumentNumber</th>
|
||||
<th>DateExecution</th>
|
||||
@@ -27,6 +28,7 @@
|
||||
<tfoot class="table-light">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Status</th>
|
||||
<th>IsEditable</th>
|
||||
<th>DocumentNumber</th>
|
||||
<th>DateExecution</th>
|
||||
@@ -49,21 +51,20 @@
|
||||
},
|
||||
columns: [
|
||||
{ data: "id" },
|
||||
{ data: "checkStatus",
|
||||
render:function(data, type, row)
|
||||
{
|
||||
return renderCheckStatus(data);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: "isEditable",
|
||||
searchable: false,
|
||||
sortable: false,
|
||||
// visible: (aDurchgang==1 ? true : false),
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
if (data === true) {
|
||||
return '<input type="checkbox" class="editor-active" disabled checked>';
|
||||
}
|
||||
if (data === false) {
|
||||
return '<input type="checkbox" class="editor-active" disabled>';
|
||||
}
|
||||
return data;
|
||||
}
|
||||
data: "isEditable",
|
||||
searchable: false,
|
||||
sortable: false,
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
return renderCheckBox(data);
|
||||
}
|
||||
|
||||
},
|
||||
{ data: "documentNumber"},
|
||||
@@ -79,8 +80,8 @@
|
||||
{ data: "shortName" },
|
||||
{ data: "description" },
|
||||
{ data: "userDTO.userName" },
|
||||
{ data: null, render: function (data, type, row) {
|
||||
return renderActionButtons(row.id);
|
||||
{ data: "checkStatus", render: function (data, type, row) {
|
||||
return renderActionButtonsforCheckListHeader(data, row.id);
|
||||
}}
|
||||
],
|
||||
columnDefs: [
|
||||
@@ -89,7 +90,7 @@
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"targets": 3,
|
||||
"targets": 8,
|
||||
"className": "text-center",
|
||||
"width": "10%"
|
||||
}
|
||||
@@ -111,6 +112,12 @@
|
||||
window.location.href = `@Url.Page("./CheckListHeaderEditPage")?id=${row.id}`;
|
||||
});
|
||||
|
||||
$('#tbCheckListHeadersPage').on('click', '.pdf-btn', function ()
|
||||
{
|
||||
const row = table.row($(this).closest('tr')).data();
|
||||
window.location.href = `@Url.Page("./CheckListHeaderEditPage")?id=${row.id}`;
|
||||
});
|
||||
|
||||
$('#tbCheckListHeadersPage').on('click', '.delete-btn', function ()
|
||||
{
|
||||
const row = table.row($(this).closest('tr')).data();
|
||||
|
||||
@@ -51,13 +51,7 @@
|
||||
sortable: false,
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
if (data === true) {
|
||||
return '<input type="checkbox" class="form-check-input no-click" checked>';
|
||||
}
|
||||
if (data === false) {
|
||||
return '<input type="checkbox" class="form-check-input no-click">';
|
||||
}
|
||||
return data;
|
||||
return renderCheckBox(data);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -51,13 +51,7 @@
|
||||
sortable: false,
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
if (data === true) {
|
||||
return '<input type="checkbox" class="editor-active" disabled checked>';
|
||||
}
|
||||
if (data === false) {
|
||||
return '<input type="checkbox" class="editor-active" disabled>';
|
||||
}
|
||||
return data;
|
||||
return renderCheckBox(data);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user