Журнал изменений

Журнал изменений

Фильтр и поиск

Всего: 1173 Доступных коммитов | Отфильтровано: 1173 Коммиты | Страница: 46 из 118
29.04.2026
Refactor: Migrate admin modules from htmlspecialchars() to safe-text template API
Автор: Eduard Laas | Дата: 14:01 29.04.2026

All manual htmlspecialchars() calls in admin module files are replaced by the new has_content_text / content_text, has_value_text / value_text, and has_field_text / field_text template slots. Escaping now happens inside the Mustache fragments at the output boundary instead of in PHP.

Core changes:

  1. admins.php:
  2. Cell content for name, title, lang columns uses has_content_text; the concatenated htmlspecialchars($name) after info-tooltip moves to a separate content_text slot with prefix_html for the tooltip

  3. blocks.php:
  4. filecode() form row for filename uses has_field_text / field_text
  5. database.php:
  6. getSqltable() cells for type, table, sql use has_content_text
  7. dump() alert for parse error passes raw $parsed['error'] without manual escaping; the alert fragment handles output encoding

  8. fields.php / replace.php:
  9. toggle_onclick replaced with toggle_target_id + is_toggle_block to wire the new button toggle; no htmlspecialchars changes (values are constants)

  10. groups.php:
  11. Tooltip + badge cell splits into prefix_html (tooltip) + content_html (badge); color_attr no longer manually escaped

  12. scheduler.php:
  13. nextr, stat, priority cells switch to has_content_text / content_text
  14. Title cell: info-tooltip moves to prefix_html, title text to content_text
  15. security.php:
  16. banlist() tooltip items for IP_CIDR and BANN_REAS use has_value_text
  17. Ban reason cell uses has_content_text
  18. config() textarea value_text for dump_skip loses manual htmlspecialchars

Benefits:

  • Removes ~20 htmlspecialchars() calls from PHP business logic
  • Escaping is now consistently enforced at template render time
  • Callers read cleaner: no ENT_QUOTES / ENT_SUBSTITUTE flags in PHP

Technical notes:

  • Template fragments updated in the preceding commit handle escaping via Mustache {{ }} (auto-escaped) vs {{{ }}} (raw HTML) distinction

Style: Update admin CSS — input hover, icon sizes, voting widget, toggle-form-block button
Автор: Eduard Laas | Дата: 14:00 29.04.2026

Admin stylesheet receives a broad visual consistency pass: icon sizes are unified, form element hover states are added, and new component styles are introduced for the voting widget and the toggle-form-block button.

Core changes:

  1. base.css:
  2. Global .bi rule sets font-size: 18px for all Bootstrap Icons
  3. Input/textarea/select get a :hover state: white background, blue-tinted border, subtle box-shadow; disabled inputs excluded

  4. Focus rule adds explicit border-color alongside the existing box-shadow
  5. theme.css — icon size unification (16px → 18px):
  6. sl-plus, sl-tip, sl-date/cat/views pseudo-elements, sl-monitor-head, sl-status-compact-left, sl-overview-icon-arr all updated to 18px

  7. theme.css — toggle-form-block button:
  8. New sl-toggle-form-block-toggle: inline-flex button, green when closed, red when open (.sl-is-open state); scales on hover/focus

  9. sl-toggle-form-block-title: flexbox layout with gap; title color updated
  10. sl-toggle-form-block-label: cursor:default, matching line-height
  11. Label colon suppressed inside toggle-form-block via :not() selector
  12. theme.css — row-actions trigger:
  13. New sl-row-actions-trigger: 18px inline-flex icon button, purple color, scale transform on hover; .bi inside inherits 18px

  14. theme.css — table layout:
  15. sl-col-status width reduced 64px → 52px; sl-col-actions 102px → 72px
  16. New fixed widths: sl-col-lang 58px, sl-col-module 88px
  17. th.sl-col-status / th.sl-col-actions padding tightened to 4px
  18. theme.css — voting widget (sl-vote-*):
  19. Full set of voting result styles: sl-vote-view, sl-vote-title, sl-vote-list, sl-vote-result, sl-vote-result-head, sl-vote-answer, sl-vote-result-meta, sl-vote-meter, sl-vote-progress

  20. Colour variants 1–5 via sl-vote-meter-N / sl-vote-progress-N
  21. theme.css — sl-tip refinement:
  22. Width/height 16px → 18px; font-size 15px → 18px; hover scale 1.08 → 1.12
  23. Inner div font-size: 14px / line-height: 16px for consistent tooltip text
  24. sl-plus open state shows minus icon via ::before content override

Benefits:

  • Visual consistency: all icons at 18px regardless of component context
  • Input hover feedback matches the rest of the SLAED UI pattern
  • Voting widget fully styleable without inline CSS

Technical notes:

  • .bi global rule in base.css takes precedence only where no component rule overrides; component rules that already set font-size are unchanged

