Skip to content
Browse files

Treat labels the same way we treat panels

  • Loading branch information...
1 parent e7951de commit 2e10ee6b39043d8ecb336460c0264d19c9c0f302 @juandopazo committed Jul 20, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −3 src/tabview/js/tab.js
  2. +0 −1 src/tabview/js/tabview.js
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
});
});

0 comments on commit 2e10ee6

Please sign in to comment.
Something went wrong with that request. Please try again.