Sha256: 95ea1edd5bab4a32a852e990876aeab0a58b5b5b9f0d94327cce31c1a1a49e59

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

define("dojox/grid/enhanced/plugins/Dialog", [
	"dojo/_base/declare",
	"dojo/_base/html",
	"dojo/window",
	"dijit/Dialog"
], function(declare, html, win, Dialog){

return declare("dojox.grid.enhanced.plugins.Dialog", Dialog, {
	refNode: null,
	_position: function(){
		if(this.refNode && !this._relativePosition){
			var refPos = html.position(html.byId(this.refNode)),
				thisPos = html.position(this.domNode),
				viewPort = win.getBox();
			if(thisPos.w && thisPos.h){
				if(refPos.x < 0){
					refPos.x = 0;
				}
				if(refPos.x + refPos.w > viewPort.w){
					refPos.w = viewPort.w - refPos.x;
				}
				if(refPos.y < 0){
					refPos.y = 0;
				}
				if(refPos.y + refPos.h > viewPort.h){
					refPos.h = viewPort.h - refPos.y;
				}
				refPos.x = refPos.x + refPos.w / 2 - thisPos.w / 2;
				refPos.y = refPos.y + refPos.h / 2 - thisPos.h / 2;
				if(refPos.x >= 0 && refPos.x + thisPos.w <= viewPort.w &&
					refPos.y >= 0 && refPos.y + thisPos.h <= viewPort.h){
					this._relativePosition = refPos;
				}
			}
		}
		this.inherited(arguments);
	}
});
});

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
dojox-rails-0.13.0 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojox-rails-0.12.0 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojox-rails-0.11.0 vendor/assets/javascripts/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojo-rails-0.9.4 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojo-rails-0.9.3 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojo-rails-0.9.2 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojo-rails-0.9.1 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js
dojo-rails-0.9.0 vendor/assets/javascripts/dojox/grid/enhanced/plugins/Dialog.js.uncompressed.js