diff --git a/Module.php b/Module.php index 0ca3488..14cff4e 100644 --- a/Module.php +++ b/Module.php @@ -12,6 +12,7 @@ class Module extends \humhub\components\Module { public $resourcesPath = 'resources'; + public $defaultRoute = 'admin'; public const FLEX_THEME_NAME = 'FlexTheme'; diff --git a/assets/AdminAssets.php b/assets/AdminAssets.php new file mode 100644 index 0000000..a4ac72e --- /dev/null +++ b/assets/AdminAssets.php @@ -0,0 +1,16 @@ + false + ]; + + public $sourcePath = '@flex-theme/resources'; + + public $js = [ + 'js/flex-theme-admin.js', + ]; +} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4e77c0f..1c12074 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,8 @@ ## TBA - Fix #42: Division by zero (when trying to lighten white color) - Fix #43: Invalid faded color calculated from 3 digits base color +- Enh #45: Add option to reset all colors of the current form +- Enh #45: Add default route 'admin' ## 0.3.0 (14 february 2024) **NOTE** Files in themes/FlexTheme/css now need to be writable by the PHP process (see https://docs.humhub.org/docs/admin/installation/#file-permissions) diff --git a/messages/am/admin.php b/messages/am/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/am/admin.php +++ b/messages/am/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/an/admin.php b/messages/an/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/an/admin.php +++ b/messages/an/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ar/admin.php b/messages/ar/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ar/admin.php +++ b/messages/ar/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/bg/admin.php b/messages/bg/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/bg/admin.php +++ b/messages/bg/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/br/admin.php b/messages/br/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/br/admin.php +++ b/messages/br/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ca/admin.php b/messages/ca/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ca/admin.php +++ b/messages/ca/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/cs/admin.php b/messages/cs/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/cs/admin.php +++ b/messages/cs/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/cy/admin.php b/messages/cy/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/cy/admin.php +++ b/messages/cy/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/da/admin.php b/messages/da/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/da/admin.php +++ b/messages/da/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/de/admin.php b/messages/de/admin.php index 3703959..2342c6b 100644 --- a/messages/de/admin.php +++ b/messages/de/admin.php @@ -29,10 +29,11 @@ 'WARNING' => 'WARNUNG', 'Warning: Flex Theme is not active, settings on this page won\'t have any effect!' => 'Warnung: Flex Theme is nicht aktiv, Einstellungen auf dieser Seite haben keinen Effekt!', 'Your settings will be overwritten!' => 'Ihre Einstellungen werden überschrieben!', - 'Dark Mode' => '', - 'Experimental' => '', - 'File upload links' => '', - 'Please use the module {darkmode} and select "HumHub (dark)".' => '', - 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', - 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', + 'Dark Mode' => 'Dunkler Modus', + 'Experimental' => 'Experimentell', + 'File upload links' => 'Datei-Upload-Links', + 'Please use the module {darkmode} and select "HumHub (dark)".' => 'Bitte nutze das Modul {darkmode} und wähle "HumHub (dark)" aus.', + 'Reset all colors' => 'Alle Farben zurücksetzen', + 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => 'Einstellungen wurden mit Warnungen/Fehlern gespeichert. Bitte sieh in den Logs nach. (Administration > Information > Protokolle)', + 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => 'Zeige Datei-Upload-Optionen (Bild, Audio, Video...) als Buttons anstelle des Dropdown-Menüs.', ]; diff --git a/messages/el/admin.php b/messages/el/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/el/admin.php +++ b/messages/el/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/es-419/admin.php b/messages/es-419/admin.php new file mode 100644 index 0000000..cafd8dc --- /dev/null +++ b/messages/es-419/admin.php @@ -0,0 +1,39 @@ +Flex Theme Configuration' => '', + 'Advanced' => '', + 'Background Colors' => '', + 'Color for Like Icon' => '', + 'Colors' => '', + 'Dark Mode' => '', + 'Default' => '', + 'Experimental' => '', + 'File upload links' => '', + 'Flexible Theme for HumHub' => '', + 'General Settings' => '', + 'Import/Export' => '', + 'Invalid Format' => '', + 'JSON could not be converted!' => '', + 'Like Icon' => '', + 'Like Icon (already liked)' => '', + 'Main Colors' => '', + 'Must be a color in hexadecimal format, like "#00aaff" or "#FA0"' => '', + 'Only icon' => '', + 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', + 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', + 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', + 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', + 'Show topic menu in user profiles and spaces.' => '', + 'Style of Comment Button' => '', + 'Style of Like Button' => '', + 'Text Colors' => '', + 'Text and icon' => '', + 'Text link' => '', + 'There seem to be invalid values!' => '', + 'Topic Menu' => '', + 'WARNING' => '', + 'Warning: Flex Theme is not active, settings on this page won\'t have any effect!' => '', + 'Your settings will be overwritten!' => '', +]; diff --git a/messages/es/admin.php b/messages/es/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/es/admin.php +++ b/messages/es/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/et/admin.php b/messages/et/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/et/admin.php +++ b/messages/et/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/eu/admin.php b/messages/eu/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/eu/admin.php +++ b/messages/eu/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/fa-IR/admin.php b/messages/fa-IR/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/fa-IR/admin.php +++ b/messages/fa-IR/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/fi/admin.php b/messages/fi/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/fi/admin.php +++ b/messages/fi/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/fr/admin.php b/messages/fr/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/fr/admin.php +++ b/messages/fr/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/he/admin.php b/messages/he/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/he/admin.php +++ b/messages/he/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/hr/admin.php b/messages/hr/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/hr/admin.php +++ b/messages/hr/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ht/admin.php b/messages/ht/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ht/admin.php +++ b/messages/ht/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/hu/admin.php b/messages/hu/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/hu/admin.php +++ b/messages/hu/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/id/admin.php b/messages/id/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/id/admin.php +++ b/messages/id/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/it/admin.php b/messages/it/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/it/admin.php +++ b/messages/it/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ja/admin.php b/messages/ja/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ja/admin.php +++ b/messages/ja/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ko/admin.php b/messages/ko/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ko/admin.php +++ b/messages/ko/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/lt/admin.php b/messages/lt/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/lt/admin.php +++ b/messages/lt/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/lv/admin.php b/messages/lv/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/lv/admin.php +++ b/messages/lv/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/nb-NO/admin.php b/messages/nb-NO/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/nb-NO/admin.php +++ b/messages/nb-NO/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/nl/admin.php b/messages/nl/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/nl/admin.php +++ b/messages/nl/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/nn-NO/admin.php b/messages/nn-NO/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/nn-NO/admin.php +++ b/messages/nn-NO/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/pl/admin.php b/messages/pl/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/pl/admin.php +++ b/messages/pl/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/pt-BR/admin.php b/messages/pt-BR/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/pt-BR/admin.php +++ b/messages/pt-BR/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/pt/admin.php b/messages/pt/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/pt/admin.php +++ b/messages/pt/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ro/admin.php b/messages/ro/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ro/admin.php +++ b/messages/ro/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/ru/admin.php b/messages/ru/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/ru/admin.php +++ b/messages/ru/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sk/admin.php b/messages/sk/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sk/admin.php +++ b/messages/sk/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sl/admin.php b/messages/sl/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sl/admin.php +++ b/messages/sl/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sq/admin.php b/messages/sq/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sq/admin.php +++ b/messages/sq/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sr/admin.php b/messages/sr/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sr/admin.php +++ b/messages/sr/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sv/admin.php b/messages/sv/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sv/admin.php +++ b/messages/sv/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/sw/admin.php b/messages/sw/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/sw/admin.php +++ b/messages/sw/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/th/admin.php b/messages/th/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/th/admin.php +++ b/messages/th/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/tr/admin.php b/messages/tr/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/tr/admin.php +++ b/messages/tr/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/uk/admin.php b/messages/uk/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/uk/admin.php +++ b/messages/uk/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/uz/admin.php b/messages/uz/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/uz/admin.php +++ b/messages/uz/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/vi/admin.php b/messages/vi/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/vi/admin.php +++ b/messages/vi/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/zh-CN/admin.php b/messages/zh-CN/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/zh-CN/admin.php +++ b/messages/zh-CN/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/messages/zh-TW/admin.php b/messages/zh-TW/admin.php index a3a68ea..cafd8dc 100644 --- a/messages/zh-TW/admin.php +++ b/messages/zh-TW/admin.php @@ -22,6 +22,7 @@ 'Only icon' => '', 'Please go to Administration > Settings > Appearance and select "Flex Theme".' => '', 'Please use the module {darkmode} and select "HumHub (dark)".' => '', + 'Reset all colors' => '', 'Settings were saved with warnings/errors. Please check the logging. (Administration > Information > Logging)' => '', 'Show File Upload options (image, audio, video...) as buttons instead of dropdown.' => '', 'Show topic menu in user profiles and spaces.' => '', diff --git a/resources/js/flex-theme-admin.js b/resources/js/flex-theme-admin.js new file mode 100644 index 0000000..bea9289 --- /dev/null +++ b/resources/js/flex-theme-admin.js @@ -0,0 +1,32 @@ +humhub.module("flex_theme.admin", function(module, require, $) +{ + module.initOnPjaxLoad = true; + + var refreshBtn; + var form; + + var emptyColors = function( e ) { + colorsForm = $('#colors-form'); + if (colorsForm) { + console.log('form found'); + inputs = colorsForm.find(':input'); + //var count = 0; + inputs.each(function(){ + if ($(this).is(':hidden')) { + return; + } + if ($(this).val() !== '') { + //count++; + $(this).val(''); + var sourceInput = $('#' + $(this).attr('id') + '-source'); + sourceInput.spectrum("set", ''); + } + }); + //module.log.success(count + " colors emptied"); + } + }; + + module.export({ + emptyColors: emptyColors, + }); +}); \ No newline at end of file diff --git a/views/config/colors.php b/views/config/colors.php index bd86a8c..7d39707 100644 --- a/views/config/colors.php +++ b/views/config/colors.php @@ -2,6 +2,7 @@ use humhub\modules\flexTheme\models\ColorSettings; use humhub\modules\ui\form\widgets\ActiveForm; +use humhub\modules\ui\icon\widgets\Icon; use kartik\widgets\ColorInput; use yii\helpers\Html; @@ -10,7 +11,7 @@ $background_colors = ColorSettings::BACKGROUND_COLORS; ?>
- 'configure-form']);?> + 'colors-form']);?> beginCollapsibleFields(Yii::t('FlexThemeModule.admin', 'Main Colors')); ?> @@ -32,6 +33,7 @@
'btn btn-primary', 'data-ui-loader' => '']) ?> +
diff --git a/views/config/dark-colors.php b/views/config/dark-colors.php index eeab621..95e3d92 100644 --- a/views/config/dark-colors.php +++ b/views/config/dark-colors.php @@ -2,6 +2,7 @@ use humhub\modules\flexTheme\models\DarkColorSettings; use humhub\modules\ui\form\widgets\ActiveForm; +use humhub\modules\ui\icon\widgets\Icon; use kartik\widgets\ColorInput; use yii\helpers\Html; use yii\helpers\Url; @@ -22,7 +23,7 @@

- 'configure-form']);?> + 'colors-form']);?> beginCollapsibleFields(Yii::t('FlexThemeModule.admin', 'Main Colors')); ?> @@ -44,6 +45,7 @@
'btn btn-primary', 'data-ui-loader' => '']) ?> +
diff --git a/views/layouts/admin.php b/views/layouts/admin.php index 5008d51..8676570 100644 --- a/views/layouts/admin.php +++ b/views/layouts/admin.php @@ -1,3 +1,8 @@ + beginContent('@admin/views/layouts/main.php') ?>