Browse Source

add option: enabled hover on opener

pull/32/head
Simon Vieille 9 months ago
parent
commit
a6e789c859
Signed by: deblan GPG Key ID: 03383D15A1D31745
3 changed files with 31 additions and 13 deletions
  1. +1
    -0
      lib/Settings/Admin.php
  2. +1
    -0
      src/admin.js
  3. +29
    -13
      templates/settings/admin-form.php

+ 1
- 0
lib/Settings/Admin.php View File

@ -54,6 +54,7 @@ class Admin implements ISettings
'cache' => $this->config->getAppValue('side_menu', 'cache', '0'),
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'),
'opener-hover' => $this->config->getAppValue('side_menu', 'opener-hover', '0'),
];
return new TemplateResponse('side_menu', 'settings/admin-form', $parameters, '');

+ 1
- 0
src/admin.js View File

@ -20,6 +20,7 @@ const elements = [
'side-menu-current-app-background-color',
'side-menu-text-color',
'side-menu-opener',
'side-menu-opener-hover',
'side-menu-display-logo',
'side-menu-cache',
];

+ 29
- 13
templates/settings/admin-form.php View File

@ -63,12 +63,6 @@ style('side_menu', 'admin');
value="<?php print_unescaped($_['text-color']); ?>">
</div>
<div>
<label for="side-menu-opener" class="settings-hint">
<?php p($l->t('Opener icon')); ?>
</label>
</div>
<?php
$choices = [
'Default' => 'side-menu-opener',
@ -76,6 +70,12 @@ style('side_menu', 'admin');
];
?>
<div>
<label for="side-menu-opener" class="settings-hint">
<?php p($l->t('Opener icon')); ?>
</label>
</div>
<div>
<select id="side-menu-opener" name="opener">
<?php foreach ($choices as $label => $value): ?>
@ -86,19 +86,19 @@ style('side_menu', 'admin');
</select>
</div>
<div>
<label for="side-menu-opener" class="settings-hint">
<?php p($l->t('Display the logo')); ?>
</label>
</div>
<?php
$choices = [
'Yes' => '1',
'No' => '0',
'Yes' => '1',
];
?>
<div>
<label for="side-menu-opener" class="settings-hint">
<?php p($l->t('Display the logo')); ?>
</label>
</div>
<div>
<select id="side-menu-display-logo" name="display-logo">
<?php foreach ($choices as $label => $value): ?>
@ -109,6 +109,22 @@ style('side_menu', 'admin');
</select>
</div>
<div>
<label for="side-menu-opener" class="settings-hint">
<?php p($l->t('Open the menu with the mouse is hover the opener (automatically disabled on touch screens)')); ?>
</label>
</div>
<div>
<select id="side-menu-opener-hover" name="opener-hover">
<?php foreach ($choices as $label => $value): ?>
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-hover']): ?>selected<?php endif; ?>>
<?php echo $l->t($label); ?>
</option>
<?php endforeach; ?>
</select>
</div>
<input type="hidden" id="side-menu-cache" name="cache" value="<?php print_unescaped($_['cache']); ?>">
<button id="side-menu-save" class="btn btn-primary"><?php p($l->t('Save')); ?></button>

Loading…
Cancel
Save