Quantcast
Channel: Symantec Connect - ブログエントリ
Viewing all articles
Browse latest Browse all 5094

Workflow/ServiceDesk - How To influence HTML elements in a Process View Page

$
0
0
Inject JavaScript into dynamic Process View content

Some parts of a Process View Page are rendered without an associated configuration interface.
An example of this would be the 'Send Email' Process Action from within a ServiceDesk Ticket View.

For our purpose, let us say that we do not want to use this feature.
We can hide the 'Send Email' Process Action in the Ticket View with the following technique:

1) Modify the Portal Template that is used for the Process View Page (Workflow\ProcessManager\Portal\Template66_33.aspx).
    Insert after the line: <asp:Content...

   This line only for 7.5 environments:

<script type="text/javascript" src="<%= (Request.ApplicationPath + @"/Scripts/jquery-1.7.2.js").Replace(@"//", @"/") %>"></script>

   This line only for 7.6 environments:

<script type="text/javascript" src="<%= (Request.ApplicationPath + @"../Shared/scripts/scripts/jquery.min.js").Replace(@"//", @"/") %>"></script>

   These two lines for either environment:

<script type="text/javascript" src="<%= (Request.ApplicationPath + @"/JScript.js").Replace(@"//", @"/") %>"></script>
<script type="text/javascript">$(document).ready(function() { hideSmartTasks(); });</script>

   NOTE: Once completed, you will have inserted three additional lines of code after the line starting with: <asp:Content

2) Create the file: Workflow\ProcessManager\JScript.js
    Use the following code:

function hideSmartTasks() {
        $("a").filter(function() { return $(this).text() === "Send Email"; }).hide();
}

This example utilizes the jQuery source that ships with the Workflow product, you could use any JavaScript that suits your purpose.

NOTE: Be sure to mention that you have applied this technique when talking to a Symantec Support Representative.


Viewing all articles
Browse latest Browse all 5094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>