Roundup Tracker - Issues

Message8052

Author rouilj
Recipients rouilj
Date 2024-05-16.18:48:20
Message-id <1715885300.86.0.239276881472.issue2551352@roundup.psfhosted.org>
In-reply-to
The result of calling db.<class>.classhelp() results in an a tag with an
href of the backend end classhelper template. It depends on an onclick
handler to open a popup window. However if javascript is disabled, clicking
on the link replaces the current page because the a link is missing a target
attribute.

E.G.

   <a class="classhelp" [...] href="issue? 
@startwith=0&amp;@template=help&amp;properties=id,title&amp;property=superseder&amp;form=itemS
ynopsis&amp;type=checkbox&amp;@sort=title&amp;@pagesize=100" onclick="javascript:[...]">\

This could result in lost work if the browsers back button doesn't
restore filled in data. I am going to add a target="_blank" to the
generated a link to open the classhelper in a new window/tab.

Also if javascript is disabled, the classhelper doesn't and can't work
even in a new window. Without javascript there is no way to select items
and insert them into the original page. It is useful for paging through
the results and manually copying id numbers to the original page.

So I am also going to add a noscript tag to the top of the classhelper
to tell people that clicking on apply/cancel etc. don't work. It will
show up only when javacript is unavailable leaving the classhelper
usable for read only viewing of the data.

This should not change how the new classhelper web component acts. The target
parameter is used only if the a link gets a click event. Since the web component
prevents the link from getting a click event, the target is ignored.
History
Date User Action Args
2024-05-16 18:48:20rouiljsetrecipients: + rouilj
2024-05-16 18:48:20rouiljsetmessageid: <1715885300.86.0.239276881472.issue2551352@roundup.psfhosted.org>
2024-05-16 18:48:20rouiljlinkissue2551352 messages
2024-05-16 18:48:20rouiljcreate