From: Andrew Dolgov Date: Wed, 14 Dec 2011 11:51:27 +0000 (+0400) Subject: do not include keyboard help files into index and prefs.php X-Git-Tag: 1.5.8~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=66be620a87aa93a1f9cc3e956942026ce31f2207;p=tt-rss.git do not include keyboard help files into index and prefs.php --- diff --git a/classes/backend.php b/classes/backend.php index f7e7b84b..334701f4 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/3.php deleted file mode 100644 index e1812b3f..00000000 --- a/help/3.php +++ /dev/null @@ -1,79 +0,0 @@ -

- -
- -

- - - - - -
j/k
n/p
/
- -

- - - - - - - - - - - - - -
s
S
u
T
D
X
o
c n/c p
N/P
e
- -

- - - - - - - -
[tab]
c l
c f
c s
?
- -
- -

- - - - - - -
a a
a u
a i
a n
- -

- - - - - - - - - - -
f r
f a
f s
f e
f q
f x
Q
x
- -

- - - - - - - - -
g a
g f
g s
g p
g t
g P
- - -
- -

- -

diff --git a/help/4.php b/help/4.php deleted file mode 100644 index 4cf3a126..00000000 --- a/help/4.php +++ /dev/null @@ -1,41 +0,0 @@ -

- -
- -

- - - - - - - - - -
g 1
g 2
g 3
g 4
g 5
g x
- -
- -

- - - - - - - - -
c s
c T
c c
c f
- -

- - - - -
/
?
- -
- -

Note: not all actions may be available, depending on Tiny Tiny RSS configuration and your access level.") ?>

- -

diff --git a/help/main.php b/help/main.php new file mode 100644 index 00000000..e1812b3f --- /dev/null +++ b/help/main.php @@ -0,0 +1,79 @@ +

+ +
+ +

+ + + + + +
j/k
n/p
/
+ +

+ + + + + + + + + + + + + +
s
S
u
T
D
X
o
c n/c p
N/P
e
+ +

+ + + + + + + +
[tab]
c l
c f
c s
?
+ +
+ +

+ + + + + + +
a a
a u
a i
a n
+ +

+ + + + + + + + + + +
f r
f a
f s
f e
f q
f x
Q
x
+ +

+ + + + + + + + +
g a
g f
g s
g p
g t
g P
+ + +
+ +

+ +

diff --git a/help/prefs.php b/help/prefs.php new file mode 100644 index 00000000..4cf3a126 --- /dev/null +++ b/help/prefs.php @@ -0,0 +1,41 @@ +

+ +
+ +

+ + + + + + + + + +
g 1
g 2
g 3
g 4
g 5
g x
+ +
+ +

+ + + + + + + + +
c s
c T
c c
c f
+ +

+ + + + +
/
?
+ +
+ +

Note: not all actions may be available, depending on Tiny Tiny RSS configuration and your access level.") ?>

+ +

diff --git a/index.php b/index.php index 6d0b7c64..25e3a5cb 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 69406f3e..02134aaf 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 896a787c..bd386699 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 38232bdf..23349db6 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 40d9a35a..52be2a7a 100644 --- a/prefs.php +++ b/prefs.php @@ -72,14 +72,12 @@ - +