Feature: Add new admin template fragments for voting, lists, and AJAX actions
Автор: Eduard Laas | Дата: 14:00 29.04.2026

Six new template fragments are introduced to support the voting admin redesign and to provide reusable list and AJAX-action primitives.

Core changes:

  1. comment-action-ajax.html (fragment):
  2. HTMX-powered action link with hx-get, hx-target, hx-swap attributes
  3. Supports class variants: is_favorite, is_button_blue, is_cart_plus, is_cart_minus; used as the Vote submit button in voting widget

  4. editor-action-menu.html (fragment):
  5. Alternative row-actions variant using bi icon as trigger span directly without the wrapper nav structure; kept for editor-specific contexts

  6. list-item.html (fragment):
  7. Minimal <li> wrapper supporting content_html and nested children_html
  8. list.html (fragment):
  9. Renders <ul> or <ol> with conditional class variants: sl-list, sl-sublist, sl-sublist-two, login-top (with logged state)

  10. voting-view.html (fragment):
  11. Single poll answer row: answer text, percentage, vote count, and a <meter> progress bar with colour variant class sl-vote-meter-N

  12. voting-widget.html (partial):
  13. Full voting widget section: title header, answer list, admin links, submit button, vote/comment footer links; wraps optional <form> tag

Benefits:

  • Voting result display fully template-driven, no HTML generation in PHP
  • List and action fragments reduce ad-hoc HTML in module files

Technical notes:

  • voting-widget.html replaces the HTML previously assembled in getVotingView() inside core/system.php

  • CSS for sl-vote-* classes is added in the accompanying style commit
Refactor: Redesign row-actions trigger as icon button; convert toggle-form-block to button toggle
Автор: Eduard Laas | Дата: 14:00 29.04.2026

Two admin UI patterns are updated to use semantically correct, accessible interactive elements and the new data-attribute toggle API.

Core changes:

  1. row-actions.html:
  2. Trigger element changes from <span class="sl-but-red">text</span> to <span class="sl-row-actions-trigger" role="button" tabindex="0"> wrapping a Bootstrap icon <i class="bi bi-menu-button-wide-fill">

  3. Label text moves to title and aria-label attributes for screen readers
  4. Visual label is now the icon only; text is available on hover/focus
  5. toggle-form-block.html:
  6. Block element gains data-sl-toggle and data-sl-toggle-default when is_toggle_block is true, enabling JS state tracking

  7. New toggle_target_id path: renders a <button class="sl-plus sl-toggle-form-block-toggle"> with data-sl-toggle-control pointing to the next block, replacing the previous toggle_onclick link pattern

  8. Existing toggle_onclick link path is preserved as legacy fallback
  9. Label is now wrapped in a <span class="sl-toggle-form-block-label"> for independent styling

Benefits:

  • Row action trigger is keyboard-navigable without inline onclick
  • Toggle button communicates expand/collapse semantics to assistive tech
  • Removes final toggle_onclick usages from active code paths

Technical notes:

  • toggle_onclick attribute still accepted but only for legacy callers; new callers must use toggle_target_id + is_toggle_block

  • CSS for sl-row-actions-trigger and sl-toggle-form-block-toggle added in the accompanying style commit

Feature: Extend admin fragment API with safe-text slots, prefix_html, is_col_title
Автор: Eduard Laas | Дата: 14:00 29.04.2026

Admin data-display fragments gain a safe-text rendering path so callers can pass raw PHP strings and let the template apply htmlspecialchars, instead of calling htmlspecialchars in PHP before passing content_html. This makes escaping responsibility explicit and template-side.

Core changes:

  1. table-cells.html:
  2. Add is_col_title class flag → outputs sl-col-title on th and td
  3. Add prefix_html slot rendered before content in each cell
  4. Add has_content_text / content_text: auto-escaped text path replacing manual htmlspecialchars in PHP callers

  5. th.html:
  6. Mirror is_col_title class support to header cells
  7. label.html:
  8. Add prefix_html slot (renders before label content)
  9. Add has_content_text / content_text safe-text path
  10. Existing content_html path preserved as fallback
  11. info-tooltip.html:
  12. Add has_value_text / value_text on tooltip items, escaping value server-side in template instead of in PHP

  13. div-row.html:
  14. Add has_field_text / field_text path for form rows that display plain text values; applies to both wrapped and unwrapped field variants

Benefits:

  • Removes htmlspecialchars() from PHP call sites; escaping is done once in the template layer at the correct output boundary

  • prefix_html enables tooltip + text combos without wrapper <span>

Technical notes:

  • All existing content_html paths remain fully backward-compatible
  • is_col_title maps to a new CSS class added in the accompanying style update
Refactor: Replace OnClick HideShow() with data-sl-toggle-* across all templates
Автор: Eduard Laas | Дата: 13:59 29.04.2026

Every inline OnClick="HideShow(...)" handler is removed from all Mustache templates (admin, default, lite, simple) and replaced with the declarative data-sl-toggle-control / data-sl-toggle-effect / data-sl-toggle-duration attributes consumed by slaed.js. No behaviour changes — only the binding mechanism moves from inline JS to data attributes.

