ttrss/lib/dijit/layout/AccordionContainer.js

2 lines
8.6 KiB
JavaScript
Raw Permalink Normal View History

2012-08-14 14:59:10 +00:00
//>>built
require({cache:{"url:dijit/layout/templates/AccordionButton.html":"<div data-dojo-attach-event='ondijitclick:_onTitleClick' class='dijitAccordionTitle' role=\"presentation\">\n\t<div data-dojo-attach-point='titleNode,focusNode' data-dojo-attach-event='onkeydown:_onTitleKeyDown'\n\t\t\tclass='dijitAccordionTitleFocus' role=\"tab\" aria-expanded=\"false\"\n\t\t><span class='dijitInline dijitAccordionArrow' role=\"presentation\"></span\n\t\t><span class='arrowTextUp' role=\"presentation\">+</span\n\t\t><span class='arrowTextDown' role=\"presentation\">-</span\n\t\t><span role=\"presentation\" class=\"dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\"></span>\n\t\t<span role=\"presentation\" data-dojo-attach-point='titleTextNode, textDirNode' class='dijitAccordionText'></span>\n\t</div>\n</div>\n"}});define("dijit/layout/AccordionContainer",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/fx","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/topic","../focus","../_base/manager","dojo/ready","../_Widget","../_Container","../_TemplatedMixin","../_CssStateMixin","./StackContainer","./ContentPane","dojo/text!./templates/AccordionButton.html","../a11yclick"],function(_1,_2,_3,fx,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16){function _17(_18,dim){_18.resize?_18.resize(dim):_8.setMarginBox(_18.domNode,dim);};var _19=_3("dijit.layout._AccordionButton",[_10,_12,_13],{templateString:_16,label:"",_setLabelAttr:{node:"titleTextNode",type:"innerHTML"},title:"",_setTitleAttr:{node:"titleTextNode",type:"attribute",attribute:"title"},iconClassAttr:"",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitAccordionTitle",getParent:function(){return this.parent;},buildRendering:function(){this.inherited(arguments);var _1a=this.id.replace(" ","_");_5.set(this.titleTextNode,"id",_1a+"_title");this.focusNode.setAttribute("aria-labelledby",_5.get(this.titleTextNode,"id"));_4.setSelectable(this.domNode,false);},getTitleHeight:function(){return _8.getMarginSize(this.domNode).h;},_onTitleClick:function(){var _1b=this.getParent();_1b.selectChild(this.contentWidget,true);_d.focus(this.focusNode);},_onTitleKeyDown:function(evt){return this.getParent()._onKeyDown(evt,this.contentWidget);},_setSelectedAttr:function(_1c){this._set("selected",_1c);this.focusNode.setAttribute("aria-expanded",_1c?"true":"false");this.focusNode.setAttribute("aria-selected",_1c?"true":"false");this.focusNode.setAttribute("tabIndex",_1c?"0":"-1");}});if(_b("dojo-bidi")){_19.extend({_setLabelAttr:function(_1d){this._set("label",_1d);_5.set(this.titleTextNode,"innerHTML",_1d);this.applyTextDir(this.titleTextNode);},_setTitleAttr:function(_1e){this._set("title",_1e);_5.set(this.titleTextNode,"title",_1e);this.applyTextDir(this.titleTextNode);}});}var _1f=_3("dijit.layout._AccordionInnerContainer"+(_b("dojo-bidi")?"_NoBidi":""),[_10,_13],{baseClass:"dijitAccordionInnerContainer",isLayoutContainer:true,buildRendering:function(){this.domNode=_7.place("<div class='"+this.baseClass+"' role='presentation'>",this.contentWidget.domNode,"after");var _20=this.contentWidget,cls=_a.isString(this.buttonWidget)?_a.getObject(this.buttonWidget):this.buttonWidget;this.button=_20._buttonWidget=(new cls({contentWidget:_20,label:_20.title,title:_20.tooltip,dir:_20.dir,lang:_20.lang,textDir:_20.textDir||this.textDir,iconClass:_20.iconClass,id:_20.id+"_button",parent:this.parent})).placeAt(this.domNode);this.containerNode=_7.place("<div class='dijitAccordionChildWrapper' role='tabpanel' style='display:none'>",this.domNode);this.containerNode.setAttribute("aria-labelledby",this.button.id);_7.place(this.contentWidget.domNode,this.containerNode);},postCreate:function(){this.inherited(arguments);var _21=this.button,cw=this.contentWidget;this._contentWidgetWatches=[cw.watch("title",_a.hitch(this,function(_22,_23,_24){_21.set("label",_24);})),cw.watch("tooltip",_a.hitch(this,function(_25,_26,_27){_21.set("title",_27);})),cw.watch("iconClass",_a.hitch(this,function(_28,_29,_