mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-11-14 14:48:24 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcae21c9fe |
No files matched your search
@@ -1,8 +1,7 @@
|
|||||||
name: Syntax Check
|
name: Syntax Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
php-syntax:
|
php-syntax:
|
||||||
|
|||||||
@@ -1,59 +1,6 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
// 0.9.7.18: Die parallele AJAX-Editor-Schicht ist absichtlich deaktiviert.
|
||||||
function restoreRunNowButtons() {
|
// Der NC Connector benutzt wieder ausschliesslich die vorhandenen
|
||||||
var section = document.getElementById('nc-connector');
|
// Piwigo-Formulare, die Tool-Registry und den WebDAV-Wizard.
|
||||||
if (!section) return;
|
|
||||||
|
|
||||||
var connectionCard = null;
|
|
||||||
var headings = section.querySelectorAll('h4');
|
|
||||||
for (var i = 0; i < headings.length; i++) {
|
|
||||||
if ((headings[i].textContent || '').trim() === 'Bestehende Verbindungen') {
|
|
||||||
connectionCard = headings[i].closest('.bratonien-card');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!connectionCard) return;
|
|
||||||
|
|
||||||
var details = connectionCard.querySelectorAll(':scope > details');
|
|
||||||
details.forEach(function (detail) {
|
|
||||||
var actions = detail.querySelector('.bratonien-actions');
|
|
||||||
if (!actions || actions.querySelector('[value="nc_connector_run_now"]')) return;
|
|
||||||
|
|
||||||
var connectionInput = detail.querySelector('input[name="connection_id"]');
|
|
||||||
var tokenInput = detail.querySelector('input[name="pwg_token"]');
|
|
||||||
if (!connectionInput || !tokenInput) return;
|
|
||||||
|
|
||||||
var form = document.createElement('form');
|
|
||||||
form.method = 'post';
|
|
||||||
|
|
||||||
var token = document.createElement('input');
|
|
||||||
token.type = 'hidden';
|
|
||||||
token.name = 'pwg_token';
|
|
||||||
token.value = tokenInput.value;
|
|
||||||
form.appendChild(token);
|
|
||||||
|
|
||||||
var connection = document.createElement('input');
|
|
||||||
connection.type = 'hidden';
|
|
||||||
connection.name = 'connection_id';
|
|
||||||
connection.value = connectionInput.value;
|
|
||||||
form.appendChild(connection);
|
|
||||||
|
|
||||||
var button = document.createElement('button');
|
|
||||||
button.className = 'buttonLike';
|
|
||||||
button.type = 'submit';
|
|
||||||
button.name = 'bratonien_tool';
|
|
||||||
button.value = 'nc_connector_run_now';
|
|
||||||
button.textContent = 'Jetzt abgleichen';
|
|
||||||
form.appendChild(button);
|
|
||||||
|
|
||||||
actions.insertBefore(form, actions.firstChild);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', restoreRunNowButtons);
|
|
||||||
} else {
|
|
||||||
restoreRunNowButtons();
|
|
||||||
}
|
|
||||||
})();
|
})();
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
Plugin Name: Bratonien Tools
|
Plugin Name: Bratonien Tools
|
||||||
Version: 0.9.7.19
|
Version: 0.9.7.18
|
||||||
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
||||||
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
||||||
Author: Bratonien
|
Author: Bratonien
|
||||||
|
|||||||
Reference in new issue
Block a user