-
AuthorPosts
-
March 31, 2016 at 1:24 am #605582
I have a problem using the AJAX Portfolio. It works great with slideshows, but when I use the ‘Define Custom Link’ and link to a Vimeo video there are a couple of issue.
Main problem is that the video Lightbox opens over the portfolio featured image which could be way down the window in a big portfolio grid, but the window slides back to the top of the page to show the AJAX preview. This results in the Lightbox being off screen, below the viewable area. A great solution would be to disable the AJAX preview when Define Custom Link is selected. OR to have the Lightbox always open over the AJAX preview area at the top of the portfolio grid- not over the portfolio thumbnail.
Second, when you open a slideshow over the AJAX preview area and use the large navigation arrows to the far left and right of the screen, the portfolio items get stuck on videos. That is, they will move from one portfolio item to another until they open a video, then they will only open other videos in the grid and will skip over any ‘image’ portfolio items that didn’t use Define Custom Link. This isn’t a major issue, and I will probably just hide the large navigation arrows so a user has to close the Lightbox to move to the next portfolio item.
The AJAX preview is a great feature and I hope to keep using it as the Open in Lightbox mode doesn’t allow multiple preview images to be viewed.
March 31, 2016 at 3:45 pm #605968Hi,
Open js/avia.js and look for line:
container.on("click", "a", methods.load_item);
Replace it by this:
container.on("click", "a:not([href*=vimeo.com])", methods.load_item);
Regards,
JosueApril 1, 2016 at 12:43 am #606392Thanks Josue
I didn’t find that line in avia.js but I did find it in shortcodes.js. I changed it there but this stopped all AJAX previews from working, just links to portfolio item.
April 2, 2016 at 1:32 pm #606959Hi!
We checked the site but there’s an error. Try to replace the code above with this:
container.on("click", "a:not([href*=:"vimeo.com"])", methods.load_item);
Best regards,
IsmaelApril 5, 2016 at 1:28 am #607979Thanks, site is running again now, but that edit didn’t work. This time stopped all Portfolio featured images loading in the Grid, plus links directly to item on all portfolio items bypassing AJAX previews.
April 5, 2016 at 4:32 am #608013After looking again at this i’m afraid it would require an extensive modification to the theme, unfortunately that’s beyond our support scope. You can request a customisation quote from a third-party provider here.
Regards,
JosueApril 5, 2016 at 4:46 am #608020Kind of disappointing Josue, seems to me the AJAX preview should behave this way or it is not really usable to display images and videos. Plus I don’t really want to pay again to get this working as it was already purchased as part of the theme.
Maybe a better approach would be to flag this as a bug that could be rectified in a future release?
April 5, 2016 at 10:52 am #608170Ignore my last reply, i think i managed to find a workaround, check the gallery page please.
Regards,
JosueApril 6, 2016 at 12:54 am #608581Josue, you are my hero! looks great!
So would I be right in thinking the final edit was
//container.on("click", "a", methods.load_item); container.on("click", "a:not(.mfp-iframe)", methods.load_item);
- This reply was modified 8 years, 7 months ago by cbrssict.
April 6, 2016 at 1:17 am #608586Correct, that would be it. Also if you’re using a child theme you can have a version of js/shortcodes.js in your child theme directory by adding this to functions.php:
function change_shortcodesjs() { wp_dequeue_script( 'avia-shortcodes' ); wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_shortcodesjs', 100 );
March 5, 2018 at 3:47 am #921270Can anyone help me find a more permanent solution this issue. The hack listed above has been working for the last year, until my last Enfold update. But looks like shortcodes.js no long uses the same code to trigger a lightbox.
Just to repeat the original issue was with a Portfolio link using the “Define Custom Link” Option to open a video in a Lightbox
When selected the Lightbox opens relative to the page position, but the viewable area returns to the top of screen, meaning the Lightbox is off the bottom of the window.Would be awesome if a permanent solution could be implemented, as it would seem the option is unusable without the hack above (which obviously now no longer works).
March 6, 2018 at 3:37 am #921985Hi,
Do you have version 4.2.5? Please check if the config-templatebuilder > aviashortcodes > portfolio folder exists. If you can see the folder, edit the portfolio.js file then look for this code around line 279.
container.on("click", "a", methods.load_item);
You can do the previous modification.
Best regards,
IsmaelMarch 6, 2018 at 3:48 am #921989Hi Ismael
Yes I see the Portfolio Folder, will try the edit… I’m running 4.2.5- This reply was modified 6 years, 8 months ago by cbrssict.
March 6, 2018 at 4:16 am #922002Didn’t seem to work. Edited portfolio.js to
//container.on("click", "a", methods.load_item); container.on("click", "a:not(.mfp-iframe)", methods.load_item);
But this hasn’t fixed the issue as it was previously.
March 6, 2018 at 4:19 am #922004Also didn’t work…
container.on("click", "a:not([href*=:"vimeo.com"])", methods.load_item);
- This reply was modified 6 years, 8 months ago by cbrssict.
March 7, 2018 at 5:14 am #922725Hi,
Thank you for the update. Did you install a cache and minification plugin? Please make sure that the scripts and stylesheets are refreshed. Or post the login details in the private field so that we can test it.
Best regards,
IsmaelMarch 8, 2018 at 1:58 am #923497Don’t think it is a cache issue. Please see login dets.
- This reply was modified 6 years, 8 months ago by cbrssict.
March 9, 2018 at 10:23 am #924374 -
AuthorPosts
- You must be logged in to reply to this topic.