Iam using ctools modal or ctools a lot. The current dialog has a lot of downsides compared to the jquery ui dialog one ( jquery ui API ). Not to mention that we need to maintain it in ctools which is then waste of time and effort, as people over in jquery ui would do this for us.
Back then i create the jquery_ui_dialog, and there is also the modalframe module which both utilize jquery ui dialog. As i use both, ctools and jquery ui dialog a lot, it became clear that jquery ui is much more robust and a lot more powerful.
Clear pros are:
- much more events to listen on
- much more options / configurations
- much easier theming / cleaner theming usin the theme roller
- reuses a lot of jquery ui code. Is smaller then modal of ctools then
- postition / resizing / autoposition / autoresizing / dragging is _much_ more robust and powerful
- a lot cooler effects ( optionaly )
- would be shipped with D7 directly. Is used in D7 as default dialog ( overlay )
- would solve several open issues about size / resize / position
Cons:
- needs implementation now ( wrapper )
- current themes will not work anymore ( we could make a fallback here )
I really plan to jump in here and help implementing the wrapper, as i had quiet some experiences with jquery_ui_dialog and drupal and using jquery ui dialog for years.
The general question is it should be the general direction of ctools. I dont think the implementation will be to useful as an "upgrade" on ctools, i think it should be rather raplace the current implementation. So thats why i started this discussion.
Goals with the implementation:
- be 100% backwards-compatible ( use the API, build a wrapper
- maybe, if possible wrap theming for old themes
- implement "legacy" mode to let position / size the same way as it used to be
Would love to hear some thoughts about it
Comments
Comment #1
eugenmayer commentedHello guys,
moving this issue from ctools. Am i right that dialog-api is exactly what i was going to create?
Comment #2
eugenmayer commentedDialog Stacking:
Looking at the dialog API code, it looks like we again cant stack dialog with dialog-api?
Taht is not a limitation in ctools modal and exactly on reason why i kind of not use my own http://drupal.org/project/jquery_ui_dialog implementation ..
Cant see any context here
Is that going to change or is that by-design and will be kept?
Theming:
In addition, a different issue is styling the dialog. It would be cool to have a jquery-namespace for the dialog , so you can use the jquery themer to theme it. I have implemented this in jquery_ui_dialog and it could be simply reused
Auto-Positioning:
I cant see any code handling this. Is this kind of part of jquery_ui dialog itself? I have implemented some routines in jquery_ui_dialog to help auto-position work pretty robust, but iam not sure they are obsolete in the meantime?
Auto-resizing:
Seems to be unhandered completly, same for ctoosl modal. This is a very needed feature due to the drupal-api itself. Just some arbitary form alter adding a element, and your modal-dialog with a from looks completly broken with a scrollbar. Or even think about themes, which will need you to change the code (fixed width / height). Any input on this ( also implemented int jquery_ui_dialog, works good, but smells bit hackish right now
Comment #3
jwilson3Not sure where this stands, the Dialog API maintainers never responded, and this has been abandoned for a while... so the title of this issue should be updated to remove references to CTools, as there is another issue to implement that already: #1397370: Make modal.js use jQuery dialog. I'll go ahead and throw this up to 7.x-1.x to see if the module maintainers want to chime in.
Comment #4
eugenmayer commentedFro D6, there is the Dialog API module, that does exactly that, so for me this is fixed unless merlin happens to decide thqat jquery ui dialog should replace the core implementation.
Comment #5
jason.fisher commentedI have updated a CTools patch to the latest 7.x-1.x-dev that converts the CTools Modal to JQuery Dialog and it could use some additional testing.
https://drupal.org/node/1397370
Comment #6
devin carlson commentedThe 7.x-1.x branch of the Dialog module is unsupported.