server/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html
changeset 47 267d67791e05
child 51 3247fccfbd3f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/main/webapp/WEB-INF/templates/renkanProjectEdit.html	Tue Dec 25 21:29:11 2012 +0100
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html lang="fr" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
+    <head>
+        <meta charset="utf-8" />
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+        <title>Test de Rendu RENKAN</title>
+        <meta name="description" content="" />
+        <meta name="author" content="Institut de Recherche et d'Innovation" />
+        <script src="lib/jquery.min.js" th:src="@{/static/lib/jquery.min.js}" ></script>
+        <script src="lib/jquery.mousewheel.min.js" th:src="@{/static/lib/jquery.mousewheel.min.js}"></script>
+        <script src="lib/underscore-min.js" th:src="@{/static/lib/underscore-min.js}"></script>
+        <script src="lib/backbone.js" th:src="@{/static/lib/backbone.js}"></script>
+        <script src="lib/backbone-relational.js" th:src="@{/static/lib/backbone-relational.js}"></script>
+        <script src="lib/paper.js" th:src="@{/static/lib/paper.js}"></script>
+        <script src="js/main.js" th:src="@{/static/js/main.js}"></script>
+        <script src="js/i18n.js" th:src="@{/static/js/i18n.js}"></script>
+        <script src="js/models.js" th:src="@{/static/js/models.js}"></script>
+        <script src="js/corenkan-json.js" th:src="@{/static/js/corenkan-json.js}"></script>
+        <!--script src="js/random-data.js" th:src="@{/static/js/random-data.js}"></script-->
+        <script src="js/twitter-bin.js" th:src="@{/static/js/twitter-bin.js}"></script>
+        <script src="js/wikipedia-bin.js" th:src="@{/static/js/wikipedia-bin.js}"></script>
+        <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" th:inline="javascript">
+            var _proj;
+            require(["corenkan"], function(corenkan) {            
+              $(function() {
+                _renkan = new Rkns.Renkan({
+                    url: /*[[@{/rest/projects/}+${project.id}]]*/ "data/simple-persist.php",
+                    static_url : /*[[@{/static/}]]*/ "",
+                    bins: [
+                        {
+                            bin: Rkns.Wikipedia.Bin,
+                            lang: "en",
+                            search: "Digital Humanities"
+                        },
+                        {
+                            bin: Rkns.Wikipedia.Bin,
+                            lang: "ja",
+                            search: "Digital Humanities"
+                        },
+                        {
+                            bin: Rkns.Twitter.Bin,
+                            search: "Digital Humanities"
+                        },
+                        {
+                            title: "LDT Project",
+                            bin: Rkns.Ldt.ProjectBin,
+                            project_id: "67280b1c-ff30-11e0-a82d-00145ea49a02",
+                            ldt_platform: "http://ldt.iri.centrepompidou.fr/"
+                        }
+                    ],
+                    search: [
+                        {
+                            type: Rkns.Wikipedia.Search,
+                            lang: "fr"
+                        }, 
+                        {
+                            type: Rkns.Wikipedia.Search,
+                            lang: "en"
+                        }, 
+                        {
+                            type: Rkns.Wikipedia.Search,
+                            lang: "ja"
+                        },
+                        {
+                            type: Rkns.Twitter.Search
+                        }
+                    ],
+                });
+                corenkan.app.onStatusChange = function(status) {
+                	if(status == "ready") {
+                        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;
+                            }
+                        });
+                	}
+                };
+              });
+            });
+        </script>
+        <link rel="stylesheet" href="css/renkan.css" th:href="@{/static/css/renkan.css}"/>
+        <style type="text/css">
+        </style>
+    </head>
+
+    <body>
+        <div id="renkan"></div>
+    </body>
+</html>