Core changes:

  1. Admin partials (session-summary, block-sidebar, dashboard-panel):
  2. Replace all OnClick HideShow() with data-sl-toggle-control + effect attrs
  3. Admin fragment (image-preview):
  4. href changed from 'javascript: void(0);' to '#'
  5. toggle_onclick removed; data-sl-toggle-control/effect/duration added
  6. Popup span gains data-sl-toggle and data-sl-toggle-default="closed"
  7. Frontend templates (default / lite / simple):
  8. comment, forum-post, image-preview: same OnClick → data attribute migration
  9. account-profile, contact-block, login-nav, session-summary: same migration
  10. voting-home: span OnClick replaced with data-sl-toggle-control
  11. index.html (commented code): updated in place for consistency

Benefits:

  • Eliminates all inline JavaScript from template markup
  • Consistent toggle behaviour across admin and frontend themes
  • Works with htmx afterSwap hook added in the JS refactor

Technical notes:

  • toggle_onclick template variable is no longer consumed in image-preview
  • data-sl-toggle-default="closed" controls initial hidden state without JS
Refactor: Remove HideShow() global and add data-attribute animation to slaed.js
Автор: Eduard Laas | Дата: 13:59 29.04.2026

The legacy window.HideShow() function is removed in favour of a data-attribute-driven toggle API that keeps behaviour and animation effects fully declarative. Callers set data-sl-toggle-effect and data-sl-toggle-duration on the trigger element; the JS reads these on every event instead of relying on positional arguments baked into HTML.

Core changes:

  1. setToggleBlockState / setToggleBlock (slaed.js):
  2. Accept effect and duration as parameters instead of ignoring animation

    • 'slide' delegates to setSlideMotion(); 'puff' to setFadeScale()
    • plain toggle falls back to hidden/display as before
  3. event.preventDefault() now called on non-checkbox click triggers
  4. Toggle block initialisation (slaed.js):
  5. Read data-sl-toggle-default attribute ('open'/'closed') for initial state when no saved state is present

  6. window.HideShow removal (slaed.js):
  7. Global shim deleted; all call sites migrated to data-sl-toggle-control
  8. htmx afterSwap hook (slaed.js):
  9. setToggleBlocks() called after every HTMX content swap so dynamically injected toggle blocks are wired automatically

Benefits:

  • No inline JS in HTML required for animated toggles
  • Animation type is declarative and visible in markup, not hidden in PHP
  • Eliminates the last globally-scoped legacy function from slaed.js

Technical notes:

  • Backward compatibility: window.HideShow no longer exists; all call sites must be updated to data-sl-toggle-* attributes

  • No changes to the public toggle-state API (getToggleState/setToggleState)
28.04.2026
Refactor: Polish admin form inputs, alert callouts and debug stats fragment
Автор: Eduard Laas | Дата: 22:30 28.04.2026

Visual updates to admin theme styles and a new template fragment for the debug stats panel.

base.css

  • Soften default input/textarea/select look: lighter background (#fcfeff), softer border (#d6e2ea), updated text color (#59697a). Add transition for background, border and box-shadow on focus/hover

theme.css

  • Add .sl-debug-stats grid styling with .sl-debug-value tone variants (success/warn/danger) for the new debug-stats fragment

  • Restyle .sl-warn / .sl-info callouts: larger icon area (32px, vertically centered via transform), wider left padding (60px), min-height 40px

  • Replace the single 2px progress bar in .sl-alert-flash-bar with a top+bottom hairline pattern using currentColor; warn flash uses orange (#d68a2d), default success uses green (#37a957)

  • Add gradient hairline under the admin login header (was a flat #e3edf3 line)

templates/admin/fragments/debug-stats.html

  • New fragment that renders the system debug summary as a definition list (CPU load, memory use, timestamp), replacing the previous ad-hoc inline markup. Driven by tone flags (cpu_is_/mem_is_) consistent with the rest of the admin template vocabulary

Chore: Rotate site key and refresh config fingerprint
Автор: Eduard Laas | Дата: 22:28 28.04.2026
Chore: Update config fingerprint and site key/variables
Автор: Eduard Laas | Дата: 14:35 28.04.2026

Routine config update reflecting changed site settings and a refreshed base fingerprint after template and asset changes in this sprint.

Core changes:

  1. config/global.php:
  2. Updated sitekey to new value
  3. Updated variables bitmask
  4. config/local.php:
  5. Updated base_fingerprint hash

Benefits:

  • Config state reflects current codebase revision
  • Fingerprint ensures cache invalidation for changed assets

Technical notes:

  • base_fingerprint is auto-derived from asset checksums
  • variables bitmask controls enabled site feature flags

Страница 46 из 118. Всего: 1173

1 41 42 43 44 45 46 47 48 49 50 118
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код

Предварительный просмотр