TabView shouldn't make assumptions about labels #198

Closed
wants to merge 1 commit into
from
View
11 src/tabview/js/tab.js
@@ -110,17 +110,21 @@ Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {
},
_defLabelSetter: function(label) {
- this.get('contentBox').setContent(label);
+ this.get('contentBox').setHTML(label);
return label;
},
+ _defLabelGetter: function(label) {
+ return this.get('contentBox').getHTML();
+ },
+
_defContentSetter: function(content) {
- this.get('panelNode').setContent(content);
+ this.get('panelNode').setHTML(content);
return content;
},
_defContentGetter: function(content) {
- return this.get('panelNode').getContent();
+ return this.get('panelNode').getHTML();
},
// find panel by ID mapping from label href
@@ -167,6 +171,7 @@ Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {
*/
label: {
setter: '_defLabelSetter',
+ getter: '_defLabelGetter',
validator: Lang.isString
},
View
1 src/tabview/js/tabview.js
@@ -129,7 +129,6 @@ var _queries = Y.TabviewBase._queries,
tabview.add({
boundingBox: node,
contentBox: node.one(DOT + _classNames.tabLabel),
- label: node.one(DOT + _classNames.tabLabel).get('text'),
panelNode: panelNode
});
});