Tab.js revision 808903890750c2e01a093b79dce7c7c5669dde1f
(function() {
var M = function(Y) {
};
Tab.CLASSNAMES = {
label: 'yui-tab-label',
content: 'yui-tab-content',
hidden: 'yui-hidden',
active: 'yui-active'
};
label: 'a',
content: 'div'
};
};
var proto = {
initializer: function(config) {
this._initSubNodes();
},
renderer: function() {
this.renderUI(); // lays down DOM subtree when applicable
this.bindUI(); // handle UI events
this.synchUI();
},
createNodes: function () { // TODO: automate?
this._createNode('label');
this._createNode('content');
},
findNodes: function () { // TODO: automate?
this._findNode('label');
this._findNode('content');
},
_onActivate: function() {
this.set('active', true);
},
_initSubNodes: function() {
this.findNodes();
} else { // create
this.createNodes();
}
},
},
_createNode: function (name) {
},
if (!node) { // not enough DOM provided to continue
}
}
},
// UI methods
renderUI: function() {
// TODO: automate this for all subnodes?
}
}
},
bindUI: function() {
this._onActivate, this, true);
},
synchUI: function() {
this._uiSetActive();
this._uiSetLabel();
this._uiSetContent();
},
_uiSetLabel: function() {
},
_uiSetContent: function() {
},
_uiSetActive: function() {
if (this.get('active') === true) {
} else {
}
}
};
labelNode: {
},
contentNode: {
},
label: {
value: ''
},
content: {
value: ''
},
active: {
}
};
};
/*
Tab.NODES = [
{
name: 'label',
tag: 'a',
className: Tab.CLASSNAMES.label
},
{
name: 'content',
tag: 'div',
className: Tab.CLASSNAMES.content
}
];
*/
})();