Opened 10 years ago

Closed 7 years ago

#2358 closed enhancement (fixed)

ui dialog show and hide overrides

Reported by: mnichols Owned by: Scott González
Priority: major Milestone: 1.8.4
Component: ui.dialog Version: 1.5
Keywords: dialog show hide open close Cc:
Blocked by: Blocking:

Description

There is no way to control the behaviour of the show() and hide() calls on ui dialog. Therefore applying effects to the dialog is impossible, making the dialog presentation...bland. This patch adds 'show' and 'hide' options accepting the uiDialog object to uiDialog.show() and uiDialog.hide() respectively. This lets the dev in the options do (using fx): show: function(dialog){ $j(dialog).show('drop',{ direction: 'down',duration:1500 }); }, hide: function(dialog){ $j(dialog).hide('drop',{ direction: 'down',duration:800 }); }

Attachments (6)

uidroppable-show_and_hideoverrides.patch (902 bytes) - added by mnichols 10 years ago.
show and hide ui dialog
dialog.patch (1.1 KB) - added by Cloudream 9 years ago.
dialog2.patch (1.4 KB) - added by Cloudream 9 years ago.
support for fade effect
widget-effects.patch (639 bytes) - added by Scott González 8 years ago.
widget-effects-callback.patch (638 bytes) - added by Scott González 8 years ago.
dialog_r2949.patch (1.5 KB) - added by connorhu 8 years ago.
updated patch for ui 1.7.2 (r2949)

Download all attachments as: .zip

Change History (23)

Changed 10 years ago by mnichols

show and hide ui dialog

comment:1 Changed 10 years ago by paul

Owner: changed from paul to rworth

comment:2 Changed 10 years ago by rdworth

Status: newassigned

comment:3 Changed 9 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:4 Changed 9 years ago by paul

Component: ui.coreui.dialog
Version: 1.2.31.5b4

comment:5 Changed 9 years ago by rdworth

Keywords: open close added
Status: assignedaccepted

comment:6 Changed 9 years ago by rdworth

Milestone: 1.5.1

partial fix in [255]. Still need to add support for options and/or callback handler

comment:7 Changed 9 years ago by rdworth

Version: 1.5b41.5

comment:8 Changed 9 years ago by paul

Milestone: 1.5.11.5.2

comment:9 Changed 9 years ago by Cloudream

new patch:

if you want to use effects, set show: { effect:"xxx", options:{}, speed:yyy }

also work with original show parameters, like show:500 or show:"normal"

Changed 9 years ago by Cloudream

Attachment: dialog.patch added

Changed 9 years ago by Cloudream

Attachment: dialog2.patch added

support for fade effect

comment:10 Changed 9 years ago by Cloudream

what about add a 'toggle' method to open/close dialogs?

comment:11 Changed 9 years ago by paul

Milestone: 1.5.21.6b

comment:12 Changed 9 years ago by Cloudream

Milestone: 1.6b1.7

comment:13 Changed 9 years ago by Cloudream

Milestone: 1.71.6

comment:14 Changed 9 years ago by Jörn Zaefferer

Milestone: 1.61.7

Deferred to 1.7, will need docs updates.

Changed 8 years ago by Scott González

Attachment: widget-effects.patch added

comment:15 Changed 8 years ago by Scott González

Milestone: 1.next1.8
Owner: changed from rdworth to scott.gonzalez

Added patch to modify how show/hide/toggle works to allow specifying the effect name in the options hash. This simplifies the work needed inside individual widgets to support effects. I also created a patch that allows specifying the callback separately even when the options hash defines the effect. This makes it easy for widgets to expose options for effects while still providing the plugin's own callback. For example, dialog triggers the close callback after the hide effect completes and being able to specify the callback as the second parameter (and override any callback specified in the options hash) is much easier than having to override the callback if it exists. I think it's fine to not allow specifying a callback in the effects option because there is almost always going to be an event/callback that gets triggered by the plugin at the same time.

Changed 8 years ago by Scott González

Changed 8 years ago by connorhu

Attachment: dialog_r2949.patch added

updated patch for ui 1.7.2 (r2949)

comment:17 Changed 7 years ago by Scott González

Milestone: 1.91.8.4
Resolution: fixed
Status: acceptedclosed

We got this working at some point... http://jsbin.com/obuza3/edit

Note: See TracTickets for help on using tickets.