fix error
This commit is contained in:
parent
b5040c0d7c
commit
4cad16bd13
|
@ -516,8 +516,17 @@ var GalleryTheaterWidget = function(widget){
|
|||
initialize();
|
||||
}
|
||||
if (typeof bind_gallery_widget_slide == 'undefined'){
|
||||
function set_gallery_height(widget){
|
||||
var h = widget.find('.gallery-thumb-container').height()+widget.find('.gallery-image.gal-active').height()+widget.find('.gallery-actions').height()+widget.find('.theaterButton').height()+20
|
||||
widget.find('.show-gallery-2.gallery').css('height',h)
|
||||
}
|
||||
var bind_gallery_widget_slide = function(){
|
||||
$('.widget-gallery.widget5').trigger('onload')
|
||||
$('.widget-gallery.widget5').each(function(){
|
||||
GalleryTheaterWidget($(this));
|
||||
$(window).resize(function(){
|
||||
set_gallery_height($(this))
|
||||
});
|
||||
})
|
||||
}
|
||||
$(document).ready(function(){
|
||||
bind_gallery_widget_slide()
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<script type="text/javascript">
|
||||
function set_gallery_height(widget){
|
||||
var h = widget.find('.gallery-thumb-container').height()+widget.find('.gallery-image.gal-active').height()+widget.find('.gallery-actions').height()+widget.find('.theaterButton').height()+20
|
||||
widget.find('.show-gallery-2.gallery').css('height',h)
|
||||
}
|
||||
</script>
|
||||
<div class="widget-gallery gallery widget5 no-print">
|
||||
<h3 class="widget-title">
|
||||
<span>{{widget-title}}</span>
|
||||
</h3>
|
||||
<% OrbitHelper.render_css_in_head(["theater.css"]) %>
|
||||
<%= javascript_include_tag "jquery.touchSwipe.min" %>
|
||||
<%= javascript_include_tag "theater-widget" %>
|
||||
<% OrbitHelper.render_meta_tags([{"name" => "mobile-web-app-capable","content" => "yes"},{"name" => "apple-mobile-web-app-status-bar-style","content" => "black-translucent"}]) %>
|
||||
<div class="widget-gallery gallery widget5 no-print" onload="GalleryTheaterWidget($(this));$(window).resize(function(){set_gallery_height($(this))});">
|
||||
<div id="gallery-theater-stage">
|
||||
<div class="show-gallery-2 gallery" style="margin-top: 2.4em;">
|
||||
<div class="gallery-loader">
|
||||
|
|
Loading…
Reference in New Issue