ttrss/lib/dijit/Dialog.js

2 lines
9.5 KiB
JavaScript
Raw Permalink Normal View History

2012-08-14 14:59:10 +00:00
//>>built
2018-12-04 13:23:37 +00:00
require({cache:{"url:dijit/templates/Dialog.html":"<div class=\"dijitDialog\" role=\"dialog\" aria-labelledby=\"${id}_title\">\n\t<div data-dojo-attach-point=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t\t<span data-dojo-attach-point=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"\n\t\t\t\trole=\"heading\" level=\"1\"></span>\n\t\t<span data-dojo-attach-point=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" data-dojo-attach-event=\"ondijitclick: onCancel\" title=\"${buttonCancel}\" role=\"button\" tabindex=\"-1\">\n\t\t\t<span data-dojo-attach-point=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t\t</span>\n\t</div>\n\t<div data-dojo-attach-point=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n\t${!actionBarTemplate}\n</div>\n\n"}});define("dijit/Dialog",["require","dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/Deferred","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/fx","dojo/i18n","dojo/keys","dojo/_base/lang","dojo/on","dojo/ready","dojo/sniff","dojo/touch","dojo/window","dojo/dnd/Moveable","dojo/dnd/TimedMoveable","./focus","./_base/manager","./_Widget","./_TemplatedMixin","./_CssStateMixin","./form/_FormMixin","./_DialogMixin","./DialogUnderlay","./layout/ContentPane","./layout/utils","dojo/text!./templates/Dialog.html","./a11yclick","dojo/i18n!./nls/common"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,fx,_a,_b,_c,on,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_1a,_1b,_1c,_1d){var _1e=new _5();_1e.resolve(true);function nop(){};var _1f=_4("dijit._DialogBase"+(_e("dojo-bidi")?"_NoBidi":""),[_16,_18,_19,_17],{templateString:_1d,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:false,duration:_14.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,draggable:true,_setDraggableAttr:function(val){this._set("draggable",val);},maxRatio:0.9,closable:true,_setClosableAttr:function(val){this.closeButtonNode.style.display=val?"":"none";this._set("closable",val);},postMixInProperties:function(){var _20=_a.getLocalization("dijit","common");_c.mixin(this,_20);this.inherited(arguments);},postCreate:function(){_9.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);_3.after(this,"onExecute",_c.hitch(this,"hide"),true);_3.after(this,"onCancel",_c.hitch(this,"hide"),true);on(this.closeButtonNode,_f.press,function(e){e.stopPropagation();});this._modalconnects=[];},onLoad:function(){this.resize();this._position();if(this.autofocus&&_21.isTop(this)){this._getFocusItems();_13.focus(this._firstFocusItem);}this.inherited(arguments);},focus:function(){this._getFocusItems();_13.focus(this._firstFocusItem);},_endDrag:function(){var _22=_8.position(this.domNode),_23=_10.getBox(this.ownerDocument);_22.y=Math.min(Math.max(_22.y,0),(_23.h-_22.h));_22.x=Math.min(Math.max(_22.x,0),(_23.w-_22.w));this._relativePosition=_22;this._position();},_setup:function(){var _24=this.domNode;if(this.titleBar&&this.draggable){this._moveable=new ((_e("ie")==6)?_12:_11)(_24,{handle:this.titleBar});_3.after(this._moveable,"onMoveStop",_c.hitch(this,"_endDrag"),true);}else{_7.add(_24,"dijitDialogFixed");}this.underlayAttrs={dialogId:this.id,"class":_2.map(this["class"].split(/\s/),function(s){return s+"_underlay";}).join(" "),_onKeyDown:_c.hitch(this,"_onKey"),ownerDocument:this.ownerDocument};},_size:function(){this.resize();},_position:function(){if(!_7.contains(this.ownerDocumentBody,"dojoMove")){var _25=this.domNode,_26=_10.getBox(this.ownerDocument),p=this._relativePosition,bb=_8.position(_25),l=Math.floor(_26.l+(p?Math.min(p.x,_26.w-bb.w):(_26.w-bb.w)/2)),t=Math.floor(_26.t+(p?Math.min(p.y,_26.h-bb.h):(_26.h-bb.h)/2));_9.set(_25,{left:l+"px",top:t+"px"});}},_onKey:function(evt){if(evt.keyCode==_b.TAB){this._getFocusItems();var _27=evt.target;if(this._firstFocusItem==this._lastFocusItem){evt.stopPropagation();evt.preventDefault();}else{if(_27==this._firstFocusItem&&evt.shiftKey){_1