summaryrefslogtreecommitdiff
path: root/lib/dijit/DialogUnderlay.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-14 18:59:10 +0400
committerAndrew Dolgov <[email protected]>2012-08-14 18:59:18 +0400
commit1354d17270961fff662d40f90521223f8fd0d73b (patch)
treee9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/DialogUnderlay.js
parentd04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff)
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/DialogUnderlay.js')
-rw-r--r--lib/dijit/DialogUnderlay.js114
1 files changed, 2 insertions, 112 deletions
diff --git a/lib/dijit/DialogUnderlay.js b/lib/dijit/DialogUnderlay.js
index 72557800d..0321e512c 100644
--- a/lib/dijit/DialogUnderlay.js
+++ b/lib/dijit/DialogUnderlay.js
@@ -1,112 +1,2 @@
-/*
- Copyright (c) 2004-2011, 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"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-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],
- {
- // summary:
- // The component that blocks the screen behind a `dijit.Dialog`
- //
- // description:
- // A component used to block input behind a `dijit.Dialog`. Only a single
- // instance of this widget is created by `dijit.Dialog`, and saved as
- // a reference to be shared between all Dialogs as `dijit._underlay`
- //
- // The underlay itself can be styled based on and id:
- // | #myDialog_underlay { background-color:red; }
- //
- // In the case of `dijit.Dialog`, this id is based on the id of the Dialog,
- // suffixed with _underlay.
-
- // Template has two divs; outer div is used for fade-in/fade-out, and also to hold background iframe.
- // Inner div has opacity specified in CSS file.
- templateString: "<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",
-
- // Parameters on creation or updatable later
-
- // dialogId: String
- // Id of the dialog.... DialogUnderlay's id is based on this id
- dialogId: "",
-
- // class: String
- // This class name is used on the DialogUnderlay node, in addition to dijitDialogUnderlay
- "class": "",
-
- attributeMap: { id: "domNode" },
-
- _setDialogIdAttr: function(id){
- dojo.attr(this.node, "id", id + "_underlay");
- this._set("dialogId", id);
- },
-
- _setClassAttr: function(clazz){
- this.node.className = "dijitDialogUnderlay " + clazz;
- this._set("class", clazz);
- },
-
- postCreate: function(){
- // summary:
- // Append the underlay to the body
- dojo.body().appendChild(this.domNode);
- },
-
- layout: function(){
- // summary:
- // Sets the background to the size of the viewport
- //
- // description:
- // Sets the background to the size of the viewport (rather than the size
- // of the document) since we need to cover the whole browser window, even
- // if the document is only a few lines long.
- // tags:
- // private
-
- var is = this.node.style,
- os = this.domNode.style;
-
- // hide the background temporarily, so that the background itself isn't
- // causing scrollbars to appear (might happen when user shrinks browser
- // window and then we are called to resize)
- os.display = "none";
-
- // then resize and show
- var viewport = dojo.window.getBox();
- os.top = viewport.t + "px";
- os.left = viewport.l + "px";
- is.width = viewport.w + "px";
- is.height = viewport.h + "px";
- os.display = "block";
- },
-
- show: function(){
- // summary:
- // Show the dialog underlay
- this.domNode.style.display = "block";
- this.layout();
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
- },
-
- hide: function(){
- // summary:
- // Hides the dialog underlay
- this.bgIframe.destroy();
- delete this.bgIframe;
- this.domNode.style.display = "none";
- }
- }
-);
-
-}
+//>>built
+define("dijit/DialogUnderlay",["dojo/_base/declare","dojo/dom-attr","dojo/_base/window","dojo/window","./_Widget","./_TemplatedMixin","./BackgroundIframe"],function(_1,_2,_3,_4,_5,_6,_7){return _1("dijit.DialogUnderlay",[_5,_6],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' data-dojo-attach-point='node'></div></div>",dialogId:"","class":"",_setDialogIdAttr:function(id){_2.set(this.node,"id",id+"_underlay");this._set("dialogId",id);},_setClassAttr:function(_8){this.node.className="dijitDialogUnderlay "+_8;this._set("class",_8);},postCreate:function(){_3.body().appendChild(this.domNode);},layout:function(){var is=this.node.style,os=this.domNode.style;os.display="none";var _9=_4.getBox();os.top=_9.t+"px";os.left=_9.l+"px";is.width=_9.w+"px";is.height=_9.h+"px";os.display="block";},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new _7(this.domNode);},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none";}});}); \ No newline at end of file