dolibarr.globalnotify/css/globalnotify.css
data b4a6f534ba fix: Auto-dismiss cron notifications for disabled jobs
- Add cleanupDisabledCronNotifications() method
- Automatically mark notifications as read when cronjob is disabled
- Fixes issue where "Cron-Job verpasst" kept reappearing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 12:09:42 +01:00

476 lines
8.7 KiB
CSS
Executable file

/**
* GlobalNotify CSS
* Floating messenger-style notification widget
*/
/* ============================================
FLOATING WIDGET CONTAINER
============================================ */
.globalnotify-widget {
position: fixed;
bottom: 20px;
left: 20px;
z-index: 99999;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* ============================================
FLOATING ACTION BUTTON (FAB)
============================================ */
.globalnotify-fab {
width: 50px;
height: 50px;
border-radius: 50%;
background: #6c757d; /* Dolibarr gray - no notifications */
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: grab;
box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
position: relative;
}
.globalnotify-fab:active {
cursor: grabbing;
}
.globalnotify-fab:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(108, 117, 125, 0.5);
}
/* Has notifications - red */
.globalnotify-fab-active {
background: #e74c3c;
box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}
.globalnotify-fab-active:hover {
box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}
.globalnotify-fab .fa-bell {
font-size: 20px;
}
/* Urgent state - pulsing red */
.globalnotify-fab-urgent {
animation: globalnotify-pulse 2s infinite;
background: #c0392b;
box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}
.globalnotify-fab-urgent:hover {
box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}
@keyframes globalnotify-pulse {
0%, 100% {
box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}
50% {
box-shadow: 0 4px 25px rgba(231, 76, 60, 0.7), 0 0 0 8px rgba(231, 76, 60, 0.1);
}
}
/* New notification shake animation */
.globalnotify-fab-shake {
animation: globalnotify-shake 0.8s ease-in-out;
}
@keyframes globalnotify-shake {
0%, 100% { transform: rotate(0deg); }
10% { transform: rotate(-15deg); }
20% { transform: rotate(15deg); }
30% { transform: rotate(-15deg); }
40% { transform: rotate(15deg); }
50% { transform: rotate(-10deg); }
60% { transform: rotate(10deg); }
70% { transform: rotate(-5deg); }
80% { transform: rotate(5deg); }
90% { transform: rotate(0deg); }
}
/* Bounce animation for new notifications */
.globalnotify-fab-bounce {
animation: globalnotify-bounce 0.6s ease;
}
@keyframes globalnotify-bounce {
0% { transform: scale(1); }
30% { transform: scale(1.3); }
50% { transform: scale(0.9); }
70% { transform: scale(1.1); }
100% { transform: scale(1); }
}
/* Badge on FAB */
.globalnotify-fab-badge {
position: absolute;
top: -5px;
right: -5px;
background: #e74c3c;
color: white;
font-size: 11px;
font-weight: bold;
padding: 2px 6px;
border-radius: 10px;
min-width: 18px;
text-align: center;
border: 2px solid white;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* ============================================
FLOATING PANEL
============================================ */
.globalnotify-panel {
position: absolute;
bottom: 60px;
left: 0;
width: 360px;
max-height: 500px;
background: white;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
overflow: hidden;
display: flex;
flex-direction: column;
}
/* Panel Header - Dolibarr style */
.globalnotify-panel-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 15px;
background: #263c5c; /* Dolibarr dark blue */
color: white;
cursor: move;
user-select: none;
}
.globalnotify-panel-title {
font-weight: 600;
font-size: 14px;
}
.globalnotify-panel-actions {
display: flex;
gap: 10px;
}
.globalnotify-action-link {
cursor: pointer;
opacity: 0.8;
transition: opacity 0.2s;
padding: 4px;
}
.globalnotify-action-link:hover {
opacity: 1;
}
/* Panel Content Section */
.globalnotify-section {
flex: 1;
overflow-y: auto;
max-height: 300px;
}
/* Empty State */
.globalnotify-empty {
padding: 40px 20px;
text-align: center;
color: #999;
font-size: 14px;
}
.globalnotify-empty .fa {
font-size: 40px;
color: #27ae60;
margin-bottom: 10px;
}
/* ============================================
NOTIFICATION ITEMS
============================================ */
.globalnotify-item {
display: flex;
align-items: flex-start;
padding: 10px 12px;
border-bottom: 1px solid #f0f0f0;
transition: background-color 0.2s;
}
.globalnotify-item:hover {
background-color: #f8f9fa;
}
.globalnotify-item:last-child {
border-bottom: none;
}
/* Read items (history) */
.globalnotify-item-read {
opacity: 0.6;
background-color: #fafafa;
}
.globalnotify-item-read:hover {
opacity: 0.8;
}
/* Checkbox column */
.globalnotify-checkbox {
width: 24px;
flex-shrink: 0;
cursor: pointer;
padding-top: 2px;
}
.globalnotify-unchecked {
color: #ccc;
font-size: 16px;
}
.globalnotify-checked {
color: #27ae60;
font-size: 16px;
}
.globalnotify-checkbox:hover .globalnotify-unchecked {
color: #27ae60;
}
/* Item content */
.globalnotify-item-content {
flex: 1;
display: flex;
min-width: 0;
}
.globalnotify-clickable {
cursor: pointer;
}
.globalnotify-clickable:hover .globalnotify-item-title {
color: #667eea;
}
/* Item icon */
.globalnotify-item-icon {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 10px;
font-size: 12px;
}
.globalnotify-item-error .globalnotify-item-icon {
background-color: #fdeaea;
color: #e74c3c;
}
.globalnotify-item-warning .globalnotify-item-icon {
background-color: #fef5e7;
color: #f39c12;
}
.globalnotify-item-info .globalnotify-item-icon {
background-color: #eaf2f8;
color: #3498db;
}
.globalnotify-item-success .globalnotify-item-icon {
background-color: #e8f8f0;
color: #27ae60;
}
.globalnotify-item-action .globalnotify-item-icon {
background-color: #f4ecf7;
color: #9b59b6;
}
/* Item text */
.globalnotify-item-text {
flex: 1;
min-width: 0;
}
.globalnotify-item-title {
font-weight: 600;
font-size: 12px;
color: #333;
margin-bottom: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.globalnotify-item-message {
font-size: 11px;
color: #666;
line-height: 1.3;
margin-bottom: 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.globalnotify-item-meta {
display: flex;
gap: 8px;
align-items: center;
}
.globalnotify-module-tag {
background: #eee;
padding: 1px 5px;
border-radius: 3px;
font-size: 9px;
text-transform: uppercase;
color: #666;
}
.globalnotify-time {
font-size: 10px;
color: #999;
}
/* ============================================
HISTORY SECTION
============================================ */
.globalnotify-history-toggle {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 15px;
background: #f5f5f5;
border-top: 1px solid #eee;
cursor: pointer;
font-size: 12px;
color: #666;
transition: background-color 0.2s;
}
.globalnotify-history-toggle:hover {
background: #eee;
}
.globalnotify-history-toggle .fa-history {
margin-right: 6px;
}
.globalnotify-chevron {
transition: transform 0.3s;
}
.globalnotify-history-toggle.open .globalnotify-chevron {
transform: rotate(180deg);
}
.globalnotify-history {
max-height: 200px;
overflow-y: auto;
background: #fafafa;
display: none;
}
.globalnotify-history.open {
display: block;
}
/* ============================================
PANEL FOOTER
============================================ */
.globalnotify-panel-footer {
padding: 10px 15px;
background: #f8f9fa;
border-top: 1px solid #eee;
text-align: center;
}
.globalnotify-panel-footer a {
font-size: 12px;
color: #667eea;
text-decoration: none;
}
.globalnotify-panel-footer a:hover {
text-decoration: underline;
}
.globalnotify-panel-footer .fa-cog {
margin-right: 5px;
}
/* ============================================
RESPONSIVE
============================================ */
@media (max-width: 480px) {
.globalnotify-panel {
width: calc(100vw - 40px);
max-width: 360px;
}
}
/* ============================================
DARK MODE SUPPORT
============================================ */
@media (prefers-color-scheme: dark) {
.globalnotify-panel {
background: #2d2d2d;
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.globalnotify-item {
border-color: #444;
}
.globalnotify-item:hover {
background-color: #383838;
}
.globalnotify-item-read {
background-color: #333;
}
.globalnotify-item-title {
color: #eee;
}
.globalnotify-item-message {
color: #aaa;
}
.globalnotify-empty {
color: #888;
}
.globalnotify-history-toggle {
background: #333;
border-color: #444;
color: #aaa;
}
.globalnotify-history-toggle:hover {
background: #3a3a3a;
}
.globalnotify-history {
background: #2a2a2a;
}
.globalnotify-panel-footer {
background: #333;
border-color: #444;
}
}