Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
colors: use colorpicker instead using predefined colors
Browse files Browse the repository at this point in the history
- NOTE: type="color" is not supported in Internet Explorer 11
  or Safari 9.1 (or earlier)

Fix andreknieriem#104
Fix andreknieriem#198 (countdown-background
and countdown-color can be set to same color)

Change-Id: I1cf2536a3feba760f5ba33827608cec440db966f
  • Loading branch information
andi34 committed Jan 15, 2020
1 parent 45a4bea commit 7521853
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 34 deletions.
4 changes: 4 additions & 0 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
echo '<label data-l10n="'.$panel.'_'.$key.'">'.$panel.'_'.$key.'</label><input type="text" name="'.$field['name'].'" value="'.$field[
'value'].'" placeholder="'.$field['placeholder'].'"/>';
break;
case 'color':
echo '<input type="color" name="'.$field['name'].'" value="'.$field['value'].'" placeholder="'.$field['placeholder'].'"/>
<label data-l10n="'.$panel.'_'.$key.'"> '.$panel.'_'.$key.'</label>';
break;
case 'hidden':
echo '<input type="hidden" name="'.$field['name'].'" value="'.$field['value'].'"/>';
break;
Expand Down
11 changes: 0 additions & 11 deletions lib/colors.php

This file was deleted.

19 changes: 6 additions & 13 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
require_once(__DIR__ . '/filter.php');
require_once(__DIR__ . '/colors.php');

$configsetup = [
'general' => [
Expand Down Expand Up @@ -258,45 +257,39 @@
'value' => $config['rounded_corners']
],
'colors_primary' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[primary]',
'placeholder' => $defaultConfig['colors']['primary'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['primary']
],
'colors_secondary' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[secondary]',
'placeholder' => $defaultConfig['colors']['secondary'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['secondary']
],
'colors_font' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[font]',
'placeholder' => $defaultConfig['colors']['font'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['font']
],
'colors_countdown' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[countdown]',
'placeholder' => $defaultConfig['colors']['countdown'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['countdown']
],
'colors_background_countdown' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[background_countdown]',
'placeholder' => $defaultConfig['colors']['background_countdown'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['background_countdown']
],
'colors_cheese' => [
'type' => 'select',
'type' => 'color',
'name' => 'colors[cheese]',
'placeholder' => $defaultConfig['colors']['cheese'],
'options' => AVAILABLE_COLORS,
'value' => $config['colors']['cheese']
]
],
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ const L10N = {
'print_font_path': 'Schriftart',
'print_fontsize': 'Schriftgröße',
'user_interface': 'Benutzeroberfläche',
'user_interface_color_theme': 'Theme',
'color_theme': 'Theme auswählen',
'crop_onprint': 'Bild bei Ausdruck zurechtschneiden',
'print_crop_width': 'Neue Bildbreite bei Ausdruck',
'print_crop_height': 'Neue Bildhöhe bei Ausdruck',
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ const L10N = {
'print_font_path': 'Font',
'print_fontsize': 'Font size',
'user_interface': 'User interface',
'user_interface_color_theme': 'Theme',
'color_theme': 'Choose a theme',
'crop_onprint': 'Crop picture at print',
'print_crop_width': 'New width at print',
'print_crop_height': 'New height at print',
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ const L10N = {
'print_font_path': 'Font',
'print_fontsize': 'Tamaño de la fuente',
'user_interface': 'Interfaz de usuario',
'user_interface_color_theme': 'Tema',
'color_theme': 'Elige un tema',
'crop_onprint': 'Recortar imagen en la impresión',
'print_crop_width': 'Nuevo ancho en la impresión',
'print_crop_height': 'Nueva altura en la impresión',
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ const L10N = {
'print_font_path': 'Font',
'print_fontsize': 'Taille de la police',
'user_interface': 'Interface utilisateur',
'user_interface_color_theme': 'Thème',
'color_theme': 'Choisissez un thème',
'crop_onprint': 'Recadrer la photo à imprimer',
'print_crop_width': 'Nouvelle largeur à l\'impression',
'print_crop_height': 'Nouvelle hauteur à l\'impression',
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/gr.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ const L10N = {
'print_font_path': 'Font',
'print_fontsize': 'το μέγεθος της γραμματοσειράς',
'user_interface': 'διεπαφή χρήστη',
'user_interface_color_theme': 'Θέμα',
'color_theme': 'Επιλέξτε θέμα',
'crop_onprint': 'Τραβήξτε την εικόνα όταν εκτυπώνετε',
'print_crop_width': 'Νέο πλάτος εικόνας στην εκτύπωση',
'print_crop_height': 'Νέο ύψος εικόνας στην εκτύπωση',
Expand Down

0 comments on commit 7521853

Please sign in to comment.