| '; + $html .= ' | '; + $html .= ' | ' . Text::_('COM_MOKOBACKUP_FIELD_EXCLUDE_DATA') . ' | '; + $html .= ''; + $html .= ' | ' . Text::_('COM_MOKOBACKUP_FIELD_EXCLUDE_STRUCTURE') . ' | '; $html .= '' . Text::_('COM_MOKOBACKUP_FIELD_TABLE_NAME') . ' | '; $html .= '
|---|---|---|---|---|---|
| '; + $html .= ' | '; + $html .= ' | '; + $html .= ' | '; + $html .= ' | '; $html .= ' | ' . $safeTable . ' | ';
$html .= '
- escape($item->description); ?>
+
+ escape($item->description); ?>
+
+ checksum)) : ?>
+ : checksum, 0, 16); ?>... + |
escape($item->profile_title ?? 'Profile #' . $item->profile_id); ?> @@ -130,13 +135,18 @@ $listDirn = $this->escape($this->state->get('list.direction')); | backupstart, Text::_('DATE_FORMAT_LC4')); ?> | -+ | status === 'complete' && $item->filesexist) : ?> + | id; ?> @@ -274,5 +284,58 @@ $listDirn = $this->escape($this->state->get('list.direction')); // Expose for toolbar button window.mokobackupStart = startSteppedBackup; + + // View Log modal handler + document.addEventListener('click', function(e) { + var btn = e.target.closest('.mb-view-log'); + if (!btn) return; + e.preventDefault(); + var recordId = btn.getAttribute('data-id'); + var modal = document.getElementById('mb-log-modal'); + var body = document.getElementById('mb-log-body'); + body.textContent = 'Loading...'; + modal.style.display = 'block'; + + var form = new URLSearchParams(); + form.append('task', 'ajax.viewLog'); + form.append('id', recordId); + form.append(TOKEN_NAME, '1'); + + fetch(AJAX_URL, { + method: 'POST', + body: form, + headers: { 'X-Requested-With': 'XMLHttpRequest' } + }) + .then(function(r) { return r.json(); }) + .then(function(data) { + if (data.error) { + body.textContent = data.message || 'Error loading log'; + } else { + body.textContent = data.log; + } + }) + .catch(function(err) { + body.textContent = 'Error: ' + err.message; + }); + }); + + document.addEventListener('click', function(e) { + if (e.target.id === 'mb-log-modal' || e.target.classList.contains('mb-log-close')) { + document.getElementById('mb-log-modal').style.display = 'none'; + } + }); })(); + + + diff --git a/src/script.php b/src/script.php index d5cc0001..d970bcdd 100644 --- a/src/script.php +++ b/src/script.php @@ -190,7 +190,7 @@ class Pkg_MokoBackupInstallerScript if ($updateSiteId > 0) { $editUrl = Route::_( - 'index.php?option=com_installer&view=updatesites&task=updatesite.edit&id=' . $updateSiteId + 'index.php?option=com_installer&view=updatesites&filter[search]=mokobackup' ); Factory::getApplication()->enqueueMessage( |