Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#2654 closed task (fixed)

ContentPane: port to dijit

Reported by: koranteng Owned by: mumme
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc: bill
Blocked By: Blocking:

Description (last modified by bill)

Port ContentPane? to Dijit 0.9. More advanced ContentPane? features will go into dojox; dijit will just have a simple ContentPane?.

Basic features in dijit:

  • href loading
  • embedded widgets

DojoX enhanced features (not in dijit):

  • script loading/execution
  • CSS file loading, adjustment of pathnames
  • handle (javascript function to generate content)
  • regex to parse out stuff in <body> as content, ignore stuff in <head>

Removed from both:

  • auto-loading of dojo.require() objects

Other notes:

  • rename setUrl to setHref
  • Rename cacheContent -> preventCache
  • Consider using a css class with a loading image as background image instead of the Loading.. message that way we don't rely on i18n and it would be prettier in my opinion. The same goes for a error message.

Attachments (1)

2654-dijit-base-util.patch (14.3 KB) - added by koranteng 12 years ago.
base infrastructure changes for layout widgets

Download all attachments as: .zip

Change History (23)

comment:1 Changed 12 years ago by bill

Description: modified (diff)
Summary: port ContentPane to 0.9 dijitContentPane: port to dijit
Type: defecttask
Version: 0.4.20.9

Changed 12 years ago by koranteng

Attachment: 2654-dijit-base-util.patch added

base infrastructure changes for layout widgets

comment:2 Changed 12 years ago by koranteng

the above patch is the first pass of base infrastructure changes for the layout widgets, the remainder of the changes are submitted separately

Container.js - I fixed a bug in getChildren (some layout widgets insert helper nodes as children so we should skip them when iterating)

Layout.js - port for layout widgets

Showable.js - first pass... still need to implement dojo.fx.toggle

TemplatedWidget?.js - removed the addclass/remove class to base.widget for now... I didn't want to change all the form widgets yet... since those functions will come back in the core

Widget.js - added the layout method to widget... used for wiring by the parser... moved _addclass/removeclass

utilparser.js - call the layout method of widgets to enable wiring

dijit.css, tundra.css - base layout widget classes

comment:3 Changed 12 years ago by Adam Peller

(In [8376]) Refs #2654. Koranteng, please factor out tundra additions. I'm told that some of the style info belongs in dijit.css?

comment:4 Changed 12 years ago by Adam Peller

(In [8377]) Style compliance. Refs #2654

comment:5 Changed 12 years ago by liucougar

(In [8383]) Refs #2654: IE does not like boolean return type for compare function return the parsed widgets

comment:6 Changed 12 years ago by Adam Peller

(In [8391]) Interim checkin from Koranteng Ofosu-Amaah (IBM, CCLA) Includes ContentPane?, SplitContainer?, PageContainer?, LinkPane?, and LayoutContainer?. Refs #2654, #2817, #2818

comment:7 Changed 12 years ago by alex

(In [8394]) idiomatic Dojo. Refs #2654

comment:8 Changed 12 years ago by bill

Basics are working, but there are still a bunch of options like executeScripts that need to be removed (so leaving this bug open).

comment:9 Changed 12 years ago by Adam Peller

Component: WidgetsDijit

comment:10 Changed 12 years ago by bill

Owner: changed from koranteng to mumme

Fredrick said he can split Contentpane into a basic one for dijit and the more advanced version for Dojox, so I'm gonna reassign this bug to him.

comment:11 Changed 12 years ago by bill

Basic features in dijit:

  • href loading
  • embedded widgets

DojoX enhanced features (not in dijit):

  • script loading/execution
  • CSS file loading, adjustment of pathnames
  • handle (javascript function to generate content)
  • regex to parse out stuff in <body> as content, ignore stuff in <head>

Removed from both:

  • auto-loading of dojo.require() objects

Other notes:

  • rename setUrl to setHref
  • Rename cacheContent -> preventCache
  • Consider using a css class with a loading image as background image instead of the Loading.. message that way we don't rely on i18n and it would be prettier in my opinion. The same goes for a error message.

comment:12 Changed 12 years ago by bill

Description: modified (diff)

comment:13 Changed 12 years ago by mumme

(In [9272]) A slimmed ContentPane? for dijit, partial Refs #2654

comment:14 Changed 12 years ago by mumme

(In [9280]) Remove dijit._Container mixin, Bill said It shouldn't have addChild etc interfaces. Guess I still thinks to much like 0.4 Also removed functionality/test about not autoparse widgets. partialy Refs #2654

comment:15 in reply to:  11 Changed 12 years ago by mumme

Cc: bill added
Status: newassigned

Replying to bill:

DojoX enhanced features (not in dijit): [Snip...]

  • regex to parse out stuff in <body> as content, ignore stuff in <head>

I think the the body scan should remain in dijit ContentPane? but turned of by default. I think (might be wrong) that developing a page in ASP.NET more or less requires a body tag, it would be nice to be able to point to a solution, though not optimal, for those people even in dijit.

+ It will probably be a heck lot of people who don't want to rewrite every server response they written.

After all it is just 4 lines, and if its turned of by default, runtime wont suffer more than a single if(extractContent).

comment:16 Changed 12 years ago by bill

I see. OK, if it's only 4 lines then I don't care much.

comment:17 Changed 12 years ago by Sam Foster

There was some talk of moving all the href/loading stuff into its own mixin - to make it more easily available to other widgets. Making the widget lazy-load its content is an extremely common pattern, but ContentPane? is not always the appropriate widget to extend. Is this a requirement? new enhancement?

comment:18 Changed 12 years ago by mumme

(In [9399]) Make lazy load work without hiding domNode when ContentPane? is a child of StackContainer?. Change initial load trigger to startup makes it work for Dialog too without any hiding from user. Refs #2654

comment:19 Changed 12 years ago by mumme

(In [9400]) Forgot to change To -> From in unlinkLazyLoadFromParent. Refs #2654

comment:20 in reply to:  17 Changed 12 years ago by mumme

Replying to sfoster:

There was some talk of moving all the href/loading stuff into its own mixin - to make it more easily available to other widgets. Making the widget lazy-load its content is an extremely common pattern, but ContentPane? is not always the appropriate widget to extend. Is this a requirement? new enhancement?

I'm not sure, but I think a enhancement ticket would be easier to trac than a comment in a port ticketm so please do open a enhancement ticket.

comment:21 Changed 12 years ago by mumme

Resolution: fixed
Status: assignedclosed

With changeset [9400] I consider this done.

Closing.

comment:22 Changed 9 years ago by bill

(In [22981]) Remove invalid comment, NodeList contents are moved, not copied. Refs #2654 !strict.

Note: See TracTickets for help on using tickets.