Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Improve Dialogs API #3077

Closed
njx opened this issue Mar 8, 2013 · 4 comments
Closed

Improve Dialogs API #3077

njx opened this issue Mar 8, 2013 · 4 comments

Comments

@njx
Copy link
Contributor

njx commented Mar 8, 2013

The current Dialogs API is a little odd; after opening the dialog, you have to manually find the dialog DOM node by using $(".dlg-class-name.instance"), and to close the dialog manually, you have to call cancelModalDialogIfOpen("dlg-class-name"). It would be cleaner if showModalDialogUsingTemplate() returned an actual dialog object, and if that had elt() and close() methods or some such.

Also, buttons on the right-hand side have to be specified in the opposite order that you want them to appear in (right-to-left instead of left-to-right), probably because they're both floated. We should probably put them in a floated container.

@TomMalbran
Copy link
Contributor

Should the returned object be a normal javascript object, or it would be better to make a new class with the methods mentioned and create a new instance for each dialog that is then returned?

@njx
Copy link
Contributor Author

njx commented Mar 11, 2013

Reviewed. Will take a look at the pull request--thanks @TomMalbran.

@TomMalbran
Copy link
Contributor

@njx This should be fixed now :)

@njx
Copy link
Contributor Author

njx commented Jun 6, 2013

Ah, of course! Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants