-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow multiple stylesheets, fix: #1
- Loading branch information
Showing
6 changed files
with
20 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<?php | ||
|
||
$addon = rex_addon::get('module_styles'); | ||
$styles = explode("\r\n", $addon->getConfig('module_stylesheet')); | ||
|
||
if (rex::isBackend() && rex::getUser() && rex_url::currentBackendPage() === 'index.php?page=content/edit' && $addon->getConfig('module_stylesheet')) { | ||
rex_view::setJsProperty('moduleStylesheet', $addon->getConfig('module_stylesheet')); | ||
rex_view::setJsProperty('moduleStylesheet', $styles); | ||
rex_view::addJsFile($addon->getAssetsUrl('module-styles.js')); | ||
} | ||
|
||
if (rex::isBackend() && rex::getUser() && rex_url::currentBackendPage() === 'index.php?page=module_styles/settings' && $addon->getConfig('module_stylesheet')) { | ||
rex_view::setJsProperty('moduleStylesheet', $addon->getConfig('module_stylesheet')); | ||
rex_view::setJsProperty('moduleStylesheet', $styles); | ||
rex_view::addJsFile($addon->getAssetsUrl('module-styles-settings.js')); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
module_styles_title = Module-Styles | ||
module_styles_settings = Einstellungen | ||
module_styles_settings_desc = Hier können Sie die Einstellungen für das Modul ändern. | ||
module_styles_multiline = Gib die URL zum Stylesheet ein. Du kannst auch mehrere URLs eingeben, jede in einer neuen Zeile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
module_styles_title = Module-Styles | ||
module_styles_settings = Settings | ||
module_styles_multiline = Enter the URL to the stylesheet. You can also enter multiple URLs, each on a new line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters