#4657 closed enhancement (fixed)
dijit.Dialog should subclass dojox.layout.ContentPane (for executeScripts)
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | DojoX Layout | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
It looks like dijit.Dialog subclasses dojo.ContentPane?. The default ContentPane? doesn't support executeScripts. This means that you can't actually use Dojo inside a Dojo dialog (i.e., Dialog is next to useless).
A simple fix would be to make it inhert from dojox.layout.ContentPane?, which seems to have the correct code. If the coding standards don't allow Dijit components to use dojox, executeScripts should be moved to the standard ContentPane?.
Thanks!
Change History (9)
comment:1 Changed 13 years ago by
Priority: | high → normal |
---|---|
severity: | major → normal |
Type: | defect → enhancement |
comment:2 Changed 13 years ago by
Thanks for looking at this Dante. Agreed that people who aren't trying to build completely rich-UI apps would still find the current Dialog useful.
I tried to copy Dialog.js and make my own version that subclasses dojox.layout.ContentPane?. While I haven't gone too crazy (I'm new to all this), I can't seem to get it to behave correctly.
Is there any simple workaround (other than moving to YUI/scriptaculous, which looks like my current best bet)? From looking at the source, it looks like I'll hit the same problem with Tabs, etc as well...
From web discussion, it looks like lots of other people are hitting the same problem and have done a dojo.query("script", node).forEach(function(n){ eval(n.innerHTML); }); but I'm not quite clear how one would hook it to each dialog so it executes when that dialog pops up.
That looks like an ugly solution, but would probably be ok for the time being.
Thanks so much!
comment:3 Changed 13 years ago by
Milestone: | 1.0 → 2.0 |
---|
comment:5 Changed 12 years ago by
Description: | modified (diff) |
---|
Sounds like we need to refactor dijit.Dialog to make it easy for dojox.widget.Dialog to factor in dojox.layout.ContentPane instead of dijit.layout.ContentPane
comment:6 Changed 12 years ago by
Milestone: | 1.3 → 1.4 |
---|
bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4
comment:7 Changed 11 years ago by
Owner: | set to bill |
---|
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [20244]) Make dojox.widget.Dialog extend dojox.layout.ContentPane?, rather than dijit.layout.ContentPane?, and also provide way for users to easily declare a version of the dijit.Dialog that extends dojox.layout.ContentPane?, rather than dijit.layout.ContentPane?.
Fixes #4657 !strict.
comment:9 Changed 11 years ago by
Component: | Dijit → DojoX Layout |
---|
dijit isn't allowed to use stuff from dojox. A dialog without executeScripts is not useless by any means, but i can understand a desire to have scripts in your external html. the quickest solution would be to make your own subclass mixing the dialog code with the dojox contentpane code, thought contentpane isn't a mixin, and it may be difficult. because currently the executescripts code is in dojox, a solution would be to make such a subclass available in dojox. (dialog from dojox cp)