From be7513be2fd6bb3d1b46640d678d004da4e70365 Mon Sep 17 00:00:00 2001 From: Epagris Date: Thu, 26 Sep 2024 08:58:37 +0200 Subject: [PATCH] - initial steps on frame location separation --- default_frame.php | 2 ++ frames/frames_common.php | 5 +++++ js/main.js | 31 ------------------------------- js/spreadquiz.js | 6 ++++-- 4 files changed, 11 insertions(+), 33 deletions(-) create mode 100644 frames/frames_common.php diff --git a/default_frame.php b/default_frame.php index 5c2df1b..260c40a 100644 --- a/default_frame.php +++ b/default_frame.php @@ -1,5 +1,7 @@ { - if (resp === "OK") { - alert("Sikeres jelszóváltoztatás!"); - hide("change_password_window"); - oldpassF.value = ""; - newpass1F.value = ""; - newpass2F.value = ""; - } else { - alert("Sikertelen jelszóváltoztatás!"); - } - }); - } -} - function change_password() { let oldpassF = document.getElementById("old_password"); let newpass1F = document.getElementById("new_password_1"); diff --git a/js/spreadquiz.js b/js/spreadquiz.js index f0d9c18..095cacb 100644 --- a/js/spreadquiz.js +++ b/js/spreadquiz.js @@ -17,8 +17,10 @@ function login() { }); } -function open_in_content_frame(url) { - document.getElementById("content_frame").src = url; +const FRAME_RELATIVE_LOCATION = ""; + +function open_in_content_frame(url, isFrame = true) { + document.getElementById("content_frame").src = (isFrame ? FRAME_RELATIVE_LOCATION : "") + url; } var USERDATA = {};