added option (title_editable, default is true) to make the title uneditable in edit mode
--- a/client/js/defaults.js Wed Jul 27 15:40:57 2016 +0200
+++ b/client/js/defaults.js Mon Oct 03 13:50:52 2016 +0200
@@ -69,6 +69,8 @@
/* allow the edition of the user name */
user_color_editable: true,
/* allow the edition of the user color */
+ title_editable: true,
+ /* allow the edition of the renkan title */
show_user_color: true,
/* show user colors in the list */
show_save_button: true,
--- a/client/templates/scene.html Wed Jul 27 15:40:57 2016 +0200
+++ b/client/templates/scene.html Mon Oct 03 13:50:52 2016 +0200
@@ -1,7 +1,7 @@
<% if (options.show_top_bar) { %>
<div class="Rk-TopBar">
<div class="loader"></div>
- <% if (!options.editor_mode) { %>
+ <% if (!options.editor_mode || !options.title_editable) { %>
<h2 class="Rk-PadTitle">
<%- project.get("title") || translate("Untitled project")%>
</h2>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/test-writable-simple-title-not-editable.html Mon Oct 03 13:50:52 2016 +0200
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="fr">
+ <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/jquery.js"></script>
+ <script src="../lib/jquery-mousewheel/jquery.mousewheel.js"></script>
+ <script src="../lib/lodash/lodash.js"></script>
+ <script src="../lib/backbone/backbone.js"></script>
+ <script src="../lib/backbone-relational/backbone-relational.js"></script>
+ <script src="../lib/paper/paper-full.js"></script>
+ <script src="../js/main.js"></script>
+ <script src="../js/dataloader.js"></script>
+ <script src="../js/router.js"></script>
+ <script src="../js/models.js"></script>
+ <script src="../js/defaults.js"></script>
+ <script src="../js/i18n.js"></script>
+ <script src="../dist/js/templates.js"></script>
+ <script src="../js/full-json.js"></script>
+ <script src="../js/ldtjson-bin.js"></script>
+ <script src="../js/list-bin.js"></script>
+ <script src="../js/wikipedia-bin.js"></script>
+ <script data-main="../js/main-renderer" src="../lib/requirejs/require.js"></script>
+ <script type="text/javascript">
+ function startRenkan(){
+ var _renkan = new Rkns.Renkan({
+ property_files: [ "../data/properties.json" ],
+ /*user_id: "u-iri",
+ language: "fr",
+ node_fill_color: false*/
+ show_bins: false,
+ static_url: "../",
+ title_editable: false,
+ });
+ Rkns.jsonIO(_renkan, {
+ url: "/simple-persist"
+ });
+ };
+ </script>
+ <link rel="stylesheet" href="../css/renkan.css" />
+ </head>
+
+ <body>
+ <div id="renkan"></div>
+ </body>
+</html>