Ticket #4657 (new enhancement)

Opened 10 months ago

Last modified 5 months ago

dijit.Dialog should subclass dojox.layout.ContentPane (for executeScripts)

Reported by: guest Owned by:
Priority: normal Milestone: 1.3
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc:

Description

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

Changed 10 months ago by dante

  • priority changed from high to normal
  • type changed from defect to enhancement
  • severity changed from major to normal

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)

Changed 10 months 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!

Changed 10 months ago by bill

  • milestone changed from 1.0 to 2.0

Changed 5 months ago by alex

  • milestone changed from 2.0 to 1.3

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.