Move gallery JavaScript to gallery_detail.js

This commit is contained in:
Alexandre Iooss 2022-03-11 19:26:59 +01:00
parent 443ba11ea2
commit 1d287792df
3 changed files with 15 additions and 10 deletions

View file

@ -10,8 +10,8 @@ class lgAdmin {
constructor(instance, $LG) {
this.core = instance;
this.$LG = $LG;
this.isStaff = instance.settings.isStaff;
this.csrfToken = instance.settings.csrfToken;
this.isStaff = document.querySelector('[name=is_staff]').value === "true";
this.csrfToken = document.querySelector('[name=csrfmiddlewaretoken]').value;
this.photoId = 0;
return this;
}