From b8cb4d08b3b06bc22541d3366016403207742503 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 28 Dec 2012 15:42:02 +0400 Subject: help cleanup, use dijit dialog --- classes/backend.php | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/backend.php b/classes/backend.php index 42dfb5474..29f18171f 100644 --- a/classes/backend.php +++ b/classes/backend.php @@ -18,14 +18,74 @@ class Backend extends Handler { print_r($rv); } + private function display_main_help() { + $info = get_hotkeys_info($this->link); + $imap = get_hotkeys_map($this->link); + $omap = array(); + + // :( + $tinycharmap = array( + "(9)" => "{TAB}", + "(191)" => "?"); + + foreach ($imap[1] as $sequence => $action) { + if (!isset($omap[$action])) { + $omap[$action] = isset($tinycharmap[$sequence]) ? $tinycharmap[$sequence] : + $sequence; + } + } + + print ""; + + print "

". + __("Other interface tips are available in the Tiny Tiny RSS wiki.") . + "

"; + } + function help() { $topic = basename($_REQUEST["topic"]); - if (file_exists("help/$topic.php")) { + switch ($topic) { + case "main": + $this->display_main_help(); + break; + case "prefs": + //$this->display_prefs_help(); + break; + default: + print "

".__("Help topic not found.")."

"; + } + + print "
"; + print ""; + print "
"; + + /* if (file_exists("help/$topic.php")) { include("help/$topic.php"); } else { print "

".__("Help topic not found.")."

"; - } + } */ /* print "
"; */ -- cgit v1.2.3-54-g00ecf