Permalink
Browse files

build tabview

  • Loading branch information...
1 parent ee90064 commit 2e0bd0e86ce02e638864d50da18a8bfa88e4bee5 @msweeney msweeney committed Sep 19, 2012
@@ -26,7 +26,7 @@ _yuitest_coverage["build/tabview-base/tabview-base.js"] = {
path: "build/tabview-base/tabview-base.js",
code: []
};
-_yuitest_coverage["build/tabview-base/tabview-base.js"].code=["YUI.add('tabview-base', function (Y, NAME) {","","var getClassName = Y.ClassNameManager.getClassName,"," TABVIEW = 'tabview',"," TAB = 'tab',"," CONTENT = 'content',"," PANEL = 'panel',"," SELECTED = 'selected',"," EMPTY_OBJ = {},"," DOT = '.',",""," _classNames = {"," tabview: getClassName(TABVIEW),"," tabviewPanel: getClassName(TABVIEW, PANEL),"," tabviewList: getClassName(TABVIEW, 'list'),"," tab: getClassName(TAB),"," tabLabel: getClassName(TAB, 'label'),"," tabPanel: getClassName(TAB, PANEL),"," selectedTab: getClassName(TAB, SELECTED),"," selectedPanel: getClassName(TAB, PANEL, SELECTED)"," },",""," _queries = {"," tabview: DOT + _classNames.tabview,"," tabviewList: '> ul',"," tab: '> ul > li',"," tabLabel: '> ul > li > a ',"," tabviewPanel: '> div',"," tabPanel: '> div > div',"," selectedTab: '> ul > ' + DOT + _classNames.selectedTab,"," selectedPanel: '> div ' + DOT + _classNames.selectedPanel"," },",""," TabviewBase = function(config) {"," this.init.apply(this, arguments);"," };","","TabviewBase.NAME = 'tabviewBase';","TabviewBase._queries = _queries;","TabviewBase._classNames = _classNames;","","Y.mix(TabviewBase.prototype, {"," init: function(config) {"," config = config || EMPTY_OBJ;"," this._node = config.host || Y.one(config.node);",""," this.refresh();"," },",""," initClassNames: function(index) {"," Y.Object.each(_queries, function(query, name) {"," // this === tabview._node"," if (_classNames[name]) {"," var result = this.all(query);"," "," if (index !== undefined) {"," result = result.item(index);"," }",""," if (result) {"," result.addClass(_classNames[name]);"," }"," }"," }, this._node);",""," this._node.addClass(_classNames.tabview);"," },",""," _select: function(index) {"," var node = this._node,"," oldItem = node.one(_queries.selectedTab),"," oldContent = node.one(_queries.selectedPanel),"," newItem = node.all(_queries.tab).item(index),"," newContent = node.all(_queries.tabPanel).item(index);",""," if (oldItem) {"," oldItem.removeClass(_classNames.selectedTab);"," }",""," if (oldContent) {"," oldContent.removeClass(_classNames.selectedPanel);"," }",""," if (newItem) {"," newItem.addClass(_classNames.selectedTab);"," }",""," if (newContent) {"," newContent.addClass(_classNames.selectedPanel);"," }"," },",""," initState: function() {"," var node = this._node,"," activeNode = node.one(_queries.selectedTab),"," activeIndex = activeNode ?"," node.all(_queries.tab).indexOf(activeNode) : 0;",""," this._select(activeIndex);"," },",""," // collapse extra space between list-items"," _scrubTextNodes: function() {"," this._node.one(_queries.tabviewList).get('childNodes').each(function(node) {"," if (node.get('nodeType') === 3) { // text node"," node.remove();"," }"," });"," },",""," // 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._node.delegate(this.tabEventName,"," this.onTabEvent,"," _queries.tab,"," this"," );"," },",""," onTabEvent: function(e) {"," e.preventDefault();"," this._select(this._node.all(_queries.tab).indexOf(e.currentTarget));"," },",""," destroy: function() {"," this._node.detach(this.tabEventName);"," }","});","","Y.TabviewBase = TabviewBase;","","","}, '@VERSION@', {\"requires\": [\"node-event-delegate\", \"classnamemanager\", \"skin-sam-tabview\"]});"];
+_yuitest_coverage["build/tabview-base/tabview-base.js"].code=["YUI.add('tabview-base', function (Y, NAME) {","","var getClassName = Y.ClassNameManager.getClassName,"," TABVIEW = 'tabview',"," TAB = 'tab',"," CONTENT = 'content',"," PANEL = 'panel',"," SELECTED = 'selected',"," EMPTY_OBJ = {},"," DOT = '.',",""," _classNames = {"," tabview: getClassName(TABVIEW),"," tabviewPanel: getClassName(TABVIEW, PANEL),"," tabviewList: getClassName(TABVIEW, 'list'),"," tab: getClassName(TAB),"," tabLabel: getClassName(TAB, 'label'),"," tabPanel: getClassName(TAB, PANEL),"," selectedTab: getClassName(TAB, SELECTED),"," selectedPanel: getClassName(TAB, PANEL, SELECTED)"," },",""," _queries = {"," tabview: DOT + _classNames.tabview,"," tabviewList: '> ul',"," tab: '> ul > li',"," tabLabel: '> ul > li > a',"," tabviewPanel: '> div',"," tabPanel: '> div > div',"," selectedTab: '> ul > ' + DOT + _classNames.selectedTab,"," selectedPanel: '> div ' + DOT + _classNames.selectedPanel"," },",""," TabviewBase = function(config) {"," this.init.apply(this, arguments);"," };","","TabviewBase.NAME = 'tabviewBase';","TabviewBase._queries = _queries;","TabviewBase._classNames = _classNames;","","Y.mix(TabviewBase.prototype, {"," init: function(config) {"," config = config || EMPTY_OBJ;"," this._node = config.host || Y.one(config.node);",""," this.refresh();"," },",""," initClassNames: function(index) {"," Y.Object.each(_queries, function(query, name) {"," // this === tabview._node"," if (_classNames[name]) {"," var result = this.all(query);"," "," if (index !== undefined) {"," result = result.item(index);"," }",""," if (result) {"," result.addClass(_classNames[name]);"," }"," }"," }, this._node);",""," this._node.addClass(_classNames.tabview);"," },",""," _select: function(index) {"," var node = this._node,"," oldItem = node.one(_queries.selectedTab),"," oldContent = node.one(_queries.selectedPanel),"," newItem = node.all(_queries.tab).item(index),"," newContent = node.all(_queries.tabPanel).item(index);",""," if (oldItem) {"," oldItem.removeClass(_classNames.selectedTab);"," }",""," if (oldContent) {"," oldContent.removeClass(_classNames.selectedPanel);"," }",""," if (newItem) {"," newItem.addClass(_classNames.selectedTab);"," }",""," if (newContent) {"," newContent.addClass(_classNames.selectedPanel);"," }"," },",""," initState: function() {"," var node = this._node,"," activeNode = node.one(_queries.selectedTab),"," activeIndex = activeNode ?"," node.all(_queries.tab).indexOf(activeNode) : 0;",""," this._select(activeIndex);"," },",""," // collapse extra space between list-items"," _scrubTextNodes: function() {"," this._node.one(_queries.tabviewList).get('childNodes').each(function(node) {"," if (node.get('nodeType') === 3) { // text node"," node.remove();"," }"," });"," },",""," // 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._node.delegate(this.tabEventName,"," this.onTabEvent,"," _queries.tab,"," this"," );"," },",""," onTabEvent: function(e) {"," e.preventDefault();"," this._select(this._node.all(_queries.tab).indexOf(e.currentTarget));"," },",""," destroy: function() {"," this._node.detach(this.tabEventName);"," }","});","","Y.TabviewBase = TabviewBase;","","","}, '@VERSION@', {\"requires\": [\"node-event-delegate\", \"classnamemanager\", \"skin-sam-tabview\"]});"];
_yuitest_coverage["build/tabview-base/tabview-base.js"].lines = {"1":0,"3":0,"35":0,"38":0,"39":0,"40":0,"42":0,"44":0,"45":0,"47":0,"51":0,"53":0,"54":0,"56":0,"57":0,"60":0,"61":0,"66":0,"70":0,"76":0,"77":0,"80":0,"81":0,"84":0,"85":0,"88":0,"89":0,"94":0,"99":0,"104":0,"105":0,"106":0,"113":0,"114":0,"115":0,"116":0,"124":0,"132":0,"133":0,"137":0,"141":0};
_yuitest_coverage["build/tabview-base/tabview-base.js"].functions = {"TabviewBase:34":0,"init:43":0,"(anonymous 2):51":0,"initClassNames:50":0,"_select:69":0,"initState:93":0,"(anonymous 3):104":0,"_scrubTextNodes:103":0,"refresh:112":0,"initEvents:121":0,"onTabEvent:131":0,"destroy:136":0,"(anonymous 1):1":0};
_yuitest_coverage["build/tabview-base/tabview-base.js"].coveredLines = 41;
@@ -60,7 +60,7 @@ var getClassName = Y.ClassNameManager.getClassName,
tabview: DOT + _classNames.tabview,
tabviewList: '> ul',
tab: '> ul > li',
- tabLabel: '> ul > li > a ',
+ tabLabel: '> ul > li > a',
tabviewPanel: '> div',
tabPanel: '> div > div',
selectedTab: '> ul > ' + DOT + _classNames.selectedTab,
@@ -24,7 +24,7 @@ var getClassName = Y.ClassNameManager.getClassName,
tabview: DOT + _classNames.tabview,
tabviewList: '> ul',
tab: '> ul > li',
- tabLabel: '> ul > li > a ',
+ tabLabel: '> ul > li > a',
tabviewPanel: '> div',
tabPanel: '> div > div',
selectedTab: '> ul > ' + DOT + _classNames.selectedTab,

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -24,7 +24,7 @@ var getClassName = Y.ClassNameManager.getClassName,
tabview: DOT + _classNames.tabview,
tabviewList: '> ul',
tab: '> ul > li',
- tabLabel: '> ul > li > a ',
+ tabLabel: '> ul > li > a',
tabviewPanel: '> div',
tabPanel: '> div > div',
selectedTab: '> ul > ' + DOT + _classNames.selectedTab,

0 comments on commit 2e0bd0e

Please sign in to comment.