Skip to content

v2.3.1#681

Merged
wenzhixin merged 8 commits into
masterfrom
develop
Feb 28, 2026
Merged

v2.3.1#681
wenzhixin merged 8 commits into
masterfrom
develop

Conversation

@wenzhixin

Copy link
Copy Markdown
Owner
  • Update: Replaced jQuery utilities with ES6+ alternatives.
  • Update: Fixed Bootstrap theme checkbox focus state outline being clipped.

Fixed bootstrap theme checkbox focus state outline being clipped
This PR refactors the codebase to replace jQuery utility methods with
modern ES6+ alternatives, making the code more idiomatic and maintainable.

Changes:
- Replace $.extend() with native extend() function
  * Uses proven implementation from bootstrap-table
  * Supports both shallow and deep merging
  * Maintains full jQuery API compatibility

- Replace $.each() with native for...of loops
  * More idiomatic ES6+ syntax
  * Better performance and readability

- Replace $.inArray() with Array.prototype.includes()
  * Simpler and more intuitive API

- Add extend() and isObject() utilities to src/utils/index.js
  * No separate compatibility layer needed
  * Consistent with existing code style

Benefits:
- More native JavaScript, less jQuery dependency
- Better performance with native methods
- Future-proof for jQuery 4.0+
- Cleaner, more maintainable code

All tests pass and lint checks are clean.
Refactor: Replace jQuery utilities with ES6+ alternatives
Fixes #677 - View source code not working after jQuery upgrade

Changes:
- Replace $.trim() with String.prototype.trim()
- Replace $.map() with Array.prototype.map()
- Replace $.each() with Array.prototype.forEach()
- Replace $.extend() with Object.assign()
- Replace $.param() with URLSearchParams implementation

This ensures compatibility with jQuery 4.0+ where utility methods
like $.trim() have been removed.

Files modified:
- site/website/static/js/template.js
- site/website/static/templates/refresh.html
Fix: Replace jQuery utilities with ES6+ in site templates
@wenzhixin wenzhixin merged commit 4ede221 into master Feb 28, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant