dolibarr.filearchive/css/docbrowser.css.php
data cbf04e6cc9 FileArchiv: Tile/Gallery view with toggle buttons
- Added formObjectOptions hook for document pages
- CSS/JS injected via DOMContentLoaded for proper timing
- Toggle between list and tile view (localStorage persisted)
- Lightbox for image gallery with keyboard navigation
- Fixed hook contexts (productdocuments, invoicedocuments, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 16:59:19 +01:00

228 lines
4.2 KiB
PHP

<?php
/* Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
* CSS for FileArchiv Document Browser
*/
// Define constant if not already defined
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
}
if (!defined('NOLOGIN')) {
define('NOLOGIN', '1');
}
if (!defined('NOCSRFCHECK')) {
define('NOCSRFCHECK', '1');
}
header('Content-Type: text/css');
?>
/* FileArchiv Document Browser Styles */
.filearchiv-docbrowser-section {
margin-top: 20px;
padding: 15px;
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 6px;
}
.filearchiv-docbrowser-title {
font-weight: 600;
margin-bottom: 10px;
color: #333;
}
.filearchiv-modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 9999;
justify-content: center;
align-items: center;
}
.filearchiv-modal-overlay.active {
display: flex;
}
.filearchiv-modal {
background: #fff;
border-radius: 8px;
width: 90%;
max-width: 800px;
max-height: 80vh;
display: flex;
flex-direction: column;
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.filearchiv-modal-header {
padding: 15px 20px;
border-bottom: 1px solid #ddd;
display: flex;
justify-content: space-between;
align-items: center;
background: #f8f9fa;
border-radius: 8px 8px 0 0;
}
.filearchiv-modal-header h3 {
margin: 0;
font-size: 18px;
color: #333;
}
.filearchiv-modal-close {
font-size: 24px;
cursor: pointer;
color: #666;
line-height: 1;
}
.filearchiv-modal-close:hover {
color: #333;
}
.filearchiv-modal-body {
padding: 20px;
overflow-y: auto;
flex: 1;
}
.filearchiv-modal-footer {
padding: 15px 20px;
border-top: 1px solid #ddd;
display: flex;
justify-content: space-between;
align-items: center;
background: #f8f9fa;
border-radius: 0 0 8px 8px;
}
.filearchiv-category {
margin-bottom: 15px;
border: 1px solid #e0e0e0;
border-radius: 6px;
overflow: hidden;
}
.filearchiv-category-header {
padding: 12px 15px;
background: #f5f5f5;
cursor: pointer;
display: flex;
align-items: center;
gap: 10px;
font-weight: 600;
color: #333;
}
.filearchiv-category-header:hover {
background: #eee;
}
.filearchiv-category-header i {
width: 20px;
text-align: center;
}
.filearchiv-category-header .count {
margin-left: auto;
background: #007bff;
color: #fff;
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
}
.filearchiv-category-header .toggle-icon {
margin-left: 5px;
transition: transform 0.2s;
}
.filearchiv-category-body {
display: none;
padding: 10px 15px;
background: #fff;
}
.filearchiv-category.open .filearchiv-category-body {
display: block;
}
.filearchiv-category.open .toggle-icon {
transform: rotate(180deg);
}
.filearchiv-file-item {
display: flex;
align-items: center;
padding: 8px 10px;
border-bottom: 1px solid #f0f0f0;
gap: 10px;
}
.filearchiv-file-item:last-child {
border-bottom: none;
}
.filearchiv-file-item:hover {
background: #f8f9fa;
}
.filearchiv-file-item input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
.filearchiv-file-item .file-icon {
font-size: 20px;
width: 24px;
text-align: center;
}
.filearchiv-file-item .file-info {
flex: 1;
}
.filearchiv-file-item .file-name {
font-weight: 500;
color: #333;
word-break: break-word;
}
.filearchiv-file-item .file-meta {
font-size: 12px;
color: #888;
margin-top: 2px;
}
.filearchiv-file-item .file-source {
font-size: 11px;
color: #007bff;
background: #e7f3ff;
padding: 2px 6px;
border-radius: 3px;
}
.filearchiv-selected-count {
font-weight: 600;
color: #333;
}
.filearchiv-btn {
padding: 8px 16px;
border-radius: 4px;
border: none;
cursor: pointer;
font-size: 14px;
display: inline-flex;
align-items: center;
gap: 6px;
}
.filearchiv-btn-primary {
background: #007bff;
color: #fff;
}
.filearchiv-btn-primary:hover {
background: #0056b3;
}
.filearchiv-btn-primary:disabled {
background: #ccc;
cursor: not-allowed;
}
.filearchiv-btn-secondary {
background: #6c757d;
color: #fff;
}
.filearchiv-btn-secondary:hover {
background: #545b62;
}
.filearchiv-loading {
text-align: center;
padding: 40px;
color: #666;
}
.filearchiv-loading i {
font-size: 32px;
margin-bottom: 10px;
}
.filearchiv-empty {
text-align: center;
padding: 30px;
color: #888;
}