server/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html
changeset 51 3247fccfbd3f
parent 47 267d67791e05
child 54 43c35d6ca3f0
--- a/server/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html	Tue Jan 01 09:28:03 2013 +0100
+++ b/server/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html	Mon Jan 14 16:00:07 2013 +0100
@@ -2,6 +2,7 @@
 <html lang="fr" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
     <head>
         <meta charset="utf-8" />
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
         <title>Test de Rendu RENKAN</title>
         <meta name="description" content="" />
@@ -22,7 +23,7 @@
         <script src="js/ldtjson-bin.js" th:src="@{/static/js/ldtjson-bin.js}"></script>
         <script src="js/paper-renderer.js" th:src="@{/static/js/paper-renderer.js}"></script>
         <script type="text/javascript" src="js/config.js" th:src="@{/static/js/config.js}"></script>
-        <script type="text/javascript" src="js/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true" th:src="@{/static/js/dojo.js}"></script>        
+        <script type="text/javascript" src="lib/dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true" th:src="@{/static/lib/dojo/dojo.js}"></script>        
         <script type="text/javascript" th:inline="javascript">
             var _proj;
             require(["corenkan"], function(corenkan) {            
@@ -75,19 +76,7 @@
                         Rkns.jsonIO(_renkan, {
                             url: /*[[@{/rest/projects/}+${project.id}]]*/ "data/simple-persist.php",
                             callback: function(_proj, _renkan) {
-                            	corenkan.app.setProject(_proj);
-                            	var anon_users = _proj.get("users").where({title: "anonymous"});
-                            	if(anon_users.length == 0) {
-                                	_proj.current_user = _proj.addUser({
-                                        id: Rkns.Utils.getUID("u"),
-                                        title: "anonymous",
-                                        color: "#000080",
-                                    });
-                            	}
-                            	else {
-                            		_proj.current_user = anon_users[0];
-                            	}
-                            	_renkan.current_user = _proj.current_user.id;
+                            	corenkan.app.setObjects(_renkan);
                             }
                         });
                 	}