Skip to content
Permalink
Browse files

Dialog: added ability to set the resize handles.

  • Loading branch information
scottgonzalez committed Jun 4, 2008
1 parent b80fb72 commit 9caa12ad6521770dd5217dc1b1a77345a7c90418
Showing with 5 additions and 3 deletions.
  1. +5 −3 ui/source/ui.dialog.js
@@ -33,6 +33,9 @@ $.widget("ui.dialog", {
init: function() {
var self = this,
options = this.options,
resizeHandles = typeof options.resizable == 'string'
? options.resizable
: 'n,e,s,w,se,sw,ne,nw',

uiDialogContent = this.element
.addClass('ui-dialog-content')
@@ -125,16 +128,14 @@ $.widget("ui.dialog", {
}

if ($.fn.resizable) {
$.each('n,s,e,w,ne,se,sw,nw'.split(','), function() {
uiDialog.append('<div class="ui-resizable-' + this + ' ui-resizable-handle"></div>');
});
uiDialog.resizable({
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,
minWidth: options.minWidth,
minHeight: options.minHeight,
start: options.resizeStart,
resize: options.resize,
handles: resizeHandles,
stop: function(e, ui) {
(options.resizeStop && options.resizeStop.apply(this, arguments));
$.ui.dialog.overlay.resize();
@@ -160,6 +161,7 @@ $.widget("ui.dialog", {
this.position(value);
break;
case "resizable":
(typeof value == 'string' && this.uiDialog.data('handles.resizable', value));
this.uiDialog.resizable(value ? 'enable' : 'disable');
break;
case "title":

0 comments on commit 9caa12a

Please sign in to comment.
You can’t perform that action at this time.