自動採番プラグインのプラグインのjQuery削除#230
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the jQuery dependency from the autonum (auto-numbering) plugin's desktop.js and config.js, replacing jQuery DOM/event/AJAX-helper calls with native DOM APIs (document.querySelector, addEventListener, classList, style, closest, etc.). jsRender ($.templates) usage is intentionally kept. The manifest version is bumped accordingly.
Changes:
- Replace jQuery DOM/event calls in
desktop.js(alert popup creation) with native DOM APIs and drop thejQueryIIFE parameter. - Replace jQuery in
config.js(form value access, listeners, validation alerts, layout sizing, radio group handling) with native DOM APIs and drop thejQueryIIFE parameter. - Bump plugin version from
2.4.4to2.4.5.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| examples/autonum/manifest.json | Version bump to 2.4.5. |
| examples/autonum/js/desktop.js | Rewrites alertMessage popup construction with native DOM APIs; removes $ from IIFE. |
| examples/autonum/js/config.js | Migrates form/value/event/layout/radio operations to native DOM APIs; removes $ from IIFE (jsRender $.templates retained). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
レビューコメント1.
|
下部の保存・キャンセルボタンが動作しません
// 現在のコード(上部のボタンにだけイベントが登録される)
document.querySelector('button.plugin_submit').addEventListener('click', () => {
self.settingSave();
});
document.querySelector('button.plugin_cancel').addEventListener('click', () => {
history.back();
});
document.querySelectorAll('button.plugin_submit').forEach((btn) => {
btn.addEventListener('click', () => {
self.settingSave();
});
});
document.querySelectorAll('button.plugin_cancel').forEach((btn) => {
btn.addEventListener('click', () => {
history.back();
});
}); |
|
前回の指摘事項はすべて対応されていることを確認しました。 1点だけ残っています。
|
|
指摘事項の対応を確認しました。動作確認もOKです。 |
jsRender以外のjQueryをはがしました。