add files necessary for last commit.
authorcavaliet
Wed, 09 Mar 2011 16:16:06 +0100
changeset 40 7fe7db7a5b41
parent 39 47504376ee9d
child 42 491513b6e144
add files necessary for last commit.
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt_full.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/ldt_div.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/init_ldt_full.html	Wed Mar 09 16:16:06 2011 +0100
@@ -0,0 +1,26 @@
+{% extends "ldt/ldt_utils/workspace_base.html" %}
+{% load i18n %}
+
+{% block js_import %}
+    {{block.super}}
+    <script type="text/javascript">
+        function ldtSaveOk() {
+            //alert("LDT a fini sa sauvegarde");
+        }
+        
+        window.onbeforeunload = onBeforeUnload_Handler;
+        
+        function onBeforeUnload_Handler(){
+            //refreshing even the user click the "Cancel" button
+            if($('#ldtInitSwf').get(0).isModified()=="true"){
+                return "{% trans 'Your current work is modified. Click Cancel and save it one last time before leaving. Click OK to leave without saving.' %}";
+            }
+        }
+    </script>
+{% endblock %}
+
+
+{% block content %}
+    {% include "ldt/ldt_utils/partial/ldt_div.html" %}
+{% endblock %}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/ldt_div.html	Wed Mar 09 16:16:06 2011 +0100
@@ -0,0 +1,38 @@
+{% comment %}
+Yes we include swfobject.js in the middle of the page...
+{% endcomment %}
+<script type="text/javascript" src="{{LDT_MEDIA_PREFIX}}js/swfobject.js"></script>
+<div id="ldtInit" name="ldtInit" style="background-color: #00FF00; width: 1201px; height: 831px; left: 100px; top: 100px; z-index: 99999999; margin: 0; padding: 0;">&nbsp;</div>
+<script language="JavaScript" type="text/javascript">
+
+	var params = {
+		quality:"high",
+		allowFullScreen:"true",
+		wmode:"transparent",
+		allowScriptAccess:"always"
+	};
+
+	var flashvars = {
+		colorUrl:'{{colorurl}}',
+		i18nUrl: '{{i18nurl}}',
+		language: '{{language}}',
+		{% if url %}
+		urlBase:'{{baseurl}}',
+		initUrl:'{{url}}',
+		{% endif %}
+		{% ifequal readonly 'false' %}
+		readOnly: '{{readonly}}',
+		postUrl:'{{posturl}}',
+		postVars: encodeURIComponent('id={{id}}&csrfmiddlewaretoken={{csrf_token}}'),
+		{% else %}
+		readOnly:'true',
+		{% endifequal %}
+		startTime:'100'	 
+	};
+
+	var attributes = {  id: "ldtInitSwf",  name: "ldtInitSwf"};
+
+	swfobject.embedSWF("{{LDT_MEDIA_PREFIX}}swf/ldt/LignesDeTempsFlex.swf", "ldtInit", "1001", "631", "9.0.0", "{{LDT_MEDIA_PREFIX}}swf/expressInstall.swf", flashvars, params, attributes);
+
+</script>
+