[OpenVPMS Developers] [JIRA] (OVPMS-1263) Add support to customise help topics links.

Message from Tim Anderson (Created) (JIRA) jira@openvpms.org

Add support to customise help topics links. -------------------------------------------

Key: OVPMS-1263 URL: https://openvpms.atlassian.net/browse/OVPMS-1263 Project: VPMS Web Application Issue Type: Improvement Components: User Interface Affects Versions: 1.5 Reporter: Tim Gething Assignee: Tim Anderson Priority: Minor

From http://www.openvpms.org/forum/it-possible-change-help-url:

{quote} Clicking help on the top menu line (or keying Alt-H) brings up a window which only allows you to go the the OPV site.

Is it possible to tailor a) the pop-up window that currently contains the version number or and the one "Help Topics" link; b) the URL that "Help Topics" invokes?

Ahah - after a quick search through the source: b) the URL is set in the messages file as the message helpdialog.topics.link; a) the popup window is hard coded but it would be relatively easy to provide for extra buttons (say helpdialog.topic1.link thru helpdialog.topic9.link) with the code generating the buttons only if the message is present in the message file.

The code is something like the following replacement for lines 81-91 of HelpDialog.java: [warning my java is 10 years rusty]

{noformat} int n; for (n=0;n<10;n++) { // look for topic0 through topic9 String t = "helpdialog.topic"+n; String l = t + ".link"; if (!isNull(Messages.get(t))) { // if have this topic Button helpLink = ButtonFactory.create(t,"hyperlink"); helpLink.setBackground(null); // want to inherit style of parent helpLink.addActionListener(new ActionListener() { public void onAction(ActionEvent e) { String link = Messages.get(l); ApplicationInstance.getActive().enqueueCommand( new BrowserOpenWindowCommand(link, null, null)); close(); } }); } else { // topic n not there - skip check for higher numbers break; } } {noformat}

The above also requires renaming the current help.topics and help.topics.link messages to help.topic0 and help.topic0.link {quote}

-- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://openvpms.atlassian.net/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Syndicate content