Home Analyst Portal
Options

Add Description to My Favorite Request/Top Requests ROs on Home Page

Jonathan_BolesJonathan_Boles Customer Ninja IT Monkey ✭✭✭✭
Hello Community, 

Would like to know if it's possible to add the description below the request offering title thats shown under My Favorite Requests or Top Requests on the Home Page of the Cireson Portal?

So essentially going from this:

To something like this (mock-up):

I'd be much appreciative of any steps/instruction you could provide.

Thanks,

Jonathan Boles

Best Answer

  • Options
    seth_coussensseth_coussens Member Ninja IT Monkey ✭✭✭✭
    edited January 2017 Answer ✓
    This should get you started. Basically, you need to run a script against your service offering page, identify the favorites section and pull the description for each and then add it dynamically to each request offering:

    /* ----------------------------------------------- */
    /* ----- Add Totals To Grouped By Grid Views ----- */
    /* ----------------------------------------------- */
    // Tested for: Cireson Portal v5.0.8
    $(document).ready(function () {
    console.log("Loaded 'Self Service Modifications'");
    
    // Verify we are on the correct self service page
    var url = window.location.href;
    if (url.indexOf("/View/94ecd540-714b-49dc-82d1-0b34bf11888f") === -1) {
    return;
    }
    
    //The navigation node doesn't load immediately. Get the main div that definitely exists.
    var mainPageNode = document.getElementById('main_wrapper');
    
    // create an observer instance
    var observer = new MutationObserver(function (mutations) {
    //The page changed. See if our title exists. If it does, then our gridview should also exist.
    var dropTarget = $('[data-template="topfav-request-offerings"]');
    
    //An element with class of page_title exists.
    if (dropTarget.length > 0) {
    console.log("Found it", dropTarget);
    
    addFavoritesDescription(dropTarget);
    
    //We are done observing.
    observer.disconnect();
    }
    
    });
    
    // configure the observer and start the instance.
    var observerConfig = { attributes: true, childList: true, subtree: true, characterData: true };
    observer.observe(mainPageNode, observerConfig);
    
    });
    
    function addFavoritesDescription(parentElement) {
    //go through each child element
    //use api to get back request offering information (description)
    //add description to element
    }<br>

Answers

  • Options
    seth_coussensseth_coussens Member Ninja IT Monkey ✭✭✭✭
    edited January 2017 Answer ✓
    This should get you started. Basically, you need to run a script against your service offering page, identify the favorites section and pull the description for each and then add it dynamically to each request offering:

    /* ----------------------------------------------- */
    /* ----- Add Totals To Grouped By Grid Views ----- */
    /* ----------------------------------------------- */
    // Tested for: Cireson Portal v5.0.8
    $(document).ready(function () {
    console.log("Loaded 'Self Service Modifications'");
    
    // Verify we are on the correct self service page
    var url = window.location.href;
    if (url.indexOf("/View/94ecd540-714b-49dc-82d1-0b34bf11888f") === -1) {
    return;
    }
    
    //The navigation node doesn't load immediately. Get the main div that definitely exists.
    var mainPageNode = document.getElementById('main_wrapper');
    
    // create an observer instance
    var observer = new MutationObserver(function (mutations) {
    //The page changed. See if our title exists. If it does, then our gridview should also exist.
    var dropTarget = $('[data-template="topfav-request-offerings"]');
    
    //An element with class of page_title exists.
    if (dropTarget.length > 0) {
    console.log("Found it", dropTarget);
    
    addFavoritesDescription(dropTarget);
    
    //We are done observing.
    observer.disconnect();
    }
    
    });
    
    // configure the observer and start the instance.
    var observerConfig = { attributes: true, childList: true, subtree: true, characterData: true };
    observer.observe(mainPageNode, observerConfig);
    
    });
    
    function addFavoritesDescription(parentElement) {
    //go through each child element
    //use api to get back request offering information (description)
    //add description to element
    }<br>
Sign In or Register to comment.