Add JSFrame implementation for report window
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -71,16 +71,16 @@ function openReportWindow(e, postElement) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
// If there's already a report window open, close it and open this one.
|
// If there's already a report window open, close it and open this one.
|
||||||
if (window.top.reportWindow) {
|
if (window.top.reportWindow) {
|
||||||
window.top.reportWindow.close();
|
window.top.reportWindow.closeFrame();
|
||||||
}
|
}
|
||||||
let reportUrl = $(postElement).attr("data-report-url");
|
let reportUrl = $(postElement).attr("data-report-url");
|
||||||
window.reportWindow = new WinBox("New Report", {
|
window.top.reportWindow = jsFrame.create({
|
||||||
url: reportUrl,
|
url: reportUrl,
|
||||||
modal: true,
|
modal: true,
|
||||||
onclose: function (force) {
|
width: 360,
|
||||||
window.top.reportWindow = null;
|
height: 95,
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
window.top.reportWindow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onLoad(e) {
|
function onLoad(e) {
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ function openReplyWindow() {
|
|||||||
url: REPLY_URL,
|
url: REPLY_URL,
|
||||||
});
|
});
|
||||||
window.top.replyWindow.show();
|
window.top.replyWindow.show();
|
||||||
window.top.replyWindow.on("hid", (frame, info) => console.log("hidden"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function replyTextbox() {
|
function replyTextbox() {
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ function isIframe() {
|
|||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(isIframe()) {
|
if(isIframe()) {
|
||||||
window.top.reportWindow.close();
|
if(typeof window.top.reportWindow !== "undefined" && window.top.reportWindow) {
|
||||||
|
window.top.reportWindow.closeFrame();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user