Ticket #2358 (accepted enhancement)

Opened 3 years ago

Last modified 3 months ago

ui dialog show and hide overrides

Reported by: mnichols Owned by: scott.gonzalez
Priority: major Milestone: 1.9
Component: ui.dialog Version: 1.5
Keywords: dialog show hide open close Cc:

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

uidroppable-show_and_hideoverrides.patch Download (0.9 KB) - added by mnichols 3 years ago.
show and hide ui dialog
dialog.patch Download (1.1 KB) - added by Cloudream 2 years ago.
dialog2.patch Download (1.4 KB) - added by Cloudream 2 years ago.
support for fade effect
widget-effects.patch Download (0.6 KB) - added by scott.gonzalez 15 months ago.
widget-effects-callback.patch Download (0.6 KB) - added by scott.gonzalez 15 months ago.
dialog_r2949.patch Download (1.5 KB) - added by connorhu 13 months ago.
updated patch for ui 1.7.2 (r2949)

Change History

Changed 3 years ago by mnichols

show and hide ui dialog

Changed 3 years ago by paul

  • owner changed from paul to rworth

Changed 3 years ago by rdworth

  • status changed from new to assigned

Changed 2 years ago by anonymous

  • milestone 1.2.4 deleted

Milestone 1.2.4 deleted

Changed 2 years ago by paul

  • version changed from 1.2.3 to 1.5b4
  • component changed from ui.core to ui.dialog

Changed 2 years ago by rdworth

  • keywords open close added
  • status changed from assigned to accepted

Changed 2 years ago by rdworth

  • milestone set to 1.5.1

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

Changed 2 years ago by rdworth

  • version changed from 1.5b4 to 1.5

Changed 2 years ago by paul

  • milestone changed from 1.5.1 to 1.5.2

Changed 2 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 2 years ago by Cloudream

Changed 2 years ago by Cloudream

support for fade effect

Changed 2 years ago by Cloudream

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

Changed 2 years ago by paul

  • milestone changed from 1.5.2 to 1.6b

Changed 2 years ago by Cloudream

  • milestone changed from 1.6b to 1.7

Changed 2 years ago by Cloudream

  • milestone changed from 1.7 to 1.6

Changed 23 months ago by joern.zaefferer

  • milestone changed from 1.6 to 1.7

Deferred to 1.7, will need docs updates.

Changed 15 months ago by scott.gonzalez

Changed 15 months ago by scott.gonzalez

  • owner changed from rdworth to scott.gonzalez
  • milestone changed from 1.next to 1.8

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 15 months ago by scott.gonzalez

Changed 13 months ago by connorhu

updated patch for ui 1.7.2 (r2949)

Note: See TracTickets for help on using tickets.