Add titles to viewer action buttons
This commit is contained in:
parent
d2506a587d
commit
407a73cc89
1 changed files with 3 additions and 3 deletions
|
|
@ -18,15 +18,15 @@ class lgAdmin {
|
||||||
const reportIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z\"/></svg>";
|
const reportIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z\"/></svg>";
|
||||||
|
|
||||||
// Add button linking to Django admin page
|
// Add button linking to Django admin page
|
||||||
this.core.$toolbar.append(`<a href="#" id="lg-admin" class="lg-icon lg-bi-icon">${adminIcon}</a>`);
|
this.core.$toolbar.append(`<a href="#" id="lg-admin" title="Go to admin" class="lg-icon lg-bi-icon">${adminIcon}</a>`);
|
||||||
document.getElementById("lg-admin").style.display = this.isStaff ? 'block' : 'none';
|
document.getElementById("lg-admin").style.display = this.isStaff ? 'block' : 'none';
|
||||||
|
|
||||||
// Add button to delete photo
|
// Add button to delete photo
|
||||||
this.core.$toolbar.append(`<a href="#" id="lg-delete" class="lg-icon lg-bi-icon">${deleteIcon}</a>`);
|
this.core.$toolbar.append(`<a href="#" id="lg-delete" title="Remove this photo" class="lg-icon lg-bi-icon">${deleteIcon}</a>`);
|
||||||
document.getElementById("lg-delete").style.display = this.isStaff ? 'block' : 'none';
|
document.getElementById("lg-delete").style.display = this.isStaff ? 'block' : 'none';
|
||||||
|
|
||||||
// Add button to report photo
|
// Add button to report photo
|
||||||
this.core.$toolbar.append(`<a href="#" id="lg-report" class="lg-icon lg-bi-icon">${reportIcon}</a>`);
|
this.core.$toolbar.append(`<a href="#" id="lg-report" title="Notify abuse" class="lg-icon lg-bi-icon">${reportIcon}</a>`);
|
||||||
|
|
||||||
this.core.LGel.on("lgAfterSlide.admin", this.onAfterSlide.bind(this));
|
this.core.LGel.on("lgAfterSlide.admin", this.onAfterSlide.bind(this));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue