Is it possible to auto-expand the category/service offering list?

Jonathan_BolesJonathan_Boles Customer Ninja IT Monkey ✭✭✭✭
This is probably a quick and easy adjustment but I can't for the life of me seem to get it working. I would like to see the list below auto expanded when an end user or analyst visits the home page of the portal.



Any help anyone could provide would be much appreciated!

Best Answers

  • Jonathan_BolesJonathan_Boles Customer Ninja IT Monkey ✭✭✭✭
    Accepted Answer
    Thanks to @Jerry_Veldhuis, we were able to get this bit figured out! 

Answers

  • Jonathan_BolesJonathan_Boles Customer Ninja IT Monkey ✭✭✭✭
    Accepted Answer
    Thanks to @Jerry_Veldhuis, we were able to get this bit figured out! 
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Can you share? I am interested as well. 
  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Thanks @Jerry_Veldhuis for helping out the community here.
    Any chance you can all share your code and solution with the community?
    I'm sure others would like to see what you have done and how you have done it.

  • Martin_BlomgrenMartin_Blomgren Customer Ninja IT Monkey ✭✭✭✭
    Did this a while ago when exploring options for different home pages. Don't know what's the best way but anyhow this is how I solved it back then:

    (function() {
    var homeObserver = new MutationObserver(function (mutations) {
    var targetElements = $('div.sc-filter ul.nav.sidenav > li.ng-scope > a.link');
    if(targetElements.length > 0) { 
      targetElements.each(function(index, item) {
       $(item).trigger("click");
      });   

    homeObserver.disconnect(targetElements);
      }
    });

    var observerConfig = {
        attributes: true,
        childList: false,
        characterData: false,
        subtree: true
    };

    $(document).ready(function () {
     if (window.location.href.indexOf("ServiceCatalog/Listing") > -1) {
          var targetNode = document.getElementById('main_wrapper');
         homeObserver.observe(targetNode, observerConfig);
     }
    });
    })();


  • Jerry_VeldhuisJerry_Veldhuis Customer Advanced IT Monkey ✭✭✭
    My code was very similar to @Martin_Blomgren 's solution but not as clean. I traversed the links and skipped the 'Favorites' labeled one. Cheers - jerry
Sign In or Register to comment.