';
}
/**
@@ -473,8 +473,8 @@ class Output
$noIcon = !empty($item['noicon']);
$link['class'] = $noIcon
- ? 'filetools-open'
- : 'filetools-open media mediafile mf_folder';
+ ? 'luxtools-open'
+ : 'luxtools-open media mediafile mf_folder';
$link['more'] .= ' data-path="' . hsc($path) . '"';
if ($conf['relnofollow']) $link['more'] .= ' rel="nofollow"';
diff --git a/_test/SyntaxTest.php b/_test/SyntaxTest.php
index 3f3dfed..20d757b 100644
--- a/_test/SyntaxTest.php
+++ b/_test/SyntaxTest.php
@@ -126,14 +126,14 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'div.filetools-plugin' => 1,
- 'div.filetools-plugin > ul' => 1,
- 'div.filetools-plugin > ul > li' => 3,
- 'div.filetools-plugin > ul > li:nth-child(1)' => 1,
- 'div.filetools-plugin > ul > li:nth-child(1) a' => 'example.txt',
- 'div.filetools-plugin > ul > li:nth-child(2) ul' => 1,
- 'div.filetools-plugin > ul > li:nth-child(2) ul > li' => 1,
- 'div.filetools-plugin > ul > li:nth-child(2) ul > li a' => 'example2.txt',
+ 'div.luxtools-plugin' => 1,
+ 'div.luxtools-plugin > ul' => 1,
+ 'div.luxtools-plugin > ul > li' => 3,
+ 'div.luxtools-plugin > ul > li:nth-child(1)' => 1,
+ 'div.luxtools-plugin > ul > li:nth-child(1) a' => 'example.txt',
+ 'div.luxtools-plugin > ul > li:nth-child(2) ul' => 1,
+ 'div.luxtools-plugin > ul > li:nth-child(2) ul > li' => 1,
+ 'div.luxtools-plugin > ul > li:nth-child(2) ul > li a' => 'example2.txt',
];
$this->structureCheck($doc, $structure);
@@ -153,14 +153,14 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'div.filetools-plugin' => 1,
- 'div.filetools-plugin > ol' => 1,
- 'div.filetools-plugin > ol > li' => 3,
- 'div.filetools-plugin > ol > li:nth-child(1)' => 1,
- 'div.filetools-plugin > ol > li:nth-child(1) a' => 'example.txt',
- 'div.filetools-plugin > ol > li:nth-child(2) ol' => 1,
- 'div.filetools-plugin > ol > li:nth-child(2) ol > li' => 1,
- 'div.filetools-plugin > ol > li:nth-child(2) ol > li a' => 'example2.txt',
+ 'div.luxtools-plugin' => 1,
+ 'div.luxtools-plugin > ol' => 1,
+ 'div.luxtools-plugin > ol > li' => 3,
+ 'div.luxtools-plugin > ol > li:nth-child(1)' => 1,
+ 'div.luxtools-plugin > ol > li:nth-child(1) a' => 'example.txt',
+ 'div.luxtools-plugin > ol > li:nth-child(2) ol' => 1,
+ 'div.luxtools-plugin > ol > li:nth-child(2) ol > li' => 1,
+ 'div.luxtools-plugin > ol > li:nth-child(2) ol > li a' => 'example2.txt',
];
$this->structureCheck($doc, $structure);
@@ -182,12 +182,12 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'div.filetools-plugin' => 1,
- 'div.filetools-plugin table' => 1,
- 'div.filetools-plugin table > tbody > tr' => 3,
- 'div.filetools-plugin table > tbody > tr:nth-child(1) a' => 'example.txt',
- 'div.filetools-plugin table > tbody > tr:nth-child(2) a' => 'exampledir/example2.txt',
- 'div.filetools-plugin table > tbody > tr:nth-child(3) a' => 'exampleimage.png',
+ 'div.luxtools-plugin' => 1,
+ 'div.luxtools-plugin table' => 1,
+ 'div.luxtools-plugin table > tbody > tr' => 3,
+ 'div.luxtools-plugin table > tbody > tr:nth-child(1) a' => 'example.txt',
+ 'div.luxtools-plugin table > tbody > tr:nth-child(2) a' => 'exampledir/example2.txt',
+ 'div.luxtools-plugin table > tbody > tr:nth-child(3) a' => 'exampleimage.png',
];
$this->structureCheck($doc, $structure);
@@ -201,7 +201,7 @@ class plugin_luxtools_test extends DokuWikiTest
$doc = new Document();
$doc->html($xhtml);
- $style = (string)$doc->find('div.filetools-plugin')->attr('style');
+ $style = (string)$doc->find('div.luxtools-plugin')->attr('style');
$this->assertStringContainsString('max-height: 500px', $style);
$this->assertStringContainsString('overflow-y: auto', $style);
@@ -215,7 +215,7 @@ class plugin_luxtools_test extends DokuWikiTest
$doc = new Document();
$doc->html($xhtml);
- $style = $doc->find('div.filetools-plugin')->attr('style');
+ $style = $doc->find('div.luxtools-plugin')->attr('style');
$this->assertTrue($style === null || $style === '');
}
@@ -232,9 +232,9 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'div.filetools-plugin.filetools-gallery' => 1,
- 'div.filetools-plugin.filetools-gallery a' => 1,
- 'div.filetools-plugin.filetools-gallery img' => 1,
+ 'div.luxtools-plugin.luxtools-gallery' => 1,
+ 'div.luxtools-plugin.luxtools-gallery a' => 1,
+ 'div.luxtools-plugin.luxtools-gallery img' => 1,
];
$this->structureCheck($doc, $structure);
@@ -256,7 +256,7 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'button.filetools-open' => 1,
+ 'button.luxtools-open' => 1,
];
$this->structureCheck($doc, $structure);
@@ -277,10 +277,10 @@ class plugin_luxtools_test extends DokuWikiTest
$doc->html($xhtml);
$structure = [
- 'div.filetools-plugin' => 1,
- 'div.filetools-plugin table' => 1,
- 'div.filetools-plugin table > tbody > tr' => 3,
- 'a.filetools-open' => 1,
+ 'div.luxtools-plugin' => 1,
+ 'div.luxtools-plugin table' => 1,
+ 'div.luxtools-plugin table > tbody > tr' => 3,
+ 'a.luxtools-open' => 1,
];
$this->structureCheck($doc, $structure);
diff --git a/conf/default.php b/conf/default.php
index 8d40d92..0be1507 100644
--- a/conf/default.php
+++ b/conf/default.php
@@ -1,7 +1,7 @@
...}}.
+// Local client service used by {{open>...}}.
$conf['open_service_url'] = 'http://127.0.0.1:8765';
$conf['open_service_token'] = '';
diff --git a/conf/metadata.php b/conf/metadata.php
index c3f09e2..a2069de 100644
--- a/conf/metadata.php
+++ b/conf/metadata.php
@@ -2,7 +2,7 @@
/**
* Metadata for configuration manager plugin
- * Additions for the filetools plugin
+ * Additions for the luxtools plugin
*
* @author Gina Haeussge
*/
diff --git a/lang/de/settings.php b/lang/de/settings.php
index 382fe98..4a6fbc1 100644
--- a/lang/de/settings.php
+++ b/lang/de/settings.php
@@ -6,5 +6,5 @@ $lang['thumb_placeholder'] = 'MediaManager-ID für den Platzhalter der Galerie-T
$lang['gallery_thumb_scale'] = 'Skalierungsfaktor für Galerie-Thumbnails. 2 erzeugt schärfere Thumbnails auf HiDPI-Displays (Anzeige bleibt 150×150).';
-$lang['open_service_url'] = 'URL des lokalen Öffner-Dienstes für {{open>...}} (z.B. http://127.0.0.1:8765).';
-$lang['open_service_token'] = 'Token für den lokalen Öffner-Dienst (X-Filetools-Token).';
+$lang['open_service_url'] = 'URL des lokalen Client-Dienstes für {{open>...}} (z.B. http://127.0.0.1:8765).';
+$lang['open_service_token'] = 'Token für den lokalen Client-Dienst (X-Luxtools-Token).';
diff --git a/lang/en/settings.php b/lang/en/settings.php
index a87722d..4e9b18c 100644
--- a/lang/en/settings.php
+++ b/lang/en/settings.php
@@ -8,5 +8,5 @@ $lang['thumb_placeholder'] = 'MediaManager ID for the gallery thumbnail placehol
$lang['gallery_thumb_scale'] = 'Gallery thumbnail scale factor. Use 2 for sharper thumbnails on HiDPI screens (still displayed as 150×150).';
-$lang['open_service_url'] = 'Local opener service URL for the {{open>...}} button (e.g. http://127.0.0.1:8765).';
-$lang['open_service_token'] = 'Token sent to the local opener service (X-Filetools-Token).';
+$lang['open_service_url'] = 'Local client service URL for the {{open>...}} button (e.g. http://127.0.0.1:8765).';
+$lang['open_service_token'] = 'Token sent to the local client service (X-Luxtools-Token).';
diff --git a/script.js b/script.js
index ebafb4c..0e8526d 100644
--- a/script.js
+++ b/script.js
@@ -4,7 +4,7 @@
'use strict';
function initGalleryThumbs() {
- var imgs = document.querySelectorAll('div.filetools-gallery img[data-thumb-src]');
+ var imgs = document.querySelectorAll('div.luxtools-gallery img[data-thumb-src]');
if (!imgs || !imgs.length) return;
function loadThumb(img) {
@@ -75,13 +75,13 @@
function openViaService(el, rawPath) {
var baseUrl = getServiceUrl(el);
- if (!baseUrl) return Promise.reject(new Error('No opener service configured'));
+ if (!baseUrl) return Promise.reject(new Error('No client service configured'));
var headers = {
'Content-Type': 'application/json'
};
var token = getServiceToken(el);
- if (token) headers['X-Filetools-Token'] = token;
+ if (token) headers['X-Luxtools-Token'] = token;
return window.fetch(baseUrl + '/open', {
method: 'POST',
@@ -131,12 +131,12 @@
function onClick(event) {
var el = event.target;
- if (!el || !el.classList || !el.classList.contains('filetools-open')) return;
+ if (!el || !el.classList || !el.classList.contains('luxtools-open')) return;
var raw = el.getAttribute('data-path') || '';
if (!raw) return;
- // Prefer local opener service.
+ // Prefer local client service.
openViaService(el, raw)
.catch(function (err) {
// If the browser blocks the request before it reaches localhost (mixed-content,
@@ -146,7 +146,7 @@
// Fallback to old behavior (often blocked in modern browsers).
var url = normalizeToFileUrl(raw);
if (!url) return;
- console.warn('Local opener service failed, falling back to file:// navigation:', err);
+ console.warn('Local client service failed, falling back to file:// navigation:', err);
try {
window.open(url, '_blank', 'noopener');
} catch (e) {
diff --git a/style.css b/style.css
index 6d6d175..d325b44 100644
--- a/style.css
+++ b/style.css
@@ -3,18 +3,18 @@
*/
/* DokuWiki often highlights rows on hover. Avoid highlighting header rows. */
-div.filetools-plugin table thead tr:hover > * {
+div.luxtools-plugin table thead tr:hover > * {
background-color: @ini_background_alt !important;
}
/* "Open Location" row above the header should be visually smaller. */
-div.filetools-plugin table thead tr.luxtools-openlocation-row td {
+div.luxtools-plugin table thead tr.luxtools-openlocation-row td {
font-size: 80%;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
-div.filetools-plugin table thead tr.luxtools-openlocation-row:hover td {
+div.luxtools-plugin table thead tr.luxtools-openlocation-row:hover td {
background-color: @ini_background !important;
}
@@ -25,24 +25,24 @@ div.filetools-plugin table thead tr.luxtools-openlocation-row:hover td {
* The relative URL is resolved against the plugin directory by DokuWiki's CSS
* aggregator, resulting in lib/images/fileicons/svg/folder.svg.
*/
-div.filetools-plugin a.media.mediafile.mf_folder,
-div.filetools-plugin a.mediafile.mf_folder {
+div.luxtools-plugin a.media.mediafile.mf_folder,
+div.luxtools-plugin a.mediafile.mf_folder {
background-image: url(../../images/fileicons/svg/folder.svg) !important;
}
/* Muted empty-state message when a listing has no results. */
-div.filetools-plugin .luxtools-empty {
+div.luxtools-plugin .luxtools-empty {
opacity: 0.65;
font-style: italic;
padding: 0.25em 0;
}
/* Image gallery spacing. */
-div.filetools-gallery {
+div.luxtools-gallery {
padding-bottom: 0.5em;
}
-div.filetools-gallery a.media {
+div.luxtools-gallery a.media {
display: inline-block;
margin: 0 0.35em 0.35em 0;
}
diff --git a/syntax.php b/syntax.php
index 8df6ac7..39cae89 100644
--- a/syntax.php
+++ b/syntax.php
@@ -18,7 +18,7 @@ class syntax_plugin_luxtools extends syntax_plugin_luxtools_files
}
/**
- * Compatibility alias for older codebases that referenced the legacy class name.
+ * Compatibility alias for older codebases that referenced the legacy FileTools class name.
*
* Note: plugin id/base is now `luxtools`.
*/
diff --git a/syntax/AbstractSyntax.php b/syntax/AbstractSyntax.php
index d3e9c8e..3367491 100644
--- a/syntax/AbstractSyntax.php
+++ b/syntax/AbstractSyntax.php
@@ -250,7 +250,7 @@ abstract class syntax_plugin_luxtools_abstract extends SyntaxPlugin
$text = (string)$this->getLang($langKey);
if ($renderer instanceof \Doku_Renderer_xhtml) {
- $renderer->doc .= '';
+ $renderer->doc .= '';
return;
}
diff --git a/syntax/open.php b/syntax/open.php
index 9c58b8d..9747a00 100644
--- a/syntax/open.php
+++ b/syntax/open.php
@@ -76,7 +76,7 @@ class syntax_plugin_luxtools_open extends SyntaxPlugin
$serviceUrl = trim((string)$this->getConf('open_service_url'));
$serviceToken = trim((string)$this->getConf('open_service_token'));
- $attrs = ' type="button" class="filetools-open"'
+ $attrs = ' type="button" class="luxtools-open"'
. ' data-path="' . hsc($path) . '"';
if ($serviceUrl !== '') {
$attrs .= ' data-service-url="' . hsc($serviceUrl) . '"';