<?php
// Copyright (c) MetaClass, 2003-2008
// Licensed under the Academic Free License version 3.0
includeClass('', 'pnt/web/parts');
/** PagePart that generates a tab bar and corrsponding content divs
* that are shown/hidden by clicking on a tab div in the tab bar.
* content is generated by printPart on the whole or on specified parts.
*
* This abstract superclass provides behavior for the concrete
* subclass TabsPart in the root classFolder or in the application classFolder.
* To keep de application developers code (including localization overrides)
* separated from the framework code override methods in the
* concrete subclass rather then modify them here.
* @see http://www.phppeanuts.org/site/index_php/Menu/178
* @see http://www.phppeanuts.org/site/index_php/Pagina/65
* @package pnt/web/parts
*/
class PntTabsPart extends {
/** Array with tab names. If a key is a string, it will be used as the tab label */
var $tabsSpec;
/** if set to false the contentparts should print their own divs with
* names according to the tabsSepc concatenated with 'Div' */
var $printDivs = true;
/** If set to true only the tabsbar is printen, no content parts */
var $tabsBarOnly = false;
/** name of selected tab as it appears in $tabSpec, can be set from print/getPart parameters */
var $selected;
/** name of the javascript func tion called when the a tab is selected.
* set this variable to name your own func tion and call pntTabSelected from there
* if you need to do something more on tab selection then hiding/showing tabs
* your func tion must take two parameters, the first an array with all tab keys
* the second the key of the selected tab, and pass them on to pntTabSelected
* @see scripts/general.js */
var $jsSelectFunc = 'pntTabSelected';
/** parts by tab name that generate content */
var $contentParts;