From 85b26f960d472130959aab7033ad14ad477811cc Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 17 Dec 2015 16:46:46 +0100 Subject: [PATCH] hides the admin checkboxes in annotator --- app/assets/javascripts/annotatable.js.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/annotatable.js.coffee b/app/assets/javascripts/annotatable.js.coffee index ddd82e6cf..712500cf3 100644 --- a/app/assets/javascripts/annotatable.js.coffee +++ b/app/assets/javascripts/annotatable.js.coffee @@ -6,11 +6,14 @@ App.Annotatable = ann_id = $this.data("annotatable-id") app = new annotator.App() - .include(annotator.ui.main, { element: this }) - .include(annotator.storage.http, { prefix: "", urls: { search: "/annotations/search" } }) .include -> beforeAnnotationCreated: (ann) -> ann[ann_type + "_id"] = ann_id + ann.permissions = ann.permissions || {} + ann.permissions.admin = [] + .include(annotator.ui.main, { element: this }) + .include(annotator.storage.http, { prefix: "", urls: { search: "/annotations/search" } }) + app.start().then -> app.ident.identity = $('html').data('current-user-id')