ServiceDesk

 View Only
  • 1.  jQuery in ServiceDesk portal pages?

    Posted Jan 16, 2013 01:31 PM

    I can only assume the jQuery library is unsupported in ServiceDesk verX.x portal pages due to the "0" number of posts a "jQuery" search returns in the forums.  Is this true? Anyone out there get it to work?  

    I'm specifically trying to style/color certain columns and values in reports.  Made more complicated due to my users only wanting to color code certain values in rows/columns (like "High" priority to red).  Utilizing javascript would make the most sense to delegate the processing of column values and styles away from the server, and onto the client.  jQuery just makes it that much more simple, hence the question.



  • 2.  RE: jQuery in ServiceDesk portal pages?
    Best Answer

    Posted Jan 17, 2013 03:19 PM

     

    Ok, well. I guess "unsupported" was a restrictive word. Symantec doesn't support things that are not Symantec.
     
    I did figure out how to make it work, albeit, not pretty.
    1. Add a web part to the page: UI -> HTMLDisplayWebPart
    2. Edit the webpart, click the HTML tab, and entered the following:
    • <script src="http://venezia:81/jquery-1.9.0.min.js" type="text/javascript"></script>
      <script type="text/javascript">
      alert($('body').length);
      </script>
           ​Done right, you should get a "1" alerted when the page loads (1 should be the return result from a jQuery "body" element count).
     
    Bad news?
    • Every time I come back to modify the webpart, and click the HTML tab, it is empty. Then when you click Apply button, you realize the code was really not there when you updated it.

    Guess you can't have everything in life. For now, I just copy/paste my code repeatedly when making changes.

     

     



  • 3.  RE: jQuery in ServiceDesk portal pages?

    Posted Feb 04, 2013 11:27 AM

    Always an easier way, right?

    For those looking to color code values (conditonal formatting) in your reports:

    In the report builder's Data tab, hover your mouse over the column you want to format and cick the Edit pencil.

    Add a Add Column Formatting to the field, selecting the color and value you require.