General Notes
Notable differences between dijit and the old widget system:
- all CSS is in one file called tundra.css (but plan to split this into two files, dijit.css and tundra.css, plus dojo/ will have a site.css file for general rules about fonts etc.)
- there is no onResized() method; still have to work out how layout containers do their sizing
- no fillInTemplate() method; do everything in postCreate(). but note that when postCreate() is called, the children don't yet exist.
- widgets declared using dojo.declare() not dojo.widget.defineWidget(), and you mixin various classes like TemplatedWidget, if your widget has a template
Directory structure
dijit/ form/ - form widgets layout/ - layout widgets ... base/ - base classes like Widget.js, PopupContainer?.js util/ - utility functions like manager.js test/ - tests themes/ - css and images to control look and feel
Theming
General
For more information see the functional spec.
Images
All images must be in the themes/tundra directory, and the pathnames put into tundra.css.
For images that are conceptually foreground images, to make widgets render correctly in high-contrast mode, you must pull the path out of the CSS file and create an <img> node. See Checkbox.js code for an example.
Templates
Simplified templates to just support tundra theme (no button rounded corners or sliding-door tabs).
Template files will have class names hardcoded:
<div class="dojoButton"> <span class="dojoButtonLabel"> ...
${dojoWidgetModuleUri"} is replaced by ${dijitModuleUri}
Javascript infrastructure
See changes.txt for lifecycle info.
onClick="foo" now overrides (ie, replaces) the default onClick() function rather than attaching to it,so widget designers should make empty onClick() functions (when appropriate).
Infrastructure classes (util/)
manager - keeps track of all the widgets; has some utility functions users might use. parser - searches page for widgets and instantiates them
FocusManager - keeps track of currently focused element
PopupManager - for popups and drop downs
TypeMatic - for repeated keystrokes when you hold down an arrow key
a11y.js
layout.js - for LayoutContainer
shadow/ - if they don't want the shadow code in dojo core then we will move it here.
wai.js
Base classes / Mixins (base/)
Widget - combined from prior Widget.js, Domwidget.js, and Htmlwidget.js, but API simplified. Parent/Child relationships removed.
Templatedwidget - any widget with a template
Container, Contained - mixin for widget parent/child relationships (used by tree, menu, etc)
Layout - mixins for widgets that can be sized, and widgets that size their children PopupContainer - mixin for stuff that pops up, like tooltip. Contains show/hide lfx effects too
DropdownContainer - mixin for stuff like Dropdowndatepicker
FormElement - for all form elements (see below) Supports common attributes and methods like id, value, name, tabIndex, enable(), disable(), etc. MenuBase - for cascading menus (this is probably just part of Menu.js)
Form Widgets (form/, Doug)
All the form widgets are descended from the Formelement.
Other notes: Autocompletor, Select - data getting interface needs to be changed to use dojo.data. The select box is similar to today's Select widget but needs to be changed so that you can set the value of the checkbox (by setting the key) and that retrieves the key --> label mapping from the server. See existing bugs for details. The Autocompletor is similar to today's Combobox but doesn't have the idea of a "key" at all Slider - Code size has to be greatly reduced and like all the other form widgets, no javascript sizing; about 5 pages for the class. Remove support for buttons on slider. Corresponds to tundra look. (How do we get #s on the bottom?). Also, what code should be shared between spinner and slider?
Alex said that there's some custom CSS on IE that makes textareas size to the data they contain.
Layout Widgets (Koranteng)
The layout widget design has to change because widgets no longer have parent/child relationship.
Miscellaneous Widgets
Editor* - Cougar Nee Editor2. Editor needs to have auto-size mode but also be able to set a fixed size via style attribute or via resizeTo() function, so that editor can be placed in a layout pane
Tree* - Nee TreeV3. need to finish this code and review what's already there. There are many many classes. also maybe need to be able to set a fixed size via resizeTo() function, so that can be placed in a layout pane
Table - based on Filteringtable but with paging. need to be able to set a fixed size via resizeTo() function, so that can be placed in a layout pane
- Printer-friendly version
- Login or register to post comments
- Unsubscribe post
