Commit abecb662e135a091379675e2d2bc479066db26c6
Committed by
Daniela Feitosa
1 parent
fa6f67e9
Exists in
master
and in
28 other branches
Fixing bug on highlights block
(ActionItem1759)
Showing
1 changed file
with
25 additions
and
17 deletions
Show diff stats
app/views/blocks/highlights.rhtml
... | ... | @@ -17,24 +17,32 @@ |
17 | 17 | <p class="highlights-block-footer"></p> |
18 | 18 | <script type="text/javascript"> |
19 | 19 | (function($) { |
20 | + $.fn.cycle.transitions.customFade = function($cont, $slides, opts) { | |
21 | + $slides.not(":eq(" + opts.currSlide + ")").css("opacity", 0); | |
22 | + opts.before.push(function(curr, next, opts) { | |
23 | + $.fn.cycle.commonReset(curr, next, opts); | |
24 | + opts.cssBefore.opacity = 0; | |
25 | + }); | |
26 | + opts.animIn = { | |
27 | + opacity: 1 | |
28 | + }; | |
29 | + opts.animOut = { | |
30 | + opacity: 0 | |
31 | + }; | |
32 | + opts.cssBefore = { | |
33 | + top: 0, | |
34 | + left: 0, | |
35 | + zIndex: 1, | |
36 | + display: 'block' | |
37 | + }; | |
38 | + opts.cssAfter = { | |
39 | + zIndex: 0 | |
40 | + }; | |
41 | + }; | |
20 | 42 | var options = { |
21 | - fx: 'custom', | |
22 | - animIn : { | |
23 | - opacity : 1 | |
24 | - }, | |
25 | - animOut : { | |
26 | - opacity : 0 | |
27 | - }, | |
28 | - cssBefore : { | |
29 | - zIndex : 1, | |
30 | - opacity : 0, | |
31 | - display : 'block' | |
32 | - }, | |
33 | - cssAfter : { | |
34 | - zIndex : 0 | |
35 | - }, | |
36 | - fastOnEvent : 1, | |
37 | - timeout : <%= block.interval * 1000 %> | |
43 | + fx: 'customFade', | |
44 | + fastOnEvent: 1, | |
45 | + timeout: <%= block.interval * 1000 %> | |
38 | 46 | }; |
39 | 47 | <% if block.navigation %> |
40 | 48 | options.pager = '#block-<%= block.id %> .highlights-block-pager'; | ... | ... |