Home General Discussion

Remove links from table views

Raymond_DidonatoRaymond_Didonato Customer IT Monkey ✭
Admittedly, this is a weird question.  I have an idea for a customization to the views in the portal that contain tables.  In order to pull off what I'm trying to do, I need to remove the function of clicking a work item in the table navigating to the page of the work item to edit it.  I've been at it for a little while now, and although I might be able to get to figure it out eventually, I thought I'd throw it out there to all you wonderful folks to see if someone knew how that worked.

Answers

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    There is an onmousedown event that triggers when rows are clicked, which you can turn off.  e.g.: $('tr').off('mousedown').  I do not have perfect recollection of this, but there might be additional events triggering the same function, such as 'click' (presumably for the sake of compatibility).

    Some adjustments will need to be made to that statement--it's just pseudo code to set you on the right path--to prevent it from interfering with grouping/sorting/etc. functions that you probably do not want to lose, but this is the general idea.  

    I dealt with these events quite a bit in this custom code, although you'll notice I have it set to avoid any tables that contain work items (you would want to do the opposite).  It might help put things in context.  Or it might sow the seeds of further confusion (I hope not!).  :)
  • Raymond_DidonatoRaymond_Didonato Customer IT Monkey ✭
    Thanks for the info, Tom.  I will probably be adjusting my customization over time, and doing new ones, and this will help.  For now, I've gone in a different direction, and added an icon to the left side of the Status column as my anchor.  When clicked, it pops the form in an iframe on the right side of the window.





    It's far from perfect, but I like it as an optional way to view items.  I find myself using it more often than opening the form fully as I like staying in view of the work items as they come in.
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Raymond_Didonato - that is awesome!  Can you share the code?
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Seconding that.  This is a very interesting approach!
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Third
  • Raymond_DidonatoRaymond_Didonato Customer IT Monkey ✭
    No problem sharing it.  The other community scripts out there inspired me to learn JS, and from what I know at this point, it's mostly vanilla JS with a little jquery sprinkled in.  You'll see that I'm having trouble with knowing when to apply the styling to the iframe.  When it displays on the page, it displays how I want to see it, but the code is inefficient as it runs at an interval.  Other than that, I think it does okay.
  • Raymond_DidonatoRaymond_Didonato Customer IT Monkey ✭
    There was an old reference in the code throwing errors if you tried clicking on a new work item preview link while one was already open.  I had that working already but made some last minute edits to the script before sharing it with the community.. because I wanted it to be better if others were going to see it.  Then I forgot to update everything  :)
Sign In or Register to comment.