equal
deleted
inserted
replaced
61 /** |
61 /** |
62 * Init lightbox plug-in |
62 * Init lightbox plug-in |
63 */ |
63 */ |
64 $(document).on('click', '[data-toggle="lightbox"]', function (event) { |
64 $(document).on('click', '[data-toggle="lightbox"]', function (event) { |
65 event.preventDefault(); |
65 event.preventDefault(); |
66 $(this).ekkoLightbox({ |
66 var source = $(this); |
67 wrapping: false, |
67 ams.ajax.check($.fn.ekkoLightbox, |
68 alwaysShowClose: true |
68 '/--static--/pyams_default_theme/js/ext/ekko-lightbox' + ams.devext + '.js', |
69 }); |
69 function() { |
|
70 source.ekkoLightbox({ |
|
71 wrapping: false, |
|
72 alwaysShowClose: true, |
|
73 onContentLoaded: function() { |
|
74 var element = this.element(), |
|
75 description = element.data('description'), |
|
76 modal = this.modal(), |
|
77 container = $('.ekko-lightbox-container', modal); |
|
78 if (description) { |
|
79 $('<div></div>').addClass('description') |
|
80 .text(description) |
|
81 .appendTo(container); |
|
82 } else { |
|
83 $('.description', container).remove(); |
|
84 } |
|
85 } |
|
86 }); |
|
87 }); |
70 }); |
88 }); |
71 |
89 |
72 /** |
90 /** |
73 * Initialize MyAMS custom click handlers |
91 * Initialize MyAMS custom click handlers |
74 */ |
92 */ |