diff --git a/static/js/lightbox.js b/static/js/lightbox.js index 4e357ff481..84d6db7cb3 100644 --- a/static/js/lightbox.js +++ b/static/js/lightbox.js @@ -1,5 +1,7 @@ import $ from "jquery"; +import render_lightbox_overlay from "../templates/lightbox_overlay.hbs"; + import * as blueslip from "./blueslip"; import {LightboxCanvas} from "./lightbox_canvas"; import * as message_store from "./message_store"; @@ -280,6 +282,9 @@ export function next() { // this is a block of events that are required for the lightbox to work. export function initialize() { + const rendered_lightbox_overlay = render_lightbox_overlay(); + $("body").append(rendered_lightbox_overlay); + $("#main_div, #compose .preview_content").on("click", ".message_inline_image a", function (e) { // prevent the link from opening in a new page. e.preventDefault(); diff --git a/templates/zerver/app/lightbox_overlay.html b/static/templates/lightbox_overlay.hbs similarity index 67% rename from templates/zerver/app/lightbox_overlay.html rename to static/templates/lightbox_overlay.hbs index ea6068065c..b950580d5f 100644 --- a/templates/zerver/app/lightbox_overlay.html +++ b/static/templates/lightbox_overlay.hbs @@ -4,14 +4,14 @@
-
+
- {{ _('Open') }} - {{ _('Download') }} + {{t "Open" }} + {{t "Download" }}
diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html index eeec49ed5e..230833692f 100644 --- a/templates/zerver/app/index.html +++ b/templates/zerver/app/index.html @@ -42,7 +42,6 @@ -{% include "zerver/app/lightbox_overlay.html" %}