Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Section Collapse by default

Closed
41
Views
6
Comments
Joe Choueiri-Oracle
Joe Choueiri-Oracle Rank 5 - Community Champion

Hi

What is the java script we need to use to make the section collapsed by default, I found few codes but none of them worked...here is what I found:

var sectionId = “get the id from page sourse“;

var sectionDiv = document.getElementById(“Embed”+sectionId);

var plusImg = document.getElementById(sectionId+”Max”);

var minusImg = document.getElementById(sectionId+”Min”);

var contentsTable = document.getElementById(sectionId+”Contents”);

minusImg.style.display = “none”;

contentsTable.style.display = “none”;

plusImg.style.display = “”;

sectionDiv.setAttribute(“minimized”, “true”);

Or

{td class="MinMaxCell" onclick="saw.dashboard.onToggleSection('d:dashboard~p:isca1c9kk1hb8ubn~s:l8052b1hagt86ms6',

event);

saw.dashboard.onToggleSection ('d:dashboard~p:isca1c9kk1hb8ubn~s:7rfmm0f1qd4gmllh',

event);

return false;" align="center"}{img id=""

src="res/s_MyCompagny/portal/ToggleDashboard.JPG" title="Toggle Dashboard"/}{img id="" src="res/s_MyCompagny/portal/ToggleDashboard.JPG" style="display:none"

title="Toggle Dashboard"/}{/td}{/tr}{tr}

Answers

  • [Deleted User]
    [Deleted User] Rank 10 - Analytics Guru

    Please reconsider whether you REALLY want to do that. It's JS. It's nasty and can easily be achieved differently by standard config that's not relying on anything.

    Collapse the section(s) you want. Create a new saved customization. Assign the customization to AuthenticatedUser.

    pastedImage_2.png

    Set is as Account Default!!

    pastedImage_1.png

    Save. Done. Bob's your uncle. No code.

  • Timothy Dickinson
    Timothy Dickinson Rank 3 - Community Apprentice
    edited July 2024

    hi! what do you do if you have a custom style? at the moment because a custom dashboard style is in place I can't share dashboard customizations? the Key to the permissions is greyed out an not selectable?

  • @Timothy Dickinson Can you please open a new thread for this and specify your issue clearly and in detail? This thread is 4 years old and my images from back then don't even render anymore.

  • Timothy Dickinson
    Timothy Dickinson Rank 3 - Community Apprentice

    hi Christian - Thank you for quick response! I didn't follow your steps properly and failed to save the customization for other users. I resolved my mistake, so please discount the comment. I would much rather use the native functionality when it meets the need exactly.

    However, in OAS are there instances where you could use Java script for certain things? Such as, if you didn't want to click on the side of the page and click the gear cog to clear your customization? - say you would rather have the user be able to do it in on the dashboard page directly via one click on a link? is there a guide to what you can do with JS in OAS? what you may do/ and what you should not do? Much Appreciated.

  • Gianni Ceresa
    edited July 2024

    The key point in Christian message was "Can you please open a new thread", because as he said this is a old thread abandoned by OP.

    Ask a new question, provide all the details (product name and version), explain your need, what you tried and as much context as possible. And posting it in the right category, https://community.oracle.com/products/oracleanalytics/categories/oac-oas if it is about OAS as this one is for old OBIEE versions.

  • Beaten by Gianni but @Timothy Dickinson please stop posting into this zombie thread. I am closing it now.

This discussion has been closed.