Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#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 bill)

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?.


Change History (9)

comment:1 Changed 14 years ago by dante

Priority: highnormal
severity: majornormal
Type: defectenhancement

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)

comment:2 Changed 14 years ago by guest

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 14 years ago by bill

Milestone: 1.02.0

comment:4 Changed 14 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:5 Changed 13 years ago by bill

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 13 years ago by bill

Milestone: 1.31.4

bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4

comment:7 Changed 12 years ago by bill

Owner: set to bill

comment:8 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(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 bill

Component: DijitDojoX Layout
Note: See TracTickets for help on using tickets.