Skip to content
Snippets Groups Projects
Commit ffc676e6 authored by Chris Lawton's avatar Chris Lawton
Browse files

move fancybox settings in to its' own component

parent 71741164
No related branches found
No related tags found
No related merge requests found
import $ from './../globals';
import '@fancyapps/fancybox';
export default () => {
$('[data-fancybox]').fancybox({
animationDuration : 350,
animationEffect : 'fade',
afterClose: function(){
$('.django-select2-checkboxes').select2('close');
}
});
};
...@@ -5,7 +5,7 @@ import MobileSearch from './components/mobile-search'; ...@@ -5,7 +5,7 @@ import MobileSearch from './components/mobile-search';
import Tabs from './components/tabs'; import Tabs from './components/tabs';
import listInputFiles from './components/list-input-files'; import listInputFiles from './components/list-input-files';
import toggleActionsPanel from './components/toggle-actions-panel'; import toggleActionsPanel from './components/toggle-actions-panel';
import '@fancyapps/fancybox'; import fancyboxGlobal from './components/fancybox-global';
(function ($) { (function ($) {
$(document).ready(function(){ $(document).ready(function(){
...@@ -34,14 +34,9 @@ import '@fancyapps/fancybox'; ...@@ -34,14 +34,9 @@ import '@fancyapps/fancybox';
// Show actions sidebar on mobile // Show actions sidebar on mobile
toggleActionsPanel(); toggleActionsPanel();
// Fancybox global options // Global fancybox options
$('[data-fancybox]').fancybox({ fancyboxGlobal();
animationDuration : 350,
animationEffect : 'fade',
afterClose: function(){
$('.django-select2-checkboxes').select2('close');
}
});
// Close any open select2 dropdowns when inside a modal // Close any open select2 dropdowns when inside a modal
$('.modal').click((e) => { $('.modal').click((e) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment