diff --git a/SETUP/tests/smoketests/pageload_smoketest.py b/SETUP/tests/smoketests/pageload_smoketest.py
index c6c7052d02..ad35161490 100755
--- a/SETUP/tests/smoketests/pageload_smoketest.py
+++ b/SETUP/tests/smoketests/pageload_smoketest.py
@@ -30,7 +30,6 @@
BASE_TESTS = [
{'path': 'activity_hub.php'},
{'path': 'pastnews.php'},
- {'path': 'pophelp.php?category=teams&name=edit_teamname'},
{'path': 'project.php?id=projectID5e23a810ef693'},
{'path': 'project.php?id=projectID5e23a810ef693&detail_level=1'},
{'path': 'project.php?id=projectID5e23a810ef693&detail_level=2'},
diff --git a/faq/pophelp/prefs/prefs_pophelp.inc b/faq/pophelp/prefs/prefs_pophelp.inc
index f63453257c..695a3a7fd2 100644
--- a/faq/pophelp/prefs/prefs_pophelp.inc
+++ b/faq/pophelp/prefs/prefs_pophelp.inc
@@ -71,13 +71,6 @@ _("
This setting specifies how your credits will appear when a project is comp
'content' => _("
The language that the site will be presented in.
"),
],
- // OBSOLETED. MAYBE.
- //'set_lang' =>
- // array (
- // 'title' => _("Language"),
- // 'content' => _("Your primary language.")
- // );
-
'set_name' =>
[
'title' => _("Name"),
@@ -181,15 +174,13 @@ have them assigned directly to you.
[
'title' => _("Interface Type"),
'content' =>
-_("This setting determines which proofreading interface you prefer.
-
-The Standard Interface is the default and is designed to work with very minimal
-browser requirements.
-
-The Enhanced Interface has additional tools and features which are not present in the
-Standard Interface and may require a more recent browser for complete functionality.
-
-Both interfaces require a frames and JavaScript enabled browser as a minimum.
"),
+_("This setting determines which proofreading interface you prefer. Both interfaces require a frames and JavaScript enabled browser as a minimum.
+
+The Standard Interface is the default, uses text-based buttons,
+and is designed to work with minimal browser requirements.
+The Enhanced Interface uses images that have tooltips for buttons,
+and some buttons not present in the Standard Interface.
+ "),
],
// FIXME In the userprefs display, add hover text to these icons
diff --git a/pinc/js_newpophelp.inc b/pinc/js_newpophelp.inc
deleted file mode 100644
index d3b9714430..0000000000
--- a/pinc/js_newpophelp.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-profile->i_res]);
- $top = ((int)$wSize[1] - 300) / 2;
- $left = ((int)$wSize[0] - 400) / 2;
-
- return "
- function newHelpWin(wFile)
- {
- var newFeatures='toolbar=0,status=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=400,height=300,top=$top,left=$left';
- window.open('$popHelpDir'+wFile,'popHelp',newFeatures);
- }
- ";
-}
diff --git a/pinc/pophelp.inc b/pinc/pophelp.inc
new file mode 100644
index 0000000000..17bc7b0af2
--- /dev/null
+++ b/pinc/pophelp.inc
@@ -0,0 +1,18 @@
+ {
+ elem.addEventListener("mouseenter", function () {
+ let content = popHelpData[this.dataset.pophelp]["content"];
+ pophelp.innerHTML = content;
+ const rect = this.getBoundingClientRect();
+ pophelp.style.left = rect.left + window.scrollX + "px";
+ pophelp.style.top = rect.bottom + window.scrollY + "px";
+ pophelp.style.display = "block";
+ });
+
+ elem.addEventListener("mouseleave", function () {
+ pophelp.style.display = "none";
+ });
+ });
+});
diff --git a/stats/includes/team.inc b/stats/includes/team.inc
index e17cdf664e..9515e6f12a 100644
--- a/stats/includes/team.inc
+++ b/stats/includes/team.inc
@@ -490,28 +490,28 @@ function showEdit($tname, $ttext, $twebpage, $tedit, $tsid)
echo "";
echo "";
- echo ""._("Team Name")." : ";
- echo " ? ";
+ echo ""._("Team Name")." : ";
+ echo " ";
echo " ";
echo "";
- echo ""._("Team Webpage")." : ";
- echo " ? ";
+ echo ""._("Team Webpage")." : ";
+ echo " ";
echo " ";
echo "";
- echo ""._("Team Avatar")." : ";
- echo " ? ";
+ echo ""._("Team Avatar")." : ";
+ echo " ";
echo " ";
echo "";
- echo ""._("Team Icon")." : ";
- echo " ? ";
+ echo ""._("Team Icon")." : ";
+ echo " ";
echo " ";
echo "";
- echo ""._("Team Description")." ";
- echo " ? ";
+ echo ""._("Team Description")." ";
+ echo " ";
echo " ";
echo "";
diff --git a/stats/teams/new_team.php b/stats/teams/new_team.php
index a3fe8fc945..909679cf99 100644
--- a/stats/teams/new_team.php
+++ b/stats/teams/new_team.php
@@ -2,7 +2,7 @@
$relPath = "./../../pinc/";
include_once($relPath.'base.inc');
include_once($relPath.'theme.inc');
-include_once($relPath.'js_newpophelp.inc');
+include_once($relPath.'pophelp.inc');
include_once($relPath.'metarefresh.inc');
include_once('../includes/team.inc'); // showEdit()
@@ -10,7 +10,10 @@
$user = User::load_current();
-$theme_extra_args = ["js_data" => get_newHelpWin_javascript("$code_url/pophelp.php?category=teams&name=edit_")];
+$theme_extra_args = [
+ "js_data" => "var popHelpData = " . get_pophelp_json("teams") . ";",
+ "js_files" => ["$code_url/scripts/pophelp.js"],
+];
$teamname = trim($_POST["teamname"] ?? "");
$text_data = stripAllString($_POST["text_data"] ?? "");
diff --git a/stats/teams/tedit.php b/stats/teams/tedit.php
index 44fead57db..366eb3c5f0 100644
--- a/stats/teams/tedit.php
+++ b/stats/teams/tedit.php
@@ -2,13 +2,16 @@
$relPath = "./../../pinc/";
include_once($relPath.'base.inc');
include_once($relPath.'theme.inc');
-include_once($relPath.'js_newpophelp.inc');
+include_once($relPath.'pophelp.inc');
include_once($relPath.'metarefresh.inc');
include_once('../includes/team.inc');
require_login();
-$theme_extra_args = ["js_data" => get_newHelpWin_javascript("$code_url/pophelp.php?category=teams&name=edit_")];
+$theme_extra_args = [
+ "js_data" => "var popHelpData = " . get_pophelp_json("teams") . ";",
+ "js_files" => ["$code_url/scripts/pophelp.js"],
+];
// Either the parameter is $_POST['tsid'] when coming from the edit form,
// or it is $_GET['tid'] when using the link on top of the team summary.
diff --git a/styles/layout.less b/styles/layout.less
index ed713e29d2..8ff6be0f98 100644
--- a/styles/layout.less
+++ b/styles/layout.less
@@ -1834,6 +1834,21 @@ p.mentor-oldest {
.center-align;
}
+/* ------------------------------------------------------------------------ */
+/* Popup Help */
+
+.pophelp {
+ .solid-border;
+ display: none;
+ position: absolute;
+ background-color: @page-background;
+ color: @page-text;
+ padding: 0 5px;
+ border-radius: 5px;
+ z-index: 1000;
+ font-size: 90%;
+}
+
/* ------------------------------------------------------------------------ */
/* Diff styling */
/* Import diff styling from MediaWiki */
diff --git a/styles/themes/charcoal.css b/styles/themes/charcoal.css
index c0aff35260..60ccf6643d 100644
--- a/styles/themes/charcoal.css
+++ b/styles/themes/charcoal.css
@@ -2822,6 +2822,19 @@ p.mentor-oldest {
text-align: center;
}
/* ------------------------------------------------------------------------ */
+/* Popup Help */
+.pophelp {
+ border: thin solid #565656;
+ display: none;
+ position: absolute;
+ background-color: #262626;
+ color: #e2e2e2;
+ padding: 0 5px;
+ border-radius: 5px;
+ z-index: 1000;
+ font-size: 90%;
+}
+/* ------------------------------------------------------------------------ */
/* Diff styling */
/* Import diff styling from MediaWiki */
/*!
diff --git a/styles/themes/classic_grey.css b/styles/themes/classic_grey.css
index ef95809fd0..25ed98b5da 100644
--- a/styles/themes/classic_grey.css
+++ b/styles/themes/classic_grey.css
@@ -2822,6 +2822,19 @@ p.mentor-oldest {
text-align: center;
}
/* ------------------------------------------------------------------------ */
+/* Popup Help */
+.pophelp {
+ border: thin solid #000000;
+ display: none;
+ position: absolute;
+ background-color: #ffffff;
+ color: #000000;
+ padding: 0 5px;
+ border-radius: 5px;
+ z-index: 1000;
+ font-size: 90%;
+}
+/* ------------------------------------------------------------------------ */
/* Diff styling */
/* Import diff styling from MediaWiki */
/*!
diff --git a/styles/themes/project_gutenberg.css b/styles/themes/project_gutenberg.css
index e77ce86f00..25877e120f 100644
--- a/styles/themes/project_gutenberg.css
+++ b/styles/themes/project_gutenberg.css
@@ -2822,6 +2822,19 @@ p.mentor-oldest {
text-align: center;
}
/* ------------------------------------------------------------------------ */
+/* Popup Help */
+.pophelp {
+ border: thin solid #000000;
+ display: none;
+ position: absolute;
+ background-color: #ffffff;
+ color: #000000;
+ padding: 0 5px;
+ border-radius: 5px;
+ z-index: 1000;
+ font-size: 90%;
+}
+/* ------------------------------------------------------------------------ */
/* Diff styling */
/* Import diff styling from MediaWiki */
/*!
diff --git a/styles/themes/royal_blues.css b/styles/themes/royal_blues.css
index 72e3a0f645..7b3dffb9e5 100644
--- a/styles/themes/royal_blues.css
+++ b/styles/themes/royal_blues.css
@@ -2822,6 +2822,19 @@ p.mentor-oldest {
text-align: center;
}
/* ------------------------------------------------------------------------ */
+/* Popup Help */
+.pophelp {
+ border: thin solid #000000;
+ display: none;
+ position: absolute;
+ background-color: #ffffff;
+ color: #000000;
+ padding: 0 5px;
+ border-radius: 5px;
+ z-index: 1000;
+ font-size: 90%;
+}
+/* ------------------------------------------------------------------------ */
/* Diff styling */
/* Import diff styling from MediaWiki */
/*!
diff --git a/tools/project_manager/editproject.php b/tools/project_manager/editproject.php
index e08ab9a8a7..70c09a0b5b 100644
--- a/tools/project_manager/editproject.php
+++ b/tools/project_manager/editproject.php
@@ -11,12 +11,9 @@
include_once('edit_common.inc');
include_once($relPath.'project_edit.inc');
include_once($relPath.'wordcheck_engine.inc');
-include_once($relPath.'js_newpophelp.inc');
require_login();
-$theme_args['js_data'] = get_newHelpWin_javascript("$code_url/faq/pophelp/project_manager/");
-
$return = $_REQUEST["return"] ?? "$code_url/tools/project_manager/projectmgr.php";
if (!user_is_PM()) {
@@ -52,7 +49,7 @@
}
}
- output_header($page_title, NO_STATSBAR, $theme_args);
+ output_header($page_title, NO_STATSBAR);
echo "$page_title \n";
if ($errors) {
@@ -107,7 +104,7 @@
$fatal_error = sprintf(_("parameter '%s' is invalid"), 'action') . ": '$requested_action'";
}
- output_header($page_title, NO_STATSBAR, $theme_args);
+ output_header($page_title, NO_STATSBAR);
echo "$page_title \n";
if ($fatal_error != '') {
diff --git a/userprefs.php b/userprefs.php
index a71898a27f..e7923fbd4c 100644
--- a/userprefs.php
+++ b/userprefs.php
@@ -8,7 +8,7 @@
include_once($relPath.'theme.inc');
include_once($relPath.'user_is.inc');
include_once($relPath.'Settings.inc');
-include_once($relPath.'js_newpophelp.inc');
+include_once($relPath.'pophelp.inc');
include_once($relPath.'forum_interface.inc'); // get_forum_user_details(), get_url_to_edit_profile()
include_once($relPath.'User.inc');
include_once($relPath.'Project.inc');
@@ -114,9 +114,12 @@
// header, start of table, form, etc. common to all tabs
$header = _("Personal Preferences");
-$theme_extra_args["js_files"] = ["$code_url/scripts/userprefs.js"];
-$theme_extra_args["js_data"] =
- get_newHelpWin_javascript("$code_url/pophelp.php?category=prefs&name=set_") . "
+$theme_extra_args["js_files"] = [
+ "$code_url/scripts/userprefs.js",
+ "$code_url/scripts/pophelp.js",
+];
+$theme_extra_args["js_data"] = "
+ var popHelpData = " . get_pophelp_json("prefs") . ";
function do_font_sample_update(font_index, size_index, layout) {
if(font_index != null) {
@@ -181,7 +184,7 @@ function do_font_sample_update(font_index, size_index, layout) {
output_tab_bar($tabs, $selected_tab, "tab", "origin=" . urlencode($origin));
-echo "" . _("Click the ? for help on that specific preference.") . "
";
+echo "" . _("Hover over a setting to get more information about it.") . "
";
echo "