diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-28 16:41:41 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-28 16:41:41 +0100 |
| commit | f1694d4cec610cfa3f10b85b524f4f94ae7af22a (patch) | |
| tree | abf0fe2dce99f86b547b3cf7d03880b6245195d0 | |
| parent | 7987ca4930b41a82fede79023470e137bec4d2de (diff) | |
| download | Chimère-f1694d4cec610cfa3f10b85b524f4f94ae7af22a.tar.bz2 Chimère-f1694d4cec610cfa3f10b85b524f4f94ae7af22a.zip | |
JS UI: Simplify tabs management
| -rw-r--r-- | chimere/templates/chimere/detail.html | 25 |
1 files 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: '' |
