--- a/integration/js/annotation-article.js Mon Jul 08 12:53:32 2013 +0200
+++ b/integration/js/annotation-article.js Mon Jul 22 12:02:47 2013 +0200
@@ -127,7 +127,7 @@
+ '<% } else { %><p><%- annotation.comment || "(sans commentaire)" %></p><% } %>'
+ '<h3>Mots-clés :</h3>'
+ '<ul class="<%- editable ? "annotation-tags-form" : "" %>"><% _(annotation.tags).forEach(function(tag) { %><li><%- tag %></li><% }) %></ul>'
- + '<% if (editable) { %><div><a class="annotation-remove" href="#">Supprimer</a><input class="annotation-submit" type="submit" value="Enregistrer" /></div><% } %>'
+ + '<% if (editable) { %><h3><input class="annotation-public" type="checkbox" <% if (annotation.isPublic) {%>checked <% } %>/>Annotation publique</h3><div><a class="annotation-remove" href="#">Supprimer</a><input class="annotation-submit" type="submit" value="Enregistrer" /></div><% } %>'
+ '</form></div>'
);
@@ -218,11 +218,17 @@
$(".annotation-frames").append(frame);
$(".annotation-list").append(li);
- frame.find(".annotation-textarea").on("keyup change", function() {
+ frame.find(".annotation-textarea").on("keyup paste input change", function() {
annotation.comment = $(this).val();
li.find(".annotation-comment").text(annotation.comment || "(Sans commentaire)");
});
+ frame.find(".annotation-public").change(function() {
+ annotation.isPublic = $(this).is(":checked");
+ });
+
+ frame.find("")
+
var ontagchange = function(evt, ui) {
annotation.tags = $(this).tagit("assignedTags");
li.find(".annotation-tags").text((annotation.tags || []).join(", ") || "(aucun mot-clé)");