aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_defaults.js
blob: cba514fe774c7e03725a7ce9416bc72f98e2eb09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * dialog_defaults.js
 */

var dialog_defaults = {
	autoOpen: true,
	buttons: {},
	closeOnEscape: true,
	closeText: 'close',
	disabled: false,
	dialogClass: '',
	draggable: true,
	height: 'auto',
	hide: null,
	maxHeight: false,
	maxWidth: false,
	minHeight: 150,
	minWidth: 150,
	modal: false,
	position: {
		my: 'center',
		at: 'center',
		of: window,
		collision: 'fit',
		// ensure that the titlebar is never outside the document
		using: function(pos) {
			var topOffset = $(this).css(pos).offset().top;
			if (topOffset < 0) {
				$(this).css('top', pos.top - topOffset);
			}
		}
	},
	resizable: true,
	show: null,
	stack: true,
	title: '',
	width: 300,
	zIndex: 1000
};

commonWidgetTests('dialog', { defaults: dialog_defaults });