[Rt-devel] Minor usability patch - make TitleBox titles on Display page jump to corresponding box on Edit page

Richard Harman rt-devel at richardharman.com
Tue Sep 8 20:50:59 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What if a title's HREF is pointing to a different page?  Nothing. 8-)
There won't be any problems, UI-wise or HREF link-wise.

The # at the end of the URL is called a "fragment" (see perldoc URI).
The fragment is essentially ignored in retrieving content from URLs by
web browsers.  It's only really used to short-cut navigation to a
particular part of the page further down, after the first page
"break".  So I'm not modifying what url the HREF is point to at all.
If there happens to be a titlebox on the linked to page, then the
patch takes care of the destination <A NAME>.  If not, then everything
is still OK because the # and everything past it is ignored.

For example (my patch applied):

RTIR Display.html:

  <a name="The Basics"></a>
...
          <a href="/RTIR/Edit.html?id=1#The Basics
<view-source:http://rt.xabean.com/RTIR/Edit.html?id=1#The%20Basics>">The
Basics</a></span>

This works because the destination <A NAME> exists, because there's a
TitleBox with the same title in the Edit.html page.

Same page:

  <a name="Articles"></a>
...
          <a href="/RTIR/Advanced.html?id=1#Articles
<view-source:http://rt.xabean.com/RTIR/Advanced.html?id=1#Articles>">Articles</a></span>

This doesn't, because there isn't a TitleBox on in the Advanced.html
page named "Articles".  But that's ok, because the browser ignores a
link to an <a name> that doesn't exist.

Does this answer your question?  If there's a better way to do this,
I'm open to suggestions.



On 09/08/09 19:49, Ruslan Zakirov wrote:
> Hello Richard,
>
> What if title's href is pointing to a different page?
>
> On Tue, Sep 8, 2009 at 7:25 PM, Richard
> Harman<rt-devel at richardharman.com> wrote:
>> At my office I extended my RT UI by adding four more TitleBox widgets,
>> to hold custom fields specific to what my office does.  In order to
>> speed up accessibility, I modified the TitleBoxStart component to
>> include an <A NAME> tag, and modify the TitleBox's title to point to the
>> <A NAME> tag.
>>
>> This lets people jump down to the part of the edit page they're focused
>> on directly, instead of having to scroll down.

- -- 
- -----------------------------------------------------------
"Looks like there'll be no money for you, Crazy Round Man."
                                             - Samurai Jack
Richard G Harman Jr           <me+nospam at richardharman.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqm+/MACgkQ3rKdb192Vz/9sQCgiBl616khOHeyGBtzQQ+fW0z8
ksYAoJTN6lcoMIb3hmamYgJ5vFxoqvwR
=lLUg
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20090908/2219257f/attachment-0001.htm 


More information about the Rt-devel mailing list