summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commitf1694d4cec610cfa3f10b85b524f4f94ae7af22a (patch)
treeabf0fe2dce99f86b547b3cf7d03880b6245195d0
parent7987ca4930b41a82fede79023470e137bec4d2de (diff)
downloadChimère-f1694d4cec610cfa3f10b85b524f4f94ae7af22a.tar.bz2
Chimère-f1694d4cec610cfa3f10b85b524f4f94ae7af22a.zip
JS UI: Simplify tabs management
-rw-r--r--chimere/templates/chimere/detail.html25
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: ''