From 9caa12ad6521770dd5217dc1b1a77345a7c90418 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 4 Jun 2008 00:42:17 +0000 Subject: Dialog: added ability to set the resize handles. --- ui/source/ui.dialog.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/source/ui.dialog.js b/ui/source/ui.dialog.js index d09cfc205..04ae309ed 100644 --- a/ui/source/ui.dialog.js +++ b/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,9 +128,6 @@ $.widget("ui.dialog", { } if ($.fn.resizable) { - $.each('n,s,e,w,ne,se,sw,nw'.split(','), function() { - uiDialog.append('
'); - }); uiDialog.resizable({ maxWidth: options.maxWidth, maxHeight: options.maxHeight, @@ -135,6 +135,7 @@ $.widget("ui.dialog", { 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": -- cgit v1.2.3