4 Replies Latest reply on Feb 7, 2017 8:17 AM by v.zhdanova

    Self Service Web Access - Config Item Template HTML

    rs090 Apprentice

      We are struggling with our self service application in that users are able to click on an item without clicking on the "Add to Cart" button and various things may happen - some are redirected to a window we don't want them to go to; others are directed to the correct window that tells them to click the back button we setup and then click the "Add to Cart" button.  Chrome vs IE have different behaviors sporadically.    As a result of this our self service application is not being well received by our customer base.

       

      There should be a simple resolution to this but I'm unable to make it work.   What we would like to do is disable the mouse click anywhere except on the "Add to Cart" button or on a hyperlink.   Some of services don't have an "Add to Cart" button, they are just an HTML field with a URL redirect somewhere else, yet if the user does not click on the URL itself they are taken to a blank form within the system and given an error when trying to submit (2nd screenshot below).   In these case we would want to disable the mouse click event anywhere except the URL. 

       

      I've had no luck getting pointer-events: none; or similar commands to work within the template code below for ServiceCatalogDisplay  below, but have been able to get style commands to work  - cursor: crosshair , so either I'm using the wrong formats on the template or what we are attempting is not possible or needs to be done somehwere else.

       

      Has anyone done something like this successfully yet?  Thanks

       

       

      <a style="text-decoration: none" href="../../ss/object/createInCart.rails?class_name=RequestManagement.Request&lifecycle_name={Lifecycle/Name}&object_template_name={Template/Guid}&attributes=_ConfigItemRequested-{Guid}&RaiseUser-">

      <table>

      <tr>

        <td cellpadding="20">

         <img src='{Image}' width='75px'><br>

         <font size="1">

         </font>

        </td>

        <td colspan=4>

         <font size="2" face="Arial" color = '#002E8A'><strong>{Title}</strong></font><br><br><font size="2" face="Arial" color = '#002E8A'><strong>Description</strong></font><br><font face="verdana" size="2">{_ServiceCatalogueDescript}</font><br><br>

        </td>

      </tr>

      <tr>

        <td rowspan=2>

        </td>

      <td> {_SelfServiceRedirectLink} </td>

      </tr>

      </table>

      </a>

       

       

        • 1. Re: Self Service Web Access - Config Item Template HTML
          Apprentice

          Hi,

          if you want to disable click any where only clicking in add to cart change the table tag from
          <table> to <table onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();">

          which then means that the click doesn't do anything.

          1 of 1 people found this helpful
          • 2. Re: Self Service Web Access - Config Item Template HTML
            rs090 Apprentice

            Hi I got locked out of the support site for a couple days and had to open a support ticket to get put back, sorry for the delay in responding.  We tired your suggestion above Mohammad and initially it did not work unless we took out our style tag at the top and ultimately found a combination that would work with event command you provided but would not apply to the entire table instead had to be applied on each row or table data section.  Very helpful so thank you for that feedback.   I posted our final (test code) below in the event it helps someone in the future.  

             

            We have one remaining issue in that below the </table> tag where the add to cart button is the software calls out to a stylesheet on the server and adds a <div> tag so we could not disable clicking on the <div> for each catalog item since it's not contained in the html template in object designer.  Opened a support ticket to see if they can point me to the stylesheet we can update, since the element source code shows it's on the web server/ss folder/stylesheets then encrypts the name in to a number such as all.rails=key?634121443551  (included some screens of this below to show what I'm talking about).   Will try to remember to update ticket once we get an answer back from support on this.

             

            <style="text-decoration: none" href="../../ss/object/createInCart.rails?class_name=RequestManagement.Request&lifecycle_name={Lifecycle/Name}&object_template_name={Template/Guid}&attributes=_ConfigItemRequested-{Guid}&RaiseUser-">

             

            <table onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();" >

            <tr cellpadding="0" onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();" >

              <td onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();" >

               <img src='{Image}' width='75px' height='75px'><br>

               <font size="1">

               </font>

              </td>

              <td colspan=1 width="100%" cellpadding="0" height = "100%" onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();">

               <font size="2" face="Arial" color = '#002E8A'><strong>{Title}</strong></font><br><br><font size="2" face="Arial" color = '#002E8A'><strong>Description</strong></font><br><font face="verdana" size="2">{_ServiceCatalogueDescript}</font><br><br>

              </td>

            </tr>

            <tr>

              <td>

              </td>

            <td> {_SelfServiceRedirectLink} </td>

            </tr>

            </table>

            </style>

             

             

             

             

            1 of 1 people found this helpful
            • 3. Re: Self Service Web Access - Config Item Template HTML
              Apprentice

              Hi,

              I tried to use your format of the link, but I don't understand how can I pass the username or ID to the request form in this case...

              I need to open the request form with the current username in the field "RaiseUser" and when I do it using the link (not a button "Request Service") I get an empty RaiseUser field.

              Do you know how to fix it?

              • 4. Re: Self Service Web Access - Config Item Template HTML
                Apprentice

                Hi Mohammad,

                 

                when I use <table> to <table onclick="var e=arguments[0]; e.cancelBubble=true; e.stopPropagation();"> to disable click in Service Catalog, the bottom area of table line (the area on the same level as a button "Request Service") is still active for click...

                Do you have any suggestions how to disable this area too?