Changing Tab Order in the Edit Incidents Screen
When you create or edit an incident in the Altiris Helpdesk, pressing the Tab key from the textbox labeled Title: takes you to the control bar when it really should take you to the textbox labeled Comments:. To correct this you will need to edit the WorkItemEdit.ascx user control.
First you should follow the normal procedure for creating a custom console as explained in the Helpdesk Reference manual. Create the custom.config file and redirect the file id="WorkItemEdit" to your custom copy of the WorkItemEdit.ascx file.
Having done all that, open your custom copy of the WorkItemEdit.ascx file with your favourite text editor and locate the FinalizeTemplate subroutine. Scroll down a few lines and just before the line End Sub add the code:
tbTitle.Attributes.Add("onblur","javascript:" + stUBBEdit.GetControl("tbUBBEdit").ClientID + ".focus();")
Save the file. Now when you create a new incident or edit an existing one, pressing the Tab key from the Title textbox will cause the cursor to jump to the Comments Textbox.
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments 5 Comments • Jump to latest comment
I realised only after posting this that I forgot the case where the user is using Shift-Tab to cycle backwards through the controls.
tbTitle.Attributes.Add("onblur","javascript: if (window.event.shiftKey) { " & ibSelectAsset.ClientID & ".focus(); } else { " & stUBBEdit.GetControl("tbUBBEdit").ClientID & ".focus();}")
You might also want to add:
DirectCast(stUBBEdit.GetControl("tbUBBEdit"), Altiris.AppWeaver.TextBox).Attributes.Add("onblur","javascript: if (window.event.shiftKey) { " & tbTitle.ClientID & ".focus(); }")
so that Shift-Tab will move the focus directly from the Comments field to the Title field.
One catch. The onblur is triggered whenever the focus leaves the title field. So if the worker clicks on another control on the page, the focus will still move to the Comments field. Whether this is acceptable is up to you.
I came up with a simpler solution to the problem. Instead of adding the javascript to the WorkItemEdit.ascx template, edit the subUBBEdit.ascx file and add the following lines to the FinalizeTemplate subroutine:
hlBold.Attributes.Add("tabIndex", "-1")
hlItalic.Attributes.Add("tabIndex", "-1")
hlUnderline.Attributes.Add("tabIndex", "-1")
hlHyperlink.Attributes.Add("tabIndex", "-1")
hlImg.Attributes.Add("tabIndex", "-1")
hlColor.Attributes.Add("tabIndex", "-1")
Perfect! That's just what I was looking for.
As a HelpDesk user for the past 1.5 years, this has always been a bother. I will be implementing this now that I am the administrator. Thanks!
Hi. My asp.net knowledge is not very good.
I have managed to make som customization and my custom.config file looks like this:
"<?xml version="1.0" encoding="utf-8"?>
My Helpdesk Console
"
Now I want to add the CustomsubUBBEdit.ascx file i have in the custom catalog in my custom.config file. How can this be done?
Would you like to reply?
Login or Register to post your comment.