- Introduction of eveai-listview (to select objects) that is sortable, filterable, ...
- npm build does now also include building css files. - Source javascript and css are now defined in the source directories (eveai_app or eveai_chat_client), and automatically built for use with nginx - eveai.css is now split into several more manageable files (per control type)
This commit is contained in:
106
eveai_app/static/assets/css/eveai-chat-session-view.css
Normal file
106
eveai_app/static/assets/css/eveai-chat-session-view.css
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Custom styles for chat session view --------------------------------------------------------- */
|
||||
.accordion-button:not(.collapsed) {
|
||||
background-color: var(--bs-primary);
|
||||
color: var(--bs-white);
|
||||
}
|
||||
|
||||
.accordion-button:focus {
|
||||
box-shadow: 0 0 0 0.25rem rgba(118, 89, 154, 0.25);
|
||||
}
|
||||
|
||||
.interaction-question {
|
||||
font-size: 1rem; /* Normal text size */
|
||||
}
|
||||
|
||||
.interaction-icons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.interaction-icons .material-icons {
|
||||
font-size: 24px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.thumb-icon.filled {
|
||||
color: var(--bs-success);
|
||||
}
|
||||
|
||||
.thumb-icon.outlined {
|
||||
color: var(--thumb-icon-outlined);
|
||||
}
|
||||
|
||||
/* Algorithm icon colors */
|
||||
.algorithm-icon.rag_tenant {
|
||||
color: var(--algorithm-color-rag-tenant);
|
||||
}
|
||||
|
||||
.algorithm-icon.rag_wikipedia {
|
||||
color: var(--algorithm-color-rag-wikipedia);
|
||||
}
|
||||
|
||||
.algorithm-icon.rag_google {
|
||||
color: var(--algorithm-color-rag-google);
|
||||
}
|
||||
|
||||
.algorithm-icon.llm {
|
||||
color: var(--algorithm-color-llm);
|
||||
}
|
||||
|
||||
.accordion-body {
|
||||
background-color: var(--bs-light);
|
||||
}
|
||||
|
||||
.interaction-header {
|
||||
font-size: 0.9rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
.interaction-metadata {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.interaction-time {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.specialist-info {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.interaction-question {
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 0.9rem;
|
||||
padding: 0.35em 0.65em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.accordion-button {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.accordion-button::after {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
211
eveai_app/static/assets/css/eveai-forms.css
Normal file
211
eveai_app/static/assets/css/eveai-forms.css
Normal file
@@ -0,0 +1,211 @@
|
||||
/* Form and Input Fields ----------------------------------------------------------------------- */
|
||||
.form-group label.form-label {
|
||||
color: var(--bs-secondary) !important; /* Secondary color for labels */
|
||||
font-weight: 500; /* Slightly bolder labels */
|
||||
}
|
||||
|
||||
.form-group:last-of-type {
|
||||
margin-bottom: 2rem; /* Adjust this value to control spacing */
|
||||
}
|
||||
|
||||
.form-control {
|
||||
background-color: var(--bs-light) !important; /* Light background for input fields */
|
||||
border-color: var(--bs-secondary) !important; /* Secondary color for borders */
|
||||
color: var(--bs-body-color) !important; /* Text color consistent with the theme */
|
||||
}
|
||||
|
||||
/* Style for both disabled and readonly fields - same gray background */
|
||||
.form-control:disabled,
|
||||
.form-control[readonly] {
|
||||
background-color: var(--bs-gray-100) !important; /* Gray background */
|
||||
color: var(--bs-gray-600) !important; /* Dimmed text color */
|
||||
}
|
||||
|
||||
.form-check-input:checked {
|
||||
background-color: var(--bs-primary) !important; /* Primary color for checked checkboxes */
|
||||
border-color: var(--bs-primary) !important; /* Primary color for checkbox border */
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
color: var(--bs-body-color) !important; /* Consistent text color for check labels */
|
||||
}
|
||||
|
||||
/* Tabs Navigation ----------------------------------------------------------------------------- */
|
||||
.nav-pills .nav-link {
|
||||
color: var(--bs-primary) !important; /* Primary color for inactive tab text */
|
||||
border-radius: 0.375rem !important; /* Rounded corners for tabs */
|
||||
transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transitions */
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active {
|
||||
background-color: var(--bs-primary) !important; /* Primary background for active tab */
|
||||
color: var(--bs-white) !important; /* White text for active tab */
|
||||
}
|
||||
|
||||
.nav-pills .nav-link:hover {
|
||||
background-color: var(--bs-secondary) !important; /* Secondary background on hover */
|
||||
color: var(--bs-white) !important; /* White text on hover */
|
||||
}
|
||||
|
||||
/* Tabs Content -------------------------------------------------------------------------------- */
|
||||
.tab-pane {
|
||||
padding-top: 1rem; /* Consistent padding inside tabs */
|
||||
}
|
||||
|
||||
.moving-tab {
|
||||
background-color: var(--bs-primary) !important; /* Primary color for the moving tab indicator */
|
||||
}
|
||||
|
||||
/* Buttons ------------------------------------------------------------------------------------- */
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: var(--bs-secondary) !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
}
|
||||
|
||||
#copy-message {
|
||||
color: var(--bs-success) !important; /* Success color for the copy message */
|
||||
}
|
||||
|
||||
/* Danger Button Styling */
|
||||
.btn-danger {
|
||||
background-color: var(--bs-danger) !important; /* Use the danger color from the EveAI theme */
|
||||
border-color: var(--bs-danger) !important;
|
||||
color: var(--bs-white) !important; /* Ensure text is white for readability */
|
||||
transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition on hover */
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background-color: var(--bs-secondary) !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
color: var(--bs-white) !important; /* Ensure the text remains white and readable */
|
||||
}
|
||||
|
||||
/* Success Alert Styling */
|
||||
.alert-success {
|
||||
background-color: var(--bs-success) !important; /* EveAI success background color */
|
||||
color: var(--bs-dark) !important; /* Dark color for the text for better readability */
|
||||
border-color: var(--bs-success) !important; /* Matching border color */
|
||||
border-radius: 0.375rem; /* Rounded corners for the alert box */
|
||||
padding: 1rem; /* Consistent padding */
|
||||
box-shadow: 0px 4px 10px rgba(118, 89, 154, 0.2); /* Soft shadow for some depth */
|
||||
}
|
||||
|
||||
.alert-success .alert-heading {
|
||||
color: var(--bs-dark) !important; /* Ensure the heading stands out */
|
||||
font-weight: 600; /* Slightly bolder heading */
|
||||
}
|
||||
|
||||
.alert-success p {
|
||||
margin-bottom: 0; /* Remove extra margin from paragraphs inside alerts */
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border: 1px solid #d2d6da;
|
||||
padding: 0.625rem 0.75rem;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
color: #495057;
|
||||
background-color: transparent;
|
||||
border-color: #d2d6da;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* REQUIRED FIELD SETTINGS --------------------------------------------------------------------- */
|
||||
/* Required field indicator styling */
|
||||
.field-label-wrapper {
|
||||
display: flex;
|
||||
align-items: baseline; /* Changed from center to baseline for proper text alignment */
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.required-field-indicator {
|
||||
display: inline-flex;
|
||||
align-items: baseline; /* Match the wrapper's alignment */
|
||||
}
|
||||
|
||||
.required-field-indicator .required-icon {
|
||||
font-size: 0.7rem;
|
||||
transition: transform 0.2s ease-in-out;
|
||||
opacity: 0.8;
|
||||
line-height: 1; /* Ensure proper vertical alignment */
|
||||
}
|
||||
|
||||
/* Hover animation */
|
||||
.field-label-wrapper:hover .required-icon {
|
||||
transform: scale(1.2);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Animation when field is invalid */
|
||||
.is-invalid + .field-label-wrapper .required-icon {
|
||||
color: var(--bs-danger);
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 0.8;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.2);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide visually but maintain accessibility */
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* TAB ERROR STYLES ---------------------------------------------------------------------------- */
|
||||
/* Style for tabs with errors */
|
||||
.nav-link.has-error {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-link.has-error::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: var(--bs-danger);
|
||||
border-radius: 50%;
|
||||
transform: translate(50%, -50%);
|
||||
}
|
||||
|
||||
/* Enhance the invalid field visualization */
|
||||
.form-control:invalid {
|
||||
border-color: var(--bs-danger);
|
||||
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
|
||||
}
|
||||
|
||||
/* Add smooth transition for tab changes */
|
||||
.tab-pane {
|
||||
transition: opacity 0.15s linear;
|
||||
}
|
||||
|
||||
.tab-pane.fade {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tab-pane.fade.show {
|
||||
opacity: 1;
|
||||
}
|
||||
107
eveai_app/static/assets/css/eveai-json-editor.css
Normal file
107
eveai_app/static/assets/css/eveai-json-editor.css
Normal file
@@ -0,0 +1,107 @@
|
||||
:root {
|
||||
/* Hoofdkleuren gebaseerd op EveAI kleurenschema */
|
||||
--jse-theme-color: var(--bs-primary); /* Paars als hoofdkleur */
|
||||
--jse-theme-color-highlight: var(--bs-secondary); /* Secundair paars voor highlights */
|
||||
|
||||
/* Achtergrondkleuren */
|
||||
--jse-background-color: #fff;
|
||||
--jse-panel-background: #f8f9fa;
|
||||
--jse-panel-border: 1px solid var(--bs-secondary);
|
||||
--jse-panel-border-radius: 0.375rem;
|
||||
|
||||
/* Tekstkleuren */
|
||||
--jse-text-color: var(--bs-body-color);
|
||||
--jse-text-color-inverse: #ffffff;
|
||||
|
||||
/* Navigatie */
|
||||
--jse-navigation-bar-background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
--jse-navigation-bar-background-highlight: var(--bs-secondary);
|
||||
--jse-navigation-bar-text-color: #ffffff;
|
||||
|
||||
/* Status balk */
|
||||
--jse-status-bar-background: var(--bs-light);
|
||||
--jse-status-bar-color: var(--bs-body-color);
|
||||
--jse-status-bar-border: 1px solid var(--bs-secondary);
|
||||
--jse-status-bar-border-radius: 0 0 0.375rem 0.375rem;
|
||||
|
||||
/* Main menu bar */
|
||||
--jse-main-menu-background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
--jse-main-menu-color: #ffffff;
|
||||
--jse-main-menu-button-background-highlight: var(--bs-secondary);
|
||||
--jse-main-menu-button-color-highlight: #ffffff;
|
||||
|
||||
/* Contextmenu */
|
||||
--jse-context-menu-background: #fff;
|
||||
--jse-context-menu-background-highlight: var(--bs-secondary);
|
||||
--jse-context-menu-color: var(--bs-body-color);
|
||||
--jse-context-menu-color-highlight: #ffffff;
|
||||
--jse-context-menu-border: 1px solid var(--bs-secondary);
|
||||
--jse-context-menu-box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2);
|
||||
--jse-context-menu-border-radius: 0.375rem;
|
||||
|
||||
/* Knoppen */
|
||||
--jse-button-background: var(--bs-primary);
|
||||
--jse-button-background-highlight: var(--bs-secondary);
|
||||
--jse-button-color: #ffffff;
|
||||
--jse-button-color-highlight: #ffffff;
|
||||
--jse-button-border-radius: 0.375rem;
|
||||
|
||||
/* JSON Tree Mode */
|
||||
--jse-key-color: var(--bs-info);
|
||||
--jse-delimiter-color: #666;
|
||||
--jse-string-color: var(--bs-primary);
|
||||
--jse-number-color: var(--bs-warning);
|
||||
--jse-boolean-color: var(--bs-danger);
|
||||
--jse-null-color: #888;
|
||||
--jse-invalid-color: #e0b4b4;
|
||||
--jse-readonly-color: #888;
|
||||
--jse-readonly-background-color: #f0f0f0;
|
||||
|
||||
/* Selectie */
|
||||
--jse-selection-background-color: rgba(118, 89, 154, 0.2);
|
||||
--jse-selection-background-inactive-color: rgba(118, 89, 154, 0.1);
|
||||
|
||||
/* Foutmeldingen */
|
||||
--jse-error-color: var(--bs-danger);
|
||||
--jse-error-background-color: rgba(156, 45, 102, 0.1);
|
||||
|
||||
/* Tooltips */
|
||||
--jse-tooltip-background: var(--bs-primary);
|
||||
--jse-tooltip-color: #ffffff;
|
||||
--jse-tooltip-border-radius: 0.375rem;
|
||||
--jse-tooltip-box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2);
|
||||
}
|
||||
|
||||
/* Extra stijlen voor de containers */
|
||||
.jsoneditor-initialized {
|
||||
border: 1px solid var(--bs-secondary);
|
||||
border-radius: 0.375rem;
|
||||
min-height: 300px;
|
||||
box-shadow: 0 4px 8px rgba(118, 89, 154, 0.1);
|
||||
}
|
||||
|
||||
.jsoneditor-readonly-mode {
|
||||
background-color: var(--bs-light);
|
||||
}
|
||||
|
||||
/* Stijlen voor de knoppen in de editor */
|
||||
.jse-button {
|
||||
border: none !important;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Stijlen voor veldlabels in de boom */
|
||||
.jse-tree .jse-key {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Stijlen voor waarden in de boom */
|
||||
.jse-tree .jse-value {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Verbeter de leesbaarheid van de tekstmodus */
|
||||
.jse-text-mode {
|
||||
font-family: monospace;
|
||||
line-height: 1.5;
|
||||
}
|
||||
33
eveai_app/static/assets/css/eveai-markdown.css
Normal file
33
eveai_app/static/assets/css/eveai-markdown.css
Normal file
@@ -0,0 +1,33 @@
|
||||
/* Markdown content styles --------------------------------------------------------------------- */
|
||||
.markdown-content {
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown-content p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.markdown-content h1, .markdown-content h2, .markdown-content h3,
|
||||
.markdown-content h4, .markdown-content h5, .markdown-content h6 {
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.markdown-content ul, .markdown-content ol {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
.markdown-content code {
|
||||
background-color: #f8f9fa;
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown-content pre {
|
||||
background-color: #f8f9fa;
|
||||
padding: 1rem;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
37
eveai_app/static/assets/css/eveai-responsive-table.css
Normal file
37
eveai_app/static/assets/css/eveai-responsive-table.css
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Responsive tabel stijlen voor optimaal schermgebruik --------------------------------- */
|
||||
|
||||
/* Zorg dat tabellen zich aanpassen aan de beschikbare schermruimte */
|
||||
@media (min-height: 900px) {
|
||||
/* Voor grotere schermen, gebruik meer verticale ruimte */
|
||||
.tabulator-list-view .tabulator {
|
||||
min-height: 650px;
|
||||
}
|
||||
|
||||
.tabulator-list-view {
|
||||
min-height: 650px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 1200px) {
|
||||
/* Voor zeer grote schermen, gebruik maximale verticale ruimte */
|
||||
.tabulator-list-view .tabulator {
|
||||
min-height: 800px;
|
||||
}
|
||||
|
||||
.tabulator-list-view {
|
||||
min-height: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Zorg dat de inhoud van tabellen goed leesbaar blijft op elk formaat scherm */
|
||||
.tabulator .tabulator-cell {
|
||||
white-space: normal; /* Zorg dat tekst binnen cellen kan omslaan */
|
||||
overflow: visible; /* Toon alle inhoud */
|
||||
}
|
||||
|
||||
/* Behoud de leesbaarheid van de tabel headers op kleinere schermen */
|
||||
@media (max-width: 768px) {
|
||||
.tabulator .tabulator-header .tabulator-col-title {
|
||||
font-size: 0.8rem; /* Kleinere tekst op kleinere schermen */
|
||||
}
|
||||
}
|
||||
50
eveai_app/static/assets/css/eveai-select2.css
Normal file
50
eveai_app/static/assets/css/eveai-select2.css
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Hide Select2's custom elements */
|
||||
.select2-container-hidden {
|
||||
position: absolute !important;
|
||||
left: -9999px !important;
|
||||
}
|
||||
|
||||
.select2-dropdown-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Ensure the original select is visible and styled -------------------------------------------- */
|
||||
select.select2 {
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
padding: .375rem .75rem !important;
|
||||
font-size: 1rem !important;
|
||||
line-height: 1.5 !important;
|
||||
color: #495057 !important;
|
||||
background-color: #fff !important;
|
||||
background-clip: padding-box !important;
|
||||
border: 1px solid #ced4da !important;
|
||||
border-radius: .25rem !important;
|
||||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out !important;
|
||||
}
|
||||
|
||||
/* Style for multiple select */
|
||||
select.select2[multiple] {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px !important; /* Pas deze waarde aan naar wens */
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
/* Zorg voor een consistente breedte */
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* Voorkom dat de dropdown de pagina uitbreidt */
|
||||
.select2-dropdown {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.timezone-dropdown {
|
||||
max-height: 300px;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
724
eveai_app/static/assets/css/eveai-tabulator.css
Normal file
724
eveai_app/static/assets/css/eveai-tabulator.css
Normal file
@@ -0,0 +1,724 @@
|
||||
/* Tabulator styling / ordered_list ------------------------------------------------------------ */
|
||||
.ordered-list-editor {
|
||||
margin-bottom: 1rem;
|
||||
min-height: 200px; /* Minimum height, will expand as needed */
|
||||
}
|
||||
|
||||
/* Make sure the Tabulator container has a proper height */
|
||||
.ordered-list-editor .tabulator {
|
||||
height: auto; /* Auto height to display all rows */
|
||||
min-height: 400px; /* Verhoogde minimum hoogte */
|
||||
width: 100%;
|
||||
border: 1px solid var(--bs-primary); /* Primary color for border */
|
||||
border-radius: 0.375rem; /* Match application's border-radius */
|
||||
margin-bottom: 0.5rem;
|
||||
box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2); /* Match application's shadow style */
|
||||
}
|
||||
|
||||
/* Ensure the table holder has a scrollbar */
|
||||
.ordered-list-editor .tabulator-tableholder {
|
||||
/* overflow-y: auto !important; - Removed to allow Tabulator to handle overflow */
|
||||
/* max-height: calc(100% - 42px) !important; - Removed to allow Tabulator to handle height */
|
||||
/* Consider using non-!important values if specific scrolling behavior is needed */
|
||||
overflow-y: auto;
|
||||
max-height: calc(100% - 42px);
|
||||
}
|
||||
|
||||
/* Style for the table element */
|
||||
.ordered-list-editor .tabulator-table {
|
||||
display: table !important; /* Force display as table */
|
||||
width: 100% !important;
|
||||
table-layout: fixed !important; /* Use fixed table layout for consistent column widths */
|
||||
}
|
||||
|
||||
/* Style for the handle column */
|
||||
.ordered-list-editor .tabulator-row-handle {
|
||||
cursor: move;
|
||||
background-color: var(--bs-light, #f8f9fa);
|
||||
border-right: 1px solid var(--bs-gray-300, #dee2e6);
|
||||
transition: background-color 0.3s ease; /* Smooth transition for hover effect */
|
||||
}
|
||||
|
||||
/* Hover effect for handle column */
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-row-handle {
|
||||
background-color: var(--bs-secondary); /* Secondary color on hover */
|
||||
}
|
||||
|
||||
/* Style for the handle bars to make them more visible */
|
||||
.ordered-list-editor .tabulator-row-handle-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ordered-list-editor .tabulator-row-handle-bar {
|
||||
background: var(--bs-primary); /* Primary color for handle bars */
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 2px;
|
||||
margin: 1px 0;
|
||||
transition: background-color 0.3s ease; /* Smooth transition for hover effect */
|
||||
}
|
||||
|
||||
/* Change handle bar color on hover */
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-row-handle-bar {
|
||||
background: #ffffff; /* White handle bars on hover */
|
||||
}
|
||||
|
||||
/* Style for the delete button */
|
||||
.ordered-list-editor .tabulator-cell button.btn-danger {
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
/* Style for boolean columns */
|
||||
.ordered-list-editor .tabulator-cell[data-type="boolean"] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Style for boolean cell icons */
|
||||
.ordered-list-editor .tabulator-cell .material-icons {
|
||||
font-size: 1.2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Style for true/checked icons */
|
||||
.ordered-list-editor .tabulator-cell[aria-checked="true"] .material-icons {
|
||||
color: var(--bs-primary); /* Primary color for checked state */
|
||||
}
|
||||
|
||||
/* Style for false/unchecked icons */
|
||||
.ordered-list-editor .tabulator-cell[aria-checked="false"] .material-icons {
|
||||
color: var(--bs-danger); /* Danger color for unchecked state */
|
||||
}
|
||||
|
||||
/* Style for the table header */
|
||||
.ordered-list-editor .tabulator-header {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%); /* Match JSE gradient */
|
||||
border-bottom: 2px solid var(--bs-secondary); /* Secondary color for border */
|
||||
color: #ffffff; /* White text for better contrast on gradient */
|
||||
}
|
||||
|
||||
/* Style for the headers container */
|
||||
.ordered-list-editor .tabulator-headers {
|
||||
display: table-row !important; /* Force display as table row */
|
||||
}
|
||||
|
||||
/* Style for the header cells */
|
||||
.ordered-list-editor .tabulator-col {
|
||||
background: transparent; /* Let the header gradient show through */
|
||||
padding: 8px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
display: table-cell !important; /* Force display as table cell */
|
||||
box-sizing: border-box !important; /* Include padding in width calculation */
|
||||
position: relative !important; /* Ensure proper positioning */
|
||||
color: #ffffff; /* White text for better contrast on gradient */
|
||||
}
|
||||
|
||||
/* Override any inline styles that might hide column headers */
|
||||
.ordered-list-editor .tabulator-col[style*="display: none"] {
|
||||
display: table-cell !important; /* Force display as table cell */
|
||||
}
|
||||
|
||||
/* Ensure header cells have the same width as their corresponding data cells */
|
||||
.ordered-list-editor .tabulator-col,
|
||||
.ordered-list-editor .tabulator-cell
|
||||
{
|
||||
}
|
||||
|
||||
/* Style for the header cell content */
|
||||
.ordered-list-editor .tabulator-col-title {
|
||||
white-space: normal; /* Allow header text to wrap */
|
||||
word-break: break-word; /* Break words to prevent horizontal overflow */
|
||||
font-weight: bold;
|
||||
font-size: 0.85rem; /* Kleinere font grootte, dezelfde als in de rijen */
|
||||
color: #ffffff; /* White text for better contrast on gradient */
|
||||
}
|
||||
|
||||
/* Style for the table rows */
|
||||
.ordered-list-editor .tabulator-row {
|
||||
border-bottom: 1px solid var(--bs-gray-300, #dee2e6); /* Match application's row border color */
|
||||
display: table-row !important; /* Force display as table row */
|
||||
}
|
||||
|
||||
/* Hover effect for rows */
|
||||
.ordered-list-editor .tabulator-row:hover {
|
||||
background-color: var(--bs-secondary) !important; /* Secondary color on hover */
|
||||
color: #ffffff !important; /* White text on hover */
|
||||
}
|
||||
|
||||
/* Ensure all text in hovered rows changes to white */
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell,
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell * {
|
||||
color: #ffffff !important; /* White text for all elements in hovered rows */
|
||||
}
|
||||
|
||||
/* Style for even rows */
|
||||
.ordered-list-editor .tabulator-row-even {
|
||||
background-color: #f8f9fa; /* Light gray for even rows */
|
||||
}
|
||||
|
||||
/* Style for odd rows */
|
||||
.ordered-list-editor .tabulator-row-odd {
|
||||
background-color: #ffffff; /* White for odd rows */
|
||||
}
|
||||
|
||||
/* Style for selected rows */
|
||||
.ordered-list-editor .tabulator-row.tabulator-selected {
|
||||
background-color: var(--bs-primary) !important; /* Primary color for selected rows */
|
||||
color: #ffffff !important; /* White text for contrast */
|
||||
}
|
||||
|
||||
/* Style for row being moved */
|
||||
.ordered-list-editor .tabulator-row.tabulator-moving {
|
||||
background-color: var(--bs-primary) !important; /* Primary color for moving rows */
|
||||
color: #ffffff !important; /* White text for contrast */
|
||||
border: 2px dashed var(--bs-secondary) !important; /* Dashed border to indicate movement */
|
||||
opacity: 0.9 !important; /* Slightly transparent to distinguish from other rows */
|
||||
box-shadow: 0 0 10px rgba(118, 89, 154, 0.5) !important; /* Shadow for depth */
|
||||
z-index: 100 !important; /* Ensure it appears above other rows */
|
||||
pointer-events: none !important; /* Allow events to pass through to elements below */
|
||||
transform: scale(1.02) !important; /* Slightly larger to stand out */
|
||||
transition: transform 0.2s ease !important; /* Smooth transition */
|
||||
}
|
||||
|
||||
/* Style for cells in the row being moved */
|
||||
.ordered-list-editor .tabulator-row.tabulator-moving .tabulator-cell {
|
||||
color: #ffffff !important; /* Ensure text is white for contrast */
|
||||
background-color: transparent !important; /* Use the row's background color */
|
||||
border-color: transparent !important; /* Hide cell borders */
|
||||
display: table-cell !important; /* Ensure cells are visible */
|
||||
overflow: visible !important; /* Show all content */
|
||||
}
|
||||
|
||||
/* Style for the moving element (the ghost row that follows the cursor) */
|
||||
.tabulator-moving-element {
|
||||
background-color: var(--bs-primary) !important; /* Primary color for moving element */
|
||||
color: #ffffff !important; /* White text for contrast */
|
||||
border: 2px dashed var(--bs-secondary) !important; /* Dashed border to indicate movement */
|
||||
opacity: 0.9 !important; /* Slightly transparent */
|
||||
box-shadow: 0 0 15px rgba(118, 89, 154, 0.7) !important; /* Stronger shadow for better visibility */
|
||||
border-radius: 0.375rem !important; /* Rounded corners */
|
||||
overflow: visible !important; /* Show all content */
|
||||
width: auto !important; /* Allow width to adjust to content */
|
||||
max-width: none !important; /* Don't limit width */
|
||||
pointer-events: none !important; /* Allow events to pass through */
|
||||
display: table !important; /* Ensure it's displayed as a table */
|
||||
table-layout: fixed !important; /* Fixed table layout for consistent cell widths */
|
||||
}
|
||||
|
||||
/* Style for cells in the moving element */
|
||||
.tabulator-moving-element .tabulator-cell,
|
||||
.tabulator-moving-element .tabulator-row .tabulator-cell {
|
||||
color: #ffffff !important; /* White text for contrast */
|
||||
background-color: transparent !important; /* Use the row's background color */
|
||||
border-color: transparent !important; /* Hide cell borders */
|
||||
display: table-cell !important; /* Ensure cells are visible */
|
||||
overflow: visible !important; /* Show all content */
|
||||
padding: 8px !important; /* Consistent padding */
|
||||
white-space: normal !important; /* Allow text to wrap */
|
||||
word-break: break-word !important; /* Break words to prevent overflow */
|
||||
font-size: 0.85rem !important; /* Consistent font size */
|
||||
vertical-align: middle !important; /* Center content vertically */
|
||||
}
|
||||
|
||||
/* Style for the active moving element */
|
||||
.tabulator-moving-element-active {
|
||||
opacity: 1 !important; /* Fully opaque when active */
|
||||
transform: scale(1.05) !important; /* Slightly larger when active */
|
||||
box-shadow: 0 0 20px rgba(118, 89, 154, 0.8) !important; /* Stronger shadow when active */
|
||||
z-index: 1000 !important; /* Higher z-index to ensure it's on top */
|
||||
}
|
||||
|
||||
/* Style for the table cells */
|
||||
.ordered-list-editor .tabulator-cell {
|
||||
padding: 8px;
|
||||
white-space: normal; /* Allow text to wrap */
|
||||
overflow: visible; /* Show overflowing content */
|
||||
height: auto !important; /* Allow cell to grow as needed */
|
||||
word-break: break-word; /* Break words to prevent horizontal overflow */
|
||||
display: table-cell !important; /* Force display as table cell */
|
||||
scroll-margin-top: 100px; /* Prevent unwanted scrolling when focusing */
|
||||
scroll-behavior: auto; /* Disable smooth scrolling which might cause jumping */
|
||||
font-size: 0.85rem; /* Smaller font size */
|
||||
}
|
||||
|
||||
/* Style for truncated cells */
|
||||
.ordered-list-editor .truncated-cell {
|
||||
position: relative;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.ordered-list-editor .truncated-content {
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.ordered-list-editor .show-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--bs-primary); /* Use primary color for the show more indicator */
|
||||
cursor: pointer;
|
||||
transition: color 0.3s ease; /* Smooth transition for hover effect */
|
||||
}
|
||||
|
||||
.ordered-list-editor .show-more:hover {
|
||||
color: var(--bs-secondary); /* Use secondary color on hover */
|
||||
}
|
||||
|
||||
/* Style for the visible cells */
|
||||
.ordered-list-editor .tabulator-cell-visible {
|
||||
display: table-cell !important; /* Force display as table cell */
|
||||
}
|
||||
|
||||
/* Override any inline styles that might hide cells */
|
||||
.ordered-list-editor .tabulator-cell[style*="display: none"] {
|
||||
display: table-cell !important; /* Force display as table cell */
|
||||
}
|
||||
|
||||
/* Style for the textarea editor */
|
||||
.ordered-list-editor .tabulator-cell textarea {
|
||||
min-height: 60px;
|
||||
resize: vertical;
|
||||
width: 100%; /* Ensure textarea fills the cell */
|
||||
border: 1px solid var(--bs-gray-300, #dee2e6); /* Match application's input border */
|
||||
border-radius: 0.375rem; /* Match application's border-radius */
|
||||
padding: 0.625rem 0.75rem; /* Match application's input padding */
|
||||
transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for focus effect */
|
||||
}
|
||||
|
||||
/* Focus state for textarea */
|
||||
.ordered-list-editor .tabulator-cell textarea:focus {
|
||||
border-color: var(--bs-primary); /* Primary color for focus state */
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.2rem rgba(118, 89, 154, 0.25); /* Subtle glow with primary color */
|
||||
}
|
||||
|
||||
/* Style for the placeholder */
|
||||
.ordered-list-editor .tabulator-placeholder {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
color: var(--bs-secondary); /* Secondary color for placeholder text */
|
||||
font-style: italic;
|
||||
background-color: var(--bs-light, #f8f9fa); /* Light background for placeholder */
|
||||
border-radius: 0.375rem; /* Match application's border-radius */
|
||||
margin: 10px;
|
||||
border: 1px dashed var(--bs-gray-300, #dee2e6); /* Dashed border for empty state */
|
||||
}
|
||||
|
||||
/* Style for the Add Row button */
|
||||
.ordered-list-editor + .btn-primary {
|
||||
margin-top: 0.5rem;
|
||||
background-color: var(--bs-primary) !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
color: #ffffff !important;
|
||||
transition: background-color 0.3s ease, border-color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Hover effect for primary button */
|
||||
.ordered-list-editor + .btn-primary:hover {
|
||||
background-color: var(--bs-secondary) !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
}
|
||||
|
||||
/* Style for the Expand button */
|
||||
.ordered-list-editor + .btn-primary + .btn-secondary {
|
||||
margin-top: 0.5rem;
|
||||
background-color: var(--bs-secondary) !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
color: #ffffff !important;
|
||||
transition: background-color 0.3s ease, border-color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Hover effect for secondary button */
|
||||
.ordered-list-editor + .btn-primary + .btn-secondary:hover {
|
||||
background-color: var(--bs-primary) !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
/* Fullscreen mode styles */
|
||||
.ordered-list-editor.fullscreen-mode {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 9999;
|
||||
background: var(--bs-light, #f8f9fa); /* Use light background color */
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid var(--bs-primary); /* Primary color border */
|
||||
box-shadow: 0 0 20px rgba(118, 89, 154, 0.3); /* Larger shadow for modal effect */
|
||||
}
|
||||
|
||||
.ordered-list-editor.fullscreen-mode .tabulator {
|
||||
height: calc(100vh - 100px) !important;
|
||||
width: 100% !important;
|
||||
border: 1px solid var(--bs-primary); /* Consistent border */
|
||||
box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2); /* Consistent shadow */
|
||||
}
|
||||
|
||||
/* Tekst in invoervelden zwart maken voor betere leesbaarheid */
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell input,
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell select,
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell textarea,
|
||||
.ordered-list-editor .tabulator-row:hover .tabulator-cell .tabulator-editor,
|
||||
.ordered-list-editor .tabulator-row.tabulator-selected .tabulator-cell input,
|
||||
.ordered-list-editor .tabulator-row.tabulator-selected .tabulator-cell select,
|
||||
.ordered-list-editor .tabulator-row.tabulator-selected .tabulator-cell textarea,
|
||||
.ordered-list-editor .tabulator-row.tabulator-selected .tabulator-cell .tabulator-editor {
|
||||
color: #000000 !important; /* Zwarte tekst op witte achtergrond */
|
||||
background-color: #ffffff !important; /* Witte achtergrond verzekeren */
|
||||
border: 1px solid var(--bs-primary) !important; /* Duidelijke rand toevoegen */
|
||||
}
|
||||
|
||||
.tabulator-container {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
/* Extra specifieke override stijlen voor tabulator paginator en footer */
|
||||
.tabulator .tabulator-footer .tabulator-paginator {
|
||||
background: transparent !important; /* Transparante achtergrond, want de footer heeft al gradient */
|
||||
border-top: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-footer .tabulator-page {
|
||||
font-family: inherit !important;
|
||||
font-weight: normal !important;
|
||||
font-size: 0.85rem !important;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-footer .tabulator-page.active {
|
||||
font-weight: bold !important;
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-footer .tabulator-paginator .tabulator-page-size {
|
||||
margin-left: 5px !important;
|
||||
padding: 5px 10px !important;
|
||||
border-radius: 4px !important;
|
||||
border: 1px solid white !important;
|
||||
background-color: rgba(255, 255, 255, 0.2) !important;
|
||||
color: white !important;
|
||||
font-size: 0.85rem !important;
|
||||
font-family: inherit !important;
|
||||
}
|
||||
|
||||
/* Styling voor de paginator container */
|
||||
.tabulator .tabulator-footer .tabulator-paginator label {
|
||||
color: white !important; /* Witte tekst voor betere leesbaarheid op donkere gradient */
|
||||
font-size: 0.85rem !important;
|
||||
font-weight: normal !important;
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
|
||||
/* Override specifiek voor .tabulator-page.active */
|
||||
.tabulator .tabulator-footer .tabulator-paginator .tabulator-pages .tabulator-page.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
color: white !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
/* Styling voor buttons in de tabulator paginator */
|
||||
.tabulator-footer button,
|
||||
.tabulator .tabulator-footer .tabulator-page {
|
||||
margin: 0 2px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0.2) !important;
|
||||
color: white !important;
|
||||
border: 1px solid white !important;
|
||||
font-size: 0.85rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.tabulator-footer button:hover,
|
||||
.tabulator .tabulator-footer .tabulator-page:hover {
|
||||
background-color: var(--bs-secondary) !important;
|
||||
color: white !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
}
|
||||
|
||||
.tabulator-footer button.tabulator-page.active,
|
||||
.tabulator .tabulator-footer .tabulator-page.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
color: white !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tabulator-footer button:disabled,
|
||||
.tabulator .tabulator-footer .tabulator-page:disabled,
|
||||
.tabulator .tabulator-footer .tabulator-page.disabled {
|
||||
color: var(--bs-gray-500) !important;
|
||||
background-color: var(--bs-gray-200) !important;
|
||||
border-color: var(--bs-gray-300) !important;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
/* Styling voor de tabulator paginator -------------------------------------------------------------- */
|
||||
.tabulator-paginator {
|
||||
background: linear-gradient(90deg, var(--bs-secondary) 0%, var(--bs-primary) 100%) !important; /* Omgekeerde gradient van de header */
|
||||
padding: 10px;
|
||||
border-bottom-left-radius: 0.375rem;
|
||||
border-bottom-right-radius: 0.375rem;
|
||||
border-top: 1px solid var(--bs-secondary);
|
||||
}
|
||||
|
||||
.tabulator-paginator .tabulator-page {
|
||||
margin: 0 2px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--bs-light);
|
||||
color: var(--bs-primary);
|
||||
border: 1px solid var(--bs-secondary);
|
||||
font-size: 0.85rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.tabulator-paginator .tabulator-page:hover {
|
||||
background-color: var(--bs-secondary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tabulator-paginator .tabulator-page.active,
|
||||
.tabulator .tabulator-footer .tabulator-page.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
color: white !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
.tabulator-paginator .tabulator-page:disabled,
|
||||
.tabulator-paginator .tabulator-page.disabled {
|
||||
color: var(--bs-gray-500);
|
||||
background-color: var(--bs-gray-200);
|
||||
border-color: var(--bs-gray-300);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.tabulator-paginator .tabulator-page-size {
|
||||
margin-left: 5px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--bs-secondary);
|
||||
background-color: var(--bs-light);
|
||||
color: var(--bs-primary);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.tabulator-footer,
|
||||
.tabulator .tabulator-footer {
|
||||
background: linear-gradient(90deg, var(--bs-secondary) 0%, var(--bs-primary) 100%) !important; /* Omgekeerde gradient van de header */
|
||||
border-top: 1px solid var(--bs-secondary) !important;
|
||||
border-bottom-left-radius: 0.375rem !important;
|
||||
border-bottom-right-radius: 0.375rem !important;
|
||||
padding: 8px !important;
|
||||
}
|
||||
.filter-controls .filter-row {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-row.tabulator-selected {
|
||||
background-color: #e3f2fd !important;
|
||||
border-left: 3px solid #007bff !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-row:hover {
|
||||
background-color: #f5f5f5;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Visuele indicator dat de rij klikbaar is */
|
||||
.tabulator .tabulator-row {
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
/* Algemene tabulator header stijlen -------------------------------------------------------------- */
|
||||
.tabulator .tabulator-header {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
border-bottom: 2px solid var(--bs-secondary);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Voorkom grijze achtergrond bij hover over header elementen */
|
||||
.tabulator-header .tabulator-col:hover,
|
||||
.tabulator-header .tabulator-col-row:hover,
|
||||
.tabulator-header .tabulator-col-group:hover {
|
||||
background: transparent !important; /* Behoudt de transparante achtergrond bij hover */
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header .tabulator-col {
|
||||
background: transparent;
|
||||
border-right: none;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Voorkom grijze achtergrond bij hover over kolomkoppen */
|
||||
.tabulator-col:hover {
|
||||
background: transparent !important; /* Behoud dezelfde achtergrond bij hover */
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header .tabulator-col-title {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header .tabulator-col-sorter {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
|
||||
color: #ffffff;
|
||||
font-size: 0.85rem; /* Kleinere font grootte, dezelfde als in de rijen */
|
||||
}
|
||||
|
||||
.tabulator .tabulator-header .tabulator-header-filter input,
|
||||
.tabulator .tabulator-header .tabulator-header-filter select {
|
||||
border: 1px solid var(--bs-secondary);
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* Tabulator List View stijlen ---------------------------------------------------------------------- */
|
||||
.tabulator-list-view {
|
||||
margin-bottom: 1rem;
|
||||
min-height: 400px; /* Verhoogde minimum hoogte voor meer verticale ruimte */
|
||||
}
|
||||
|
||||
/* Tabulator List View paginator stijlen */
|
||||
.tabulator-list-view .tabulator-footer {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%); /* Match EveAI gradient */
|
||||
padding: 8px;
|
||||
border-bottom-left-radius: 0.375rem;
|
||||
border-bottom-right-radius: 0.375rem;
|
||||
border-top: 1px solid var(--bs-secondary);
|
||||
}
|
||||
|
||||
/* Maximale specifieke selector voor active pagination knoppen */
|
||||
.tabulator-list-view .tabulator-footer .tabulator-paginator .tabulator-pages .tabulator-page.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
color: white !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
/* Zorg ervoor dat de Tabulator container een goede hoogte heeft */
|
||||
.tabulator-list-view .tabulator {
|
||||
height: auto; /* Auto hoogte om alle rijen weer te geven */
|
||||
min-height: 500px; /* Verhoogde minimum hoogte */
|
||||
width: 100%;
|
||||
border: 1px solid var(--bs-primary); /* Primaire kleur voor rand */
|
||||
border-radius: 0.375rem; /* Afstemmen op border-radius van applicatie */
|
||||
margin-bottom: 0.5rem;
|
||||
box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2); /* Afstemmen op schaduw stijl van applicatie */
|
||||
}
|
||||
|
||||
/* Stijl voor de tabel header */
|
||||
.tabulator-list-view .tabulator-header {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%); /* Match EveAI gradient */
|
||||
border-bottom: 2px solid var(--bs-secondary); /* Secundaire kleur voor rand */
|
||||
color: #ffffff; /* Witte tekst voor beter contrast op gradient */
|
||||
}
|
||||
|
||||
/* Stijl voor de header cellen */
|
||||
.tabulator-list-view .tabulator-col {
|
||||
background: transparent; /* Laat de header gradient doorschijnen */
|
||||
padding: 8px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
box-sizing: border-box !important; /* Padding meenemen in breedte berekening */
|
||||
position: relative !important; /* Juiste positionering verzekeren */
|
||||
color: #ffffff; /* Witte tekst voor beter contrast op gradient */
|
||||
}
|
||||
|
||||
/* Voorkom kleurverandering bij hover over kolomkoppen */
|
||||
.tabulator .tabulator-header .tabulator-col:hover {
|
||||
background: transparent !important; /* Behoud transparante achtergrond bij hover */
|
||||
}
|
||||
|
||||
/* Stijl voor de inhoud van header cellen */
|
||||
.tabulator-list-view .tabulator-col-title {
|
||||
white-space: normal; /* Sta toe dat header tekst omwikkelt */
|
||||
word-break: break-word; /* Breek woorden om horizontale overflow te voorkomen */
|
||||
font-weight: bold;
|
||||
font-size: 0.85rem; /* Kleinere font grootte, dezelfde als in de rijen */
|
||||
color: #ffffff; /* Witte tekst voor beter contrast op gradient */
|
||||
}
|
||||
|
||||
/* Stijl voor de tabel rijen */
|
||||
.tabulator-list-view .tabulator-row {
|
||||
border-bottom: 1px solid var(--bs-gray-300, #dee2e6); /* Match rij rand kleur van applicatie */
|
||||
font-size: 0.85rem; /* Kleinere font grootte zoals gevraagd */
|
||||
}
|
||||
|
||||
/* Hover effect voor rijen */
|
||||
.tabulator-list-view .tabulator-row:hover {
|
||||
background-color: var(--bs-secondary) !important; /* Secundaire kleur bij hover */
|
||||
color: #ffffff !important; /* Witte tekst bij hover */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Zorg ervoor dat alle tekst in rijen bij hover wit wordt */
|
||||
.tabulator-list-view .tabulator-row:hover .tabulator-cell,
|
||||
.tabulator-list-view .tabulator-row:hover .tabulator-cell * {
|
||||
color: #ffffff !important; /* Witte tekst voor alle elementen in rijen bij hover */
|
||||
}
|
||||
|
||||
/* Stijl voor even rijen */
|
||||
.tabulator-list-view .tabulator-row-even {
|
||||
background-color: #f8f9fa; /* Lichtgrijs voor even rijen */
|
||||
}
|
||||
|
||||
/* Stijl voor oneven rijen */
|
||||
.tabulator-list-view .tabulator-row-odd {
|
||||
background-color: #ffffff; /* Wit voor oneven rijen */
|
||||
}
|
||||
|
||||
/* Stijl voor geselecteerde rijen */
|
||||
.tabulator-list-view .tabulator-row.tabulator-selected {
|
||||
background-color: var(--bs-primary) !important; /* Primaire kleur voor geselecteerde rijen */
|
||||
color: #ffffff !important; /* Witte tekst voor contrast */
|
||||
border: none !important; /* Geen lijn voor geselecteerde rij, alleen kleur */
|
||||
}
|
||||
|
||||
/* Stijl voor de tabel cellen */
|
||||
.tabulator-list-view .tabulator-cell {
|
||||
padding: 8px;
|
||||
white-space: normal; /* Sta toe dat tekst omwikkelt */
|
||||
overflow: visible; /* Toon overlopende inhoud */
|
||||
height: auto !important; /* Sta toe dat cel groeit indien nodig */
|
||||
word-break: break-word; /* Breek woorden om horizontale overflow te voorkomen */
|
||||
font-size: 0.85rem; /* Kleinere font grootte */
|
||||
}
|
||||
|
||||
/* Tekst in invoervelden zwart maken voor betere leesbaarheid bij hover/selectie */
|
||||
.tabulator-list-view .tabulator-row:hover .tabulator-cell input,
|
||||
.tabulator-list-view .tabulator-row:hover .tabulator-cell select,
|
||||
.tabulator-list-view .tabulator-row:hover .tabulator-cell textarea,
|
||||
.tabulator-list-view .tabulator-row.tabulator-selected .tabulator-cell input,
|
||||
.tabulator-list-view .tabulator-row.tabulator-selected .tabulator-cell select,
|
||||
.tabulator-list-view .tabulator-row.tabulator-selected .tabulator-cell textarea {
|
||||
color: #000000 !important; /* Zwarte tekst op witte achtergrond */
|
||||
background-color: #ffffff !important; /* Witte achtergrond verzekeren */
|
||||
border: 1px solid var(--bs-primary) !important; /* Duidelijke rand toevoegen */
|
||||
}
|
||||
317
eveai_app/static/assets/css/eveai.css
Normal file
317
eveai_app/static/assets/css/eveai.css
Normal file
@@ -0,0 +1,317 @@
|
||||
/*Overriding Colors*/
|
||||
:root {
|
||||
--bs-primary: #76599a;
|
||||
--bs-secondary: #b14f9d;
|
||||
--bs-success: #f8e1a9;
|
||||
--bs-info: #423372;
|
||||
--bs-warning: #eb7f31;
|
||||
--bs-danger: #9c2d66;
|
||||
}
|
||||
|
||||
/* Overriding the background gradient and text colors ------------------------------------------ */
|
||||
.bg-gradient-success {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
}
|
||||
|
||||
.shadow-success {
|
||||
box-shadow: 0px 4px 20px 0px rgba(118, 89, 154, 0.5); /* Adjusting shadow color */
|
||||
}
|
||||
|
||||
.border-radius-lg {
|
||||
border-radius: 1rem; /* Assuming you want to keep the large border-radius */
|
||||
}
|
||||
|
||||
.text-white {
|
||||
color: #f8e1a9 !important; /* Adjust text to the EveAI success color */
|
||||
}
|
||||
|
||||
.text-sm {
|
||||
font-size: 0.875rem; /* Adjust size if needed, keeping original */
|
||||
}
|
||||
|
||||
/* Override for the link with text-success and text-gradient classes */
|
||||
.text-success {
|
||||
color: var(--bs-primary) !important; /* Use EveAI primary color */
|
||||
}
|
||||
|
||||
.text-gradient {
|
||||
background-image: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.font-weight-bold {
|
||||
font-weight: 700; /* Retain bold text */
|
||||
}
|
||||
|
||||
/* Navbar customization ------------------------------------------------------------------------ */
|
||||
.navbar-light .navbar-brand {
|
||||
color: var(--bs-primary) !important; /* Primary color for the brand text */
|
||||
}
|
||||
|
||||
.navbar-light .navbar-nav .nav-link {
|
||||
color: var(--bs-secondary) !important; /* Secondary color for the nav links */
|
||||
}
|
||||
|
||||
/* Ensure consistent alignment for all dropdown icons */
|
||||
.navbar-nav .nav-link i.material-icons {
|
||||
font-size: 24px; /* Ensures all icons are the same size */
|
||||
vertical-align: middle; /* Align icons vertically with text */
|
||||
margin-right: 8px; /* Space between icon and text */
|
||||
line-height: 1; /* Prevents misalignment due to line-height issues */
|
||||
}
|
||||
|
||||
.navbar-nav .nav-link {
|
||||
display: flex;
|
||||
align-items: center; /* Aligns icon and text vertically */
|
||||
padding: 0; /* Remove any additional padding */
|
||||
}
|
||||
|
||||
/* Adjust the size and spacing of the material-symbols-outlined icons */
|
||||
.navbar-nav .nav-link .material-symbols-outlined {
|
||||
font-size: 20px; /* Adjust the icon size */
|
||||
vertical-align: middle; /* Ensure vertical alignment with text */
|
||||
margin-right: 8px; /* Add space between the icon and the text */
|
||||
line-height: 1; /* Maintain alignment */
|
||||
}
|
||||
|
||||
.navbar-light .navbar-nav .nav-link:hover,
|
||||
.navbar-light .navbar-nav .nav-link:focus {
|
||||
color: var(--bs-primary) !important; /* Primary color on hover/focus */
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
background-color: var(--bs-light) !important; /* Adjust the background to a custom light color if needed */
|
||||
}
|
||||
|
||||
.btn.bg-gradient-primary {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
color: var(--bs-white) !important; /* Ensures text is readable on the gradient */
|
||||
border: none;
|
||||
}
|
||||
|
||||
.navbar-toggler .navbar-toggler-bar {
|
||||
background-color: var(--bs-secondary); /* Adjusts color of the toggler bars */
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: var(--bs-light); /* Light background for dropdown */
|
||||
border-radius: 0.375rem; /* Retains rounded corners */
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
color: var(--bs-primary) !important; /* Primary color for dropdown items */
|
||||
}
|
||||
|
||||
.dropdown-item:hover,
|
||||
.dropdown-item:focus {
|
||||
background-color: var(--bs-secondary) !important; /* Secondary color for hover/focus background */
|
||||
color: var(--bs-white) !important; /* White text on hover/focus */
|
||||
}
|
||||
|
||||
.btn.bg-gradient-primary {
|
||||
background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
|
||||
color: var(--bs-white) !important;
|
||||
}
|
||||
|
||||
/* Page header customization ------------------------------------------------------------------- */
|
||||
.page-header {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 25vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-header .mask {
|
||||
background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary)) !important; /* Gradient overlay */
|
||||
opacity: 0.8; /* Adjust opacity to let the background image show through */
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
color: var(--bs-success) !important; /* Use the success color for the header text */
|
||||
margin-top: -1.5rem; /* Adjusted margin to align text properly */
|
||||
}
|
||||
|
||||
.page-header p.lead {
|
||||
color: var(--bs-info) !important; /* Use the info color for the lead text */
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
/* Ensure consistent padding */
|
||||
.page-header .container {
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
|
||||
.page-header .col-lg-7 {
|
||||
margin-top: -5rem; /* Adjust margin to improve vertical alignment */
|
||||
}
|
||||
|
||||
/* Card and table customization ---------------------------------------------------------------- */
|
||||
.card {
|
||||
border: 1px solid var(--bs-secondary) !important; /* Secondary color for the card border */
|
||||
border-radius: 0.5rem; /* Keeps the border-radius consistent */
|
||||
box-shadow: 0 4px 8px rgba(118, 89, 154, 0.2); /* Soft shadow with primary color */
|
||||
}
|
||||
|
||||
.table {
|
||||
color: var(--bs-body-color) !important; /* Ensure the text color matches the theme */
|
||||
background-color: var(--bs-light) !important; /* Light background color */
|
||||
border-collapse: separate !important; /* Ensure borders do not collapse */
|
||||
border-spacing: 0; /* Remove spacing between table cells */
|
||||
border-radius: 0.375rem; /* Rounded corners */
|
||||
overflow: hidden; /* Ensure the rounded corners apply to the entire table */
|
||||
border: 1px solid var(--bs-secondary) !important; /* Apply border with secondary color */
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
color: var(--bs-info) !important; /* Info color for the table headers */
|
||||
background-color: var(--bs-light) !important; /* Background for table headers */
|
||||
border-bottom: 1px solid var(--bs-secondary) !important; /* Secondary color for the header bottom border */
|
||||
}
|
||||
|
||||
/* Ensures corners are colored */
|
||||
.table thead th:first-child {
|
||||
border-top-left-radius: 0.375rem !important;
|
||||
}
|
||||
|
||||
.table thead th:last-child {
|
||||
border-top-right-radius: 0.375rem !important;
|
||||
}
|
||||
|
||||
.table tbody tr:last-child td:first-child {
|
||||
border-bottom-left-radius: 0.375rem !important;
|
||||
}
|
||||
|
||||
.table tbody tr:last-child td:last-child {
|
||||
border-bottom-right-radius: 0.375rem !important;
|
||||
}
|
||||
|
||||
.table tbody tr {
|
||||
border-top: 1px solid var(--bs-gray-300) !important; /* Subtle border between rows */
|
||||
}
|
||||
|
||||
.table tbody tr:hover {
|
||||
background-color: var(--bs-secondary) !important; /* Secondary color on row hover */
|
||||
color: var(--bs-white) !important; /* White text on hover */
|
||||
}
|
||||
|
||||
.table tbody tr:hover a,
|
||||
.table tbody tr:hover p,
|
||||
.table tbody tr:hover td {
|
||||
color: var(--bs-white) !important; /* Ensure all text, links, and paragraphs change to white */
|
||||
}
|
||||
|
||||
.table tbody tr:hover .text-xs {
|
||||
color: var(--bs-white) !important; /* Ensure the smaller text also changes to white */
|
||||
}
|
||||
|
||||
.table .text-xs {
|
||||
color: var(--bs-body-color) !important; /* Consistent text color in the table cells */
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
accent-color: var(--bs-primary); /* Primary color for radio buttons */
|
||||
}
|
||||
|
||||
/* Buttons customization */
|
||||
.btn-primary {
|
||||
background-color: var(--bs-primary) !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
color: var(--bs-white) !important;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: var(--bs-secondary) !important;
|
||||
border-color: var(--bs-secondary) !important;
|
||||
color: var(--bs-white) !important;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: var(--bs-warning) !important;
|
||||
border-color: var(--bs-warning) !important;
|
||||
color: var(--bs-white) !important;
|
||||
}
|
||||
|
||||
/* Adjust the form group margin */
|
||||
.form-group {
|
||||
margin-top: 1.5rem; /* Adjust for better spacing */
|
||||
}
|
||||
|
||||
/* Card footer customization */
|
||||
.card-footer {
|
||||
/*background-color: var(--bs-light) !important; !* Light background for the footer *!*/
|
||||
padding-top: 1rem; /* Adjust padding for consistent spacing */
|
||||
padding-bottom: 1rem; /* Adjust padding for consistent spacing */
|
||||
/*border-top: 1px solid var(--bs-secondary) !important; !* Border with secondary color *!*/
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.card-footer .pagination {
|
||||
padding-left: 0 !important; /* Remove extra padding */
|
||||
padding-right: 0 !important; /* Remove extra padding */
|
||||
}
|
||||
|
||||
/* Pagination customization */
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
list-style: none;
|
||||
border-radius: 0.375rem;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
padding-left: 0 !important; /* Add some padding inside the pagination */
|
||||
padding-right: 0 !important; /* Add some padding inside the pagination */
|
||||
}
|
||||
|
||||
.pagination .page-item {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.page-item.disabled .page-link {
|
||||
color: var(--bs-gray-500) !important; /* Disabled state color */
|
||||
background-color: var(--bs-gray-200) !important; /* Disabled state background */
|
||||
border-color: var(--bs-gray-300) !important; /* Disabled state border */
|
||||
}
|
||||
|
||||
.page-item.active .page-link {
|
||||
z-index: 1;
|
||||
color: var(--bs-white) !important; /* Active page color */
|
||||
background-color: var(--bs-primary) !important; /* Active page background */
|
||||
border-color: var(--bs-primary) !important; /* Active page border */
|
||||
}
|
||||
|
||||
.page-item .page-link {
|
||||
border-radius: 50% !important; /* Ensure circular buttons */
|
||||
margin: 0 5px; /* Add some spacing between buttons */
|
||||
}
|
||||
|
||||
.page-link {
|
||||
color: var(--bs-primary) !important; /* Default link color */
|
||||
background-color: var(--bs-light) !important; /* Light background for links */
|
||||
border: 1px solid var(--bs-secondary) !important; /* Border with secondary color */
|
||||
border-radius: 0.375rem; /* Rounded corners */
|
||||
padding: 0.5rem 0.75rem;
|
||||
margin: 0 0.25rem; /* Adjust margin for spacing */
|
||||
}
|
||||
|
||||
.page-link:hover {
|
||||
color: var(--bs-white) !important; /* Hover state text color */
|
||||
background-color: var(--bs-secondary) !important; /* Hover state background */
|
||||
border-color: var(--bs-secondary) !important; /* Hover state border */
|
||||
}
|
||||
|
||||
.page-link i.fa {
|
||||
margin-right: 0.25rem; /* Add spacing between icon and text */
|
||||
}
|
||||
|
||||
/* Align text centrally */
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
39764
eveai_app/static/assets/css/material-kit-pro.css
Normal file
39764
eveai_app/static/assets/css/material-kit-pro.css
Normal file
File diff suppressed because it is too large
Load Diff
478
eveai_app/static/assets/js/material-kit-pro.js
Normal file
478
eveai_app/static/assets/js/material-kit-pro.js
Normal file
@@ -0,0 +1,478 @@
|
||||
/*!
|
||||
|
||||
=========================================================
|
||||
* Material Kit 3 PRO - v3.1.0
|
||||
=========================================================
|
||||
|
||||
* Product Page: https://www.creative-tim.com/product/soft-ui-design-system
|
||||
* Copyright 2021 Creative Tim (https://www.creative-tim.com)
|
||||
|
||||
* Coded by Creative Tim
|
||||
|
||||
=========================================================
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
*/
|
||||
|
||||
// Returns a function, that, as long as it continues to be invoked, will not
|
||||
// be triggered. The function will be called after it stops being called for
|
||||
// N milliseconds. If `immediate` is passed, trigger the function on the
|
||||
// leading edge, instead of the trailing.
|
||||
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
var context = this,
|
||||
args = arguments;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(function() {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
}, wait);
|
||||
if (immediate && !timeout) func.apply(context, args);
|
||||
};
|
||||
};
|
||||
|
||||
// Function for smooth scroll to element
|
||||
function smoothToPricing(id) {
|
||||
if (document.getElementById(id)) {
|
||||
document.getElementById(id).scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Debounce function
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
var context = this,
|
||||
args = arguments;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(function() {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
}, wait);
|
||||
if (immediate && !timeout) func.apply(context, args);
|
||||
};
|
||||
};
|
||||
|
||||
// initialization of Popovers
|
||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
||||
var popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
|
||||
return new bootstrap.Popover(popoverTriggerEl)
|
||||
})
|
||||
|
||||
// initialization of Tooltips
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
||||
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
})
|
||||
|
||||
// helper for adding on all elements multiple attributes
|
||||
function setAttributes(el, options) {
|
||||
Object.keys(options).forEach(function(attr) {
|
||||
el.setAttribute(attr, options[attr]);
|
||||
})
|
||||
}
|
||||
|
||||
// activate popovers
|
||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="popover"]'))
|
||||
var popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
|
||||
return new bootstrap.Popover(popoverTriggerEl)
|
||||
})
|
||||
|
||||
// activate tooltips
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'))
|
||||
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
})
|
||||
|
||||
|
||||
window.onload = function() {
|
||||
// Material Design Input function
|
||||
var inputs = document.querySelectorAll('input');
|
||||
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
inputs[i].addEventListener('focus', function(e) {
|
||||
this.parentElement.classList.add('is-focused');
|
||||
}, false);
|
||||
|
||||
inputs[i].onkeyup = function(e) {
|
||||
if (this.value != "") {
|
||||
this.parentElement.classList.add('is-filled');
|
||||
} else {
|
||||
this.parentElement.classList.remove('is-filled');
|
||||
}
|
||||
};
|
||||
|
||||
inputs[i].addEventListener('focusout', function(e) {
|
||||
if (this.value != "") {
|
||||
this.parentElement.classList.add('is-filled');
|
||||
}
|
||||
this.parentElement.classList.remove('is-focused');
|
||||
}, false);
|
||||
}
|
||||
|
||||
// Ripple Effect
|
||||
var ripples = document.querySelectorAll('.btn');
|
||||
|
||||
for (var i = 0; i < ripples.length; i++) {
|
||||
ripples[i].addEventListener('click', function(e) {
|
||||
var targetEl = e.target;
|
||||
var rippleDiv = targetEl.querySelector('.ripple');
|
||||
|
||||
rippleDiv = document.createElement('span');
|
||||
rippleDiv.classList.add('ripple');
|
||||
rippleDiv.style.width = rippleDiv.style.height = Math.max(targetEl.offsetWidth, targetEl.offsetHeight) + 'px';
|
||||
targetEl.appendChild(rippleDiv);
|
||||
|
||||
rippleDiv.style.left = (e.offsetX - rippleDiv.offsetWidth / 2) + 'px';
|
||||
rippleDiv.style.top = (e.offsetY - rippleDiv.offsetHeight / 2) + 'px';
|
||||
rippleDiv.classList.add('ripple');
|
||||
setTimeout(function() {
|
||||
rippleDiv.parentElement.removeChild(rippleDiv);
|
||||
}, 600);
|
||||
}, false);
|
||||
}
|
||||
};
|
||||
|
||||
// Multi Level Dropdown
|
||||
function dropDown(a) {
|
||||
if (!document.querySelector('.dropdown-hover')) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
var multilevel = a.parentElement.parentElement.children;
|
||||
|
||||
|
||||
for (var i = 0; i < multilevel.length; i++) {
|
||||
if (multilevel[i].lastElementChild != a.parentElement.lastElementChild) {
|
||||
multilevel[i].lastElementChild.classList.remove('show');
|
||||
multilevel[i].firstElementChild.classList.remove('show');
|
||||
}
|
||||
}
|
||||
|
||||
if (!a.nextElementSibling.classList.contains("show")) {
|
||||
a.nextElementSibling.classList.add("show");
|
||||
a.classList.add("show");
|
||||
|
||||
} else {
|
||||
a.nextElementSibling.classList.remove("show");
|
||||
a.classList.remove("show");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Colored shadows from Cards
|
||||
if (document.querySelector('.blur-shadow-image')) {
|
||||
var shadowCards = document.querySelectorAll('.blur-shadow-image');
|
||||
var shadowCardsRounded = document.querySelectorAll('.blur-shadow-image.rounded-circle');
|
||||
|
||||
if (shadowCardsRounded) {
|
||||
for (var i = 0; i < shadowCardsRounded.length; i++) {
|
||||
var div = document.createElement("DIV");
|
||||
shadowCardsRounded[i].parentElement.appendChild(div);
|
||||
div.classList.add('colored-shadow', 'rounded');
|
||||
|
||||
var currentSrc = shadowCardsRounded[i].children[0].getAttribute('src');
|
||||
var el = shadowCardsRounded[i].nextElementSibling;
|
||||
|
||||
el.style.backgroundImage = 'url(' + currentSrc + ')';
|
||||
}
|
||||
}
|
||||
if (shadowCards) {
|
||||
for (var i = 0; i < shadowCards.length; i++) {
|
||||
var div = document.createElement("DIV");
|
||||
shadowCards[i].parentElement.appendChild(div);
|
||||
div.classList.add('colored-shadow');
|
||||
|
||||
var currentSrc = shadowCards[i].children[0].getAttribute('src');
|
||||
var el = shadowCards[i].nextElementSibling;
|
||||
|
||||
el.style.backgroundImage = 'url(' + currentSrc + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Colored shadows for Avatars
|
||||
if (document.querySelector('.blur-shadow-avatar')) {
|
||||
var shadowCards = document.querySelectorAll('.blur-shadow-avatar');
|
||||
var shadowCardsRounded = document.querySelectorAll('.blur-shadow-avatar.rounded-circle');
|
||||
|
||||
if (shadowCardsRounded) {
|
||||
for (var i = 0; i < shadowCardsRounded.length; i++) {
|
||||
|
||||
var div = document.createElement("DIV");
|
||||
shadowCardsRounded[i].parentElement.appendChild(div);
|
||||
div.classList.add('colored-shadow', 'rounded', 'start-0', 'end-0', 'mx-auto');
|
||||
|
||||
var avatarClasses = ['avatar-xs', 'avatar-sm', 'avatar-lg', 'avatar-xl', 'avatar-xxl'];
|
||||
|
||||
for (var k = 0; k < avatarClasses.length; k++) {
|
||||
if (shadowCardsRounded[i].firstElementChild.classList.contains(avatarClasses[k])) {
|
||||
div.classList.add(avatarClasses[k]);
|
||||
}
|
||||
}
|
||||
|
||||
var currentSrc = shadowCardsRounded[i].children[0].getAttribute('src');
|
||||
var el = shadowCardsRounded[i].nextElementSibling;
|
||||
|
||||
el.style.backgroundImage = 'url(' + currentSrc + ')';
|
||||
}
|
||||
}
|
||||
if (shadowCards) {
|
||||
|
||||
for (var i = 0; i < shadowCards.length; i++) {
|
||||
|
||||
var div = document.createElement("DIV");
|
||||
shadowCards[i].parentElement.appendChild(div);
|
||||
div.classList.add('colored-shadow', 'start-0', 'end-0', 'mx-auto');
|
||||
|
||||
var avatarClasses = ['avatar-xs', 'avatar-sm', 'avatar-lg', 'avatar-xl', 'avatar-xxl'];
|
||||
|
||||
for (var k = 0; k < avatarClasses.length; k++) {
|
||||
if (shadowCards[i].firstElementChild.classList.contains(avatarClasses[k])) {
|
||||
div.classList.add(avatarClasses[k]);
|
||||
}
|
||||
}
|
||||
|
||||
var currentSrc = shadowCards[i].children[0].getAttribute('src');
|
||||
var el = shadowCards[i].nextElementSibling;
|
||||
|
||||
el.style.backgroundImage = 'url(' + currentSrc + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Google Maps
|
||||
if (document.querySelector('#google-maps')) {
|
||||
var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
|
||||
var mapOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
|
||||
styles: [{
|
||||
"featureType": "administrative",
|
||||
"elementType": "labels.text.fill",
|
||||
"stylers": [{
|
||||
"color": "#444444"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "landscape",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"color": "#f2f2f2"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "poi",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"visibility": "off"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "road",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"saturation": -100
|
||||
}, {
|
||||
"lightness": 45
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "road.highway",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"visibility": "simplified"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "road.arterial",
|
||||
"elementType": "labels.icon",
|
||||
"stylers": [{
|
||||
"visibility": "off"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "transit",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"visibility": "off"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"featureType": "water",
|
||||
"elementType": "all",
|
||||
"stylers": [{
|
||||
"color": "#C5CBF5"
|
||||
}, {
|
||||
"visibility": "on"
|
||||
}]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var map = new google.maps.Map(document.getElementById("google-maps"), mapOptions);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: myLatlng,
|
||||
title: "Hello World!"
|
||||
});
|
||||
|
||||
// To add the marker to the map, call setMap();
|
||||
marker.setMap(map);
|
||||
}
|
||||
|
||||
// Tabs navigation
|
||||
|
||||
var total = document.querySelectorAll('.nav-pills');
|
||||
|
||||
total.forEach(function(item, i) {
|
||||
var moving_div = document.createElement('div');
|
||||
var first_li = item.querySelector('li:first-child .nav-link');
|
||||
var tab = first_li.cloneNode();
|
||||
tab.innerHTML = "-";
|
||||
|
||||
moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');
|
||||
moving_div.appendChild(tab);
|
||||
item.appendChild(moving_div);
|
||||
|
||||
var list_length = item.getElementsByTagName("li").length;
|
||||
|
||||
moving_div.style.padding = '0px';
|
||||
moving_div.style.width = item.querySelector('li:nth-child(1)').offsetWidth + 'px';
|
||||
moving_div.style.transform = 'translate3d(0px, 0px, 0px)';
|
||||
moving_div.style.transition = '.5s ease';
|
||||
|
||||
item.onmouseover = function(event) {
|
||||
let target = getEventTarget(event);
|
||||
let li = target.closest('li'); // get reference
|
||||
if (li) {
|
||||
let nodes = Array.from(li.closest('ul').children); // get array
|
||||
let index = nodes.indexOf(li) + 1;
|
||||
item.querySelector('li:nth-child(' + index + ') .nav-link').onclick = function() {
|
||||
moving_div = item.querySelector('.moving-tab');
|
||||
let sum = 0;
|
||||
if (item.classList.contains('flex-column')) {
|
||||
for (var j = 1; j <= nodes.indexOf(li); j++) {
|
||||
sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;
|
||||
}
|
||||
moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';
|
||||
moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;
|
||||
} else {
|
||||
for (var j = 1; j <= nodes.indexOf(li); j++) {
|
||||
sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;
|
||||
}
|
||||
moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';
|
||||
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Tabs navigation resize
|
||||
|
||||
window.addEventListener('resize', function(event) {
|
||||
total.forEach(function(item, i) {
|
||||
item.querySelector('.moving-tab').remove();
|
||||
var moving_div = document.createElement('div');
|
||||
var tab = item.querySelector(".nav-link.active").cloneNode();
|
||||
tab.innerHTML = "-";
|
||||
|
||||
moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');
|
||||
moving_div.appendChild(tab);
|
||||
|
||||
item.appendChild(moving_div);
|
||||
|
||||
moving_div.style.padding = '0px';
|
||||
moving_div.style.transition = '.5s ease';
|
||||
|
||||
let li = item.querySelector(".nav-link.active").parentElement;
|
||||
|
||||
if (li) {
|
||||
let nodes = Array.from(li.closest('ul').children); // get array
|
||||
let index = nodes.indexOf(li) + 1;
|
||||
|
||||
let sum = 0;
|
||||
if (item.classList.contains('flex-column')) {
|
||||
for (var j = 1; j <= nodes.indexOf(li); j++) {
|
||||
sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;
|
||||
}
|
||||
moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';
|
||||
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
|
||||
moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;
|
||||
} else {
|
||||
for (var j = 1; j <= nodes.indexOf(li); j++) {
|
||||
sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;
|
||||
}
|
||||
moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';
|
||||
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (window.innerWidth < 991) {
|
||||
total.forEach(function(item, i) {
|
||||
if (!item.classList.contains('flex-column')) {
|
||||
item.classList.add('flex-column', 'on-resize');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
total.forEach(function(item, i) {
|
||||
if (item.classList.contains('on-resize')) {
|
||||
item.classList.remove('flex-column', 'on-resize');
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getEventTarget(e) {
|
||||
e = e || window.event;
|
||||
return e.target || e.srcElement;
|
||||
}
|
||||
|
||||
// End tabs navigation
|
||||
|
||||
|
||||
// Copy code function
|
||||
|
||||
function copyCode(el) {
|
||||
const selection = window.getSelection();
|
||||
const range = document.createRange();
|
||||
const textToCopy = el.nextElementSibling;
|
||||
range.selectNodeContents(textToCopy);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
const successful = document.execCommand('copy');
|
||||
window.getSelection().removeAllRanges()
|
||||
if (!el.parentElement.querySelector('.alert')) {
|
||||
var alert = document.createElement('div');
|
||||
alert.classList.add('alert', 'alert-success', 'position-absolute', 'top-0', 'border-0', 'text-white', 'w-25', 'end-0', 'start-0', 'mt-2', 'mx-auto', 'py-2');
|
||||
alert.style.transform = 'translate3d(0px, 0px, 0px)'
|
||||
alert.style.opacity = '0';
|
||||
alert.style.transition = '.35s ease';
|
||||
setTimeout(function() {
|
||||
alert.style.transform = 'translate3d(0px, 20px, 0px)';
|
||||
alert.style.setProperty("opacity", "1", "important");
|
||||
}, 100);
|
||||
alert.innerHTML = "Code successfully copied!";
|
||||
el.parentElement.appendChild(alert);
|
||||
setTimeout(function() {
|
||||
alert.style.transform = 'translate3d(0px, 0px, 0px)'
|
||||
alert.style.setProperty("opacity", "0", "important");
|
||||
}, 2000);
|
||||
setTimeout(function() {
|
||||
el.parentElement.querySelector('.alert').remove();
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
|
||||
// End copy code function
|
||||
301
eveai_app/templates/eveai_list_view.html
Normal file
301
eveai_app/templates/eveai_list_view.html
Normal file
@@ -0,0 +1,301 @@
|
||||
<script type="module">
|
||||
window.EveAI = window.EveAI || {};
|
||||
window.EveAI.ListView = {
|
||||
instances: {},
|
||||
|
||||
initialize: function(containerId, options = {}) {
|
||||
const container = document.getElementById(containerId);
|
||||
if (!container) {
|
||||
console.error(`Container ${containerId} not found`);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Default configuration
|
||||
const config = {
|
||||
data: [],
|
||||
columns: [],
|
||||
initialSort: [],
|
||||
initialFilters: [],
|
||||
filterableColumns: [],
|
||||
selectable: true,
|
||||
actions: [],
|
||||
usePagination: true, // Nieuwe optie om paginering aan/uit te zetten
|
||||
tableHeight: 700, // Standaard tabelhoogte als deze niet wordt gespecificeerd
|
||||
...options
|
||||
};
|
||||
|
||||
// Check if Tabulator is available
|
||||
if (typeof window.Tabulator !== 'function') {
|
||||
console.error('Tabulator not loaded (window.Tabulator missing).');
|
||||
container.innerHTML = `<div class="alert alert-danger">
|
||||
<strong>Error:</strong> Tabulator not loaded
|
||||
</div>`;
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
// Create Tabulator table
|
||||
const tableContainer = document.createElement('div');
|
||||
tableContainer.className = 'tabulator-container tabulator-list-view mt-3';
|
||||
container.appendChild(tableContainer);
|
||||
|
||||
// Basisinstellingen voor tabel configuratie
|
||||
const tableConfig = {
|
||||
data: config.data,
|
||||
columns: this._buildColumns(config.columns, config.selectable),
|
||||
layout: "fitColumns",
|
||||
|
||||
// Conditionele paginatie of progressieve lading
|
||||
...(config.usePagination ? {
|
||||
pagination: "local",
|
||||
paginationSize: 25,
|
||||
paginationSizeSelector: [10, 25, 50, 100]
|
||||
} : {
|
||||
progressiveLoad: "scroll" // Gebruik progressieve lading voor grote datasets wanneer paginatie uitstaat
|
||||
}),
|
||||
|
||||
// Gemeenschappelijke configuratie voor beide modi
|
||||
movableColumns: true,
|
||||
resizableRows: false, // Schakel dit uit om prestatieproblemen te voorkomen
|
||||
initialSort: config.initialSort,
|
||||
initialFilter: config.initialFilters,
|
||||
selectable: 1, // Beperk tot maximaal 1 rij selectie
|
||||
selectableRangeMode: "click",
|
||||
selectableCheck: function() { return true; }, // Zorg ervoor dat alle cellen selecteerbaar zijn
|
||||
rowClick: function(e, row) {
|
||||
// Selecteer de rij bij klikken op willekeurige cel
|
||||
if (config.selectable) {
|
||||
console.log('Row clicked!', row.getData());
|
||||
row.getTable().deselectRow();
|
||||
row.select();
|
||||
// Handmatig de rowSelectionChanged event aanroepen als extra maatregel
|
||||
const instance = EveAI.ListView.instances[containerId];
|
||||
if (instance) {
|
||||
instance.selectedRow = row.getData();
|
||||
EveAI.ListView._updateActionButtons(containerId);
|
||||
}
|
||||
}
|
||||
},
|
||||
cellClick: function(e, cell) {
|
||||
// Gebruik ook cellClick om ervoor te zorgen dat klikken op een cel de rij selecteert
|
||||
if (config.selectable && !e.target.matches('a, input, button, select, .tabulator-cell-editing')) {
|
||||
console.log('Cell clicked!', cell.getData());
|
||||
const row = cell.getRow();
|
||||
row.getTable().deselectRow();
|
||||
row.select();
|
||||
// Handmatig de rowSelectionChanged event aanroepen als extra maatregel
|
||||
const instance = EveAI.ListView.instances[containerId];
|
||||
if (instance) {
|
||||
instance.selectedRow = row.getData();
|
||||
EveAI.ListView._updateActionButtons(containerId);
|
||||
}
|
||||
}
|
||||
},
|
||||
cellTap: function(e, cell) {
|
||||
// Extra handler voor touch devices
|
||||
if (config.selectable && !e.target.matches('a, input, button, select, .tabulator-cell-editing')) {
|
||||
console.log('Cell tapped!', cell.getData());
|
||||
const row = cell.getRow();
|
||||
row.getTable().deselectRow();
|
||||
row.select();
|
||||
// Handmatig de rowSelectionChanged event aanroepen
|
||||
const instance = EveAI.ListView.instances[containerId];
|
||||
if (instance) {
|
||||
instance.selectedRow = row.getData();
|
||||
EveAI.ListView._updateActionButtons(containerId);
|
||||
}
|
||||
}
|
||||
},
|
||||
rowSelectionChanged: function(data, rows) {
|
||||
console.log("Aantal geselecteerde rijen:", rows.length);
|
||||
console.log("Geselecteerde rijen:", rows.map(r => r.getData()));
|
||||
|
||||
// Update de geselecteerde rij (enkelvoud)
|
||||
EveAI.ListView.instances[containerId].selectedRow = rows.length > 0 ? rows[0].getData() : null;
|
||||
EveAI.ListView._updateActionButtons(containerId);
|
||||
},
|
||||
rowFormatter: function(row) {
|
||||
// Voeg cursor-style toe om aan te geven dat rijen klikbaar zijn
|
||||
if (config.selectable) {
|
||||
row.getElement().style.cursor = 'pointer';
|
||||
}
|
||||
},
|
||||
placeholder: "No data available",
|
||||
tooltips: false, // Schakel tooltips uit voor betere prestaties
|
||||
responsiveLayout: false, // Schakel responsiveLayout uit om recursieve problemen te voorkomen
|
||||
renderVerticalBuffer: 20, // Optimaliseer virtuele rendering
|
||||
virtualDomBuffer: 80, // Optimaliseer virtuele DOM buffer
|
||||
height: config.tableHeight // Gebruik de geconfigureerde tabel hoogte
|
||||
};
|
||||
|
||||
// Maak Tabulator instantie met de geconfigureerde instellingen
|
||||
const table = new Tabulator(tableContainer, tableConfig);
|
||||
|
||||
// Create action buttons
|
||||
if (config.actions.length > 0) {
|
||||
this._createActionButtons(container, config.actions, table);
|
||||
}
|
||||
|
||||
// Store instance
|
||||
this.instances[containerId] = {
|
||||
table: table,
|
||||
config: config,
|
||||
selectedRow: null
|
||||
};
|
||||
|
||||
// Registreer events met de Tabulator API voor betere compatibiliteit
|
||||
table.on("rowClick", function(e, row){
|
||||
console.log("Tabulator API: Row clicked!", row.getData());
|
||||
if (config.selectable) {
|
||||
// Stop event propagation om te voorkomen dat andere handlers interfereren
|
||||
e.stopPropagation();
|
||||
row.getTable().deselectRow();
|
||||
row.select();
|
||||
}
|
||||
});
|
||||
|
||||
// Row selection event met de Tabulator API
|
||||
table.on("rowSelectionChanged", function(data, rows){
|
||||
console.log("Tabulator API: Aantal geselecteerde rijen:", rows.length);
|
||||
console.log("Tabulator API: Geselecteerde rijen:", rows.map(r => r.getData()));
|
||||
|
||||
// Update de geselecteerde rij (enkelvoud)
|
||||
EveAI.ListView.instances[containerId].selectedRow = rows.length > 0 ? rows[0].getData() : null;
|
||||
EveAI.ListView._updateActionButtons(containerId);
|
||||
});
|
||||
|
||||
// Opmerking: row selection event wordt nu afgehandeld via de Tabulator API
|
||||
|
||||
return table;
|
||||
} catch (error) {
|
||||
console.error('Error initializing ListView:', error);
|
||||
container.innerHTML = `<div class="alert alert-danger">
|
||||
<strong>Error loading data:</strong> ${error.message}
|
||||
</div>`;
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
_buildColumns: function(columns, selectable) {
|
||||
const tabulatorColumns = [];
|
||||
|
||||
// Add selection column if needed
|
||||
{#if (selectable) {#}
|
||||
{# tabulatorColumns.push({#}
|
||||
{# formatter: "rowSelection", #}
|
||||
{# titleFormatter: "rowSelection", #}
|
||||
{# hozAlign: "center", #}
|
||||
{# headerSort: false, #}
|
||||
{# width: 60#}
|
||||
{# });#}
|
||||
{#}#}
|
||||
|
||||
// Add data columns
|
||||
columns.forEach(col => {
|
||||
// Maak een nieuwe schone kolom met alleen geldige Tabulator-eigenschappen
|
||||
const column = {
|
||||
title: col.title,
|
||||
field: col.field,
|
||||
headerSort: col.sortable !== false,
|
||||
headerFilter: col.filterable !== false,
|
||||
formatter: col.formatter,
|
||||
width: col.width,
|
||||
hozAlign: col.hozAlign,
|
||||
vertAlign: col.vertAlign
|
||||
};
|
||||
|
||||
// Zorg voor juiste numerieke sortering voor ID velden
|
||||
if (col.field === 'id' || col.field.endsWith('_id') || col.type === 'number') {
|
||||
column.sorter = 'number';
|
||||
}
|
||||
|
||||
// Set appropriate header filter based on the data type
|
||||
if (col.type === 'date') {
|
||||
column.headerFilter = "input";
|
||||
column.headerFilterParams = {type: "date"};
|
||||
} else if (col.type === 'number') {
|
||||
column.headerFilter = "number";
|
||||
} else if (col.filterValues) {
|
||||
column.headerFilter = "select";
|
||||
column.headerFilterParams = {values: col.filterValues};
|
||||
} else {
|
||||
column.headerFilter = "input";
|
||||
}
|
||||
|
||||
tabulatorColumns.push(column);
|
||||
});
|
||||
|
||||
return tabulatorColumns;
|
||||
},
|
||||
|
||||
_createActionButtons: function(container, actions, table) {
|
||||
const actionSection = document.createElement('div');
|
||||
actionSection.className = 'mt-3 d-flex justify-content-between';
|
||||
|
||||
const leftActions = document.createElement('div');
|
||||
const rightActions = document.createElement('div');
|
||||
|
||||
actions.forEach(action => {
|
||||
const button = document.createElement('button');
|
||||
button.type = 'submit';
|
||||
button.name = 'action';
|
||||
button.value = action.value;
|
||||
button.className = `btn ${action.class || 'btn-primary'} me-2`;
|
||||
button.textContent = action.text;
|
||||
button.disabled = action.requiresSelection !== false; // Disabled by default if requires selection
|
||||
|
||||
if (action.position === 'right') {
|
||||
rightActions.appendChild(button);
|
||||
} else {
|
||||
leftActions.appendChild(button);
|
||||
}
|
||||
});
|
||||
|
||||
actionSection.appendChild(leftActions);
|
||||
actionSection.appendChild(rightActions);
|
||||
container.appendChild(actionSection);
|
||||
},
|
||||
|
||||
|
||||
_updateActionButtons: function(containerId) {
|
||||
const instance = this.instances[containerId];
|
||||
const container = document.getElementById(containerId);
|
||||
const buttons = container.querySelectorAll('button[name="action"]');
|
||||
|
||||
buttons.forEach(button => {
|
||||
// Enable/disable based on selection requirement
|
||||
const action = instance.config.actions.find(a => a.value === button.value);
|
||||
if (action && action.requiresSelection !== false) {
|
||||
// Controleer of er een geselecteerde rij is
|
||||
button.disabled = !instance.selectedRow;
|
||||
}
|
||||
});
|
||||
|
||||
// Update hidden input with selected row data
|
||||
this._updateSelectedRowInput(containerId);
|
||||
},
|
||||
|
||||
_updateSelectedRowInput: function(containerId) {
|
||||
const instance = this.instances[containerId];
|
||||
let hiddenInput = document.getElementById(`${containerId}-selected-row`);
|
||||
|
||||
if (!hiddenInput) {
|
||||
hiddenInput = document.createElement('input');
|
||||
hiddenInput.type = 'hidden';
|
||||
hiddenInput.name = 'selected_row';
|
||||
hiddenInput.id = `${containerId}-selected-row`;
|
||||
document.getElementById(containerId).appendChild(hiddenInput);
|
||||
}
|
||||
|
||||
if (instance.selectedRow) {
|
||||
// Bewaar de geselecteerde rij-ID
|
||||
hiddenInput.value = JSON.stringify({value: instance.selectedRow.id});
|
||||
} else {
|
||||
hiddenInput.value = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="{{url_for('static', filename='assets/img/apple-icon.png')}}">
|
||||
<link rel="icon" type="image/png" href="{{url_for('static', filename='assets/img/favicon.png')}}">
|
||||
<title>
|
||||
{% block title %}{% endblock %}
|
||||
</title>
|
||||
<!-- Fonts and icons -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
|
||||
<!-- Nucleo Icons -->
|
||||
<link href="{{url_for('static', filename='assets/css/nucleo-icons.css" rel="stylesheet')}}" />
|
||||
<link href="{{url_for('static', filename='assets/css/nucleo-svg.css" rel="stylesheet')}}" />
|
||||
<!-- Font Awesome Icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
<!-- Material Icons -->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
|
||||
<!-- CSS Files -->
|
||||
<link id="pagestyle" href="{{url_for('static', filename='assets/css/material-kit-pro.css')}}" rel="stylesheet" />
|
||||
<link id="pagestyle" href="{{url_for('static', filename='assets/css/eveai.css')}}" rel="stylesheet" />
|
||||
</head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="{{url_for('static', filename='assets/img/apple-icon.png')}}">
|
||||
<link rel="icon" type="image/png" href="{{url_for('static', filename='assets/img/favicon.png')}}">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
|
||||
<!-- Fonts blijven via CDN (sneller) -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
|
||||
<!-- Gebundelde CSS (bevat nu al je CSS) -->
|
||||
<link href="{{url_for('static', filename='dist/main.css')}}" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,27 +1,77 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'macros.html' import render_selectable_table, render_pagination %}
|
||||
|
||||
{% block title %}Specialists{% endblock %}
|
||||
|
||||
{% block content_title %}Specialists{% endblock %}
|
||||
{% block content_description %}View Specialists for Tenant{% endblock %}
|
||||
{% block content_class %}<div class="col-xl-12 col-lg-5 col-md-7 mx-auto"></div>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<form method="POST" action="{{ url_for('interaction_bp.handle_specialist_selection') }}" id="specialistsForm">
|
||||
{{ render_selectable_table(headers=["Specialist ID", "Name", "Type", "Type Version", "Active"], rows=rows, selectable=True, id="specialistsTable") }}
|
||||
<div class="form-group mt-3 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="submit" name="action" value="edit_specialist" class="btn btn-primary" onclick="return validateTableSelection('specialistsForm')">Edit Specialist</button>
|
||||
<button type="submit" name="action" value="execute_specialist" class="btn btn-primary" onclick="return validateTableSelection('specialistsForm')">Execute Specialist</button>
|
||||
</div>
|
||||
<button type="submit" name="action" value="create_specialist" class="btn btn-success">Register Specialist</button>
|
||||
</div>
|
||||
<form method="POST" action="{{ url_for('interaction_bp.handle_specialist_selection') }}" id="specialistsForm" onsubmit="return validateSpecialistSelection()">
|
||||
<div id="specialists-list-view" class="tabulator-list-view"></div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %}
|
||||
{{ render_pagination(pagination, 'interaction_bp.specialists') }}
|
||||
{% endblock %}
|
||||
<!-- Include the list view component -->
|
||||
{% include 'eveai_list_view.html' %}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Laad data met een kleine vertraging om de pagina eerst te laten renderen
|
||||
setTimeout(() => {
|
||||
// Initialize the list view met gepagineerde data en optimalisaties
|
||||
const tabulatorTable = EveAI.ListView.initialize('specialists-list-view', {
|
||||
data: {{ specialists_data | tojson }},
|
||||
columns: {{ columns | tojson }},
|
||||
initialSort: {{ initial_sort | tojson }},
|
||||
actions: {{ actions | tojson }},
|
||||
selectable: true,
|
||||
usePagination: true, // Gebruik paginatie in plaats van progressieve lading
|
||||
tableHeight: 800 // Hogere tabel voor specialists view
|
||||
});
|
||||
|
||||
// Extra debug event listeners
|
||||
if (tabulatorTable) {
|
||||
console.log('Tabulator tabel succesvol geïnitialiseerd');
|
||||
|
||||
// Voeg een klik-event toe aan de hele tabel container voor een betere gebruikerservaring
|
||||
document.querySelector('.tabulator-container').addEventListener('click', function(e) {
|
||||
console.log('Tabulator container click event');
|
||||
// De specifieke row click events worden afgehandeld door Tabulator zelf
|
||||
});
|
||||
} else {
|
||||
console.error('Tabulator tabel kon niet worden geïnitialiseerd');
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
|
||||
// Validation function for form submission
|
||||
function validateSpecialistSelection() {
|
||||
const selectedRow = document.getElementById('specialists-list-view-selected-row');
|
||||
const actionButton = document.activeElement;
|
||||
|
||||
// Als de actie geen selectie vereist, ga dan altijd door
|
||||
if (actionButton && actionButton.classList.contains('btn-success')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!selectedRow || !selectedRow.value) {
|
||||
alert('Selecteer a.u.b. eerst een specialist.');
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
const selection = JSON.parse(selectedRow.value);
|
||||
// Controleer of er een specialist is geselecteerd
|
||||
if (!selection.value) {
|
||||
alert('Selecteer a.u.b. eerst een specialist.');
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
alert('Er is een fout opgetreden bij het verwerken van de selectie.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
{#dist/main.js contains all used javascript libraries#}
|
||||
<script src="{{url_for('static', filename='dist/main.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/typedjs.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/prism.min.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/highlight.min.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/parallax.min.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/nouislider.min.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/plugins/anime.min.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='assets/js/material-kit-pro.min.js')}}"></script>
|
||||
|
||||
<!-- Chat client bundle (alleen op chat paginas) -->
|
||||
{% if 'chat' in request.endpoint or request.path.startswith('/chat') %}
|
||||
<script src="{{url_for('static', filename='dist/chat-client.js')}}"></script>
|
||||
{% endif %}
|
||||
|
||||
{% include 'eveai_json_editor.html' %}
|
||||
{% include 'eveai_ordered_list_editor.html' %}
|
||||
{% include 'eveai_list_view.html' %}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
@@ -288,20 +288,45 @@ def edit_specialist(specialist_id):
|
||||
@interaction_bp.route('/specialists', methods=['GET', 'POST'])
|
||||
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
|
||||
def specialists():
|
||||
page = request.args.get('page', 1, type=int)
|
||||
per_page = request.args.get('per_page', 10, type=int)
|
||||
# Get all specialists (no pagination needed for client-side)
|
||||
specialists_query = Specialist.query.order_by(Specialist.id)
|
||||
all_specialists = specialists_query.all()
|
||||
|
||||
query = Specialist.query.order_by(Specialist.id)
|
||||
# Prepare data for Tabulator
|
||||
specialists_data = []
|
||||
for specialist in all_specialists:
|
||||
specialists_data.append({
|
||||
'id': specialist.id,
|
||||
'name': specialist.name,
|
||||
'type': specialist.type,
|
||||
'type_version': specialist.type_version,
|
||||
'active': specialist.active
|
||||
})
|
||||
|
||||
pagination = query.paginate(page=page, per_page=per_page)
|
||||
the_specialists = pagination.items
|
||||
# Column definitions
|
||||
columns = [
|
||||
{'title': 'ID', 'field': 'id', 'width': 80},
|
||||
{'title': 'Name', 'field': 'name'},
|
||||
{'title': 'Type', 'field': 'type'},
|
||||
{'title': 'Type Version', 'field': 'type_version'},
|
||||
{'title': 'Active', 'field': 'active', 'formatter': 'tickCross'}
|
||||
]
|
||||
|
||||
# prepare table data
|
||||
rows = prepare_table_for_macro(the_specialists,
|
||||
[('id', ''), ('name', ''), ('type', ''), ('type_version', ''), ('active', ''),])
|
||||
# Action definitions
|
||||
actions = [
|
||||
{'value': 'edit_specialist', 'text': 'Edit Specialist', 'class': 'btn-primary', 'requiresSelection': True},
|
||||
{'value': 'execute_specialist', 'text': 'Execute Specialist', 'class': 'btn-primary', 'requiresSelection': True},
|
||||
{'value': 'create_specialist', 'text': 'Register Specialist', 'class': 'btn-success', 'position': 'right', 'requiresSelection': False}
|
||||
]
|
||||
|
||||
# Render the catalogs in a template
|
||||
return render_template('interaction/specialists.html', rows=rows, pagination=pagination)
|
||||
# Initial sort configuration
|
||||
initial_sort = [{'column': 'id', 'dir': 'asc'}]
|
||||
|
||||
return render_template('interaction/specialists.html',
|
||||
specialists_data=specialists_data,
|
||||
columns=columns,
|
||||
actions=actions,
|
||||
initial_sort=initial_sort)
|
||||
|
||||
|
||||
@interaction_bp.route('/handle_specialist_selection', methods=['POST'])
|
||||
@@ -877,4 +902,4 @@ def edit_asset(asset_id):
|
||||
db.session.rollback()
|
||||
current_app.logger.error(f"Error saving asset {asset_id}: {str(e)}")
|
||||
flash(f'Fout bij het opslaan van het asset: {str(e)}', 'error')
|
||||
return redirect(prefixed_url_for('interaction_bp.edit_asset', asset_id=asset_id))
|
||||
return redirect(prefixed_url_for('interaction_bp.edit_asset', asset_id=asset_id))
|
||||
|
||||
Reference in New Issue
Block a user