Skip to content

Commit

Permalink
Merge branch pro into master
Browse files Browse the repository at this point in the history
Conflicts:
	composer.json
	dca/tl_content.php
	dca/tl_module.php
	dca/tl_rocksolid_slide.php
	languages/de/tl_module.php
	languages/de/tl_rocksolid_slide.php
	languages/en/tl_module.php
	languages/en/tl_rocksolid_slide.php
	src/MadeYourDay/Contao/Module/Slider.php
	templates/rsts_default.html5
	templates/rsts_default.xhtml
  • Loading branch information
ausi committed Jan 29, 2015
2 parents 2f14c6c + 4ac4b8e commit 1b5cf7f
Show file tree
Hide file tree
Showing 27 changed files with 894 additions and 84 deletions.
21 changes: 3 additions & 18 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
Copyright (c) 2012-2014 MADE/YOUR/DAY
Copyright (c) 2012-2015 MADE/YOUR/DAY

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
German License: http://rocksolidthemes.com/de/contao/lizenzbedigungen
English License: http://rocksolidthemes.com/en/contao/license
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ More information:

* English: http://rocksolidthemes.com/en/contao/plugins/responsive-slider
* German: http://rocksolidthemes.com/de/contao/plugins/responsive-slider

## License

* English: http://rocksolidthemes.com/en/contao/license
* German: http://rocksolidthemes.com/de/contao/lizenzbedigungen
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords":["contao","slider","jquery"],
"type":"contao-module",
"homepage":"http://rocksolidthemes.com/de/contao/plugins/responsive-slider",
"license":"MIT",
"license":"commercial",
"authors":[
{
"name":"RockSolid Themes",
Expand All @@ -20,13 +20,14 @@
"require":{
"php":">=5.3",
"contao/core":">=3,<4",
"contao-community-alliance/composer-installer":"*"
"contao-community-alliance/composer-plugin":"~2.0"
},
"autoload":{
"classmap":["src/"]
},
"replace":{
"contao-legacy/rocksolid-slider":"self.version"
"contao-legacy/rocksolid-slider":"self.version",
"contao-legacy/rocksolid-slider-pro":"self.version"
},
"extra":{
"contao":{
Expand Down
2 changes: 2 additions & 0 deletions config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
'MadeYourDay\\Contao\\Slider' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Slider.php',
'MadeYourDay\\Contao\\SliderRunonce' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/SliderRunonce.php',
'MadeYourDay\\Contao\\Module\\Slider' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Module/Slider.php',
'MadeYourDay\\Contao\\Module\\SliderNews' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Module/SliderNews.php',
'MadeYourDay\\Contao\\Module\\SliderEvents' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Module/SliderEvents.php',
'MadeYourDay\\Contao\\Model\\SlideModel' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Model/SlideModel.php',
'MadeYourDay\\Contao\\Model\\SliderModel' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Model/SliderModel.php',
'MadeYourDay\\Contao\\Model\\ContentModel' => 'system/modules/rocksolid-slider/src/MadeYourDay/Contao/Model/ContentModel.php',
Expand Down
7 changes: 6 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
$GLOBALS['TL_CTE']['includes']['rocksolid_slider'] = 'MadeYourDay\\Contao\\Module\\Slider';

$GLOBALS['BE_MOD']['content']['rocksolid_slider'] = array(
'tables' => array('tl_rocksolid_slider', 'tl_rocksolid_slide', 'tl_content'),
'tables' => array(
'tl_rocksolid_slider',
'tl_rocksolid_slide',
'tl_content',
'tl_rocksolid_slider_license',
),
'icon' => 'system/modules/rocksolid-slider/assets/img/icon.png',
);

Expand Down
108 changes: 95 additions & 13 deletions dca/tl_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,36 @@

}

$GLOBALS['TL_DCA']['tl_content']['palettes']['rocksolid_slider'] = '{type_legend},type,headline;{rocksolid_slider_legend},rsts_id,rsts_type,rsts_random,rsts_loop,rsts_centerContent,rsts_skin,rsts_width,rsts_height,rsts_preloadSlides,rsts_gapSize,rsts_duration,rsts_captions,rsts_scaleMode,rsts_imagePosition;{rsts_navigation_legend},rsts_navType,rsts_deepLinkPrefix,rsts_controls,rsts_keyboard;{rsts_autoplay_legend},rsts_autoplay,rsts_autoplayRestart,rsts_autoplayProgress,rsts_pauseAutoplayOnHover,rsts_videoAutoplay;{rsts_carousel_legend},rsts_getPro;{template_legend:hide},rsts_template,size;{protected_legend:hide},protected;{expert_legend:hide},guests,rsts_customSkin,rsts_cssPrefix,cssID,space;{invisible_legend:hide},invisible,start,stop';
$GLOBALS['TL_DCA']['tl_content']['config']['onload_callback'][] = array('MadeYourDay\\Contao\\Slider', 'contentOnloadCallback');

$GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][] = 'rsts_content_type';
$GLOBALS['TL_DCA']['tl_content']['palettes']['rocksolid_slider'] = '{type_legend},type,headline,rsts_content_type';
$GLOBALS['TL_DCA']['tl_content']['palettes']['rocksolid_sliderrsts_default'] = '{type_legend},type,headline,rsts_content_type;{rocksolid_slider_legend},rsts_id,rsts_type,rsts_direction,rsts_random,rsts_loop,rsts_centerContent,rsts_skin,rsts_width,rsts_height,rsts_preloadSlides,rsts_gapSize,rsts_duration,rsts_captions,rsts_scaleMode,rsts_imagePosition;{rsts_navigation_legend},rsts_navType,rsts_deepLinkPrefix,rsts_controls,rsts_keyboard,rsts_invertControls;{rsts_autoplay_legend},rsts_autoplay,rsts_autoplayRestart,rsts_autoplayProgress,rsts_pauseAutoplayOnHover,rsts_videoAutoplay;{rsts_carousel_legend},rsts_slideMaxCount,rsts_prevNextSteps,rsts_slideMinSize,rsts_combineNavItems,rsts_visibleArea,rsts_visibleAreaMax;{template_legend:hide},rsts_template,size;{protected_legend:hide},protected;{expert_legend:hide},guests,rsts_customSkin,rsts_cssPrefix,cssID,space;{invisible_legend:hide},invisible,start,stop';
$GLOBALS['TL_DCA']['tl_content']['palettes']['rocksolid_sliderrsts_images'] = '{type_legend},type,headline,rsts_content_type;{source_legend:hide},multiSRC;{rocksolid_slider_legend},rsts_type,rsts_direction,rsts_random,rsts_loop,rsts_centerContent,rsts_skin,rsts_width,rsts_height,rsts_preloadSlides,rsts_gapSize,rsts_duration,rsts_captions,rsts_scaleMode,rsts_imagePosition;{rsts_navigation_legend},rsts_navType,rsts_deepLinkPrefix,rsts_controls,rsts_keyboard,rsts_invertControls;{rsts_autoplay_legend},rsts_autoplay,rsts_autoplayRestart,rsts_autoplayProgress,rsts_pauseAutoplayOnHover,rsts_videoAutoplay;{rsts_carousel_legend},rsts_slideMaxCount,rsts_prevNextSteps,rsts_slideMinSize,rsts_combineNavItems,rsts_visibleArea,rsts_visibleAreaMax;{template_legend:hide},rsts_template,size;{protected_legend:hide},protected;{expert_legend:hide},guests,rsts_customSkin,rsts_cssPrefix,cssID,space;{invisible_legend:hide},invisible,start,stop';

$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_content_type'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_content_type'],
'default' => 'rsts_default',
'exclude' => true,
'inputType' => 'select',
'options' => array('rsts_default', 'rsts_images'),
'reference' => &$GLOBALS['TL_LANG']['tl_module']['rsts_content_types'],
'eval' => array(
'mandatory' => true,
'submitOnChange' => true,
'tl_class' => 'w50',
),
'sql' => "varchar(64) NOT NULL default 'rsts_default'",
);
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_id'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_id'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('MadeYourDay\\Contao\\Slider', 'getSliderIds'),
'eval' => array('mandatory' => true),
'eval' => array(
'includeBlankOption' => true,
'mandatory' => true,
),
'sql' => "int(10) unsigned NOT NULL default '0'",
);
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_template'] = array(
Expand All @@ -41,18 +63,27 @@
'inputType' => 'select',
'options_callback' => array('MadeYourDay\\Contao\\Slider', 'getSliderTemplates'),
'eval' => array('tl_class' => 'w50'),
'sql' => "varchar(32) NOT NULL default ''",
'sql' => "varchar(32) NOT NULL default 'rsts_default'",
);
// slider type (slide or fade)
// slider type (slide, side-slide or fade)
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_type'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_type'],
'exclude' => true,
'inputType' => 'select',
'options' => array('slide' => 'slide', 'fade' => 'fade'),
'options' => array('slide' => 'slide', 'side-slide' => 'side-slide', 'fade' => 'fade'),
'eval' => array('tl_class' => 'w50'),
'sql' => "varchar(64) NOT NULL default ''",
);
// For backwards compatibility
// "x" for horizontal or "y" for vertical
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_direction'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_direction'],
'exclude' => true,
'inputType' => 'select',
'options' => array(
'x' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_x'],
'y' => $GLOBALS['TL_LANG']['tl_module']['rsts_direction_y'],
),
'eval' => array('tl_class' => 'w50'),
'sql' => "varchar(64) NOT NULL default ''",
);
// if true the slides get shuffled once on initialization
Expand Down Expand Up @@ -109,6 +140,7 @@
// - a css lenght value: e.g. "100%", "500px", "50em"
// - "auto": get the size from the active slide dimensions at runtime
// height can be set to auto only if the direction is "x"
// - "normalize": similar to auto but uses the size of the largest slide
// - a proportion: keep a fixed proportion for the slides, e.g. "480x270"
// this must not set to both dimensions
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_width'] = array(
Expand Down Expand Up @@ -213,6 +245,14 @@
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default '1'",
);
// Adds data-rsts-class="rsts-invert-controls" to all slides
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_invertControls'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_invertControls'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default ''",
);
// image scale mode (fit, crop, scale)
// only works if width and height are not set to "auto"
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_scaleMode'] = array(
Expand Down Expand Up @@ -263,13 +303,55 @@
'eval' => array('tl_class' => 'w50 m12'),
'sql' => "char(1) NOT NULL default '1'",
);
// get pro version
$GLOBALS['TL_DCA']['tl_module']['fields']['rsts_getPro'] = array(
'input_field_callback' => function() {
return '<div>'
. $GLOBALS['TL_LANG']['tl_module']['rsts_getPro']
. '</div>';
},
// maximum number of visible slides
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_slideMaxCount'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_slideMaxCount'],
'exclude' => true,
'inputType' => 'select',
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20),
'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true),
'sql' => "int(10) unsigned NOT NULL default '0'",
);
// number of slides to navigate by clicking prev or next
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_prevNextSteps'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_prevNextSteps'],
'exclude' => true,
'inputType' => 'select',
'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20),
'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true),
'sql' => "int(10) unsigned NOT NULL default '0'",
);
// the size of the area for the visible slide (0 = 0%, 1 = 100%)
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_visibleArea'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_visibleArea'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50 clr'),
'sql' => "double unsigned NOT NULL default '0'",
);
// maximum size of the area for the visible slide in px
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_visibleAreaMax'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_visibleAreaMax'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'sql' => "double unsigned NOT NULL default '0'",
);
// minimal size of one slide in px
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_slideMinSize'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_slideMinSize'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'sql' => "int(10) unsigned NOT NULL default '0'",
);
// combine navigation items if multiple slides are visible (default true)
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_combineNavItems'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_combineNavItems'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class' => 'w50 m12'),
'sql' => "char(1) NOT NULL default '1'",
);
// custom slider skin (rsts_skin gets ignored if this is set)
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_customSkin'] = array(
Expand Down
Loading

0 comments on commit 1b5cf7f

Please sign in to comment.