Initial commit: Grav CMS setup with HTML reference material

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 23:38:26 +02:00
commit a9be15caf3
2261 changed files with 418989 additions and 0 deletions
@@ -0,0 +1,42 @@
import $ from 'jquery';
import { translations } from 'grav-config';
import request from '../utils/request';
import { Instances as Charts } from './chart';
$('[data-backup][data-ajax*="backup/"]').on('click', function() {
let element = $(this);
let url = element.data('ajax');
const inDropdown = element.closest('.dropdown-menu');
(inDropdown.length ? inDropdown : element)
.closest('.button-group').find('> button:first')
.attr('disabled', 'disabled')
.find('> .fa').removeClass('fa-life-ring').addClass('fa-spin fa-refresh');
request(url, (/* response */) => {
if (Charts && Charts.backups) {
Charts.backups.updateData({ series: [0, 100] });
Charts.backups.element.find('.numeric').html(`0 <em>${translations.PLUGIN_ADMIN.DAYS.toLowerCase()}</em>`);
}
(inDropdown.length ? inDropdown : element)
.closest('.button-group').find('> button:first')
.removeAttr('disabled')
.find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-life-ring');
});
});
$('[data-backup][data-ajax*="backupDelete"]').on('click', function() {
let element = $(this);
let url = element.data('ajax');
const tr = element.closest('tr');
tr.addClass('deleting');
request(url, (response) => {
if (response.status === 'success') {
tr.remove();
} else {
tr.removeClass('deleting');
}
});
});