tabview-debug.js revision 90a4a68f29f441573560c73239959e79a9ddb64c
TABVIEW = 'tabview',
TAB = 'tab',
CONTENT = 'content',
PANEL = 'panel',
SELECTED = 'selected',
EMPTY_OBJ = {},
DOT = '.',
_classNames = {
},
_queries = {
tabviewList: '> ul',
tab: '> ul > li',
tabLabel: '> ul > li > a ',
tabviewPanel: '> div',
tabPanel: '> div > div',
},
TabviewBase = function(config) {
};
this.refresh();
},
initClassNames: function(index) {
// this === tabview._node
if (_classNames[name]) {
}
if (result) {
}
}
}, this._node);
},
if (oldItem) {
}
if (oldContent) {
}
if (newItem) {
}
if (newContent) {
}
},
initState: function() {
this._select(activeIndex);
},
// collapse extra space between list-items
_scrubTextNodes: function() {
}
});
},
// base renderer only enlivens existing markup
refresh: function() {
this._scrubTextNodes();
this.initClassNames();
this.initState();
this.initEvents();
},
tabEventName: 'click',
initEvents: function() {
// TODO: detach prefix for delegate?
// this._node.delegate('tabview|' + this.tabEventName),
this.onTabEvent,
this
);
},
onTabEvent: function(e) {
e.preventDefault();
},
destroy: function() {
}
});
Y.TabviewBase = TabviewBase;
DOT = '.',
_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':
});
}
// Since the anchor's "href" attribute has been removed, the
// element will not fire the click event in Firefox when the
// user presses the enter key. To fix this, dispatch the
// "click" event to the anchor when the user presses the
// enter key.
if (_isGeckoIEWin) {
this.simulate("click");
}
}, ">ul>li>a");
}
},
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);
this._setDefSelection(contentBox);
},
_setDefSelection: function() {
// If no tab is selected, select the first tab.
}
},
_renderListBox: function(contentBox) {
if (!list) {
} else {
}
},
_renderPanelBox: function(contentBox) {
if (!panel) {
} else {
}
},
_renderTabs: function(contentBox) {
tabview = this;
if (tabs) { // add classNames and fill in Tab fields from markup when possible
});
});
}
}
}, {
ATTRS: {
value: 'Tab'
},
// Override of Widget's default tabIndex attribute since we don't
// want the bounding box of each TabView instance in the default
// tab index. The focusable pieces of a TabView's UI will be
// each tab's anchor element.
tabIndex: {
value: null
//validator: '_validTabIndex'
}
}
});
_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
// Remove the "href" attribute from the anchor element to
// prevent JAWS and NVDA from reading the value of the "href"
// attribute when the anchor is focused
if (_isGeckoIEWin) {
}
// Apply the ARIA roles, states and properties to each panel
role: 'tabpanel',
'aria-labelledby': id
});
},
syncUI: function() {
},
bindUI: function() {
},
renderUI: function() {
this._initAria();
},
},
if (!panel) {
}
},
_add: function() {
if (list) {
}
if (tabviewPanel) {
}
},
_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
});
}
}, {
ATTRS: {
triggerEvent: {
value: 'click'
},
label: {
},
content: {
},
panelNode: {},
// Override of Widget's default tabIndex attribute since we don't
// want the bounding box (<li>) of each Tab instance in the default
// tab index. The focusable pieces of a TabView's UI will be
// each tab's anchor element.
tabIndex: {
value: null,
validator: '_validTabIndex'
}
},
HTML_PARSER: {
selection: function(contentBox) {
}
}
});
}, '@VERSION@' ,{requires:['substitute', 'node-focusmanager', 'tabview-base', 'widget', 'widget-parent', 'widget-child']});