Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tabview Build

  • Loading branch information...
commit d5791b5eb362369c3d1dbea55870be18ba1953e7 1 parent 1199417
@davglass davglass authored
View
234 build/tabview-base/tabview-base-coverage.js
@@ -1,230 +1,6 @@
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
+if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
+if (!__coverage__['build/tabview-base/tabview-base.js']) {
+ __coverage__['build/tabview-base/tabview-base.js'] = {"path":"build/tabview-base/tabview-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"(anonymous_2)","line":33,"loc":{"start":{"line":33,"column":18},"end":{"line":33,"column":29}}},"3":{"name":"(anonymous_3)","line":42,"loc":{"start":{"line":42,"column":10},"end":{"line":42,"column":27}}},"4":{"name":"(anonymous_4)","line":49,"loc":{"start":{"line":49,"column":20},"end":{"line":49,"column":36}}},"5":{"name":"(anonymous_5)","line":50,"loc":{"start":{"line":50,"column":32},"end":{"line":50,"column":54}}},"6":{"name":"(anonymous_6)","line":68,"loc":{"start":{"line":68,"column":13},"end":{"line":68,"column":29}}},"7":{"name":"(anonymous_7)","line":92,"loc":{"start":{"line":92,"column":15},"end":{"line":92,"column":26}}},"8":{"name":"(anonymous_8)","line":102,"loc":{"start":{"line":102,"column":21},"end":{"line":102,"column":32}}},"9":{"name":"(anonymous_9)","line":103,"loc":{"start":{"line":103,"column":68},"end":{"line":103,"column":83}}},"10":{"name":"(anonymous_10)","line":111,"loc":{"start":{"line":111,"column":13},"end":{"line":111,"column":24}}},"11":{"name":"(anonymous_11)","line":120,"loc":{"start":{"line":120,"column":16},"end":{"line":120,"column":27}}},"12":{"name":"(anonymous_12)","line":130,"loc":{"start":{"line":130,"column":16},"end":{"line":130,"column":28}}},"13":{"name":"(anonymous_13)","line":135,"loc":{"start":{"line":135,"column":13},"end":{"line":135,"column":24}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":143,"column":75}},"2":{"start":{"line":3,"column":0},"end":{"line":35,"column":6}},"3":{"start":{"line":34,"column":8},"end":{"line":34,"column":41}},"4":{"start":{"line":37,"column":0},"end":{"line":37,"column":33}},"5":{"start":{"line":38,"column":0},"end":{"line":38,"column":32}},"6":{"start":{"line":39,"column":0},"end":{"line":39,"column":38}},"7":{"start":{"line":41,"column":0},"end":{"line":138,"column":3}},"8":{"start":{"line":43,"column":8},"end":{"line":43,"column":37}},"9":{"start":{"line":44,"column":8},"end":{"line":44,"column":55}},"10":{"start":{"line":46,"column":8},"end":{"line":46,"column":23}},"11":{"start":{"line":50,"column":8},"end":{"line":63,"column":23}},"12":{"start":{"line":52,"column":12},"end":{"line":62,"column":13}},"13":{"start":{"line":53,"column":16},"end":{"line":53,"column":45}},"14":{"start":{"line":55,"column":16},"end":{"line":57,"column":17}},"15":{"start":{"line":56,"column":20},"end":{"line":56,"column":48}},"16":{"start":{"line":59,"column":16},"end":{"line":61,"column":17}},"17":{"start":{"line":60,"column":20},"end":{"line":60,"column":55}},"18":{"start":{"line":65,"column":8},"end":{"line":65,"column":49}},"19":{"start":{"line":69,"column":8},"end":{"line":73,"column":65}},"20":{"start":{"line":75,"column":8},"end":{"line":77,"column":9}},"21":{"start":{"line":76,"column":12},"end":{"line":76,"column":57}},"22":{"start":{"line":79,"column":8},"end":{"line":81,"column":9}},"23":{"start":{"line":80,"column":12},"end":{"line":80,"column":62}},"24":{"start":{"line":83,"column":8},"end":{"line":85,"column":9}},"25":{"start":{"line":84,"column":12},"end":{"line":84,"column":54}},"26":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"27":{"start":{"line":88,"column":12},"end":{"line":88,"column":59}},"28":{"start":{"line":93,"column":8},"end":{"line":96,"column":67}},"29":{"start":{"line":98,"column":8},"end":{"line":98,"column":34}},"30":{"start":{"line":103,"column":8},"end":{"line":107,"column":11}},"31":{"start":{"line":104,"column":12},"end":{"line":106,"column":13}},"32":{"start":{"line":105,"column":16},"end":{"line":105,"column":30}},"33":{"start":{"line":112,"column":8},"end":{"line":112,"column":31}},"34":{"start":{"line":113,"column":8},"end":{"line":113,"column":30}},"35":{"start":{"line":114,"column":8},"end":{"line":114,"column":25}},"36":{"start":{"line":115,"column":8},"end":{"line":115,"column":26}},"37":{"start":{"line":123,"column":8},"end":{"line":127,"column":10}},"38":{"start":{"line":131,"column":8},"end":{"line":131,"column":27}},"39":{"start":{"line":132,"column":8},"end":{"line":132,"column":76}},"40":{"start":{"line":136,"column":8},"end":{"line":136,"column":45}},"41":{"start":{"line":140,"column":0},"end":{"line":140,"column":28}}},"branchMap":{"1":{"line":43,"type":"binary-expr","locations":[{"start":{"line":43,"column":17},"end":{"line":43,"column":23}},{"start":{"line":43,"column":27},"end":{"line":43,"column":36}}]},"2":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":21},"end":{"line":44,"column":32}},{"start":{"line":44,"column":36},"end":{"line":44,"column":54}}]},"3":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":12},"end":{"line":52,"column":12}},{"start":{"line":52,"column":12},"end":{"line":52,"column":12}}]},"4":{"line":55,"type":"if","locations":[{"start":{"line":55,"column":16},"end":{"line":55,"column":16}},{"start":{"line":55,"column":16},"end":{"line":55,"column":16}}]},"5":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":16},"end":{"line":59,"column":16}},{"start":{"line":59,"column":16},"end":{"line":59,"column":16}}]},"6":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":8},"end":{"line":75,"column":8}},{"start":{"line":75,"column":8},"end":{"line":75,"column":8}}]},"7":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":8},"end":{"line":79,"column":8}},{"start":{"line":79,"column":8},"end":{"line":79,"column":8}}]},"8":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]},"9":{"line":87,"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":87,"column":8}},{"start":{"line":87,"column":8},"end":{"line":87,"column":8}}]},"10":{"line":95,"type":"cond-expr","locations":[{"start":{"line":96,"column":20},"end":{"line":96,"column":62}},{"start":{"line":96,"column":65},"end":{"line":96,"column":66}}]},"11":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":12},"end":{"line":104,"column":12}},{"start":{"line":104,"column":12},"end":{"line":104,"column":12}}]}},"code":["(function () { YUI.add('tabview-base', function (Y, NAME) {","","var getClassName = Y.ClassNameManager.getClassName,"," TABVIEW = 'tabview',"," TAB = 'tab',"," 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() {"," 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\"]});","","}());"]};
}
-_yuitest_coverage["build/tabview-base/tabview-base.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- 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',"," 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() {"," 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\"]});"];
-_yuitest_coverage["build/tabview-base/tabview-base.js"].lines = {"1":0,"3":0,"34":0,"37":0,"38":0,"39":0,"41":0,"43":0,"44":0,"46":0,"50":0,"52":0,"53":0,"55":0,"56":0,"59":0,"60":0,"65":0,"69":0,"75":0,"76":0,"79":0,"80":0,"83":0,"84":0,"87":0,"88":0,"93":0,"98":0,"103":0,"104":0,"105":0,"112":0,"113":0,"114":0,"115":0,"123":0,"131":0,"132":0,"136":0,"140":0};
-_yuitest_coverage["build/tabview-base/tabview-base.js"].functions = {"TabviewBase:33":0,"init:42":0,"(anonymous 2):50":0,"initClassNames:49":0,"_select:68":0,"initState:92":0,"(anonymous 3):103":0,"_scrubTextNodes:102":0,"refresh:111":0,"initEvents:120":0,"onTabEvent:130":0,"destroy:135":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/tabview-base/tabview-base.js"].coveredLines = 41;
-_yuitest_coverage["build/tabview-base/tabview-base.js"].coveredFunctions = 13;
-_yuitest_coverline("build/tabview-base/tabview-base.js", 1);
-YUI.add('tabview-base', function (Y, NAME) {
-
-_yuitest_coverfunc("build/tabview-base/tabview-base.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 3);
-var getClassName = Y.ClassNameManager.getClassName,
- TABVIEW = 'tabview',
- TAB = 'tab',
- 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() {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "TabviewBase", 33);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 34);
-this.init.apply(this, arguments);
- };
-
-_yuitest_coverline("build/tabview-base/tabview-base.js", 37);
-TabviewBase.NAME = 'tabviewBase';
-_yuitest_coverline("build/tabview-base/tabview-base.js", 38);
-TabviewBase._queries = _queries;
-_yuitest_coverline("build/tabview-base/tabview-base.js", 39);
-TabviewBase._classNames = _classNames;
-
-_yuitest_coverline("build/tabview-base/tabview-base.js", 41);
-Y.mix(TabviewBase.prototype, {
- init: function(config) {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "init", 42);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 43);
-config = config || EMPTY_OBJ;
- _yuitest_coverline("build/tabview-base/tabview-base.js", 44);
-this._node = config.host || Y.one(config.node);
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 46);
-this.refresh();
- },
-
- initClassNames: function(index) {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "initClassNames", 49);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 50);
-Y.Object.each(_queries, function(query, name) {
- // this === tabview._node
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "(anonymous 2)", 50);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 52);
-if (_classNames[name]) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 53);
-var result = this.all(query);
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 55);
-if (index !== undefined) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 56);
-result = result.item(index);
- }
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 59);
-if (result) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 60);
-result.addClass(_classNames[name]);
- }
- }
- }, this._node);
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 65);
-this._node.addClass(_classNames.tabview);
- },
-
- _select: function(index) {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "_select", 68);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 69);
-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);
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 75);
-if (oldItem) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 76);
-oldItem.removeClass(_classNames.selectedTab);
- }
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 79);
-if (oldContent) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 80);
-oldContent.removeClass(_classNames.selectedPanel);
- }
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 83);
-if (newItem) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 84);
-newItem.addClass(_classNames.selectedTab);
- }
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 87);
-if (newContent) {
- _yuitest_coverline("build/tabview-base/tabview-base.js", 88);
-newContent.addClass(_classNames.selectedPanel);
- }
- },
-
- initState: function() {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "initState", 92);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 93);
-var node = this._node,
- activeNode = node.one(_queries.selectedTab),
- activeIndex = activeNode ?
- node.all(_queries.tab).indexOf(activeNode) : 0;
-
- _yuitest_coverline("build/tabview-base/tabview-base.js", 98);
-this._select(activeIndex);
- },
-
- // collapse extra space between list-items
- _scrubTextNodes: function() {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "_scrubTextNodes", 102);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 103);
-this._node.one(_queries.tabviewList).get('childNodes').each(function(node) {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "(anonymous 3)", 103);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 104);
-if (node.get('nodeType') === 3) { // text node
- _yuitest_coverline("build/tabview-base/tabview-base.js", 105);
-node.remove();
- }
- });
- },
-
- // base renderer only enlivens existing markup
- refresh: function() {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "refresh", 111);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 112);
-this._scrubTextNodes();
- _yuitest_coverline("build/tabview-base/tabview-base.js", 113);
-this.initClassNames();
- _yuitest_coverline("build/tabview-base/tabview-base.js", 114);
-this.initState();
- _yuitest_coverline("build/tabview-base/tabview-base.js", 115);
-this.initEvents();
- },
-
- tabEventName: 'click',
-
- initEvents: function() {
- // TODO: detach prefix for delegate?
- // this._node.delegate('tabview|' + this.tabEventName),
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "initEvents", 120);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 123);
-this._node.delegate(this.tabEventName,
- this.onTabEvent,
- _queries.tab,
- this
- );
- },
-
- onTabEvent: function(e) {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "onTabEvent", 130);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 131);
-e.preventDefault();
- _yuitest_coverline("build/tabview-base/tabview-base.js", 132);
-this._select(this._node.all(_queries.tab).indexOf(e.currentTarget));
- },
-
- destroy: function() {
- _yuitest_coverfunc("build/tabview-base/tabview-base.js", "destroy", 135);
-_yuitest_coverline("build/tabview-base/tabview-base.js", 136);
-this._node.detach(this.tabEventName);
- }
-});
-
-_yuitest_coverline("build/tabview-base/tabview-base.js", 140);
-Y.TabviewBase = TabviewBase;
-
-
-}, '@VERSION@', {"requires": ["node-event-delegate", "classnamemanager"]});
+var __cov_dlpEYNgH$_x24F0fhVKX$A = __coverage__['build/tabview-base/tabview-base.js'];
+__cov_dlpEYNgH$_x24F0fhVKX$A.s['1']++;YUI.add('tabview-base',function(Y,NAME){__cov_dlpEYNgH$_x24F0fhVKX$A.f['1']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['2']++;var getClassName=Y.ClassNameManager.getClassName,TABVIEW='tabview',TAB='tab',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(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['2']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['3']++;this.init.apply(this,arguments);};__cov_dlpEYNgH$_x24F0fhVKX$A.s['4']++;TabviewBase.NAME='tabviewBase';__cov_dlpEYNgH$_x24F0fhVKX$A.s['5']++;TabviewBase._queries=_queries;__cov_dlpEYNgH$_x24F0fhVKX$A.s['6']++;TabviewBase._classNames=_classNames;__cov_dlpEYNgH$_x24F0fhVKX$A.s['7']++;Y.mix(TabviewBase.prototype,{init:function(config){__cov_dlpEYNgH$_x24F0fhVKX$A.f['3']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['8']++;config=(__cov_dlpEYNgH$_x24F0fhVKX$A.b['1'][0]++,config)||(__cov_dlpEYNgH$_x24F0fhVKX$A.b['1'][1]++,EMPTY_OBJ);__cov_dlpEYNgH$_x24F0fhVKX$A.s['9']++;this._node=(__cov_dlpEYNgH$_x24F0fhVKX$A.b['2'][0]++,config.host)||(__cov_dlpEYNgH$_x24F0fhVKX$A.b['2'][1]++,Y.one(config.node));__cov_dlpEYNgH$_x24F0fhVKX$A.s['10']++;this.refresh();},initClassNames:function(index){__cov_dlpEYNgH$_x24F0fhVKX$A.f['4']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['11']++;Y.Object.each(_queries,function(query,name){__cov_dlpEYNgH$_x24F0fhVKX$A.f['5']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['12']++;if(_classNames[name]){__cov_dlpEYNgH$_x24F0fhVKX$A.b['3'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['13']++;var result=this.all(query);__cov_dlpEYNgH$_x24F0fhVKX$A.s['14']++;if(index!==undefined){__cov_dlpEYNgH$_x24F0fhVKX$A.b['4'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['15']++;result=result.item(index);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['4'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['16']++;if(result){__cov_dlpEYNgH$_x24F0fhVKX$A.b['5'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['17']++;result.addClass(_classNames[name]);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['5'][1]++;}}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['3'][1]++;}},this._node);__cov_dlpEYNgH$_x24F0fhVKX$A.s['18']++;this._node.addClass(_classNames.tabview);},_select:function(index){__cov_dlpEYNgH$_x24F0fhVKX$A.f['6']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['19']++;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);__cov_dlpEYNgH$_x24F0fhVKX$A.s['20']++;if(oldItem){__cov_dlpEYNgH$_x24F0fhVKX$A.b['6'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['21']++;oldItem.removeClass(_classNames.selectedTab);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['6'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['22']++;if(oldContent){__cov_dlpEYNgH$_x24F0fhVKX$A.b['7'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['23']++;oldContent.removeClass(_classNames.selectedPanel);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['7'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['24']++;if(newItem){__cov_dlpEYNgH$_x24F0fhVKX$A.b['8'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['25']++;newItem.addClass(_classNames.selectedTab);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['8'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['26']++;if(newContent){__cov_dlpEYNgH$_x24F0fhVKX$A.b['9'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['27']++;newContent.addClass(_classNames.selectedPanel);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['9'][1]++;}},initState:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['7']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['28']++;var node=this._node,activeNode=node.one(_queries.selectedTab),activeIndex=activeNode?(__cov_dlpEYNgH$_x24F0fhVKX$A.b['10'][0]++,node.all(_queries.tab).indexOf(activeNode)):(__cov_dlpEYNgH$_x24F0fhVKX$A.b['10'][1]++,0);__cov_dlpEYNgH$_x24F0fhVKX$A.s['29']++;this._select(activeIndex);},_scrubTextNodes:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['8']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['30']++;this._node.one(_queries.tabviewList).get('childNodes').each(function(node){__cov_dlpEYNgH$_x24F0fhVKX$A.f['9']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['31']++;if(node.get('nodeType')===3){__cov_dlpEYNgH$_x24F0fhVKX$A.b['11'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['32']++;node.remove();}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['11'][1]++;}});},refresh:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['10']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['33']++;this._scrubTextNodes();__cov_dlpEYNgH$_x24F0fhVKX$A.s['34']++;this.initClassNames();__cov_dlpEYNgH$_x24F0fhVKX$A.s['35']++;this.initState();__cov_dlpEYNgH$_x24F0fhVKX$A.s['36']++;this.initEvents();},tabEventName:'click',initEvents:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['11']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['37']++;this._node.delegate(this.tabEventName,this.onTabEvent,_queries.tab,this);},onTabEvent:function(e){__cov_dlpEYNgH$_x24F0fhVKX$A.f['12']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['38']++;e.preventDefault();__cov_dlpEYNgH$_x24F0fhVKX$A.s['39']++;this._select(this._node.all(_queries.tab).indexOf(e.currentTarget));},destroy:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['13']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['40']++;this._node.detach(this.tabEventName);}});__cov_dlpEYNgH$_x24F0fhVKX$A.s['41']++;Y.TabviewBase=TabviewBase;},'@VERSION@',{'requires':['node-event-delegate','classnamemanager']});
View
63 build/tabview-plugin/tabview-plugin-coverage.js
@@ -1,59 +1,6 @@
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
+if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
+if (!__coverage__['build/tabview-plugin/tabview-plugin.js']) {
+ __coverage__['build/tabview-plugin/tabview-plugin.js'] = {"path":"build/tabview-plugin/tabview-plugin.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"b":{},"f":{"1":0,"2":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"TabviewPlugin","line":3,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":16,"column":48}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":1}},"3":{"start":{"line":4,"column":4},"end":{"line":4,"column":64}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":26}},"6":{"start":{"line":10,"column":0},"end":{"line":10,"column":39}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":22}},"8":{"start":{"line":13,"column":0},"end":{"line":13,"column":33}}},"branchMap":{},"code":["(function () { YUI.add('tabview-plugin', function (Y, NAME) {","","function TabviewPlugin() {"," TabviewPlugin.superclass.constructor.apply(this, arguments);","}","","TabviewPlugin.NAME = 'tabviewPlugin';","TabviewPlugin.NS = 'tabs';","","Y.extend(TabviewPlugin, Y.TabviewBase);","","Y.namespace('Plugin');","Y.Plugin.Tabview = TabviewPlugin;","","","}, '@VERSION@', {\"requires\": [\"tabview-base\"]});","","}());"]};
}
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/tabview-plugin/tabview-plugin.js",
- code: []
-};
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"].code=["YUI.add('tabview-plugin', function (Y, NAME) {","","function TabviewPlugin() {"," TabviewPlugin.superclass.constructor.apply(this, arguments);","}","","TabviewPlugin.NAME = 'tabviewPlugin';","TabviewPlugin.NS = 'tabs';","","Y.extend(TabviewPlugin, Y.TabviewBase);","","Y.namespace('Plugin');","Y.Plugin.Tabview = TabviewPlugin;","","","}, '@VERSION@', {\"requires\": [\"tabview-base\"]});"];
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"].lines = {"1":0,"3":0,"4":0,"7":0,"8":0,"10":0,"12":0,"13":0};
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"].functions = {"TabviewPlugin:3":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"].coveredLines = 8;
-_yuitest_coverage["build/tabview-plugin/tabview-plugin.js"].coveredFunctions = 2;
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 1);
-YUI.add('tabview-plugin', function (Y, NAME) {
-
-_yuitest_coverfunc("build/tabview-plugin/tabview-plugin.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 3);
-function TabviewPlugin() {
- _yuitest_coverfunc("build/tabview-plugin/tabview-plugin.js", "TabviewPlugin", 3);
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 4);
-TabviewPlugin.superclass.constructor.apply(this, arguments);
-}
-
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 7);
-TabviewPlugin.NAME = 'tabviewPlugin';
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 8);
-TabviewPlugin.NS = 'tabs';
-
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 10);
-Y.extend(TabviewPlugin, Y.TabviewBase);
-
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 12);
-Y.namespace('Plugin');
-_yuitest_coverline("build/tabview-plugin/tabview-plugin.js", 13);
-Y.Plugin.Tabview = TabviewPlugin;
-
-
-}, '@VERSION@', {"requires": ["tabview-base"]});
+var __cov_TykcRjcoZP68PMc273vocw = __coverage__['build/tabview-plugin/tabview-plugin.js'];
+__cov_TykcRjcoZP68PMc273vocw.s['1']++;YUI.add('tabview-plugin',function(Y,NAME){__cov_TykcRjcoZP68PMc273vocw.f['1']++;__cov_TykcRjcoZP68PMc273vocw.s['2']++;function TabviewPlugin(){__cov_TykcRjcoZP68PMc273vocw.f['2']++;__cov_TykcRjcoZP68PMc273vocw.s['3']++;TabviewPlugin.superclass.constructor.apply(this,arguments);}__cov_TykcRjcoZP68PMc273vocw.s['4']++;TabviewPlugin.NAME='tabviewPlugin';__cov_TykcRjcoZP68PMc273vocw.s['5']++;TabviewPlugin.NS='tabs';__cov_TykcRjcoZP68PMc273vocw.s['6']++;Y.extend(TabviewPlugin,Y.TabviewBase);__cov_TykcRjcoZP68PMc273vocw.s['7']++;Y.namespace('Plugin');__cov_TykcRjcoZP68PMc273vocw.s['8']++;Y.Plugin.Tabview=TabviewPlugin;},'@VERSION@',{'requires':['tabview-base']});
View
603 build/tabview/tabview-coverage.js
@@ -1,599 +1,6 @@
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
+if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
+if (!__coverage__['build/tabview/tabview.js']) {
+ __coverage__['build/tabview/tabview.js'] = {"path":"build/tabview/tabview.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":38}}},"2":{"name":"(anonymous_2)","line":23,"loc":{"start":{"line":23,"column":22},"end":{"line":23,"column":33}}},"3":{"name":"(anonymous_3)","line":27,"loc":{"start":{"line":27,"column":25},"end":{"line":27,"column":36}}},"4":{"name":"(anonymous_4)","line":31,"loc":{"start":{"line":31,"column":26},"end":{"line":31,"column":37}}},"5":{"name":"(anonymous_5)","line":35,"loc":{"start":{"line":35,"column":24},"end":{"line":35,"column":36}}},"6":{"name":"(anonymous_6)","line":49,"loc":{"start":{"line":49,"column":15},"end":{"line":49,"column":26}}},"7":{"name":"(anonymous_7)","line":61,"loc":{"start":{"line":61,"column":12},"end":{"line":61,"column":23}}},"8":{"name":"(anonymous_8)","line":78,"loc":{"start":{"line":78,"column":14},"end":{"line":78,"column":25}}},"9":{"name":"(anonymous_9)","line":86,"loc":{"start":{"line":86,"column":22},"end":{"line":86,"column":33}}},"10":{"name":"(anonymous_10)","line":90,"loc":{"start":{"line":90,"column":18},"end":{"line":90,"column":32}}},"11":{"name":"(anonymous_11)","line":103,"loc":{"start":{"line":103,"column":20},"end":{"line":103,"column":41}}},"12":{"name":"(anonymous_12)","line":110,"loc":{"start":{"line":110,"column":21},"end":{"line":110,"column":42}}},"13":{"name":"(anonymous_13)","line":117,"loc":{"start":{"line":117,"column":17},"end":{"line":117,"column":38}}},"14":{"name":"(anonymous_14)","line":128,"loc":{"start":{"line":128,"column":22},"end":{"line":128,"column":40}}},"15":{"name":"(anonymous_15)","line":149,"loc":{"start":{"line":149,"column":20},"end":{"line":149,"column":35}}},"16":{"name":"(anonymous_16)","line":161,"loc":{"start":{"line":161,"column":20},"end":{"line":161,"column":35}}},"17":{"name":"(anonymous_17)","line":202,"loc":{"start":{"line":202,"column":25},"end":{"line":202,"column":44}}},"18":{"name":"(anonymous_18)","line":206,"loc":{"start":{"line":206,"column":29},"end":{"line":206,"column":45}}},"19":{"name":"(anonymous_19)","line":210,"loc":{"start":{"line":210,"column":24},"end":{"line":210,"column":36}}},"20":{"name":"(anonymous_20)","line":218,"loc":{"start":{"line":218,"column":15},"end":{"line":218,"column":26}}},"21":{"name":"(anonymous_21)","line":239,"loc":{"start":{"line":239,"column":12},"end":{"line":239,"column":23}}},"22":{"name":"(anonymous_22)","line":245,"loc":{"start":{"line":245,"column":12},"end":{"line":245,"column":23}}},"23":{"name":"(anonymous_23)","line":250,"loc":{"start":{"line":250,"column":14},"end":{"line":250,"column":25}}},"24":{"name":"(anonymous_24)","line":255,"loc":{"start":{"line":255,"column":18},"end":{"line":255,"column":29}}},"25":{"name":"(anonymous_25)","line":260,"loc":{"start":{"line":260,"column":10},"end":{"line":260,"column":21}}},"26":{"name":"(anonymous_26)","line":274,"loc":{"start":{"line":274,"column":13},"end":{"line":274,"column":24}}},"27":{"name":"(anonymous_27)","line":279,"loc":{"start":{"line":279,"column":17},"end":{"line":279,"column":29}}},"28":{"name":"(anonymous_28)","line":288,"loc":{"start":{"line":288,"column":17},"end":{"line":288,"column":28}}},"29":{"name":"(anonymous_29)","line":294,"loc":{"start":{"line":294,"column":21},"end":{"line":294,"column":32}}},"30":{"name":"(anonymous_30)","line":298,"loc":{"start":{"line":298,"column":21},"end":{"line":298,"column":37}}},"31":{"name":"(anonymous_31)","line":306,"loc":{"start":{"line":306,"column":23},"end":{"line":306,"column":41}}},"32":{"name":"(anonymous_32)","line":314,"loc":{"start":{"line":314,"column":23},"end":{"line":314,"column":34}}},"33":{"name":"(anonymous_33)","line":319,"loc":{"start":{"line":319,"column":26},"end":{"line":319,"column":37}}},"34":{"name":"(anonymous_34)","line":379,"loc":{"start":{"line":379,"column":20},"end":{"line":379,"column":35}}},"35":{"name":"(anonymous_35)","line":397,"loc":{"start":{"line":397,"column":18},"end":{"line":397,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":417,"column":3}},"2":{"start":{"line":9,"column":0},"end":{"line":182,"column":3}},"3":{"start":{"line":24,"column":8},"end":{"line":24,"column":54}},"4":{"start":{"line":28,"column":8},"end":{"line":28,"column":52}},"5":{"start":{"line":32,"column":8},"end":{"line":32,"column":53}},"6":{"start":{"line":36,"column":8},"end":{"line":37,"column":46}},"7":{"start":{"line":39,"column":8},"end":{"line":44,"column":9}},"8":{"start":{"line":40,"column":12},"end":{"line":40,"column":57}},"9":{"start":{"line":41,"column":12},"end":{"line":43,"column":13}},"10":{"start":{"line":42,"column":16},"end":{"line":42,"column":45}},"11":{"start":{"line":46,"column":8},"end":{"line":46,"column":54}},"12":{"start":{"line":50,"column":8},"end":{"line":51,"column":59}},"13":{"start":{"line":53,"column":8},"end":{"line":58,"column":9}},"14":{"start":{"line":54,"column":12},"end":{"line":57,"column":15}},"15":{"start":{"line":66,"column":8},"end":{"line":71,"column":23}},"16":{"start":{"line":73,"column":8},"end":{"line":73,"column":52}},"17":{"start":{"line":74,"column":8},"end":{"line":74,"column":54}},"18":{"start":{"line":75,"column":8},"end":{"line":75,"column":59}},"19":{"start":{"line":79,"column":8},"end":{"line":79,"column":48}},"20":{"start":{"line":80,"column":8},"end":{"line":80,"column":40}},"21":{"start":{"line":81,"column":8},"end":{"line":81,"column":41}},"22":{"start":{"line":82,"column":8},"end":{"line":82,"column":55}},"23":{"start":{"line":83,"column":8},"end":{"line":83,"column":37}},"24":{"start":{"line":88,"column":8},"end":{"line":88,"column":62}},"25":{"start":{"line":90,"column":8},"end":{"line":95,"column":11}},"26":{"start":{"line":91,"column":12},"end":{"line":94,"column":13}},"27":{"start":{"line":92,"column":16},"end":{"line":92,"column":32}},"28":{"start":{"line":93,"column":16},"end":{"line":93,"column":28}},"29":{"start":{"line":96,"column":8},"end":{"line":100,"column":9}},"30":{"start":{"line":98,"column":12},"end":{"line":98,"column":45}},"31":{"start":{"line":99,"column":12},"end":{"line":99,"column":41}},"32":{"start":{"line":104,"column":8},"end":{"line":104,"column":40}},"33":{"start":{"line":105,"column":8},"end":{"line":107,"column":9}},"34":{"start":{"line":106,"column":12},"end":{"line":106,"column":36}},"35":{"start":{"line":111,"column":8},"end":{"line":111,"column":41}},"36":{"start":{"line":112,"column":8},"end":{"line":114,"column":9}},"37":{"start":{"line":113,"column":12},"end":{"line":113,"column":36}},"38":{"start":{"line":118,"column":8},"end":{"line":121,"column":27}},"39":{"start":{"line":123,"column":8},"end":{"line":136,"column":9}},"40":{"start":{"line":124,"column":12},"end":{"line":124,"column":43}},"41":{"start":{"line":125,"column":12},"end":{"line":125,"column":77}},"42":{"start":{"line":126,"column":12},"end":{"line":126,"column":77}},"43":{"start":{"line":128,"column":12},"end":{"line":135,"column":15}},"44":{"start":{"line":129,"column":16},"end":{"line":129,"column":65}},"45":{"start":{"line":130,"column":16},"end":{"line":134,"column":19}},"46":{"start":{"line":150,"column":16},"end":{"line":150,"column":35}},"47":{"start":{"line":151,"column":16},"end":{"line":153,"column":17}},"48":{"start":{"line":152,"column":20},"end":{"line":152,"column":59}},"49":{"start":{"line":154,"column":16},"end":{"line":154,"column":28}},"50":{"start":{"line":162,"column":16},"end":{"line":162,"column":35}},"51":{"start":{"line":163,"column":16},"end":{"line":165,"column":17}},"52":{"start":{"line":164,"column":20},"end":{"line":164,"column":60}},"53":{"start":{"line":166,"column":16},"end":{"line":166,"column":28}},"54":{"start":{"line":184,"column":0},"end":{"line":184,"column":20}},"55":{"start":{"line":185,"column":0},"end":{"line":186,"column":44}},"56":{"start":{"line":197,"column":0},"end":{"line":404,"column":3}},"57":{"start":{"line":203,"column":8},"end":{"line":203,"column":79}},"58":{"start":{"line":207,"column":7},"end":{"line":207,"column":46}},"59":{"start":{"line":211,"column":8},"end":{"line":215,"column":9}},"60":{"start":{"line":212,"column":12},"end":{"line":212,"column":27}},"61":{"start":{"line":214,"column":12},"end":{"line":214,"column":24}},"62":{"start":{"line":219,"column":8},"end":{"line":221,"column":42}},"63":{"start":{"line":223,"column":8},"end":{"line":226,"column":9}},"64":{"start":{"line":224,"column":12},"end":{"line":224,"column":26}},"65":{"start":{"line":225,"column":12},"end":{"line":225,"column":33}},"66":{"start":{"line":228,"column":8},"end":{"line":228,"column":34}},"67":{"start":{"line":229,"column":8},"end":{"line":229,"column":61}},"68":{"start":{"line":233,"column":8},"end":{"line":236,"column":11}},"69":{"start":{"line":240,"column":8},"end":{"line":240,"column":45}},"70":{"start":{"line":241,"column":8},"end":{"line":241,"column":49}},"71":{"start":{"line":242,"column":8},"end":{"line":242,"column":55}},"72":{"start":{"line":246,"column":7},"end":{"line":246,"column":66}},"73":{"start":{"line":247,"column":7},"end":{"line":247,"column":59}},"74":{"start":{"line":251,"column":8},"end":{"line":251,"column":28}},"75":{"start":{"line":252,"column":8},"end":{"line":252,"column":25}},"76":{"start":{"line":256,"column":8},"end":{"line":257,"column":48}},"77":{"start":{"line":261,"column":8},"end":{"line":263,"column":44}},"78":{"start":{"line":265,"column":8},"end":{"line":267,"column":9}},"79":{"start":{"line":266,"column":12},"end":{"line":266,"column":54}},"80":{"start":{"line":269,"column":8},"end":{"line":271,"column":9}},"81":{"start":{"line":270,"column":12},"end":{"line":270,"column":53}},"82":{"start":{"line":275,"column":8},"end":{"line":275,"column":41}},"83":{"start":{"line":276,"column":8},"end":{"line":276,"column":39}},"84":{"start":{"line":280,"column":9},"end":{"line":285,"column":10}},"85":{"start":{"line":283,"column":13},"end":{"line":283,"column":41}},"86":{"start":{"line":284,"column":13},"end":{"line":284,"column":41}},"87":{"start":{"line":289,"column":7},"end":{"line":291,"column":10}},"88":{"start":{"line":295,"column":8},"end":{"line":295,"column":48}},"89":{"start":{"line":299,"column":8},"end":{"line":299,"column":47}},"90":{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},"91":{"start":{"line":301,"column":12},"end":{"line":301,"column":37}},"92":{"start":{"line":303,"column":8},"end":{"line":303,"column":21}},"93":{"start":{"line":307,"column":8},"end":{"line":307,"column":42}},"94":{"start":{"line":308,"column":8},"end":{"line":310,"column":9}},"95":{"start":{"line":309,"column":12},"end":{"line":309,"column":35}},"96":{"start":{"line":311,"column":8},"end":{"line":311,"column":23}},"97":{"start":{"line":315,"column":8},"end":{"line":315,"column":47}},"98":{"start":{"line":320,"column":8},"end":{"line":323,"column":18}},"99":{"start":{"line":325,"column":8},"end":{"line":325,"column":38}},"100":{"start":{"line":327,"column":8},"end":{"line":332,"column":9}},"101":{"start":{"line":328,"column":12},"end":{"line":328,"column":32}},"102":{"start":{"line":329,"column":12},"end":{"line":331,"column":13}},"103":{"start":{"line":330,"column":16},"end":{"line":330,"column":53}},"104":{"start":{"line":335,"column":8},"end":{"line":338,"column":9}},"105":{"start":{"line":336,"column":12},"end":{"line":337,"column":61}},"106":{"start":{"line":340,"column":8},"end":{"line":342,"column":9}},"107":{"start":{"line":341,"column":12},"end":{"line":341,"column":55}},"108":{"start":{"line":343,"column":8},"end":{"line":343,"column":21}},"109":{"start":{"line":380,"column":16},"end":{"line":380,"column":35}},"110":{"start":{"line":381,"column":16},"end":{"line":383,"column":17}},"111":{"start":{"line":382,"column":20},"end":{"line":382,"column":56}},"112":{"start":{"line":384,"column":16},"end":{"line":384,"column":28}},"113":{"start":{"line":398,"column":12},"end":{"line":399,"column":30}},"114":{"start":{"line":400,"column":12},"end":{"line":400,"column":23}}},"branchMap":{"1":{"line":39,"type":"if","locations":[{"start":{"line":39,"column":8},"end":{"line":39,"column":8}},{"start":{"line":39,"column":8},"end":{"line":39,"column":8}}]},"2":{"line":40,"type":"binary-expr","locations":[{"start":{"line":40,"column":24},"end":{"line":40,"column":40}},{"start":{"line":40,"column":44},"end":{"line":40,"column":56}}]},"3":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":12},"end":{"line":41,"column":12}},{"start":{"line":41,"column":12},"end":{"line":41,"column":12}}]},"4":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":8},"end":{"line":53,"column":8}},{"start":{"line":53,"column":8},"end":{"line":53,"column":8}}]},"5":{"line":88,"type":"binary-expr","locations":[{"start":{"line":88,"column":24},"end":{"line":88,"column":45}},{"start":{"line":88,"column":49},"end":{"line":88,"column":61}}]},"6":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":12},"end":{"line":91,"column":12}},{"start":{"line":91,"column":12},"end":{"line":91,"column":12}}]},"7":{"line":96,"type":"if","locations":[{"start":{"line":96,"column":8},"end":{"line":96,"column":8}},{"start":{"line":96,"column":8},"end":{"line":96,"column":8}}]},"8":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":8},"end":{"line":105,"column":8}},{"start":{"line":105,"column":8},"end":{"line":105,"column":8}}]},"9":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":8},"end":{"line":112,"column":8}},{"start":{"line":112,"column":8},"end":{"line":112,"column":8}}]},"10":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":35},"end":{"line":120,"column":72}},{"start":{"line":120,"column":75},"end":{"line":120,"column":79}}]},"11":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":8},"end":{"line":123,"column":8}},{"start":{"line":123,"column":8},"end":{"line":123,"column":8}}]},"12":{"line":129,"type":"cond-expr","locations":[{"start":{"line":129,"column":43},"end":{"line":129,"column":57}},{"start":{"line":129,"column":60},"end":{"line":129,"column":64}}]},"13":{"line":151,"type":"if","locations":[{"start":{"line":151,"column":16},"end":{"line":151,"column":16}},{"start":{"line":151,"column":16},"end":{"line":151,"column":16}}]},"14":{"line":163,"type":"if","locations":[{"start":{"line":163,"column":16},"end":{"line":163,"column":16}},{"start":{"line":163,"column":16},"end":{"line":163,"column":16}}]},"15":{"line":211,"type":"if","locations":[{"start":{"line":211,"column":8},"end":{"line":211,"column":8}},{"start":{"line":211,"column":8},"end":{"line":211,"column":8}}]},"16":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":8},"end":{"line":223,"column":8}},{"start":{"line":223,"column":8},"end":{"line":223,"column":8}}]},"17":{"line":265,"type":"if","locations":[{"start":{"line":265,"column":8},"end":{"line":265,"column":8}},{"start":{"line":265,"column":8},"end":{"line":265,"column":8}}]},"18":{"line":269,"type":"if","locations":[{"start":{"line":269,"column":8},"end":{"line":269,"column":8}},{"start":{"line":269,"column":8},"end":{"line":269,"column":8}}]},"19":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":9},"end":{"line":280,"column":9}},{"start":{"line":280,"column":9},"end":{"line":280,"column":9}}]},"20":{"line":300,"type":"if","locations":[{"start":{"line":300,"column":8},"end":{"line":300,"column":8}},{"start":{"line":300,"column":8},"end":{"line":300,"column":8}}]},"21":{"line":308,"type":"if","locations":[{"start":{"line":308,"column":8},"end":{"line":308,"column":8}},{"start":{"line":308,"column":8},"end":{"line":308,"column":8}}]},"22":{"line":320,"type":"binary-expr","locations":[{"start":{"line":320,"column":19},"end":{"line":320,"column":53}},{"start":{"line":320,"column":57},"end":{"line":320,"column":59}}]},"23":{"line":327,"type":"if","locations":[{"start":{"line":327,"column":8},"end":{"line":327,"column":8}},{"start":{"line":327,"column":8},"end":{"line":327,"column":8}}]},"24":{"line":329,"type":"if","locations":[{"start":{"line":329,"column":12},"end":{"line":329,"column":12}},{"start":{"line":329,"column":12},"end":{"line":329,"column":12}}]},"25":{"line":335,"type":"if","locations":[{"start":{"line":335,"column":8},"end":{"line":335,"column":8}},{"start":{"line":335,"column":8},"end":{"line":335,"column":8}}]},"26":{"line":335,"type":"binary-expr","locations":[{"start":{"line":335,"column":12},"end":{"line":335,"column":18}},{"start":{"line":335,"column":22},"end":{"line":335,"column":28}}]},"27":{"line":340,"type":"if","locations":[{"start":{"line":340,"column":8},"end":{"line":340,"column":8}},{"start":{"line":340,"column":8},"end":{"line":340,"column":8}}]},"28":{"line":381,"type":"if","locations":[{"start":{"line":381,"column":16},"end":{"line":381,"column":16}},{"start":{"line":381,"column":16},"end":{"line":381,"column":16}}]},"29":{"line":398,"type":"cond-expr","locations":[{"start":{"line":399,"column":24},"end":{"line":399,"column":25}},{"start":{"line":399,"column":28},"end":{"line":399,"column":29}}]}},"code":["(function () { YUI.add('tabview', function (Y, NAME) {","","/**"," * The TabView module"," *"," * @module tabview"," */","","var _queries = Y.TabviewBase._queries,"," _classNames = Y.TabviewBase._classNames,"," DOT = '.',",""," /**"," * Provides a tabbed widget interface"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class TabView"," * @constructor"," * @extends Widget"," * @uses WidgetParent"," */"," TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], {"," _afterChildAdded: function() {"," this.get('contentBox').focusManager.refresh();"," },",""," _defListNodeValueFn: function() {"," return Y.Node.create(TabView.LIST_TEMPLATE);"," },",""," _defPanelNodeValueFn: function() {"," return Y.Node.create(TabView.PANEL_TEMPLATE);"," },",""," _afterChildRemoved: function(e) { // update the selected tab when removed"," var i = e.index,"," selection = this.get('selection');",""," if (!selection) { // select previous item if selection removed"," selection = this.item(i - 1) || this.item(0);"," if (selection) {"," selection.set('selected', 1);"," }"," }",""," this.get('contentBox').focusManager.refresh();"," },",""," _initAria: function() {"," var contentBox = this.get('contentBox'),"," tablist = contentBox.one(_queries.tabviewList);",""," if (tablist) {"," tablist.setAttrs({"," //'aria-labelledby':"," role: 'tablist'"," });"," }"," },",""," 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.",""," this.get('contentBox').plug(Y.Plugin.NodeFocusManager, {"," descendants: DOT + _classNames.tabLabel,"," keys: { next: 'down:39', // Right arrow"," previous: 'down:37' }, // Left arrow"," circular: true"," });",""," this.after('render', this._setDefSelection);"," this.after('addChild', this._afterChildAdded);"," this.after('removeChild', this._afterChildRemoved);"," },"," "," renderUI: function() {"," var contentBox = this.get('contentBox');"," this._renderListBox(contentBox);"," this._renderPanelBox(contentBox);"," this._childrenContainer = this.get('listNode');"," this._renderTabs(contentBox);"," },",""," _setDefSelection: function() {"," // If no tab is selected, select the first tab."," var selection = this.get('selection') || this.item(0);",""," this.some(function(tab) {"," if (tab.get('selected')) {"," selection = tab;"," return true;"," }"," });"," if (selection) {"," // TODO: why both needed? (via widgetParent/Child)?"," this.set('selection', selection);"," selection.set('selected', 1);"," }"," },",""," _renderListBox: function(contentBox) {"," var node = this.get('listNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderPanelBox: function(contentBox) {"," var node = this.get('panelNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderTabs: function(contentBox) {"," var tabs = contentBox.all(_queries.tab),"," panelNode = this.get('panelNode'),"," panels = (panelNode) ? this.get('panelNode').get('children') : null,"," tabview = this;",""," if (tabs) { // add classNames and fill in Tab fields from markup when possible"," tabs.addClass(_classNames.tab);"," contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);"," contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);",""," tabs.each(function(node, i) {"," var panelNode = (panels) ? panels.item(i) : null;"," tabview.add({"," boundingBox: node,"," contentBox: node.one(DOT + _classNames.tabLabel),"," panelNode: panelNode"," });"," });"," }"," }","}, {",""," LIST_TEMPLATE: '<ul class=\"' + _classNames.tabviewList + '\"></ul>',"," PANEL_TEMPLATE: '<div class=\"' + _classNames.tabviewPanel + '\"></div>',",""," ATTRS: {"," defaultChildType: {"," value: 'Tab'"," },",""," listNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabviewList);"," }"," return node;"," },",""," valueFn: '_defListNodeValueFn'"," },",""," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabviewPanel);"," }"," return node;"," },",""," valueFn: '_defPanelNodeValueFn'"," },",""," tabIndex: {"," value: null"," //validator: '_validTabIndex'"," }"," },",""," HTML_PARSER: {"," listNode: _queries.tabviewList,"," panelNode: _queries.tabviewPanel"," }","});","","Y.TabView = TabView;","var Lang = Y.Lang,"," _classNames = Y.TabviewBase._classNames;","","/**"," * Provides Tab instances for use with TabView"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class Tab"," * @constructor"," * @extends Widget"," * @uses WidgetChild"," */","Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {"," BOUNDING_TEMPLATE: '<li class=\"' + _classNames.tab + '\"></li>',"," CONTENT_TEMPLATE: '<a class=\"' + _classNames.tabLabel + '\"></a>',"," PANEL_TEMPLATE: '<div class=\"' + _classNames.tabPanel + '\"></div>',",""," _uiSetSelectedPanel: function(selected) {"," this.get('panelNode').toggleClass(_classNames.selectedPanel, selected);"," },",""," _afterTabSelectedChange: function(event) {"," this._uiSetSelectedPanel(event.newVal);"," },",""," _afterParentChange: function(e) {"," if (!e.newVal) {"," this._remove();"," } else {"," this._add();"," }"," },",""," _initAria: function() {"," var anchor = this.get('contentBox'),"," id = anchor.get('id'),"," panel = this.get('panelNode');"," "," if (!id) {"," id = Y.guid();"," anchor.set('id', id);"," }"," // Apply the ARIA roles, states and properties to each tab"," anchor.set('role', 'tab');"," anchor.get('parentNode').set('role', 'presentation');"," "," "," // Apply the ARIA roles, states and properties to each panel"," panel.setAttrs({"," role: 'tabpanel',"," 'aria-labelledby': id"," });"," },",""," syncUI: function() {"," this.set('label', this.get('label'));"," this.set('content', this.get('content'));"," this._uiSetSelectedPanel(this.get('selected'));"," },",""," bindUI: function() {"," this.after('selectedChange', this._afterTabSelectedChange);"," this.after('parentChange', this._afterParentChange);"," },",""," renderUI: function() {"," this._renderPanel();"," this._initAria();"," },",""," _renderPanel: function() {"," this.get('parent').get('panelNode')"," .appendChild(this.get('panelNode'));"," },",""," _add: function() {"," var parent = this.get('parent').get('contentBox'),"," list = parent.get('listNode'),"," panel = parent.get('panelNode');",""," if (list) {"," list.appendChild(this.get('boundingBox'));"," }",""," if (panel) {"," panel.appendChild(this.get('panelNode'));"," }"," },"," "," _remove: function() {"," this.get('boundingBox').remove();"," this.get('panelNode').remove();"," },",""," _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();"," e.target.set('selected', 1);"," }"," },"," "," initializer: function() {"," this.publish(this.get('triggerEvent'), {"," defaultFn: this._onActivate"," });"," },",""," _defLabelGetter: function() {"," return this.get('contentBox').getHTML();"," },",""," _defLabelSetter: function(label) {"," var labelNode = this.get('contentBox');"," if (labelNode.getHTML() !== label) { // Avoid rewriting existing label."," labelNode.setHTML(label);"," }"," return label;"," },",""," _defContentSetter: function(content) {"," var panel = this.get('panelNode');"," if (panel.getHTML() !== content) { // Avoid rewriting existing content."," panel.setHTML(content);"," }"," return content;"," },",""," _defContentGetter: function() {"," return this.get('panelNode').getHTML();"," },",""," // find panel by ID mapping from label href"," _defPanelNodeValueFn: function() {"," var href = this.get('contentBox').get('href') || '',"," parent = this.get('parent'),"," hashIndex = href.indexOf('#'),"," panel;",""," href = href.substr(hashIndex);",""," if (href.charAt(0) === '#') { // in-page nav, find by ID"," panel = Y.one(href);"," if (panel) {"," panel.addClass(_classNames.tabPanel);"," }"," }",""," // use the one found by id, or else try matching indices"," if (!panel && parent) {"," panel = parent.get('panelNode')"," .get('children').item(this.get('index'));"," }",""," if (!panel) { // create if none found"," panel = Y.Node.create(this.PANEL_TEMPLATE);"," }"," return panel;"," }","}, {"," ATTRS: {"," /**"," * @attribute triggerEvent"," * @default \"click\""," * @type String"," */"," triggerEvent: {"," value: 'click'"," },",""," /**"," * @attribute label"," * @type HTML"," */"," label: {"," setter: '_defLabelSetter',"," getter: '_defLabelGetter'"," },",""," /**"," * @attribute content"," * @type HTML"," */"," content: {"," setter: '_defContentSetter',"," getter: '_defContentGetter'"," },",""," /**"," * @attribute panelNode"," * @type Y.Node"," */"," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabPanel);"," }"," return node;"," },"," valueFn: '_defPanelNodeValueFn'"," },"," "," tabIndex: {"," value: null,"," validator: '_validTabIndex'"," }",""," },",""," HTML_PARSER: {"," selected: function() {"," var ret = (this.get('boundingBox').hasClass(_classNames.selectedTab)) ?"," 1 : 0;"," return ret;"," }"," }","","});","","","}, '@VERSION@', {"," \"requires\": ["," \"widget\","," \"widget-parent\","," \"widget-child\","," \"tabview-base\","," \"node-pluginhost\","," \"node-focusmanager\""," ],"," \"skinnable\": true","});","","}());"]};
}
-_yuitest_coverage["build/tabview/tabview.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/tabview/tabview.js",
- code: []
-};
-_yuitest_coverage["build/tabview/tabview.js"].code=["YUI.add('tabview', function (Y, NAME) {","","/**"," * The TabView module"," *"," * @module tabview"," */","","var _queries = Y.TabviewBase._queries,"," _classNames = Y.TabviewBase._classNames,"," DOT = '.',",""," /**"," * Provides a tabbed widget interface"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class TabView"," * @constructor"," * @extends Widget"," * @uses WidgetParent"," */"," TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], {"," _afterChildAdded: function() {"," this.get('contentBox').focusManager.refresh();"," },",""," _defListNodeValueFn: function() {"," return Y.Node.create(TabView.LIST_TEMPLATE);"," },",""," _defPanelNodeValueFn: function() {"," return Y.Node.create(TabView.PANEL_TEMPLATE);"," },",""," _afterChildRemoved: function(e) { // update the selected tab when removed"," var i = e.index,"," selection = this.get('selection');",""," if (!selection) { // select previous item if selection removed"," selection = this.item(i - 1) || this.item(0);"," if (selection) {"," selection.set('selected', 1);"," }"," }",""," this.get('contentBox').focusManager.refresh();"," },",""," _initAria: function() {"," var contentBox = this.get('contentBox'),"," tablist = contentBox.one(_queries.tabviewList);",""," if (tablist) {"," tablist.setAttrs({"," //'aria-labelledby':"," role: 'tablist'"," });"," }"," },",""," 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.",""," this.get('contentBox').plug(Y.Plugin.NodeFocusManager, {"," descendants: DOT + _classNames.tabLabel,"," keys: { next: 'down:39', // Right arrow"," previous: 'down:37' }, // Left arrow"," circular: true"," });",""," this.after('render', this._setDefSelection);"," this.after('addChild', this._afterChildAdded);"," this.after('removeChild', this._afterChildRemoved);"," },"," "," renderUI: function() {"," var contentBox = this.get('contentBox');"," this._renderListBox(contentBox);"," this._renderPanelBox(contentBox);"," this._childrenContainer = this.get('listNode');"," this._renderTabs(contentBox);"," },",""," _setDefSelection: function() {"," // If no tab is selected, select the first tab."," var selection = this.get('selection') || this.item(0);",""," this.some(function(tab) {"," if (tab.get('selected')) {"," selection = tab;"," return true;"," }"," });"," if (selection) {"," // TODO: why both needed? (via widgetParent/Child)?"," this.set('selection', selection);"," selection.set('selected', 1);"," }"," },",""," _renderListBox: function(contentBox) {"," var node = this.get('listNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderPanelBox: function(contentBox) {"," var node = this.get('panelNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderTabs: function(contentBox) {"," var tabs = contentBox.all(_queries.tab),"," panelNode = this.get('panelNode'),"," panels = (panelNode) ? this.get('panelNode').get('children') : null,"," tabview = this;",""," if (tabs) { // add classNames and fill in Tab fields from markup when possible"," tabs.addClass(_classNames.tab);"," contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);"," contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);",""," tabs.each(function(node, i) {"," var panelNode = (panels) ? panels.item(i) : null;"," tabview.add({"," boundingBox: node,"," contentBox: node.one(DOT + _classNames.tabLabel),"," panelNode: panelNode"," });"," });"," }"," }","}, {",""," LIST_TEMPLATE: '<ul class=\"' + _classNames.tabviewList + '\"></ul>',"," PANEL_TEMPLATE: '<div class=\"' + _classNames.tabviewPanel + '\"></div>',",""," ATTRS: {"," defaultChildType: {"," value: 'Tab'"," },",""," listNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabviewList);"," }"," return node;"," },",""," valueFn: '_defListNodeValueFn'"," },",""," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabviewPanel);"," }"," return node;"," },",""," valueFn: '_defPanelNodeValueFn'"," },",""," tabIndex: {"," value: null"," //validator: '_validTabIndex'"," }"," },",""," HTML_PARSER: {"," listNode: _queries.tabviewList,"," panelNode: _queries.tabviewPanel"," }","});","","Y.TabView = TabView;","var Lang = Y.Lang,"," _classNames = Y.TabviewBase._classNames;","","/**"," * Provides Tab instances for use with TabView"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class Tab"," * @constructor"," * @extends Widget"," * @uses WidgetChild"," */","Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {"," BOUNDING_TEMPLATE: '<li class=\"' + _classNames.tab + '\"></li>',"," CONTENT_TEMPLATE: '<a class=\"' + _classNames.tabLabel + '\"></a>',"," PANEL_TEMPLATE: '<div class=\"' + _classNames.tabPanel + '\"></div>',",""," _uiSetSelectedPanel: function(selected) {"," this.get('panelNode').toggleClass(_classNames.selectedPanel, selected);"," },",""," _afterTabSelectedChange: function(event) {"," this._uiSetSelectedPanel(event.newVal);"," },",""," _afterParentChange: function(e) {"," if (!e.newVal) {"," this._remove();"," } else {"," this._add();"," }"," },",""," _initAria: function() {"," var anchor = this.get('contentBox'),"," id = anchor.get('id'),"," panel = this.get('panelNode');"," "," if (!id) {"," id = Y.guid();"," anchor.set('id', id);"," }"," // Apply the ARIA roles, states and properties to each tab"," anchor.set('role', 'tab');"," anchor.get('parentNode').set('role', 'presentation');"," "," "," // Apply the ARIA roles, states and properties to each panel"," panel.setAttrs({"," role: 'tabpanel',"," 'aria-labelledby': id"," });"," },",""," syncUI: function() {"," this.set('label', this.get('label'));"," this.set('content', this.get('content'));"," this._uiSetSelectedPanel(this.get('selected'));"," },",""," bindUI: function() {"," this.after('selectedChange', this._afterTabSelectedChange);"," this.after('parentChange', this._afterParentChange);"," },",""," renderUI: function() {"," this._renderPanel();"," this._initAria();"," },",""," _renderPanel: function() {"," this.get('parent').get('panelNode')"," .appendChild(this.get('panelNode'));"," },",""," _add: function() {"," var parent = this.get('parent').get('contentBox'),"," list = parent.get('listNode'),"," panel = parent.get('panelNode');",""," if (list) {"," list.appendChild(this.get('boundingBox'));"," }",""," if (panel) {"," panel.appendChild(this.get('panelNode'));"," }"," },"," "," _remove: function() {"," this.get('boundingBox').remove();"," this.get('panelNode').remove();"," },",""," _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();"," e.target.set('selected', 1);"," }"," },"," "," initializer: function() {"," this.publish(this.get('triggerEvent'), {"," defaultFn: this._onActivate"," });"," },",""," _defLabelGetter: function() {"," return this.get('contentBox').getHTML();"," },",""," _defLabelSetter: function(label) {"," var labelNode = this.get('contentBox');"," if (labelNode.getHTML() !== label) { // Avoid rewriting existing label."," labelNode.setHTML(label);"," }"," return label;"," },",""," _defContentSetter: function(content) {"," var panel = this.get('panelNode');"," if (panel.getHTML() !== content) { // Avoid rewriting existing content."," panel.setHTML(content);"," }"," return content;"," },",""," _defContentGetter: function() {"," return this.get('panelNode').getHTML();"," },",""," // find panel by ID mapping from label href"," _defPanelNodeValueFn: function() {"," var href = this.get('contentBox').get('href') || '',"," parent = this.get('parent'),"," hashIndex = href.indexOf('#'),"," panel;",""," href = href.substr(hashIndex);",""," if (href.charAt(0) === '#') { // in-page nav, find by ID"," panel = Y.one(href);"," if (panel) {"," panel.addClass(_classNames.tabPanel);"," }"," }",""," // use the one found by id, or else try matching indices"," if (!panel && parent) {"," panel = parent.get('panelNode')"," .get('children').item(this.get('index'));"," }",""," if (!panel) { // create if none found"," panel = Y.Node.create(this.PANEL_TEMPLATE);"," }"," return panel;"," }","}, {"," ATTRS: {"," /**"," * @attribute triggerEvent"," * @default \"click\""," * @type String"," */"," triggerEvent: {"," value: 'click'"," },",""," /**"," * @attribute label"," * @type HTML"," */"," label: {"," setter: '_defLabelSetter',"," getter: '_defLabelGetter'"," },",""," /**"," * @attribute content"," * @type HTML"," */"," content: {"," setter: '_defContentSetter',"," getter: '_defContentGetter'"," },",""," /**"," * @attribute panelNode"," * @type Y.Node"," */"," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(_classNames.tabPanel);"," }"," return node;"," },"," valueFn: '_defPanelNodeValueFn'"," },"," "," tabIndex: {"," value: null,"," validator: '_validTabIndex'"," }",""," },",""," HTML_PARSER: {"," selected: function() {"," var ret = (this.get('boundingBox').hasClass(_classNames.selectedTab)) ?"," 1 : 0;"," return ret;"," }"," }","","});","","","}, '@VERSION@', {"," \"requires\": ["," \"widget\","," \"widget-parent\","," \"widget-child\","," \"tabview-base\","," \"node-pluginhost\","," \"node-focusmanager\""," ],"," \"skinnable\": true","});"];
-_yuitest_coverage["build/tabview/tabview.js"].lines = {"1":0,"9":0,"24":0,"28":0,"32":0,"36":0,"39":0,"40":0,"41":0,"42":0,"46":0,"50":0,"53":0,"54":0,"66":0,"73":0,"74":0,"75":0,"79":0,"80":0,"81":0,"82":0,"83":0,"88":0,"90":0,"91":0,"92":0,"93":0,"96":0,"98":0,"99":0,"104":0,"105":0,"106":0,"111":0,"112":0,"113":0,"118":0,"123":0,"124":0,"125":0,"126":0,"128":0,"129":0,"130":0,"150":0,"151":0,"152":0,"154":0,"162":0,"163":0,"164":0,"166":0,"184":0,"185":0,"197":0,"203":0,"207":0,"211":0,"212":0,"214":0,"219":0,"223":0,"224":0,"225":0,"228":0,"229":0,"233":0,"240":0,"241":0,"242":0,"246":0,"247":0,"251":0,"252":0,"256":0,"261":0,"265":0,"266":0,"269":0,"270":0,"275":0,"276":0,"280":0,"283":0,"284":0,"289":0,"295":0,"299":0,"300":0,"301":0,"303":0,"307":0,"308":0,"309":0,"311":0,"315":0,"320":0,"325":0,"327":0,"328":0,"329":0,"330":0,"335":0,"336":0,"340":0,"341":0,"343":0,"380":0,"381":0,"382":0,"384":0,"398":0,"400":0};
-_yuitest_coverage["build/tabview/tabview.js"].functions = {"_afterChildAdded:23":0,"_defListNodeValueFn:27":0,"_defPanelNodeValueFn:31":0,"_afterChildRemoved:35":0,"_initAria:49":0,"bindUI:61":0,"renderUI:78":0,"(anonymous 2):90":0,"_setDefSelection:86":0,"_renderListBox:103":0,"_renderPanelBox:110":0,"(anonymous 3):128":0,"_renderTabs:117":0,"setter:149":0,"setter:161":0,"_uiSetSelectedPanel:202":0,"_afterTabSelectedChange:206":0,"_afterParentChange:210":0,"_initAria:218":0,"syncUI:239":0,"bindUI:245":0,"renderUI:250":0,"_renderPanel:255":0,"_add:260":0,"_remove:274":0,"_onActivate:279":0,"initializer:288":0,"_defLabelGetter:294":0,"_defLabelSetter:298":0,"_defContentSetter:306":0,"_defContentGetter:314":0,"_defPanelNodeValueFn:319":0,"setter:379":0,"selected:397":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/tabview/tabview.js"].coveredLines = 114;
-_yuitest_coverage["build/tabview/tabview.js"].coveredFunctions = 35;
-_yuitest_coverline("build/tabview/tabview.js", 1);
-YUI.add('tabview', function (Y, NAME) {
-
-/**
- * The TabView module
- *
- * @module tabview
- */
-
-_yuitest_coverfunc("build/tabview/tabview.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/tabview/tabview.js", 9);
-var _queries = Y.TabviewBase._queries,
- _classNames = Y.TabviewBase._classNames,
- DOT = '.',
-
- /**
- * Provides a tabbed widget interface
- * @param config {Object} Object literal specifying tabview configuration properties.
- *
- * @class TabView
- * @constructor
- * @extends Widget
- * @uses WidgetParent
- */
- TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], {
- _afterChildAdded: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_afterChildAdded", 23);
-_yuitest_coverline("build/tabview/tabview.js", 24);
-this.get('contentBox').focusManager.refresh();
- },
-
- _defListNodeValueFn: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defListNodeValueFn", 27);
-_yuitest_coverline("build/tabview/tabview.js", 28);
-return Y.Node.create(TabView.LIST_TEMPLATE);
- },
-
- _defPanelNodeValueFn: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defPanelNodeValueFn", 31);
-_yuitest_coverline("build/tabview/tabview.js", 32);
-return Y.Node.create(TabView.PANEL_TEMPLATE);
- },
-
- _afterChildRemoved: function(e) { // update the selected tab when removed
- _yuitest_coverfunc("build/tabview/tabview.js", "_afterChildRemoved", 35);
-_yuitest_coverline("build/tabview/tabview.js", 36);
-var i = e.index,
- selection = this.get('selection');
-
- _yuitest_coverline("build/tabview/tabview.js", 39);
-if (!selection) { // select previous item if selection removed
- _yuitest_coverline("build/tabview/tabview.js", 40);
-selection = this.item(i - 1) || this.item(0);
- _yuitest_coverline("build/tabview/tabview.js", 41);
-if (selection) {
- _yuitest_coverline("build/tabview/tabview.js", 42);
-selection.set('selected', 1);
- }
- }
-
- _yuitest_coverline("build/tabview/tabview.js", 46);
-this.get('contentBox').focusManager.refresh();
- },
-
- _initAria: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_initAria", 49);
-_yuitest_coverline("build/tabview/tabview.js", 50);
-var contentBox = this.get('contentBox'),
- tablist = contentBox.one(_queries.tabviewList);
-
- _yuitest_coverline("build/tabview/tabview.js", 53);
-if (tablist) {
- _yuitest_coverline("build/tabview/tabview.js", 54);
-tablist.setAttrs({
- //'aria-labelledby':
- role: 'tablist'
- });
- }
- },
-
- 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.
-
- _yuitest_coverfunc("build/tabview/tabview.js", "bindUI", 61);
-_yuitest_coverline("build/tabview/tabview.js", 66);
-this.get('contentBox').plug(Y.Plugin.NodeFocusManager, {
- descendants: DOT + _classNames.tabLabel,
- keys: { next: 'down:39', // Right arrow
- previous: 'down:37' }, // Left arrow
- circular: true
- });
-
- _yuitest_coverline("build/tabview/tabview.js", 73);
-this.after('render', this._setDefSelection);
- _yuitest_coverline("build/tabview/tabview.js", 74);
-this.after('addChild', this._afterChildAdded);
- _yuitest_coverline("build/tabview/tabview.js", 75);
-this.after('removeChild', this._afterChildRemoved);
- },
-
- renderUI: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "renderUI", 78);
-_yuitest_coverline("build/tabview/tabview.js", 79);
-var contentBox = this.get('contentBox');
- _yuitest_coverline("build/tabview/tabview.js", 80);
-this._renderListBox(contentBox);
- _yuitest_coverline("build/tabview/tabview.js", 81);
-this._renderPanelBox(contentBox);
- _yuitest_coverline("build/tabview/tabview.js", 82);
-this._childrenContainer = this.get('listNode');
- _yuitest_coverline("build/tabview/tabview.js", 83);
-this._renderTabs(contentBox);
- },
-
- _setDefSelection: function() {
- // If no tab is selected, select the first tab.
- _yuitest_coverfunc("build/tabview/tabview.js", "_setDefSelection", 86);
-_yuitest_coverline("build/tabview/tabview.js", 88);
-var selection = this.get('selection') || this.item(0);
-
- _yuitest_coverline("build/tabview/tabview.js", 90);
-this.some(function(tab) {
- _yuitest_coverfunc("build/tabview/tabview.js", "(anonymous 2)", 90);
-_yuitest_coverline("build/tabview/tabview.js", 91);
-if (tab.get('selected')) {
- _yuitest_coverline("build/tabview/tabview.js", 92);
-selection = tab;
- _yuitest_coverline("build/tabview/tabview.js", 93);
-return true;
- }
- });
- _yuitest_coverline("build/tabview/tabview.js", 96);
-if (selection) {
- // TODO: why both needed? (via widgetParent/Child)?
- _yuitest_coverline("build/tabview/tabview.js", 98);
-this.set('selection', selection);
- _yuitest_coverline("build/tabview/tabview.js", 99);
-selection.set('selected', 1);
- }
- },
-
- _renderListBox: function(contentBox) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_renderListBox", 103);
-_yuitest_coverline("build/tabview/tabview.js", 104);
-var node = this.get('listNode');
- _yuitest_coverline("build/tabview/tabview.js", 105);
-if (!node.inDoc()) {
- _yuitest_coverline("build/tabview/tabview.js", 106);
-contentBox.append(node);
- }
- },
-
- _renderPanelBox: function(contentBox) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_renderPanelBox", 110);
-_yuitest_coverline("build/tabview/tabview.js", 111);
-var node = this.get('panelNode');
- _yuitest_coverline("build/tabview/tabview.js", 112);
-if (!node.inDoc()) {
- _yuitest_coverline("build/tabview/tabview.js", 113);
-contentBox.append(node);
- }
- },
-
- _renderTabs: function(contentBox) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_renderTabs", 117);
-_yuitest_coverline("build/tabview/tabview.js", 118);
-var tabs = contentBox.all(_queries.tab),
- panelNode = this.get('panelNode'),
- panels = (panelNode) ? this.get('panelNode').get('children') : null,
- tabview = this;
-
- _yuitest_coverline("build/tabview/tabview.js", 123);
-if (tabs) { // add classNames and fill in Tab fields from markup when possible
- _yuitest_coverline("build/tabview/tabview.js", 124);
-tabs.addClass(_classNames.tab);
- _yuitest_coverline("build/tabview/tabview.js", 125);
-contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);
- _yuitest_coverline("build/tabview/tabview.js", 126);
-contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);
-
- _yuitest_coverline("build/tabview/tabview.js", 128);
-tabs.each(function(node, i) {
- _yuitest_coverfunc("build/tabview/tabview.js", "(anonymous 3)", 128);
-_yuitest_coverline("build/tabview/tabview.js", 129);
-var panelNode = (panels) ? panels.item(i) : null;
- _yuitest_coverline("build/tabview/tabview.js", 130);
-tabview.add({
- boundingBox: node,
- contentBox: node.one(DOT + _classNames.tabLabel),
- panelNode: panelNode
- });
- });
- }
- }
-}, {
-
- LIST_TEMPLATE: '<ul class="' + _classNames.tabviewList + '"></ul>',
- PANEL_TEMPLATE: '<div class="' + _classNames.tabviewPanel + '"></div>',
-
- ATTRS: {
- defaultChildType: {
- value: 'Tab'
- },
-
- listNode: {
- setter: function(node) {
- _yuitest_coverfunc("build/tabview/tabview.js", "setter", 149);
-_yuitest_coverline("build/tabview/tabview.js", 150);
-node = Y.one(node);
- _yuitest_coverline("build/tabview/tabview.js", 151);
-if (node) {
- _yuitest_coverline("build/tabview/tabview.js", 152);
-node.addClass(_classNames.tabviewList);
- }
- _yuitest_coverline("build/tabview/tabview.js", 154);
-return node;
- },
-
- valueFn: '_defListNodeValueFn'
- },
-
- panelNode: {
- setter: function(node) {
- _yuitest_coverfunc("build/tabview/tabview.js", "setter", 161);
-_yuitest_coverline("build/tabview/tabview.js", 162);
-node = Y.one(node);
- _yuitest_coverline("build/tabview/tabview.js", 163);
-if (node) {
- _yuitest_coverline("build/tabview/tabview.js", 164);
-node.addClass(_classNames.tabviewPanel);
- }
- _yuitest_coverline("build/tabview/tabview.js", 166);
-return node;
- },
-
- valueFn: '_defPanelNodeValueFn'
- },
-
- tabIndex: {
- value: null
- //validator: '_validTabIndex'
- }
- },
-
- HTML_PARSER: {
- listNode: _queries.tabviewList,
- panelNode: _queries.tabviewPanel
- }
-});
-
-_yuitest_coverline("build/tabview/tabview.js", 184);
-Y.TabView = TabView;
-_yuitest_coverline("build/tabview/tabview.js", 185);
-var Lang = Y.Lang,
- _classNames = Y.TabviewBase._classNames;
-
-/**
- * Provides Tab instances for use with TabView
- * @param config {Object} Object literal specifying tabview configuration properties.
- *
- * @class Tab
- * @constructor
- * @extends Widget
- * @uses WidgetChild
- */
-_yuitest_coverline("build/tabview/tabview.js", 197);
-Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {
- BOUNDING_TEMPLATE: '<li class="' + _classNames.tab + '"></li>',
- CONTENT_TEMPLATE: '<a class="' + _classNames.tabLabel + '"></a>',
- PANEL_TEMPLATE: '<div class="' + _classNames.tabPanel + '"></div>',
-
- _uiSetSelectedPanel: function(selected) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_uiSetSelectedPanel", 202);
-_yuitest_coverline("build/tabview/tabview.js", 203);
-this.get('panelNode').toggleClass(_classNames.selectedPanel, selected);
- },
-
- _afterTabSelectedChange: function(event) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_afterTabSelectedChange", 206);
-_yuitest_coverline("build/tabview/tabview.js", 207);
-this._uiSetSelectedPanel(event.newVal);
- },
-
- _afterParentChange: function(e) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_afterParentChange", 210);
-_yuitest_coverline("build/tabview/tabview.js", 211);
-if (!e.newVal) {
- _yuitest_coverline("build/tabview/tabview.js", 212);
-this._remove();
- } else {
- _yuitest_coverline("build/tabview/tabview.js", 214);
-this._add();
- }
- },
-
- _initAria: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_initAria", 218);
-_yuitest_coverline("build/tabview/tabview.js", 219);
-var anchor = this.get('contentBox'),
- id = anchor.get('id'),
- panel = this.get('panelNode');
-
- _yuitest_coverline("build/tabview/tabview.js", 223);
-if (!id) {
- _yuitest_coverline("build/tabview/tabview.js", 224);
-id = Y.guid();
- _yuitest_coverline("build/tabview/tabview.js", 225);
-anchor.set('id', id);
- }
- // Apply the ARIA roles, states and properties to each tab
- _yuitest_coverline("build/tabview/tabview.js", 228);
-anchor.set('role', 'tab');
- _yuitest_coverline("build/tabview/tabview.js", 229);
-anchor.get('parentNode').set('role', 'presentation');
-
-
- // Apply the ARIA roles, states and properties to each panel
- _yuitest_coverline("build/tabview/tabview.js", 233);
-panel.setAttrs({
- role: 'tabpanel',
- 'aria-labelledby': id
- });
- },
-
- syncUI: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "syncUI", 239);
-_yuitest_coverline("build/tabview/tabview.js", 240);
-this.set('label', this.get('label'));
- _yuitest_coverline("build/tabview/tabview.js", 241);
-this.set('content', this.get('content'));
- _yuitest_coverline("build/tabview/tabview.js", 242);
-this._uiSetSelectedPanel(this.get('selected'));
- },
-
- bindUI: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "bindUI", 245);
-_yuitest_coverline("build/tabview/tabview.js", 246);
-this.after('selectedChange', this._afterTabSelectedChange);
- _yuitest_coverline("build/tabview/tabview.js", 247);
-this.after('parentChange', this._afterParentChange);
- },
-
- renderUI: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "renderUI", 250);
-_yuitest_coverline("build/tabview/tabview.js", 251);
-this._renderPanel();
- _yuitest_coverline("build/tabview/tabview.js", 252);
-this._initAria();
- },
-
- _renderPanel: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_renderPanel", 255);
-_yuitest_coverline("build/tabview/tabview.js", 256);
-this.get('parent').get('panelNode')
- .appendChild(this.get('panelNode'));
- },
-
- _add: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_add", 260);
-_yuitest_coverline("build/tabview/tabview.js", 261);
-var parent = this.get('parent').get('contentBox'),
- list = parent.get('listNode'),
- panel = parent.get('panelNode');
-
- _yuitest_coverline("build/tabview/tabview.js", 265);
-if (list) {
- _yuitest_coverline("build/tabview/tabview.js", 266);
-list.appendChild(this.get('boundingBox'));
- }
-
- _yuitest_coverline("build/tabview/tabview.js", 269);
-if (panel) {
- _yuitest_coverline("build/tabview/tabview.js", 270);
-panel.appendChild(this.get('panelNode'));
- }
- },
-
- _remove: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_remove", 274);
-_yuitest_coverline("build/tabview/tabview.js", 275);
-this.get('boundingBox').remove();
- _yuitest_coverline("build/tabview/tabview.js", 276);
-this.get('panelNode').remove();
- },
-
- _onActivate: function(e) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_onActivate", 279);
-_yuitest_coverline("build/tabview/tabview.js", 280);
-if (e.target === this) {
- // Prevent the browser from navigating to the URL specified by the
- // anchor's href attribute.
- _yuitest_coverline("build/tabview/tabview.js", 283);
-e.domEvent.preventDefault();
- _yuitest_coverline("build/tabview/tabview.js", 284);
-e.target.set('selected', 1);
- }
- },
-
- initializer: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "initializer", 288);
-_yuitest_coverline("build/tabview/tabview.js", 289);
-this.publish(this.get('triggerEvent'), {
- defaultFn: this._onActivate
- });
- },
-
- _defLabelGetter: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defLabelGetter", 294);
-_yuitest_coverline("build/tabview/tabview.js", 295);
-return this.get('contentBox').getHTML();
- },
-
- _defLabelSetter: function(label) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defLabelSetter", 298);
-_yuitest_coverline("build/tabview/tabview.js", 299);
-var labelNode = this.get('contentBox');
- _yuitest_coverline("build/tabview/tabview.js", 300);
-if (labelNode.getHTML() !== label) { // Avoid rewriting existing label.
- _yuitest_coverline("build/tabview/tabview.js", 301);
-labelNode.setHTML(label);
- }
- _yuitest_coverline("build/tabview/tabview.js", 303);
-return label;
- },
-
- _defContentSetter: function(content) {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defContentSetter", 306);
-_yuitest_coverline("build/tabview/tabview.js", 307);
-var panel = this.get('panelNode');
- _yuitest_coverline("build/tabview/tabview.js", 308);
-if (panel.getHTML() !== content) { // Avoid rewriting existing content.
- _yuitest_coverline("build/tabview/tabview.js", 309);
-panel.setHTML(content);
- }
- _yuitest_coverline("build/tabview/tabview.js", 311);
-return content;
- },
-
- _defContentGetter: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defContentGetter", 314);
-_yuitest_coverline("build/tabview/tabview.js", 315);
-return this.get('panelNode').getHTML();
- },
-
- // find panel by ID mapping from label href
- _defPanelNodeValueFn: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "_defPanelNodeValueFn", 319);
-_yuitest_coverline("build/tabview/tabview.js", 320);
-var href = this.get('contentBox').get('href') || '',
- parent = this.get('parent'),
- hashIndex = href.indexOf('#'),
- panel;
-
- _yuitest_coverline("build/tabview/tabview.js", 325);
-href = href.substr(hashIndex);
-
- _yuitest_coverline("build/tabview/tabview.js", 327);
-if (href.charAt(0) === '#') { // in-page nav, find by ID
- _yuitest_coverline("build/tabview/tabview.js", 328);
-panel = Y.one(href);
- _yuitest_coverline("build/tabview/tabview.js", 329);
-if (panel) {
- _yuitest_coverline("build/tabview/tabview.js", 330);
-panel.addClass(_classNames.tabPanel);
- }
- }
-
- // use the one found by id, or else try matching indices
- _yuitest_coverline("build/tabview/tabview.js", 335);
-if (!panel && parent) {
- _yuitest_coverline("build/tabview/tabview.js", 336);
-panel = parent.get('panelNode')
- .get('children').item(this.get('index'));
- }
-
- _yuitest_coverline("build/tabview/tabview.js", 340);
-if (!panel) { // create if none found
- _yuitest_coverline("build/tabview/tabview.js", 341);
-panel = Y.Node.create(this.PANEL_TEMPLATE);
- }
- _yuitest_coverline("build/tabview/tabview.js", 343);
-return panel;
- }
-}, {
- ATTRS: {
- /**
- * @attribute triggerEvent
- * @default "click"
- * @type String
- */
- triggerEvent: {
- value: 'click'
- },
-
- /**
- * @attribute label
- * @type HTML
- */
- label: {
- setter: '_defLabelSetter',
- getter: '_defLabelGetter'
- },
-
- /**
- * @attribute content
- * @type HTML
- */
- content: {
- setter: '_defContentSetter',
- getter: '_defContentGetter'
- },
-
- /**
- * @attribute panelNode
- * @type Y.Node
- */
- panelNode: {
- setter: function(node) {
- _yuitest_coverfunc("build/tabview/tabview.js", "setter", 379);
-_yuitest_coverline("build/tabview/tabview.js", 380);
-node = Y.one(node);
- _yuitest_coverline("build/tabview/tabview.js", 381);
-if (node) {
- _yuitest_coverline("build/tabview/tabview.js", 382);
-node.addClass(_classNames.tabPanel);
- }
- _yuitest_coverline("build/tabview/tabview.js", 384);
-return node;
- },
- valueFn: '_defPanelNodeValueFn'
- },
-
- tabIndex: {
- value: null,
- validator: '_validTabIndex'
- }
-
- },
-
- HTML_PARSER: {
- selected: function() {
- _yuitest_coverfunc("build/tabview/tabview.js", "selected", 397);
-_yuitest_coverline("build/tabview/tabview.js", 398);
-var ret = (this.get('boundingBox').hasClass(_classNames.selectedTab)) ?
- 1 : 0;
- _yuitest_coverline("build/tabview/tabview.js", 400);
-return ret;
- }
- }
-
-});
-
-
-}, '@VERSION@', {
- "requires": [
- "widget",
- "widget-parent",
- "widget-child",
- "tabview-base",
- "node-pluginhost",
- "node-focusmanager"
- ],
- "skinnable": true
-});
+var __cov_LLv1qbws4G61$tdRLo6nQQ = __coverage__['build/tabview/tabview.js'];
+__cov_LLv1qbws4G61$tdRLo6nQQ.s['1']++;YUI.add('tabview',function(Y,NAME){__cov_LLv1qbws4G61$tdRLo6nQQ.f['1']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['2']++;var _queries=Y.TabviewBase._queries,_classNames=Y.TabviewBase._classNames,DOT='.',TabView=Y.Base.create('tabView',Y.Widget,[Y.WidgetParent],{_afterChildAdded:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['2']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['3']++;this.get('contentBox').focusManager.refresh();},_defListNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['3']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['4']++;return Y.Node.create(TabView.LIST_TEMPLATE);},_defPanelNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['4']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['5']++;return Y.Node.create(TabView.PANEL_TEMPLATE);},_afterChildRemoved:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['5']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['6']++;var i=e.index,selection=this.get('selection');__cov_LLv1qbws4G61$tdRLo6nQQ.s['7']++;if(!selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['1'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['8']++;selection=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['2'][0]++,this.item(i-1))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['2'][1]++,this.item(0));__cov_LLv1qbws4G61$tdRLo6nQQ.s['9']++;if(selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['3'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['10']++;selection.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['3'][1]++;}}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['1'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['11']++;this.get('contentBox').focusManager.refresh();},_initAria:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['6']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['12']++;var contentBox=this.get('contentBox'),tablist=contentBox.one(_queries.tabviewList);__cov_LLv1qbws4G61$tdRLo6nQQ.s['13']++;if(tablist){__cov_LLv1qbws4G61$tdRLo6nQQ.b['4'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['14']++;tablist.setAttrs({role:'tablist'});}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['4'][1]++;}},bindUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['7']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['15']++;this.get('contentBox').plug(Y.Plugin.NodeFocusManager,{descendants:DOT+_classNames.tabLabel,keys:{next:'down:39',previous:'down:37'},circular:true});__cov_LLv1qbws4G61$tdRLo6nQQ.s['16']++;this.after('render',this._setDefSelection);__cov_LLv1qbws4G61$tdRLo6nQQ.s['17']++;this.after('addChild',this._afterChildAdded);__cov_LLv1qbws4G61$tdRLo6nQQ.s['18']++;this.after('removeChild',this._afterChildRemoved);},renderUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['8']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['19']++;var contentBox=this.get('contentBox');__cov_LLv1qbws4G61$tdRLo6nQQ.s['20']++;this._renderListBox(contentBox);__cov_LLv1qbws4G61$tdRLo6nQQ.s['21']++;this._renderPanelBox(contentBox);__cov_LLv1qbws4G61$tdRLo6nQQ.s['22']++;this._childrenContainer=this.get('listNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['23']++;this._renderTabs(contentBox);},_setDefSelection:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['9']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['24']++;var selection=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['5'][0]++,this.get('selection'))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['5'][1]++,this.item(0));__cov_LLv1qbws4G61$tdRLo6nQQ.s['25']++;this.some(function(tab){__cov_LLv1qbws4G61$tdRLo6nQQ.f['10']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['26']++;if(tab.get('selected')){__cov_LLv1qbws4G61$tdRLo6nQQ.b['6'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['27']++;selection=tab;__cov_LLv1qbws4G61$tdRLo6nQQ.s['28']++;return true;}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['6'][1]++;}});__cov_LLv1qbws4G61$tdRLo6nQQ.s['29']++;if(selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['7'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['30']++;this.set('selection',selection);__cov_LLv1qbws4G61$tdRLo6nQQ.s['31']++;selection.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['7'][1]++;}},_renderListBox:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['11']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['32']++;var node=this.get('listNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['33']++;if(!node.inDoc()){__cov_LLv1qbws4G61$tdRLo6nQQ.b['8'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['34']++;contentBox.append(node);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['8'][1]++;}},_renderPanelBox:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['12']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['35']++;var node=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['36']++;if(!node.inDoc()){__cov_LLv1qbws4G61$tdRLo6nQQ.b['9'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['37']++;contentBox.append(node);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['9'][1]++;}},_renderTabs:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['13']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['38']++;var tabs=contentBox.all(_queries.tab),panelNode=this.get('panelNode'),panels=panelNode?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['10'][0]++,this.get('panelNode').get('children')):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['10'][1]++,null),tabview=this;__cov_LLv1qbws4G61$tdRLo6nQQ.s['39']++;if(tabs){__cov_LLv1qbws4G61$tdRLo6nQQ.b['11'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['40']++;tabs.addClass(_classNames.tab);__cov_LLv1qbws4G61$tdRLo6nQQ.s['41']++;contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['42']++;contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['43']++;tabs.each(function(node,i){__cov_LLv1qbws4G61$tdRLo6nQQ.f['14']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['44']++;var panelNode=panels?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['12'][0]++,panels.item(i)):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['12'][1]++,null);__cov_LLv1qbws4G61$tdRLo6nQQ.s['45']++;tabview.add({boundingBox:node,contentBox:node.one(DOT+_classNames.tabLabel),panelNode:panelNode});});}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['11'][1]++;}}},{LIST_TEMPLATE:'<ul class="'+_classNames.tabviewList+'"></ul>',PANEL_TEMPLATE:'<div class="'+_classNames.tabviewPanel+'"></div>',ATTRS:{defaultChildType:{value:'Tab'},listNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['15']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['46']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['47']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['13'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['48']++;node.addClass(_classNames.tabviewList);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['13'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['49']++;return node;},valueFn:'_defListNodeValueFn'},panelNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['16']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['50']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['51']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['14'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['52']++;node.addClass(_classNames.tabviewPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['14'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['53']++;return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null}},HTML_PARSER:{listNode:_queries.tabviewList,panelNode:_queries.tabviewPanel}});__cov_LLv1qbws4G61$tdRLo6nQQ.s['54']++;Y.TabView=TabView;__cov_LLv1qbws4G61$tdRLo6nQQ.s['55']++;var Lang=Y.Lang,_classNames=Y.TabviewBase._classNames;__cov_LLv1qbws4G61$tdRLo6nQQ.s['56']++;Y.Tab=Y.Base.create('tab',Y.Widget,[Y.WidgetChild],{BOUNDING_TEMPLATE:'<li class="'+_classNames.tab+'"></li>',CONTENT_TEMPLATE:'<a class="'+_classNames.tabLabel+'"></a>',PANEL_TEMPLATE:'<div class="'+_classNames.tabPanel+'"></div>',_uiSetSelectedPanel:function(selected){__cov_LLv1qbws4G61$tdRLo6nQQ.f['17']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['57']++;this.get('panelNode').toggleClass(_classNames.selectedPanel,selected);},_afterTabSelectedChange:function(event){__cov_LLv1qbws4G61$tdRLo6nQQ.f['18']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['58']++;this._uiSetSelectedPanel(event.newVal);},_afterParentChange:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['19']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['59']++;if(!e.newVal){__cov_LLv1qbws4G61$tdRLo6nQQ.b['15'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['60']++;this._remove();}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['15'][1]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['61']++;this._add();}},_initAria:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['20']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['62']++;var anchor=this.get('contentBox'),id=anchor.get('id'),panel=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['63']++;if(!id){__cov_LLv1qbws4G61$tdRLo6nQQ.b['16'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['64']++;id=Y.guid();__cov_LLv1qbws4G61$tdRLo6nQQ.s['65']++;anchor.set('id',id);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['16'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['66']++;anchor.set('role','tab');__cov_LLv1qbws4G61$tdRLo6nQQ.s['67']++;anchor.get('parentNode').set('role','presentation');__cov_LLv1qbws4G61$tdRLo6nQQ.s['68']++;panel.setAttrs({role:'tabpanel','aria-labelledby':id});},syncUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['21']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['69']++;this.set('label',this.get('label'));__cov_LLv1qbws4G61$tdRLo6nQQ.s['70']++;this.set('content',this.get('content'));__cov_LLv1qbws4G61$tdRLo6nQQ.s['71']++;this._uiSetSelectedPanel(this.get('selected'));},bindUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['22']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['72']++;this.after('selectedChange',this._afterTabSelectedChange);__cov_LLv1qbws4G61$tdRLo6nQQ.s['73']++;this.after('parentChange',this._afterParentChange);},renderUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['23']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['74']++;this._renderPanel();__cov_LLv1qbws4G61$tdRLo6nQQ.s['75']++;this._initAria();},_renderPanel:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['24']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['76']++;this.get('parent').get('panelNode').appendChild(this.get('panelNode'));},_add:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['25']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['77']++;var parent=this.get('parent').get('contentBox'),list=parent.get('listNode'),panel=parent.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['78']++;if(list){__cov_LLv1qbws4G61$tdRLo6nQQ.b['17'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['79']++;list.appendChild(this.get('boundingBox'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['17'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['80']++;if(panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['18'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['81']++;panel.appendChild(this.get('panelNode'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['18'][1]++;}},_remove:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['26']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['82']++;this.get('boundingBox').remove();__cov_LLv1qbws4G61$tdRLo6nQQ.s['83']++;this.get('panelNode').remove();},_onActivate:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['27']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['84']++;if(e.target===this){__cov_LLv1qbws4G61$tdRLo6nQQ.b['19'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['85']++;e.domEvent.preventDefault();__cov_LLv1qbws4G61$tdRLo6nQQ.s['86']++;e.target.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['19'][1]++;}},initializer:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['28']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['87']++;this.publish(this.get('triggerEvent'),{defaultFn:this._onActivate});},_defLabelGetter:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['29']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['88']++;return this.get('contentBox').getHTML();},_defLabelSetter:function(label){__cov_LLv1qbws4G61$tdRLo6nQQ.f['30']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['89']++;var labelNode=this.get('contentBox');__cov_LLv1qbws4G61$tdRLo6nQQ.s['90']++;if(labelNode.getHTML()!==label){__cov_LLv1qbws4G61$tdRLo6nQQ.b['20'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['91']++;labelNode.setHTML(label);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['20'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['92']++;return label;},_defContentSetter:function(content){__cov_LLv1qbws4G61$tdRLo6nQQ.f['31']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['93']++;var panel=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['94']++;if(panel.getHTML()!==content){__cov_LLv1qbws4G61$tdRLo6nQQ.b['21'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['95']++;panel.setHTML(content);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['21'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['96']++;return content;},_defContentGetter:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['32']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['97']++;return this.get('panelNode').getHTML();},_defPanelNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['33']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['98']++;var href=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['22'][0]++,this.get('contentBox').get('href'))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['22'][1]++,''),parent=this.get('parent'),hashIndex=href.indexOf('#'),panel;__cov_LLv1qbws4G61$tdRLo6nQQ.s['99']++;href=href.substr(hashIndex);__cov_LLv1qbws4G61$tdRLo6nQQ.s['100']++;if(href.charAt(0)==='#'){__cov_LLv1qbws4G61$tdRLo6nQQ.b['23'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['101']++;panel=Y.one(href);__cov_LLv1qbws4G61$tdRLo6nQQ.s['102']++;if(panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['24'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['103']++;panel.addClass(_classNames.tabPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['24'][1]++;}}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['23'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['104']++;if((__cov_LLv1qbws4G61$tdRLo6nQQ.b['26'][0]++,!panel)&&(__cov_LLv1qbws4G61$tdRLo6nQQ.b['26'][1]++,parent)){__cov_LLv1qbws4G61$tdRLo6nQQ.b['25'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['105']++;panel=parent.get('panelNode').get('children').item(this.get('index'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['25'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['106']++;if(!panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['27'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['107']++;panel=Y.Node.create(this.PANEL_TEMPLATE);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['27'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['108']++;return panel;}},{ATTRS:{triggerEvent:{value:'click'},label:{setter:'_defLabelSetter',getter:'_defLabelGetter'},content:{setter:'_defContentSetter',getter:'_defContentGetter'},panelNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['34']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['109']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['110']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['28'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['111']++;node.addClass(_classNames.tabPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['28'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['112']++;return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null,validator:'_validTabIndex'}},HTML_PARSER:{selected:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['35']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['113']++;var ret=this.get('boundingBox').hasClass(_classNames.selectedTab)?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['29'][0]++,1):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['29'][1]++,0);__cov_LLv1qbws4G61$tdRLo6nQQ.s['114']++;return ret;}}});},'@VERSION@',{'requires':['widget','widget-parent','widget-child','tabview-base','node-pluginhost','node-focusmanager'],'skinnable':true});
Please sign in to comment.
Something went wrong with that request. Please try again.