Closed (fixed)
Project:
Views Slideshow
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
27 Mar 2010 at 09:13 UTC
Updated:
20 Apr 2010 at 06:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
ceardach commentedThis patch allowed me to enter the following:
The code snippet resizes the container at every transition and allowed me to avoid some issues I was having with my usage of views slideshow.
Since it will be difficult to predict and account for all use cases of slideshow behaviour, this patch would provide added flexibility. I recommend it being committed.
Comment #2
dingbats commentedThe previous patch failed to call the function with more than one Advanced Option. The new patch resolves this issue by wrapping the functions inside a closure. I've also simplified the regex.
Comment #3
redndahead commentedMarking as critical to look at before release.
Comment #4
redndahead commentedAdding the patch from #733328: Advanced Settings does not honor functions by jennycita
Even though this one is newer marking the other as duplicate. I would like it if dingbats or ceardach could test this patch as it's a simpler fix. Any possible issues?
Comment #5
jennycita commentedSubscribing. My patch was quick-and-dirty and requires the entire function to be on one line -- a substantial improvement over not being able to use functions at all, but an approach that allows multi-line function overrides is worth looking into.
Comment #6
redndahead commented@jennycita thanks that's good to know.
Comment #7
dingbats commented@redndahead My patch is a little more complicated but with two advantages: 1) it doesn't use eval, and 2) it doesn't overwrite previously set functions.
To illustrate 2): have a look at lines 16-45 where
settings.optsis defined. You'll see thatbeforeandafteralready have functions, which jennycita's patch will allow Views administrators to overwrite consequently breaking the slideshow. My patch creates a closure in which the previous function and the new function are called.It may also be worth noting that the ability to parse multi-line functions is a separate issue and would require a separate patch to change how advanced options are tokenized; currently they are split by newlines on line 58:
var advanced = settings.advanced.split("\n");.Comment #8
redndahead commentedThanks for the update. I'm not sure how to tokenize any better without making it somewhat look clunky. Maybe with some javascript I can do something that won't look completely hideous....maybe
For now this may have to be limited to keeping it all on one line.
Comment #9
jennycita commentedAh, misunderstood -- Comment #1 lead me to believe this solution accepted multi-line functions. Looking at the patch, I see that's not the case.
Comment #10
redndahead commentedThis has been committed. Thanks