refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Reference-style paid download resource editor for the front submit page.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -78,21 +78,21 @@
|
||||
}
|
||||
|
||||
root.setAttribute('data-pay-download-ready', '1');
|
||||
var cfg = window.aksrtSubmitData || {};
|
||||
var cfg = window.jioSubmitData || {};
|
||||
var i18n = cfg.i18n || {};
|
||||
var activeItem = null;
|
||||
var previousFocus = null;
|
||||
var modal = document.createElement('div');
|
||||
modal.className = 'aksrt-editor-media pay-dawnload-edit-modal';
|
||||
modal.className = 'jio-editor-media pay-dawnload-edit-modal';
|
||||
modal.hidden = true;
|
||||
modal.innerHTML =
|
||||
'<button type="button" class="aksrt-editor-media__backdrop" data-pay-download-close tabindex="-1" aria-label="' +
|
||||
'<button type="button" class="jio-editor-media__backdrop" data-pay-download-close tabindex="-1" aria-label="' +
|
||||
escapeHtml(i18n.close || '关闭') + '"></button>' +
|
||||
'<div class="aksrt-editor-media__dialog" role="dialog" aria-modal="true" aria-labelledby="aksrt-pay-download-title" tabindex="-1">' +
|
||||
'<button type="button" class="aksrt-editor-media__close" data-pay-download-close aria-label="' +
|
||||
'<div class="jio-editor-media__dialog" role="dialog" aria-modal="true" aria-labelledby="jio-pay-download-title" tabindex="-1">' +
|
||||
'<button type="button" class="jio-editor-media__close" data-pay-download-close aria-label="' +
|
||||
escapeHtml(i18n.close || '关闭') + '">×</button>' +
|
||||
'<div class="pay-dawnload-edit-content">' +
|
||||
'<div class="mb20"><b class="modal-title flex ac"><span class="toggle-radius mr10 b-theme"><i class="fa fas fa-download" aria-hidden="true"></i></span><span id="aksrt-pay-download-title" data-pay-download-title></span></b></div>' +
|
||||
'<div class="mb20"><b class="modal-title flex ac"><span class="toggle-radius mr10 b-theme"><i class="fa fas fa-download" aria-hidden="true"></i></span><span id="jio-pay-download-title" data-pay-download-title></span></b></div>' +
|
||||
'<div class="mini-scrollbar scroll-y max-vh7 pay-dawnload-edit-fields">' +
|
||||
'<div class="mb20"><div class="muted-color mb6">' + escapeHtml(i18n.downloadUrl || '下载地址') + '</div>' +
|
||||
'<div class="flex ac pay-dawnload-url-row"><input type="url" class="form-control" data-pay-resource-field="url" placeholder="' + escapeHtml(i18n.enterDownloadUrl || '请输入资源下载地址') + '">' +
|
||||
@@ -116,7 +116,7 @@
|
||||
'</div>';
|
||||
document.body.appendChild(modal);
|
||||
|
||||
var dialog = modal.querySelector('.aksrt-editor-media__dialog');
|
||||
var dialog = modal.querySelector('.jio-editor-media__dialog');
|
||||
var title = modal.querySelector('[data-pay-download-title]');
|
||||
var actions = modal.querySelector('[data-pay-download-actions]');
|
||||
var uploadButton = modal.querySelector('[data-pay-resource-upload]');
|
||||
@@ -151,7 +151,7 @@
|
||||
list.querySelectorAll('[data-pay-download-item]').forEach(function (item, index) {
|
||||
item.querySelectorAll('[data-pay-download-field]').forEach(function (input) {
|
||||
var field = input.getAttribute('data-pay-download-field');
|
||||
input.name = 'aksrt_pay[downloads][' + index + '][' + field + ']';
|
||||
input.name = 'jio_pay[downloads][' + index + '][' + field + ']';
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
function closeModal() {
|
||||
modal.hidden = true;
|
||||
document.body.classList.remove('aksrt-editor-media-open');
|
||||
document.body.classList.remove('jio-editor-media-open');
|
||||
if (previousFocus && typeof previousFocus.focus === 'function') {
|
||||
previousFocus.focus();
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
setButtonClass(inputMap.class.value);
|
||||
syncActions();
|
||||
modal.hidden = false;
|
||||
document.body.classList.add('aksrt-editor-media-open');
|
||||
document.body.classList.add('jio-editor-media-open');
|
||||
dialog.focus();
|
||||
}
|
||||
|
||||
@@ -268,14 +268,14 @@
|
||||
syncActions();
|
||||
});
|
||||
|
||||
var canUseMediaPicker = !!(window.AksrtSubmitMedia && typeof window.AksrtSubmitMedia.open === 'function');
|
||||
var canUseMediaPicker = !!(window.JioSubmitMedia && typeof window.JioSubmitMedia.open === 'function');
|
||||
uploadButton.hidden = false;
|
||||
uploadButton.addEventListener('click', function () {
|
||||
if (!canUseMediaPicker) {
|
||||
notify(i18n.mediaPickerUnavailable || '媒体选择器加载失败,请刷新页面后重试', 'danger');
|
||||
return;
|
||||
}
|
||||
window.AksrtSubmitMedia.open({
|
||||
window.JioSubmitMedia.open({
|
||||
type: 'file',
|
||||
multiple: false,
|
||||
allowExternal: false,
|
||||
@@ -284,7 +284,7 @@
|
||||
inputMap.url.value = item.url || '';
|
||||
inputMap.attachment_id.value = String(item.attachment_id || item.id || 0);
|
||||
syncActions();
|
||||
notify(i18n.uploaded || '附件上传成功', 'success', 5, 'aksrt-front-submit-resource-upload-toast');
|
||||
notify(i18n.uploaded || '附件上传成功', 'success', 5, 'jio-front-submit-resource-upload-toast');
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -297,5 +297,5 @@
|
||||
reindex();
|
||||
}
|
||||
|
||||
window.aksrtSubmitPayDownloads = { init: init };
|
||||
window.jioSubmitPayDownloads = { init: init };
|
||||
})();
|
||||
Reference in new issue
Block a user