.wrap('<div/>')
.wrap('<div/>'),
- uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent()
+ uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent())
.addClass('ui-dialog-container')
- .css({position: 'relative', width: '100%', height: '100%'})),
+ .css({
+ position: 'relative',
+ width: '100%',
+ height: '100%'
+ }),
title = options.title || uiDialogContent.attr('title') || '',
uiDialogTitlebar = (this.uiDialogTitlebar =
}),
uiDialogButtonPane = (this.uiDialogButtonPane = $('<div/>'))
- .addClass('ui-dialog-buttonpane').css({ position: 'absolute', bottom: 0 })
+ .addClass('ui-dialog-buttonpane')
+ .css({
+ position: 'absolute',
+ bottom: 0
+ })
.appendTo(uiDialog);
this.uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar)
self.close();
return false;
});
-
- this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function() {
+
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).each(function() {
$.ui.disableSelection(this);
});
cancel: '.ui-dialog-content',
helper: options.dragHelper,
handle: '.ui-dialog-titlebar',
- start: function(e, ui) {
+ start: function() {
self.moveToTop();
(options.dragStart && options.dragStart.apply(self.element[0], arguments));
},
- drag: function(e, ui) {
+ drag: function() {
(options.drag && options.drag.apply(self.element[0], arguments));
},
- stop: function(e, ui) {
+ stop: function() {
(options.dragStop && options.dragStop.apply(self.element[0], arguments));
$.ui.dialog.overlay.resize();
}
start: function() {
(options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
},
- resize: function(e, ui) {
+ resize: function() {
(options.autoResize && self.size.apply(self));
(options.resize && options.resize.apply(self.element[0], arguments));
},
handles: resizeHandles,
- stop: function(e, ui) {
+ stop: function() {
(options.autoResize && self.size.apply(self));
(options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
$.ui.dialog.overlay.resize();
var container = this.uiDialogContainer,
titlebar = this.uiDialogTitlebar,
content = this.element,
- tbMargin = parseInt(content.css('margin-top'),10) + parseInt(content.css('margin-bottom'),10),
- lrMargin = parseInt(content.css('margin-left'),10) + parseInt(content.css('margin-right'),10);
+ tbMargin = parseInt(content.css('margin-top'), 10)
+ + parseInt(content.css('margin-bottom'), 10),
+ lrMargin = parseInt(content.css('margin-left'), 10)
+ + parseInt(content.css('margin-right'), 10);
content.height(container.height() - titlebar.outerHeight() - tbMargin);
content.width(container.width() - lrMargin);
},
if (this.isOpen) { return; }
this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null;
- (this.uiDialog.next().length > 0) && this.uiDialog.appendTo('body');
+ (this.uiDialog.next().length && this.uiDialog.appendTo('body'));
this.position(this.options.position);
this.uiDialog.show(this.options.show);
- this.options.autoResize && this.size();
+ (this.options.autoResize && this.size());
this.moveToTop(true);
// CALLBACK: open
// position on open
moveToTop: function(force) {
if ((this.options.modal && !force)
- || (!this.options.stack && !this.options.modal)) { return this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus); }
+ || (!this.options.stack && !this.options.modal)) {
+ return this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus);
+ }
var maxZ = this.options.zIndex, options = this.options;
$('.ui-dialog:visible').each(function() {