Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bibliossimo
opacce
Commits
0efb2cac
Commit
0efb2cac
authored
Jun 17, 2012
by
llaffont
Browse files
On peut maintenant faire défilement manuellement les diaporamas
parent
000e8488
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
28 deletions
+58
-28
library/ZendAfi/View/Helper/Accueil/Base.php
library/ZendAfi/View/Helper/Accueil/Base.php
+3
-20
library/ZendAfi/View/Helper/TagSlideshow.php
library/ZendAfi/View/Helper/TagSlideshow.php
+18
-6
public/opac/css/global.css
public/opac/css/global.css
+37
-2
public/opac/java/slide_show/arrow_right.gif
public/opac/java/slide_show/arrow_right.gif
+0
-0
public/opac/java/slide_show/arrow_right_over.gif
public/opac/java/slide_show/arrow_right_over.gif
+0
-0
No files found.
library/ZendAfi/View/Helper/Accueil/Base.php
View file @
0efb2cac
...
...
@@ -374,25 +374,8 @@ class ZendAfi_View_Helper_Accueil_Base extends ZendAfi_View_Helper_BaseHelper {
* @return ZendAfi_View_Helper_Accueil_BibNumerique
*/
public
function
renderSlideShowScriptsOn
(
$script_loader
,
$selector
,
$options
=
null
)
{
$cycle_options
=
array
(
'pause'
=>
1
,
'fx'
=>
'fade'
);
if
(
array_isset
(
'op_transition'
,
$this
->
preferences
)
&&
in_array
(
$this
->
preferences
[
'op_transition'
],
array
(
'fade'
,
'shuffle'
,
'scrollHorz'
)))
$cycle_options
[
'fx'
]
=
$this
->
preferences
[
'op_transition'
];
if
(
array_isset
(
'op_timeout'
,
$this
->
preferences
))
$cycle_options
[
'timeout'
]
=
1000
*
$this
->
preferences
[
'op_timeout'
];
if
(
$options
)
$cycle_options
=
array_merge
(
$cycle_options
,
$options
);
$script_loader
->
addScript
(
URL_JAVA
.
'diaporama/jquery.cycle.all.min'
)
->
addJQueryReady
(
sprintf
(
'$(\'%s\').cycle(%s);'
,
$selector
,
json_encode
(
$cycle_options
)));
return
$this
;
$this
->
view
->
getHelper
(
'TagSlideshow'
)
->
setPreferences
(
$this
->
preferences
)
->
renderSlideShowScriptsOn
(
$script_loader
,
$selector
,
$options
);
}
}
library/ZendAfi/View/Helper/TagSlideshow.php
View file @
0efb2cac
...
...
@@ -59,7 +59,7 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
if
(
!
$this
->
_album
)
return
$this
;
return
$this
->
renderSlideShowScriptsOn
(
return
$this
->
renderSlideShowScriptsOn
(
Class_ScriptLoader
::
getInstance
(),
sprintf
(
'div.slideshow-%d .medias'
,
$this
->
_album
->
getId
()),
array
(
'width'
=>
$this
->
_preferences
[
'op_largeur_img'
],
...
...
@@ -71,10 +71,10 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
* @param Class_Album $album
* @return ZendAfi_View_Helper_Accueil_BibNumerique
*/
public
function
renderSlideShowScriptsOn
(
$selector
,
$options
=
null
)
{
public
function
renderSlideShowScriptsOn
(
$script_loader
,
$selector
,
$options
=
null
)
{
$cycle_options
=
array
(
'pause'
=>
1
,
'fx'
=>
'fade'
);
if
(
array_isset
(
'op_transition'
,
$this
->
_preferences
)
if
(
array_isset
(
'op_transition'
,
$this
->
_preferences
)
&&
in_array
(
$this
->
_preferences
[
'op_transition'
],
array
(
'fade'
,
'shuffle'
,
'scrollHorz'
)))
$cycle_options
[
'fx'
]
=
$this
->
_preferences
[
'op_transition'
];
...
...
@@ -84,10 +84,22 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
if
(
$options
)
$cycle_options
=
array_merge
(
$cycle_options
,
$options
);
Class_S
cript
L
oader
::
getInstance
()
$s
cript
_l
oader
->
addScript
(
URL_JAVA
.
'diaporama/jquery.cycle.all.min'
)
->
addJQueryReady
(
sprintf
(
'$(\'%s\').cycle(%s);'
,
'$(\'%s\').cycle(%s);
var container = $(\'%1$s\').parent();
container.addClass(\'slideshow\');
container.prepend(\'<div class="controls"><a href="#"></a><a href="#"></a></div>\');
container.find(\'.controls a:first-child\').click(
function(event){
event.preventDefault();
$(\'%1$s\').cycle(\'prev\') } );
container.find(\'.controls a + a\').click(
function(event){
event.preventDefault();
$(\'%1$s\').cycle(\'next\') } );
container.find(\'.controls a\').css(\'top\', (container.parent().height()/3)+\'px\')'
,
$selector
,
json_encode
(
$cycle_options
)))
->
loadPrettyPhoto
();
...
...
@@ -104,7 +116,7 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
$html
=
sprintf
(
'<div class="slideshow slideshow-%d">'
.
'<h2></h2>'
.
'<div class="medias">%s</div>'
.
'<div class="medias">%s</div>'
.
'<p></p>'
.
'</div>'
,
$this
->
_album
->
getId
(),
...
...
public/opac/css/global.css
View file @
0efb2cac
...
...
@@ -34,7 +34,7 @@ a {
float
:
right
;
position
:
relative
;
height
:
0px
;
z-index
:
5
;
z-index
:
100
;
}
div
#header
.boiteBanniereGauche
{
...
...
@@ -869,4 +869,39 @@ div.ui-sortable-placeholder {
max-height
:
200px
;
cursor
:
move
;
overflow
:
hidden
;
}
\ No newline at end of file
}
.slideshow
.controls
{
width
:
100%
;
height
:
0px
;
overflow
:
visible
;
position
:
relative
;
}
.slideshow
.controls
a
{
display
:
block
;
width
:
20px
;
height
:
80px
;
z-index
:
100
;
position
:
absolute
;
}
.slideshow
.controls
a
:first-child
{
background
:
transparent
url(../java/slide_show/arrow_left.gif)
center
center
no-repeat
;
}
.slideshow
.controls
a
:first-child:hover
{
background-image
:
url(../java/slide_show/arrow_left_over.gif)
;
}
.slideshow
.controls
a
:last-child
{
right
:
0px
;
background
:
transparent
url(../java/slide_show/arrow_right.gif)
center
center
no-repeat
;
}
.slideshow
.controls
a
:last-child:hover
{
background-image
:
url(../java/slide_show/arrow_right_over.gif)
;
}
public/opac/java/slide_show/arrow_right.gif
View replaced file @
000e8488
View file @
0efb2cac
250 Bytes
|
W:
|
H:
232 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
public/opac/java/slide_show/arrow_right_over.gif
View replaced file @
000e8488
View file @
0efb2cac
265 Bytes
|
W:
|
H:
273 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment