change Atrium Tab name

Use this board to ask questions or have discussions with other Atrium users.
Post Reply
paksilv
New User
Posts: 11
Joined: Thu Oct 20, 2016 5:56 am
First Name: silvano
Last Name: pacifici
Company Name: VIBA SPA
State / Province: Outside Canada/USA
Country: Italy
Contact:

change Atrium Tab name

Post by paksilv »

Hi,

is it possible change the name of an Atrium tab from a RDF program?

Imagine this case:
An Atrium item menu -> call a RDF program. This RDF program changes own tab name adding a suffix string to the tab name (that usually is the name of the menu item).

Thank you.
Best regards.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: change Atrium Tab name

Post by Scott Klement »

Currently, we do not offer a feature that lets you change the Atrium tab name.
paksilv
New User
Posts: 11
Joined: Thu Oct 20, 2016 5:56 am
First Name: silvano
Last Name: pacifici
Company Name: VIBA SPA
State / Province: Outside Canada/USA
Country: Italy
Contact:

Re: change Atrium Tab name

Post by paksilv »

Thank you Scott,
I'll be waiting for this new feature..
Bye.
Pak
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: change Atrium Tab name

Post by Scott Klement »

If you'd like to request this feature, you should e-mail support@profoundlogic.com.

Forums are "community support", they cannot be used to report bugs or request features.
shuffman
Profound User
Posts: 22
Joined: Fri Jan 29, 2016 11:15 am
First Name: sam
Last Name: huffman
Company Name: gmdsolutions
Phone: 7122624520
Address 1: 2311 W 18th ST
City: Spencer
State / Province: Iowa
Zip / Postal Code: 51301
Country: United States
Contact:

Re: change Atrium Tab name

Post by shuffman »

I have a set of JavaScript functions we use to do this. We are running PUI 5.6.0
Typically just called during the onload event

Code: Select all

changeTabTitle('My new title');
You could even add a little color since it just replaces the HTML

Code: Select all

changeTabTitle('<span style="color:red;">My new RED title</span>');
I did have to remove some things that are custom to our environment but hopefully i didn't miss anything

Code: Select all


function getTabTitle(){
	try{
		var tab = Atrium.getCurrentTab();
		var tabId = tab.id.split("-")[2];
		tab = window.parent.document.getElementById("Atrium-tabPanel__ext-comp-" + tabId);
		tab = tab.getElementsByClassName("x-tab-strip-text")[0];
		return tab.innerHTML;
	}catch(err){}	
}

function changeTabTitle(title){
	try{
		var tab = Atrium.getCurrentTab();
		var tabId = tab.id.split("-")[2];
		tab = window.parent.document.getElementById("Atrium-tabPanel__ext-comp-" + tabId);
		tab = tab.getElementsByClassName("x-tab-strip-text")[0];
		if(tab.title == ''){
			tab.title = tab.textContent;	
		}
		tab.innerHTML = title;
	}catch(err){}	
}

function resetTabTitle(){
	try{
		var tab = Atrium.getCurrentTab();
		var tabId = tab.id.split("-")[2];
		tab = window.parent.document.getElementById("Atrium-tabPanel__ext-comp-" + tabId);
		tab = tab.getElementsByClassName("x-tab-strip-text")[0];
		if(tab.title !== ''){
			tab.innerHTML = tab.title;	
		}
	}catch(err){}	
}

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests