Refactor admin page
This commit is contained in:
3
admin.svg
Normal file
3
admin.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path fill="none" fill-opacity="0" stroke="#6c387d" stroke-width="1.9208228" d="M2.516 2.398l19.053.002-.003 19.054-19.053-.003zm12.5 18.659v-5.708M21.55 9.01H9.077M2.88 15.076h18.417M9.075 2.187v12.896M2.385 2.242l19.253.003-.003 19.264-19.253-.003z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 289 B |
127
admin/main.php
127
admin/main.php
@@ -13,8 +13,20 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
'paths',
|
||||
'scratchpad_paths',
|
||||
'allow_in_comments',
|
||||
'defaults',
|
||||
'extensions',
|
||||
'default_sort',
|
||||
'default_order',
|
||||
'default_style',
|
||||
'default_tableheader',
|
||||
'default_foldersfirst',
|
||||
'default_recursive',
|
||||
'default_titlefile',
|
||||
'default_cache',
|
||||
'default_randlinks',
|
||||
'default_showsize',
|
||||
'default_showdate',
|
||||
'default_listsep',
|
||||
'default_maxheight',
|
||||
'thumb_placeholder',
|
||||
'gallery_thumb_scale',
|
||||
'open_service_url',
|
||||
@@ -58,8 +70,22 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
$newConf['scratchpad_paths'] = $scratchpadPaths;
|
||||
|
||||
$newConf['allow_in_comments'] = (int)$INPUT->bool('allow_in_comments');
|
||||
$newConf['defaults'] = $INPUT->str('defaults');
|
||||
$newConf['extensions'] = $INPUT->str('extensions');
|
||||
|
||||
$newConf['default_sort'] = $INPUT->str('default_sort');
|
||||
$newConf['default_order'] = $INPUT->str('default_order');
|
||||
$newConf['default_style'] = $INPUT->str('default_style');
|
||||
$newConf['default_tableheader'] = (int)$INPUT->bool('default_tableheader');
|
||||
$newConf['default_foldersfirst'] = (int)$INPUT->bool('default_foldersfirst');
|
||||
$newConf['default_recursive'] = (int)$INPUT->bool('default_recursive');
|
||||
$newConf['default_titlefile'] = $INPUT->str('default_titlefile');
|
||||
$newConf['default_cache'] = (int)$INPUT->bool('default_cache');
|
||||
$newConf['default_randlinks'] = (int)$INPUT->bool('default_randlinks');
|
||||
$newConf['default_showsize'] = (int)$INPUT->bool('default_showsize');
|
||||
$newConf['default_showdate'] = (int)$INPUT->bool('default_showdate');
|
||||
$newConf['default_listsep'] = $INPUT->str('default_listsep');
|
||||
$newConf['default_maxheight'] = $INPUT->str('default_maxheight');
|
||||
|
||||
$newConf['thumb_placeholder'] = $INPUT->str('thumb_placeholder');
|
||||
$newConf['gallery_thumb_scale'] = $INPUT->str('gallery_thumb_scale');
|
||||
$newConf['open_service_url'] = $INPUT->str('open_service_url');
|
||||
@@ -106,16 +132,103 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
echo '<input type="checkbox" name="allow_in_comments" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// defaults
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('defaults')) . '</span> ';
|
||||
echo '<input type="text" class="edit" name="defaults" value="' . hsc((string)$this->getConf('defaults')) . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
// extensions
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('extensions')) . '</span> ';
|
||||
echo '<input type="text" class="edit" name="extensions" value="' . hsc((string)$this->getConf('extensions')) . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
echo '<h2>' . hsc($this->getLang('listing_defaults')) . '</h2>';
|
||||
|
||||
// default_sort
|
||||
$defaultSort = (string)$this->getConf('default_sort');
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_sort')) . '</span>';
|
||||
echo '<select name="default_sort" class="edit">';
|
||||
foreach (['name', 'iname', 'ctime', 'mtime', 'size'] as $opt) {
|
||||
$sel = ($defaultSort === $opt) ? ' selected="selected"' : '';
|
||||
echo '<option value="' . hsc($opt) . '"' . $sel . '>' . hsc($opt) . '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_order
|
||||
$defaultOrder = (string)$this->getConf('default_order');
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_order')) . '</span>';
|
||||
echo '<select name="default_order" class="edit">';
|
||||
foreach (['asc', 'desc'] as $opt) {
|
||||
$sel = ($defaultOrder === $opt) ? ' selected="selected"' : '';
|
||||
echo '<option value="' . hsc($opt) . '"' . $sel . '>' . hsc($opt) . '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_style
|
||||
$defaultStyle = (string)$this->getConf('default_style');
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_style')) . '</span>';
|
||||
echo '<select name="default_style" class="edit">';
|
||||
foreach (['list', 'olist', 'table'] as $opt) {
|
||||
$sel = ($defaultStyle === $opt) ? ' selected="selected"' : '';
|
||||
echo '<option value="' . hsc($opt) . '"' . $sel . '>' . hsc($opt) . '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_tableheader
|
||||
$checked = $this->getConf('default_tableheader') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_tableheader')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_tableheader" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_foldersfirst
|
||||
$checked = $this->getConf('default_foldersfirst') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_foldersfirst')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_foldersfirst" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_recursive
|
||||
$checked = $this->getConf('default_recursive') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_recursive')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_recursive" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_titlefile
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_titlefile')) . '</span>';
|
||||
echo '<input type="text" class="edit" name="default_titlefile" value="' . hsc((string)$this->getConf('default_titlefile')) . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_cache
|
||||
$checked = $this->getConf('default_cache') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_cache')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_cache" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_randlinks
|
||||
$checked = $this->getConf('default_randlinks') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_randlinks')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_randlinks" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_showsize
|
||||
$checked = $this->getConf('default_showsize') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_showsize')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_showsize" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_showdate
|
||||
$checked = $this->getConf('default_showdate') ? ' checked="checked"' : '';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_showdate')) . '</span> ';
|
||||
echo '<input type="checkbox" name="default_showdate" value="1"' . $checked . ' />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_listsep
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_listsep')) . '</span>';
|
||||
echo '<input type="text" class="edit" name="default_listsep" value="' . hsc((string)$this->getConf('default_listsep')) . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
// default_maxheight
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('default_maxheight')) . '</span>';
|
||||
echo '<input type="number" class="edit" name="default_maxheight" value="' . hsc((string)$this->getConf('default_maxheight')) . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
// thumb_placeholder
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('thumb_placeholder')) . '</span> ';
|
||||
echo '<input type="text" class="edit" name="thumb_placeholder" value="' . hsc((string)$this->getConf('thumb_placeholder')) . '" />';
|
||||
|
||||
@@ -7,9 +7,25 @@
|
||||
$conf['paths'] = '';
|
||||
$conf['scratchpad_paths'] = '';
|
||||
$conf['allow_in_comments'] = 0;
|
||||
// Legacy (advanced): additional default flags in the same syntax as inline options.
|
||||
$conf['defaults'] = '';
|
||||
$conf['extensions'] = '';
|
||||
|
||||
// Listing defaults (applied to files/images/directory unless overridden inline)
|
||||
$conf['default_sort'] = 'name'; // name|iname|ctime|mtime|size
|
||||
$conf['default_order'] = 'asc'; // asc|desc
|
||||
$conf['default_style'] = 'list'; // list|olist|table
|
||||
$conf['default_tableheader'] = 0; // 0|1
|
||||
$conf['default_foldersfirst'] = 0; // 0|1
|
||||
$conf['default_recursive'] = 0; // 0|1
|
||||
$conf['default_titlefile'] = '_title.txt';
|
||||
$conf['default_cache'] = 0; // 0|1
|
||||
$conf['default_randlinks'] = 0; // 0|1
|
||||
$conf['default_showsize'] = 0; // 0|1
|
||||
$conf['default_showdate'] = 0; // 0|1
|
||||
$conf['default_listsep'] = ', ';
|
||||
$conf['default_maxheight'] = 500; // -1 disables scroll container
|
||||
|
||||
// MediaManager ID for gallery thumbnail placeholder
|
||||
$conf['thumb_placeholder'] = ':wiki:thumb-placeholder.png';
|
||||
|
||||
|
||||
@@ -29,8 +29,24 @@ $lang['err_security'] = 'Sicherheits-Token ungültig. Bitte erneut versuchen.';
|
||||
$lang['paths'] = 'Erlaubte Basis-Pfade (eine pro Zeile). Optional: Pfad mit A>-Alias ergaenzen.';
|
||||
$lang['scratchpad_paths'] = 'Scratchpad-Dateien (eine pro Zeile). Jeder Dateipfad muss eine Erweiterung enthalten. Mit einer folgenden A>-Zeile wird der Pad-Name gesetzt, der im Wiki verwendet wird.';
|
||||
$lang['allow_in_comments'] = 'luxtools-Syntax (files/images/directory/scratchpad) in Kommentaren erlauben.';
|
||||
$lang['defaults'] = 'Standardoptionen (gleiche Syntax wie bei Inline-Konfiguration).';
|
||||
$lang['extensions'] = 'Kommagetrennte Liste erlaubter Dateiendungen.';
|
||||
|
||||
$lang['listing_defaults'] = 'Listen-Standardwerte';
|
||||
$lang['default_sort'] = 'Standard-Sortierschlüssel (name|iname|ctime|mtime|size).';
|
||||
$lang['default_order'] = 'Standard-Sortierreihenfolge (asc|desc).';
|
||||
$lang['default_style'] = 'Standard-Ausgabeformat (list|olist|table).';
|
||||
$lang['default_tableheader'] = 'Tabellenkopf standardmäßig anzeigen.';
|
||||
$lang['default_foldersfirst'] = 'Ordner standardmäßig vor Dateien sortieren.';
|
||||
$lang['default_recursive'] = 'Unterverzeichnisse standardmäßig einbeziehen.';
|
||||
$lang['default_titlefile'] = 'Standard-Name der Titeldatei (z.B. _title.txt).';
|
||||
$lang['default_cache'] = 'Seiten-Caching standardmäßig aktivieren (0 deaktiviert Caching).';
|
||||
$lang['default_randlinks'] = 'Standardmäßig Cache-Busting-Parameter auf Basis mtime hinzufügen.';
|
||||
$lang['default_showsize'] = 'Dateigröße standardmäßig anzeigen (falls unterstützt).';
|
||||
$lang['default_showdate'] = 'Änderungsdatum standardmäßig anzeigen (falls unterstützt).';
|
||||
$lang['default_listsep'] = 'Standard-Trennzeichen für Listenausgabe (z.B. ", ").';
|
||||
$lang['default_maxheight'] = 'Standard max-height in px für Scroll-Container (-1 deaktiviert).';
|
||||
|
||||
$lang['defaults'] = 'Legacy-Standardoptionen (fortgeschritten). Vorhandene Werte werden weiterhin berücksichtigt, sind aber nicht mehr über die UI konfigurierbar.';
|
||||
$lang['thumb_placeholder'] = 'MediaManager-ID für den Platzhalter der Galerie-Thumbnails.';
|
||||
$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 Client-Dienstes für {{open>...}} (z.B. http://127.0.0.1:8765).';
|
||||
|
||||
@@ -3,9 +3,25 @@
|
||||
$lang["paths"] = "Erlaubte Basis-Pfade (eine pro Zeile). Optional: Pfad mit A>-Alias ergaenzen.";
|
||||
$lang["scratchpad_paths"] = "Scratchpad-Dateien (eine pro Zeile). Jeder Dateipfad muss eine Erweiterung enthalten. Mit einer folgenden A>-Zeile wird der Pad-Name gesetzt, der im Wiki verwendet wird.";
|
||||
$lang["allow_in_comments"] = "luxtools-Syntax (files/images/directory/scratchpad) in Kommentaren erlauben.";
|
||||
$lang["defaults"] = "Standardoptionen (gleiche Syntax wie bei Inline-Konfiguration).";
|
||||
$lang["extensions"] = "Kommagetrennte Liste erlaubter Dateiendungen.";
|
||||
|
||||
$lang["listing_defaults"] = "Listen-Standardwerte";
|
||||
$lang["default_sort"] = "Standard-Sortierschlüssel (name|iname|ctime|mtime|size).";
|
||||
$lang["default_order"] = "Standard-Sortierreihenfolge (asc|desc).";
|
||||
$lang["default_style"] = "Standard-Ausgabeformat (list|olist|table).";
|
||||
$lang["default_tableheader"] = "Tabellenkopf standardmäßig anzeigen.";
|
||||
$lang["default_foldersfirst"] = "Ordner standardmäßig vor Dateien sortieren.";
|
||||
$lang["default_recursive"] = "Unterverzeichnisse standardmäßig einbeziehen.";
|
||||
$lang["default_titlefile"] = "Standard-Name der Titeldatei (z.B. _title.txt).";
|
||||
$lang["default_cache"] = "Seiten-Caching standardmäßig aktivieren (0 deaktiviert Caching).";
|
||||
$lang["default_randlinks"] = "Standardmäßig Cache-Busting-Parameter auf Basis mtime hinzufügen.";
|
||||
$lang["default_showsize"] = "Dateigröße standardmäßig anzeigen (falls unterstützt).";
|
||||
$lang["default_showdate"] = "Änderungsdatum standardmäßig anzeigen (falls unterstützt).";
|
||||
$lang["default_listsep"] = "Standard-Trennzeichen für Listenausgabe (z.B. \", \").";
|
||||
$lang["default_maxheight"] = "Standard max-height in px für Scroll-Container (-1 deaktiviert).";
|
||||
|
||||
$lang["defaults"] = "Legacy-Standardoptionen (fortgeschritten). Vorhandene Werte werden weiterhin berücksichtigt, sind aber nicht mehr über die UI konfigurierbar.";
|
||||
|
||||
$lang["thumb_placeholder"] = "MediaManager-ID fuer den Platzhalter der Galerie-Thumbnails.";
|
||||
|
||||
$lang["gallery_thumb_scale"] = "Skalierungsfaktor fuer Galerie-Thumbnails. 2 erzeugt schaerfere Thumbnails auf HiDPI-Displays (Anzeige bleibt 150x150).";
|
||||
|
||||
@@ -29,8 +29,24 @@ $lang['err_security'] = 'Security token mismatch. Please retry.';
|
||||
$lang['paths'] = 'Allowed base paths (one per line). Optional: follow a path with A> alias.';
|
||||
$lang['scratchpad_paths'] = 'Scratchpad files (one per line). Each file path must include the extension. Use a following A> line to set the pad name used in the wiki.';
|
||||
$lang['allow_in_comments'] = 'Whether to allow luxtools syntax (files/images/directory/scratchpad) to be used in comments.';
|
||||
$lang['defaults'] = 'Default options. Use the same syntax as in inline configuration.';
|
||||
$lang['extensions'] = 'Comma-separated list of allowed file extensions to list.';
|
||||
|
||||
$lang['listing_defaults'] = 'Listing defaults';
|
||||
$lang['default_sort'] = 'Default sort key (name|iname|ctime|mtime|size).';
|
||||
$lang['default_order'] = 'Default sort order (asc|desc).';
|
||||
$lang['default_style'] = 'Default output style (list|olist|table).';
|
||||
$lang['default_tableheader'] = 'Render table header row by default.';
|
||||
$lang['default_foldersfirst'] = 'Group folders before files by default.';
|
||||
$lang['default_recursive'] = 'Recurse into subdirectories by default.';
|
||||
$lang['default_titlefile'] = 'Default title file name (e.g. _title.txt).';
|
||||
$lang['default_cache'] = 'Enable page caching by default (0 disables caching).';
|
||||
$lang['default_randlinks'] = 'Add cache-busting query parameter based on mtime by default.';
|
||||
$lang['default_showsize'] = 'Show file size by default (where supported).';
|
||||
$lang['default_showdate'] = 'Show last modified date by default (where supported).';
|
||||
$lang['default_listsep'] = 'Default separator used in list-style rendering (e.g. ", ").';
|
||||
$lang['default_maxheight'] = 'Default max-height in px for scroll container (-1 disables).';
|
||||
|
||||
$lang['defaults'] = 'Legacy default options string (advanced). Existing values are still honored, but this is no longer configurable via the UI.';
|
||||
$lang['thumb_placeholder'] = 'MediaManager ID for the gallery thumbnail placeholder.';
|
||||
$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 client service URL for the {{open>...}} button (e.g. http://127.0.0.1:8765).';
|
||||
|
||||
@@ -3,9 +3,25 @@
|
||||
$lang['paths'] = 'Allowed base paths (one per line). Optional: follow a path with A> alias.';
|
||||
$lang['scratchpad_paths'] = 'Scratchpad files (one per line). Each file path must include the extension; use a following A> line to set the pad name used in the wiki.';
|
||||
$lang['allow_in_comments'] = 'Whether to allow luxtools syntax (files/images/directory/scratchpad) to be used in comments.';
|
||||
$lang['defaults'] = 'Default options. Use the same syntax as in inline configuration';
|
||||
$lang['extensions'] = 'Comma-separated list of allowed file extensions to list';
|
||||
|
||||
$lang['listing_defaults'] = 'Listing defaults';
|
||||
$lang['default_sort'] = 'Default sort key (name|iname|ctime|mtime|size).';
|
||||
$lang['default_order'] = 'Default sort order (asc|desc).';
|
||||
$lang['default_style'] = 'Default output style (list|olist|table).';
|
||||
$lang['default_tableheader'] = 'Render table header row by default.';
|
||||
$lang['default_foldersfirst'] = 'Group folders before files by default.';
|
||||
$lang['default_recursive'] = 'Recurse into subdirectories by default.';
|
||||
$lang['default_titlefile'] = 'Default title file name (e.g. _title.txt).';
|
||||
$lang['default_cache'] = 'Enable page caching by default (0 disables caching).';
|
||||
$lang['default_randlinks'] = 'Add cache-busting query parameter based on mtime by default.';
|
||||
$lang['default_showsize'] = 'Show file size by default (where supported).';
|
||||
$lang['default_showdate'] = 'Show last modified date by default (where supported).';
|
||||
$lang['default_listsep'] = 'Default separator used in list-style rendering (e.g. ", ").';
|
||||
$lang['default_maxheight'] = 'Default max-height in px for scroll container (-1 disables).';
|
||||
|
||||
$lang['defaults'] = 'Legacy default options string (advanced). Existing values are still honored, but this is no longer configurable via the UI.';
|
||||
|
||||
$lang['thumb_placeholder'] = 'MediaManager ID for the gallery thumbnail placeholder';
|
||||
|
||||
$lang['gallery_thumb_scale'] = 'Gallery thumbnail scale factor. Use 2 for sharper thumbnails on HiDPI screens (still displayed as 150×150).';
|
||||
|
||||
67
style.css
67
style.css
@@ -177,6 +177,73 @@ div.luxtools-scratchpad .luxtools-scratchpad-error {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Admin: settings page form layout */
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block > span {
|
||||
flex: 0 0 35%;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
padding-top: 0.2em;
|
||||
}
|
||||
|
||||
/* The admin page markup uses <br/> to create a new line; in this layout we keep
|
||||
* label + control in one row.
|
||||
*/
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block > br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form textarea.edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form input[type="text"].edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form input[type="number"].edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form select {
|
||||
flex: 1 1 auto;
|
||||
margin-left: auto;
|
||||
width: auto;
|
||||
max-width: 65%;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Dropdowns: don't stretch; size to content, but keep them on the right. */
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form select {
|
||||
flex: 0 0 auto;
|
||||
margin-left: 0;
|
||||
width: max-content;
|
||||
max-width: 65%;
|
||||
}
|
||||
|
||||
/* Checkbox controls: keep them in the control column, left-aligned. */
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block input[type="checkbox"] {
|
||||
margin-left: 0;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* On narrow screens, stack label and control to keep things readable. */
|
||||
@media (max-width: 600px) {
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form label.block > br {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form textarea.edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form input[type="text"].edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form input[type="number"].edit,
|
||||
div.plugin_luxtools_admin form.plugin_luxtools_admin_form select {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disable background scrolling while the lightbox is open. */
|
||||
html.luxtools-noscroll,
|
||||
html.luxtools-noscroll body {
|
||||
|
||||
@@ -163,26 +163,31 @@ abstract class syntax_plugin_luxtools_abstract extends SyntaxPlugin
|
||||
{
|
||||
// Base defaults shared by all handlers
|
||||
$baseDefaults = [
|
||||
'sort' => 'name',
|
||||
'order' => 'asc',
|
||||
'style' => 'list',
|
||||
'tableheader' => 0,
|
||||
'foldersfirst' => 0,
|
||||
'recursive' => 0,
|
||||
'titlefile' => '_title.txt',
|
||||
'cache' => 0,
|
||||
'randlinks' => 0,
|
||||
'showsize' => 0,
|
||||
'showdate' => 0,
|
||||
'listsep' => ', ',
|
||||
'maxheight' => 500,
|
||||
'sort' => (string)$this->getConf('default_sort'),
|
||||
'order' => (string)$this->getConf('default_order'),
|
||||
'style' => (string)$this->getConf('default_style'),
|
||||
'tableheader' => (int)$this->getConf('default_tableheader'),
|
||||
'foldersfirst' => (int)$this->getConf('default_foldersfirst'),
|
||||
'recursive' => (int)$this->getConf('default_recursive'),
|
||||
'titlefile' => (string)$this->getConf('default_titlefile'),
|
||||
'cache' => (int)$this->getConf('default_cache'),
|
||||
'randlinks' => (int)$this->getConf('default_randlinks'),
|
||||
'showsize' => (int)$this->getConf('default_showsize'),
|
||||
'showdate' => (int)$this->getConf('default_showdate'),
|
||||
'listsep' => (string)$this->getConf('default_listsep'),
|
||||
'maxheight' => (int)$this->getConf('default_maxheight'),
|
||||
];
|
||||
|
||||
// Merge with handler-specific defaults
|
||||
$params = array_merge($baseDefaults, $this->getDefaultParams());
|
||||
|
||||
// Load default config options and combine with provided flags
|
||||
$flags = $this->getConf('defaults') . '&' . $flags;
|
||||
// Legacy (advanced): allow additional default flags in the old combined string.
|
||||
// This is not exposed in the admin UI anymore, but existing installs may
|
||||
// still have it in conf/local.php.
|
||||
$legacyDefaults = trim((string)$this->getConf('defaults'));
|
||||
|
||||
// Combine default flags and provided flags.
|
||||
$flags = ($legacyDefaults !== '' ? ($legacyDefaults . '&') : '') . $flags;
|
||||
$flagList = explode('&', $flags);
|
||||
|
||||
foreach ($flagList as $flag) {
|
||||
|
||||
Reference in New Issue
Block a user