web/static/js/projectscontents.js
changeset 47 699be5c7b4ac
parent 45 db4e163c7c8e
child 49 55f91a1f9df8
--- a/web/static/js/projectscontents.js	Sat Sep 11 01:18:28 2010 +0200
+++ b/web/static/js/projectscontents.js	Mon Sep 13 10:32:10 2010 +0200
@@ -18,6 +18,7 @@
 	$('.ldt_link',base_node).nyroModal({
        	type: 'iframe',
        	forceType: 'iframe',
+       	windowResize: false,
    		height:662, 
    		width:1022,
    		bgColor: 'rgb(239, 239, 239)',
@@ -28,6 +29,7 @@
  	$('.ldt_link_create',base_node).nyroModal({
         type: 'iframe',
         forceType: 'iframe',
+        windowResize: false,
         height:680, 
         width:500,
         bgColor: 'rgb(239, 239, 239)',
@@ -46,6 +48,18 @@
               // do nothing
              }                   
              callback();
+        	},
+        	endShowContent: function(elts, settings){
+        		var iframe = $('#nyroModalIframe', elts.content);
+    			iframe.load(function(){
+    				var swfobject = $(this).contents().find("#ldtInitSwf"); 
+    				if (swfobject.length) {
+    					$.nyroModalSettings({
+    						height: swfobject.height() + 31,
+    						width: swfobject.width() + 21
+    					});
+    				}
+    			});
         	}
     	});
 
@@ -58,14 +72,14 @@
 		 	ajax: { data: ({ json_url:json_url, player_id:player_id }) }
 		  	});*/
 		   $.nyroModalManual({
-		         type: 'iframe',
-		         forceType: 'iframe',
-		         titleFromIframe: false,
-		   	height:662, 
-		  		width:650,
-		  		bgColor: 'rgb(239, 239, 239)',
-		  		padding: 5,
-		    url: '{% url franceculture.views.popup_embed %}?json_url='+escape(json_url)+'&player_id='+escape(player_id),
+		       type: 'iframe',
+		       forceType: 'iframe',
+		       titleFromIframe: false,
+		       height:662, 
+               width:650,
+               bgColor: 'rgb(239, 239, 239)',
+               padding: 5,
+		       url: '{% url franceculture.views.popup_embed %}?json_url='+escape(json_url)+'&player_id='+escape(player_id),
 		   });
 		   return false;
 	});