]> git.parisson.com Git - teleforma.git/commitdiff
try bugfix
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 20 Jul 2014 17:54:26 +0000 (19:54 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 20 Jul 2014 17:54:26 +0000 (19:54 +0200)
teleforma/templates/teleforma/seminar_detail.html

index 99e24042ee9e877c6b08a3d413064c8080537635..1c4cdf9f181c730cd8531f02341fa6c67ada5514 100644 (file)
@@ -37,6 +37,7 @@ $(function () {
 {% if user.is_staff %}
 <script type="text/javascript">
 
+
 var seminarUtils = {
         publish : function(id){
             var p = $('#publish');
@@ -62,7 +63,7 @@ var seminarUtils = {
          },
         }
 
-$(document).ready(function(){
+$(window).ready(function(){
     var f = seminarUtils;
     f.load('{{seminar.id}}','{{user.username}}');
 
@@ -83,6 +84,11 @@ $(document).ready(function(){
           });
     });
 
+$(document).ready(function(){
+    $(window).bind('beforeunload', function(){
+            f.unload('{{seminar.id}}','{{user.username}}');
+          });
+    });
 
 </script>
 {% endif %}