Commit eb2c51b2 authored by llaffont's avatar llaffont
Browse files

Plus facile d'ajouter de nouveaux types de diaporama

parent 0efb2cac
......@@ -27,6 +27,13 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
protected $_album;
public static function getTransitionDefinitions() {
return array('fade' => 'Transparence',
'shuffle' => 'Mélange',
'scrollHorz' => 'Défilement horizontal');
}
public function setPreferences($preferences) {
if (null == $preferences)
$this->_preferences = $this->_default_preferences;
......@@ -75,7 +82,7 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
$cycle_options = array('pause' => 1,
'fx' => 'fade');
if (array_isset('op_transition', $this->_preferences)
&& in_array($this->_preferences['op_transition'], array('fade', 'shuffle', 'scrollHorz')))
&& in_array($this->_preferences['op_transition'], array_keys(self::getTransitionDefinitions())))
$cycle_options['fx'] = $this->_preferences['op_transition'];
if (array_isset('op_timeout', $this->_preferences))
......
......@@ -872,13 +872,20 @@ div.ui-sortable-placeholder {
}
.slideshow .controls {
width: 100%;
height: 0px;
overflow: visible;
position: relative;
opacity: 0.3;
}
.slideshow:hover .controls {
opacity: 1;
}
.slideshow .controls a {
display: block;
width: 20px;
......
......@@ -5,9 +5,7 @@
echo $this->formSelect('op_transition',
$this->preferences['op_transition'],
'',
array('fade' => 'Transparence',
'shuffle' => 'Mélange',
'scrollHorz' => 'Défilement horizontal'));
ZendAfi_View_Helper_TagSlideshow::getTransitionDefinitions());
?></td>
</tr>
<tr>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment