2026-02-04 15:26:44 -05:00
|
|
|
{#
|
|
|
|
|
/**
|
|
|
|
|
* Copyright (C) 2020 Xibo Signage Ltd
|
|
|
|
|
*
|
|
|
|
|
* Xibo - Digital Signage - http://www.xibo.org.uk
|
|
|
|
|
*
|
|
|
|
|
* This file is part of Xibo.
|
|
|
|
|
*
|
|
|
|
|
* Xibo is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* Xibo is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
#}
|
|
|
|
|
{% extends "authed.twig" %}
|
|
|
|
|
{% import "inline.twig" as inline %}
|
|
|
|
|
|
|
|
|
|
{% block title %}{{ "Display Setting Profiles"|trans }} | {% endblock %}
|
|
|
|
|
|
Add new pages for managing tags, tasks, transitions, users, user groups, and their respective JavaScript functionalities
- Implemented tag management page with filtering, data table, and AJAX functionality.
- Created task management page with task listing, filtering, and AJAX data loading.
- Developed transition management page with a data table for transitions.
- Added user management page with comprehensive user details, filtering options, and AJAX support.
- Introduced user group management page with filtering and data table for user groups.
- Enhanced JavaScript for data tables, including state saving, filtering, and AJAX data fetching for all new pages.
2026-02-06 23:54:21 -05:00
|
|
|
{% block actionMenu %}{% endblock %}
|
2026-02-04 15:26:44 -05:00
|
|
|
|
|
|
|
|
{% block pageContent %}
|
|
|
|
|
<div class="ots-displays-page">
|
|
|
|
|
<div class="page-header ots-page-header">
|
|
|
|
|
<h1>{% trans "Display Settings" %}</h1>
|
|
|
|
|
<p class="text-muted">{% trans "Manage Display settings profiles." %}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="widget dashboard-card ots-displays-card">
|
|
|
|
|
<div class="widget-body ots-displays-body">
|
|
|
|
|
<div class="XiboGrid" id="{{ random() }}">
|
|
|
|
|
<div class="XiboFilter card mb-3 bg-light dashboard-card ots-filter-card">
|
|
|
|
|
<div class="ots-filter-header">
|
|
|
|
|
<h3 class="ots-filter-title">{% trans "Filter Display Settings" %}</h3>
|
|
|
|
|
<button type="button" class="ots-filter-toggle" id="ots-filter-collapse-btn" title="{% trans 'Toggle filter panel' %}">
|
2026-02-05 09:04:06 -05:00
|
|
|
<i class="fa fa-chevron-down"></i>
|
2026-02-04 15:26:44 -05:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-02-05 09:04:06 -05:00
|
|
|
<div class="ots-filter-content collapsed" id="ots-filter-content">
|
2026-02-04 15:26:44 -05:00
|
|
|
<div class="FilterDiv card-body" id="Filter">
|
|
|
|
|
<form class="form-inline">
|
|
|
|
|
|
|
|
|
|
{% set title %}{% trans "Name" %}{% endset %}
|
|
|
|
|
{{ inline.inputNameGrid('displayProfile', title) }}
|
|
|
|
|
|
|
|
|
|
{% set title %}{% trans "Type" %}{% endset %}
|
|
|
|
|
{{ inline.dropdown("type", "single", title, "", [{typeId:null, type:""}]|merge(types), "typeId","type") }}
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="XiboData card pt-3 dashboard-card ots-table-card">
|
Add new pages for managing tags, tasks, transitions, users, user groups, and their respective JavaScript functionalities
- Implemented tag management page with filtering, data table, and AJAX functionality.
- Created task management page with task listing, filtering, and AJAX data loading.
- Developed transition management page with a data table for transitions.
- Added user management page with comprehensive user details, filtering options, and AJAX support.
- Introduced user group management page with filtering and data table for user groups.
- Enhanced JavaScript for data tables, including state saving, filtering, and AJAX data fetching for all new pages.
2026-02-06 23:54:21 -05:00
|
|
|
<div class="ots-table-toolbar">
|
|
|
|
|
{% if currentUser.featureEnabled("displayprofile.add") %}
|
Refactor toolbar buttons across various pages to unify styling
- Updated button classes for consistency in the playersoftware-page, playlist-page, resolution-page, schedule-page, settings-page, syncgroup-page, tag-page, task-page, template-page, transition-page, user-page, and usergroup-page.
- Removed unnecessary text from button titles and ensured all buttons have the 'ots-toolbar-btn' class for uniformity.
- Cleaned up the code by removing commented-out sections and ensuring proper indentation.
2026-02-07 14:50:40 -05:00
|
|
|
<button class="btn btn-sm btn-success ots-toolbar-btn XiboFormButton" title="{% trans "Add a new Display Settings Profile" %}" href="{{ url_for("displayProfile.add.form") }}"><i class="fa fa-plus-circle" aria-hidden="true"></i></button>
|
Add new pages for managing tags, tasks, transitions, users, user groups, and their respective JavaScript functionalities
- Implemented tag management page with filtering, data table, and AJAX functionality.
- Created task management page with task listing, filtering, and AJAX data loading.
- Developed transition management page with a data table for transitions.
- Added user management page with comprehensive user details, filtering options, and AJAX support.
- Introduced user group management page with filtering and data table for user groups.
- Enhanced JavaScript for data tables, including state saving, filtering, and AJAX data fetching for all new pages.
2026-02-06 23:54:21 -05:00
|
|
|
{% endif %}
|
Refactor toolbar buttons across various pages to unify styling
- Updated button classes for consistency in the playersoftware-page, playlist-page, resolution-page, schedule-page, settings-page, syncgroup-page, tag-page, task-page, template-page, transition-page, user-page, and usergroup-page.
- Removed unnecessary text from button titles and ensured all buttons have the 'ots-toolbar-btn' class for uniformity.
- Cleaned up the code by removing commented-out sections and ensuring proper indentation.
2026-02-07 14:50:40 -05:00
|
|
|
<button class="btn btn-sm btn-primary ots-toolbar-btn" id="refreshGrid" title="{% trans "Refresh the Table" %}" href="#"><i class="fa fa-refresh" aria-hidden="true"></i></button>
|
Add new pages for managing tags, tasks, transitions, users, user groups, and their respective JavaScript functionalities
- Implemented tag management page with filtering, data table, and AJAX functionality.
- Created task management page with task listing, filtering, and AJAX data loading.
- Developed transition management page with a data table for transitions.
- Added user management page with comprehensive user details, filtering options, and AJAX support.
- Introduced user group management page with filtering and data table for user groups.
- Enhanced JavaScript for data tables, including state saving, filtering, and AJAX data fetching for all new pages.
2026-02-06 23:54:21 -05:00
|
|
|
</div>
|
2026-02-04 15:26:44 -05:00
|
|
|
<table id="displayProfiles" class="table table-striped" data-state-preference-name="displayProfileGrid">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{% trans "Name" %}</th>
|
|
|
|
|
<th>{% trans "Type" %}</th>
|
|
|
|
|
<th>{% trans "Default" %}</th>
|
|
|
|
|
<th class="rowMenu"></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block javaScript %}
|
|
|
|
|
<script type="text/javascript" nonce="{{ cspNonce }}">
|
|
|
|
|
var table = $("#displayProfiles").DataTable({ "language": dataTablesLanguage,
|
|
|
|
|
dom: dataTablesTemplate,
|
|
|
|
|
serverSide: true,
|
|
|
|
|
stateSave: true,
|
|
|
|
|
stateDuration: 0,
|
|
|
|
|
responsive: true,
|
|
|
|
|
stateLoadCallback: dataTableStateLoadCallback,
|
|
|
|
|
stateSaveCallback: dataTableStateSaveCallback,
|
|
|
|
|
filter: false,
|
|
|
|
|
searchDelay: 3000,
|
|
|
|
|
"order": [[ 1, "asc"]],
|
|
|
|
|
ajax: {
|
|
|
|
|
"url": "{{ url_for("displayProfile.search") }}",
|
|
|
|
|
"data": function(d) {
|
|
|
|
|
$.extend(d, $("#displayProfiles").closest(".XiboGrid").find(".FilterDiv form").serializeObject());
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"columns": [
|
|
|
|
|
{ "data": "name", "render": dataTableSpacingPreformatted , responsivePriority: 2},
|
|
|
|
|
{ "data": "type" },
|
|
|
|
|
{ "data": "isDefault", "render": dataTableTickCrossColumn },
|
|
|
|
|
{
|
|
|
|
|
"orderable": false,
|
|
|
|
|
responsivePriority: 1,
|
|
|
|
|
"data": dataTableButtonsColumn
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
table.on('draw', dataTableDraw);
|
|
|
|
|
table.on('processing.dt', dataTableProcessing);
|
|
|
|
|
dataTableAddButtons(table, $('#displayProfiles_wrapper').find('.dataTables_buttons'));
|
|
|
|
|
|
|
|
|
|
$("#refreshGrid").click(function () {
|
|
|
|
|
table.ajax.reload();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Custom submit for display profile form
|
|
|
|
|
function displayProfileEditFormSubmit() {
|
|
|
|
|
var $form = $("#displayProfileForm");
|
|
|
|
|
|
|
|
|
|
// Remove temp fields and enable checkbox after submit
|
|
|
|
|
$form.submit(function(event) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
// Re-enable checkboxes
|
|
|
|
|
$form.find('input[type="checkbox"]').each(function () {
|
|
|
|
|
// Enable checkbox
|
|
|
|
|
$(this).attr('disabled', false);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Remove temp input fields
|
|
|
|
|
$form.find('input.temp-input').each(function () {
|
|
|
|
|
$(this).remove();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Replace all checkboxes with hidden input fields
|
|
|
|
|
$form.find('input[type="checkbox"]').each(function () {
|
|
|
|
|
// Get checkbox values
|
|
|
|
|
var value = $(this).is(':checked') ? 'on' : 'off';
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
|
|
|
|
|
// Create hidden input
|
|
|
|
|
$('<input type="hidden" class="temp-input">')
|
|
|
|
|
.attr('id', id)
|
|
|
|
|
.attr('name', id)
|
|
|
|
|
.val(value)
|
|
|
|
|
.appendTo($(this).parent());
|
|
|
|
|
|
|
|
|
|
// Disable checkbox so it won't be submitted
|
|
|
|
|
$(this).attr('disabled', true);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Submit form
|
|
|
|
|
$form.submit();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|