fix(options): no loading-spinner flash on options-page load (Prompt I)

Remove the show/hide around the init prepare() call in options.js; the
spinner keeps its display:none default and is only shown during a real
upload (onBeforeSend/onSuccess in BindUpload). Bump OPTIONS_JS_TOKEN to
20261124.4 so browsers fetch the changed options.js once.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-24 22:33:11 +01:00
commit daf3d93bb3
2 changed files with 6 additions and 5 deletions

View file

@ -694,10 +694,11 @@ $(function () {
return deferred.promise(); return deferred.promise();
}; };
$('.simple-template-edit-loading').css('display', 'block'); // THEME CHANGE (Prompt I): the spinner is NOT shown on page load — nothing
prepare().then(function (runsesolve) { // asynchronous is awaited here (the 650ms timeout existed only to flash it).
$('.simple-template-edit-loading').css('display', 'none'); // It is still shown during a real upload (onBeforeSend/onSuccess in BindUpload
}); // below); the element keeps its display:none default in options.twig.
prepare();
$('.selector__open_lightbox').on('click', function (e) { $('.selector__open_lightbox').on('click', function (e) {
e.preventDefault(); e.preventDefault();

View file

@ -43,7 +43,7 @@
heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control). heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control).
Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever
options/options.js changes, so every browser fetches the new file once. #} options/options.js changes, so every browser fetches the new file once. #}
{% set OPTIONS_JS_TOKEN = '20261124.3' %} {% set OPTIONS_JS_TOKEN = '20261124.4' %}
{{ unregisterScriptFile(optionsPath ~ '/options.js') }} {{ unregisterScriptFile(optionsPath ~ '/options.js') }}
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }} {{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}