aboutsummaryrefslogtreecommitdiffstats
path: root/ui/source/ui.dialog.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-06-04 00:42:17 +0000
committerScott González <scott.gonzalez@gmail.com>2008-06-04 00:42:17 +0000
commit9caa12ad6521770dd5217dc1b1a77345a7c90418 (patch)
tree53ccff5feff044c6b50548f2d946de95e5a3bb6d /ui/source/ui.dialog.js
parentb80fb723c5feb1cdedf545c6867d4d56511e24e6 (diff)
downloadjquery-ui-9caa12ad6521770dd5217dc1b1a77345a7c90418.tar.gz
jquery-ui-9caa12ad6521770dd5217dc1b1a77345a7c90418.zip
Dialog: added ability to set the resize handles.
Diffstat (limited to 'ui/source/ui.dialog.js')
-rw-r--r--ui/source/ui.dialog.js8
1 files 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('<div class="ui-resizable-' + this + ' ui-resizable-handle"></div>');
- });
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":