From 2f01fe57a8d37767827d6db42850aef86a767c53 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Nov 2010 10:39:52 +0300 Subject: add dijit/dojo stuff; initial ui mockup --- lib/dijit/DialogUnderlay.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/dijit/DialogUnderlay.js (limited to 'lib/dijit/DialogUnderlay.js') diff --git a/lib/dijit/DialogUnderlay.js b/lib/dijit/DialogUnderlay.js new file mode 100644 index 000000000..0056462a5 --- /dev/null +++ b/lib/dijit/DialogUnderlay.js @@ -0,0 +1,42 @@ +/* + Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dijit.DialogUnderlay"]){ +dojo._hasResource["dijit.DialogUnderlay"]=true; +dojo.provide("dijit.DialogUnderlay"); +dojo.require("dojo.window"); +dojo.require("dijit._Widget"); +dojo.require("dijit._Templated"); +dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"
",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(id){ +dojo.attr(this.node,"id",id+"_underlay"); +},_setClassAttr:function(_1){ +this.node.className="dijitDialogUnderlay "+_1; +},postCreate:function(){ +dojo.body().appendChild(this.domNode); +},layout:function(){ +var is=this.node.style,os=this.domNode.style; +os.display="none"; +var _2=dojo.window.getBox(); +os.top=_2.t+"px"; +os.left=_2.l+"px"; +is.width=_2.w+"px"; +is.height=_2.h+"px"; +os.display="block"; +},show:function(){ +this.domNode.style.display="block"; +this.layout(); +this.bgIframe=new dijit.BackgroundIframe(this.domNode); +},hide:function(){ +this.bgIframe.destroy(); +this.domNode.style.display="none"; +},uninitialize:function(){ +if(this.bgIframe){ +this.bgIframe.destroy(); +} +this.inherited(arguments); +}}); +} -- cgit v1.2.3