diff --git a/classes/backend.php b/classes/backend.php
index f7e7b84b8..334701f4a 100644
--- a/classes/backend.php
+++ b/classes/backend.php
@@ -12,16 +12,16 @@ class Backend extends Handler {
}
function help() {
- $tid = (int) $_REQUEST["tid"];
+ $topic = basename($_REQUEST["topic"]);
- if (file_exists("help/$tid.php")) {
- include("help/$tid.php");
+ if (file_exists("help/$topic.php")) {
+ include("help/$topic.php");
} else {
print "
".__("Help topic not found.")."
";
}
- print "
+ /* print "
";
+ __('Close this window')."
"; */
}
}
diff --git a/help/3.php b/help/main.php
similarity index 100%
rename from help/3.php
rename to help/main.php
diff --git a/help/4.php b/help/prefs.php
similarity index 100%
rename from help/4.php
rename to help/prefs.php
diff --git a/index.php b/index.php
index 6d0b7c645..25e3a5cb4 100644
--- a/index.php
+++ b/index.php
@@ -97,9 +97,7 @@
alt="new_version_icon"/>
-
-
-
+
diff --git a/js/functions.js b/js/functions.js
index 69406f3e1..02134aafa 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -634,15 +634,6 @@ function explainError(code) {
return displayDlg("explainError", code);
}
-function displayHelpInfobox(topic_id) {
-
- var url = "backend.php?op=backend&method=help&tid=" + param_escape(topic_id);
-
- window.open(url, "ttrss_help",
- "status=0,toolbar=0,location=0,width=450,height=500,scrollbars=1,menubar=0");
-
-}
-
function loading_set_progress(p) {
try {
loading_progress += p;
diff --git a/js/prefs.js b/js/prefs.js
index 896a787c6..bd3866991 100644
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -1001,12 +1001,7 @@ function pref_hotkey_handler(e) {
if (!hotkey_prefix) {
if ((keycode == 191 || keychar == '?') && shift_key) { // ?
- if (!Element.visible("hotkey_help_overlay")) {
- //Element.show("hotkey_help_overlay");
- Effect.Appear("hotkey_help_overlay", {duration : 0.3, to: 0.9});
- } else {
- Element.hide("hotkey_help_overlay");
- }
+ showHelp();
return false;
}
@@ -1919,3 +1914,16 @@ function editSelectedInstance() {
editInstance(rows[0]);
}
+function showHelp() {
+ try {
+ new Ajax.Request("backend.php", {
+ parameters: "?op=backend&method=help&topic=prefs",
+ onComplete: function(transport) {
+ $("hotkey_help_overlay").innerHTML = transport.responseText;
+ Effect.Appear("hotkey_help_overlay", {duration : 0.3});
+ } });
+
+ } catch (e) {
+ exception_error("showHelp", e);
+ }
+}
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 38232bdfe..23349db63 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -428,8 +428,12 @@ function quickMenuGo(opid) {
}
if (opid == "qmcHKhelp") {
- //Element.show("hotkey_help_overlay");
- Effect.Appear("hotkey_help_overlay", {duration : 0.3});
+ new Ajax.Request("backend.php", {
+ parameters: "?op=backend&method=help&topic=main",
+ onComplete: function(transport) {
+ $("hotkey_help_overlay").innerHTML = transport.responseText;
+ Effect.Appear("hotkey_help_overlay", {duration : 0.3});
+ } });
}
if (opid == "qmcAbout") {
diff --git a/prefs.php b/prefs.php
index 40d9a35ac..52be2a7a6 100644
--- a/prefs.php
+++ b/prefs.php
@@ -72,14 +72,12 @@
-
-
-
+