webapp/src/main/webapp/lib/commons.js
/**
 * Uses the CSS style to create something that looks a lot like a tab folder.
 * 
 * @param evt -
 *            onclick of a button
 * @param tabId -
 *            the ID of the tab to open
 * @returns nothing
 * @since 0.2.0
 */
Uses the CSS style to create something that looks a lot like a tab folder.

@param evt
onclick of a button
@param tabId
the ID of the tab to open
@returns nothing
@since 0.2.0
Uses the CSS style to create something that looks a lot like a tab folder . @param evt onclick of a button @param tabId the ID of the tab to open @returns nothing @since 0 . 2 . 0
function openTab(evt, tabId) {
	var tabContent = document.getElementsByClassName("tab-content");
	for (var i = 0; i < tabContent.length; i++) {
		tabContent[i].style.display = "none";
	}
	document.getElementById(tabId).style.display = "block";
	var tabButtons = document.getElementsByClassName("tab-button");
	for (i = 0; i < tabButtons.length; i++) {
		tabButtons[i].className = tabButtons[i].className
				.replace(" active", "");
	}
	if (evt != null) {
		evt.currentTarget.className += " active";
	}
}
function openTab ( evt , tabId ) { var tabContent = document . getElementsByClassName ( "tab-content" ) ; for ( var i = 0 ; i < tabContent . length ; i ++ ) { tabContent [ i ] . style . display = "none" ; } document . getElementById ( tabId ) . style . display = "block" ; var tabButtons = document . getElementsByClassName ( "tab-button" ) ; for ( i = 0 ; i < tabButtons . length ; i ++ ) { tabButtons [ i ] . className = tabButtons [ i ] . className . replace ( " active" , "" ) ; } if ( evt != null ) { evt . currentTarget . className += " active" ; } }
Uses the CSS style to create something that looks a lot like a tab folder.
Uses the CSS style to create something that looks a lot like a tab folder .
// remove all tabs from display
 // show the tab content with the specified ID
 // deactivate the button that was clicked
 // activate the button of the event
