diff --git a/src/Module/Slider.php b/src/Module/Slider.php index 368f159..fc4fa67 100644 --- a/src/Module/Slider.php +++ b/src/Module/Slider.php @@ -184,10 +184,10 @@ protected function compile() 'uuid' => isset($files->uuid) ? $files->uuid : null, 'name' => $file->basename, 'singleSRC' => $files->path, - 'alt' => $arrMeta['alt'], - 'title' => $arrMeta['title'], - 'imageUrl' => $arrMeta['link'], - 'caption' => $arrMeta['caption'], + 'alt' => $arrMeta['alt'] ?? null, + 'title' => $arrMeta['title'] ?? null, + 'imageUrl' => $arrMeta['link'] ?? null, + 'caption' => $arrMeta['caption'] ?? null, 'fullsize' => $this->fullsize, ); @@ -447,10 +447,10 @@ protected function parseSlides($objSlides) 'id' => $file->id, 'name' => $fileObject->basename, 'singleSRC' => $file->path, - 'alt' => $meta['alt'], - 'title' => $meta['title'], - 'imageUrl' => $meta['link'], - 'caption' => $meta['caption'], + 'alt' => $meta['alt'] ?? null, + 'title' => $meta['title'] ?? null, + 'imageUrl' => $meta['link'] ?? null, + 'caption' => $meta['caption'] ?? null, 'size' => isset($this->imgSize) ? $this->imgSize : $this->size, 'fullsize' => $this->fullsize, ), null, substr(md5('mod_rocksolid_slider_' . $this->id), 0, 6), $file); @@ -515,11 +515,11 @@ protected function parseSlides($objSlides) 'id' => $file->id, 'name' => $fileObject->basename, 'singleSRC' => $file->path, - 'alt' => $meta['alt'], - 'title' => $meta['title'], - 'imageUrl' => $meta['link'], - 'caption' => $meta['caption'], - 'size' => $slide['backgroundImageSize'], + 'alt' => $meta['alt'] ?? null, + 'title' => $meta['title'] ?? null, + 'imageUrl' => $meta['link'] ?? null, + 'caption' => $meta['caption'] ?? null, + 'size' => $slide['backgroundImageSize'] ?? null, )); } else { diff --git a/src/Resources/contao/dca/tl_content.php b/src/Resources/contao/dca/tl_content.php index c1ba260..0db1d1e 100644 --- a/src/Resources/contao/dca/tl_content.php +++ b/src/Resources/contao/dca/tl_content.php @@ -114,9 +114,10 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'x' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_x'], - 'y' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_y'], + 'x', + 'y', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -269,12 +270,13 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'bullets' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'], - 'numbers' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'], - 'tabs' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'], - 'thumbs' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_thumbs'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'], + 'bullets', + 'numbers', + 'tabs', + 'thumbs', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -309,11 +311,12 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'fit' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'], - 'crop' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'], - 'scale' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'], + 'fit', + 'crop', + 'scale', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options'], 'eval' => array('tl_class' => 'w50 clr'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -401,11 +404,12 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'fit' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'], - 'crop' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'], - 'scale' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'], + 'fit', + 'crop', + 'scale', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options'], 'eval' => array( 'tl_class' => 'w50 clr', 'includeBlankOption' => true, diff --git a/src/Resources/contao/dca/tl_module.php b/src/Resources/contao/dca/tl_module.php index f273072..2dc582e 100644 --- a/src/Resources/contao/dca/tl_module.php +++ b/src/Resources/contao/dca/tl_module.php @@ -116,9 +116,10 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'x' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_x'], - 'y' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_y'], + 'x', + 'y', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -271,12 +272,13 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'bullets' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'], - 'numbers' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'], - 'tabs' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'], - 'thumbs' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_thumbs'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'], + 'bullets', + 'numbers', + 'tabs', + 'thumbs', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -311,11 +313,12 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'fit' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'], - 'crop' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'], - 'scale' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'], + 'fit', + 'crop', + 'scale', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options'], 'eval' => array('tl_class' => 'w50 clr'), 'sql' => "varchar(64) NOT NULL default ''", ); @@ -403,11 +406,12 @@ 'exclude' => true, 'inputType' => 'select', 'options' => array( - 'fit' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'], - 'crop' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'], - 'scale' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'], - 'none' => $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'], + 'fit', + 'crop', + 'scale', + 'none', ), + 'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options'], 'eval' => array( 'tl_class' => 'w50 clr', 'includeBlankOption' => true, diff --git a/src/Resources/contao/dca/tl_rocksolid_slide.php b/src/Resources/contao/dca/tl_rocksolid_slide.php index b7c2d25..2c5d78c 100644 --- a/src/Resources/contao/dca/tl_rocksolid_slide.php +++ b/src/Resources/contao/dca/tl_rocksolid_slide.php @@ -76,7 +76,7 @@ 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slide']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', - 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"', + 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '') . '\'))return false;Backend.getScrollOffset()"', ), 'toggle' => array( 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slide']['toggle'], diff --git a/src/Resources/contao/dca/tl_rocksolid_slider.php b/src/Resources/contao/dca/tl_rocksolid_slider.php index 176ce6c..a4ab8bd 100644 --- a/src/Resources/contao/dca/tl_rocksolid_slider.php +++ b/src/Resources/contao/dca/tl_rocksolid_slider.php @@ -73,7 +73,7 @@ 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', - 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"', + 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '') . '\'))return false;Backend.getScrollOffset()"', ), 'show' => array( 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['show'], diff --git a/src/Resources/contao/languages/de/tl_module.php b/src/Resources/contao/languages/de/tl_module.php index 91d498c..2f90e10 100644 --- a/src/Resources/contao/languages/de/tl_module.php +++ b/src/Resources/contao/languages/de/tl_module.php @@ -36,8 +36,8 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_type'][1] = 'Bei "slide" bewegen sich die Elemente horizontal oder vertikal. Bei "fade" werden die Elemente überblendet.'; $GLOBALS['TL_LANG']['tl_module']['rsts_direction'][0] = 'Ausrichtung'; $GLOBALS['TL_LANG']['tl_module']['rsts_direction'][1] = 'Ausrichtung der Slide-Bewegung (nur für Animationstyp "slide").'; -$GLOBALS['TL_LANG']['tl_module']['rsts_direction_x'] = 'Horizontal'; -$GLOBALS['TL_LANG']['tl_module']['rsts_direction_y'] = 'Vertikal'; +$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options']['x'] = 'Horizontal'; +$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options']['y'] = 'Vertikal'; $GLOBALS['TL_LANG']['tl_module']['rsts_random'][0] = 'Zufällige Sortierung'; $GLOBALS['TL_LANG']['tl_module']['rsts_random'][1] = 'Wenn aktiviert werden die einzelnen Slides beim Start zufällig sortiert.'; $GLOBALS['TL_LANG']['tl_module']['rsts_loop'][0] = 'Endlosschleife'; @@ -78,11 +78,11 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_pauseAutoplayOnHover'][1] = 'Autoplay pausieren sobald man die Maus über den Slider bewegt.'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType'][0] = 'Navigationstyp'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType'][1] = 'Wählen Sie den gewünschten Navigations-Typ.'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'] = 'Punkte'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'] = 'Nummeriert'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'] = 'Tabs'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_thumbs'] = 'Thumbnails'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'] = 'Navigation ausblenden'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['bullets'] = 'Punkte'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['numbers'] = 'Nummeriert'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['tabs'] = 'Tabs'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['thumbs'] = 'Thumbnails'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['none'] = 'Navigation ausblenden'; $GLOBALS['TL_LANG']['tl_module']['rsts_controls'][0] = 'Weiter und Zurück anzeigen'; $GLOBALS['TL_LANG']['tl_module']['rsts_controls'][1] = 'Aktiviert die Navigationspfeile.'; $GLOBALS['TL_LANG']['tl_module']['rsts_thumbControls'][0] = 'Thumbnails in Weiter und Zurück anzeigen'; @@ -93,10 +93,10 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_thumbs'][1] = 'Aktiviert die Einstellungen der Thumbnails-Navigation.'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][0] = 'Skalierungsmodus'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][1] = 'Achtung: Hat keine Auswirkung wenn Höhe oder Breite auf "auto" gesetzt ist.'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'] = 'Proportional'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'] = 'Beschneiden'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'] = 'Verzerren'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'] = 'Nicht skalieren'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['fit'] = 'Proportional'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['crop'] = 'Beschneiden'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['scale'] = 'Verzerren'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['none'] = 'Nicht skalieren'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePosition'][0] = 'Bildpositionierung'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePosition'][1] = 'Position der Bilder und Hintergrundbilder.'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePositions']['center'] = 'Zentriert'; diff --git a/src/Resources/contao/languages/en/tl_module.php b/src/Resources/contao/languages/en/tl_module.php index 59cf9f4..738db61 100644 --- a/src/Resources/contao/languages/en/tl_module.php +++ b/src/Resources/contao/languages/en/tl_module.php @@ -36,8 +36,8 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_type'][1] = '"Slide" moves the elements vertically and horizontally. "Fade" uses a change-over effect.'; $GLOBALS['TL_LANG']['tl_module']['rsts_direction'][0] = 'Direction'; $GLOBALS['TL_LANG']['tl_module']['rsts_direction'][1] = 'Direction of the slide animation (only for animation type "slide").'; -$GLOBALS['TL_LANG']['tl_module']['rsts_direction_x'] = 'Horizontal'; -$GLOBALS['TL_LANG']['tl_module']['rsts_direction_y'] = 'Vertical'; +$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options']['x'] = 'Horizontal'; +$GLOBALS['TL_LANG']['tl_module']['rsts_direction_options']['y'] = 'Vertical'; $GLOBALS['TL_LANG']['tl_module']['rsts_random'][0] = 'Randomize elements'; $GLOBALS['TL_LANG']['tl_module']['rsts_random'][1] = 'If activated slider elements are randomized at the start.'; $GLOBALS['TL_LANG']['tl_module']['rsts_loop'][0] = 'Loop'; @@ -78,11 +78,11 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_pauseAutoplayOnHover'][1] = 'Pauses the autoplay if the mouse is placed over the slider.'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType'][0] = 'Navigation type'; $GLOBALS['TL_LANG']['tl_module']['rsts_navType'][1] = 'Choose the navigation type.'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_bullets'] = 'Bullets'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_numbers'] = 'Numbers'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_tabs'] = 'Tabs'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_thumbs'] = 'Thumbnails'; -$GLOBALS['TL_LANG']['tl_module']['rsts_navType_none'] = 'Hide navigation'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['bullets'] = 'Bullets'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['numbers'] = 'Numbers'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['tabs'] = 'Tabs'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['thumbs'] = 'Thumbnails'; +$GLOBALS['TL_LANG']['tl_module']['rsts_navType_options']['none'] = 'Hide navigation'; $GLOBALS['TL_LANG']['tl_module']['rsts_controls'][0] = 'Show next and previous arrows'; $GLOBALS['TL_LANG']['tl_module']['rsts_controls'][1] = 'Activates the next and previous controls.'; $GLOBALS['TL_LANG']['tl_module']['rsts_thumbControls'][0] = 'Show thumbnails in next and previous arrows'; @@ -93,10 +93,10 @@ $GLOBALS['TL_LANG']['tl_module']['rsts_thumbs'][1] = 'Activate the settings for the thumbnail navigation.'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][0] = 'Scale mode'; $GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode'][1] = 'Note: Has no effect if either width or height are set to "auto".'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_fit'] = 'Proportional'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_crop'] = 'Cut'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_scale'] = 'Distort'; -$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_none'] = 'None'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['fit'] = 'Proportional'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['crop'] = 'Cut'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['scale'] = 'Distort'; +$GLOBALS['TL_LANG']['tl_module']['rsts_scaleMode_options']['none'] = 'None'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePosition'][0] = 'Image positioning'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePosition'][1] = 'Position of images and background images.'; $GLOBALS['TL_LANG']['tl_module']['rsts_imagePositions']['center'] = 'Centered'; diff --git a/src/Resources/contao/templates/rsts_default.html5 b/src/Resources/contao/templates/rsts_default.html5 index e5c3ba0..7b5e9e6 100644 --- a/src/Resources/contao/templates/rsts_default.html5 +++ b/src/Resources/contao/templates/rsts_default.html5 @@ -19,12 +19,12 @@ ?> -