From f1694d4cec610cfa3f10b85b524f4f94ae7af22a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 28 Oct 2012 16:41:41 +0100 Subject: JS UI: Simplify tabs management --- chimere/templates/chimere/detail.html | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html index 9c2414e..70e66b5 100644 --- a/chimere/templates/chimere/detail.html +++ b/chimere/templates/chimere/detail.html @@ -94,20 +94,19 @@ $(document).ready(function(){ $("#gallery-{{marker.pk}}").dialog("option", "width", 'auto'); $("#gallery-{{marker.pk}}").dialog("option", "position", ['center', 'center']); - } - }); -}); -$("#gallery-{{marker.pk}}").bind( "dialogclose", function(event, ui) { - //pause all medias - $('video').each(function(index){$(this).pause()}); - $('audio').each(function(index){$(this).pause()}); -}); -$('.show_gallery_link').click(function(){ - $("#gallery-{{marker.pk}}").dialog('open'); - return false; -}); + }, + close: function(event, ui){ + //pause all medias + $('video').each(function(index){$(this).pause()}); + $('audio').each(function(index){$(this).pause()}); + $('.tabs').tabs('destroy'); -$(document).ready(function(){ + } + }); + $('.show_gallery_link').click(function(){ + $("#gallery-{{marker.pk}}").dialog('open'); + return false; + }); $("a[rel^='prettyPhoto']").prettyPhoto({ show_title: false, social_tools: '' -- cgit v1.2.3