tabview-debug.js revision b7d35a3417d982b6fa70eb7eab19f0ae159d88dc
/**
* The TabView module
*
* @module tabview
*/
DOT = '.',
/**
* Provides a tabbed widget interface
* @param config {Object} Object literal specifying tabview configuration properties.
*
* @class TabView
* @constructor
* @extends Widget
* @uses WidgetParent
*/
_afterChildAdded: function(e) {
},
_defListNodeValueFn: function() {
},
_defPanelNodeValueFn: function() {
},
_afterChildRemoved: function(e) { // update the selected tab when removed
var i = e.index,
if (!selection) { // select previous item if selection removed
if (selection) {
}
}
},
_initAria: function() {
if (tablist) {
//'aria-labelledby':
});
}
},
bindUI: function() {
// Use the Node Focus Manager to add keyboard support:
// Pressing the left and right arrow keys will move focus
// among each of the tabs.
circular: true
});
},
renderUI: function() {
this._renderListBox(contentBox);
this._renderPanelBox(contentBox);
this._renderTabs(contentBox);
},
_setDefSelection: function(contentBox) {
// If no tab is selected, select the first tab.
return true;
}
});
if (selection) {
// TODO: why both needed? (via widgetParent/Child)?
}
},
_renderListBox: function(contentBox) {
}
},
_renderPanelBox: function(contentBox) {
}
},
_renderTabs: function(contentBox) {
tabview = this;
if (tabs) { // add classNames and fill in Tab fields from markup when possible
});
});
}
}
}, {
ATTRS: {
value: 'Tab'
},
listNode: {
if (node) {
}
return node;
},
valueFn: '_defListNodeValueFn'
},
panelNode: {
if (node) {
}
return node;
},
valueFn: '_defPanelNodeValueFn'
},
tabIndex: {
value: null
//validator: '_validTabIndex'
}
},
HTML_PARSER: {
}
});
/**
* Provides Tab instances for use with TabView
* @param config {Object} Object literal specifying tabview configuration properties.
*
* @class Tab
* @constructor
* @extends Widget
* @uses WidgetChild
*/
_uiSetSelectedPanel: function(selected) {
},
_afterTabSelectedChange: function(event) {
},
_afterParentChange: function(e) {
if (!e.newVal) {
this._remove();
} else {
this._add();
}
},
_initAria: function() {
if (!id) {
}
// Apply the ARIA roles, states and properties to each tab
// Apply the ARIA roles, states and properties to each panel
role: 'tabpanel',
'aria-labelledby': id
});
},
syncUI: function() {
},
bindUI: function() {
},
renderUI: function() {
this._renderPanel();
this._initAria();
},
_renderPanel: function() {
},
_add: function() {
if (list) {
}
if (panel) {
}
},
_remove: function() {
},
_onActivate: function(e) {
if (e.target === this) {
// Prevent the browser from navigating to the URL specified by the
// anchor's href attribute.
e.domEvent.preventDefault();
}
},
initializer: function() {
defaultFn: this._onActivate
});
},
_defLabelSetter: function(label) {
return label;
},
_defContentSetter: function(content) {
return content;
},
// find panel by ID mapping from label href
_defPanelNodeValueFn: function() {
if (panel) {
}
}
// use the one found by id, or else try matching indices
}
if (!panel) { // create if none found
}
return panel;
}
}, {
ATTRS: {
/**
* @attribute triggerEvent
* @default "click"
* @type String
*/
triggerEvent: {
value: 'click'
},
/**
* @attribute label
* @type String
*/
label: {
setter: '_defLabelSetter',
},
/**
* @attribute content
* @type String
*/
content: {
setter: '_defContentSetter',
},
/**
* @attribute panelNode
* @type Y.Node
*/
panelNode: {
if (node) {
}
return node;
},
valueFn: '_defPanelNodeValueFn'
},
tabIndex: {
value: null,
validator: '_validTabIndex'
}
},
HTML_PARSER: {
selected: function(contentBox) {
1 : 0;
return ret;
}
}
});
}, '@VERSION@' ,{requires:['substitute', 'node-pluginhost', 'node-focusmanager', 'tabview-base', 'widget', 'widget-parent', 'widget-child']});