community.egroupware.org: Community wiki

  
Community wiki
Widget rewrite progress
Rewrite progress - This is a list of what's done and what's not done.

Common options (see etemplate/inc/class.etemplate_widget.inc.php $attribute_definition):
typeSome widgets have multiple sub-types to implement specific behaviour or for backwards compatability.
idUsed to uniquely idenfify the widget on the page. If not set, an ID will be generated when the widget is rendered
classCSS class assigned to the rendered widget. Separate multiple classes with a space. They will be added to any classes the widget itself uses.
labelLabel for the widget. Displayed by default in front of widget, widgets can display it elsewhere.
hiddenHidden takes one of 3 values: HIDDEN_NO, HIDDEN_CLIENT or HIDDEN_SERVER

WidgetPHP ClassJS WidgetreadonlyDisabledSupported EventsOptionsExceptions & Deprecated optionsResponsible
Form   submit, unload  
Label   Clickfor, link, link_target#1. i/b
Textbox    max_lengthNeeds server and client side validation callback/system
text    validate_preg, multiline, rows, colsRows and Cols might be removed as they can be replaced by CSS
int, float    min, maxFloat input needs excact validation
passwd      
date    no_icon  
color    no_icon  Andreas
Select   click, change  
ajax select       
Checkbox   click,change   
Radiobutton       
Button   -CSS needed Click, Submit  
buttononly      
cancel      
Template   None  
Image    src (vfs, common::findimage, http, progressbar), link missing! imagemap Andreas
Progress Bar    color, position   Andreas
HTML      
Date       
FileUpload      
Box (VBox, HBox)      
GroupBox       
Tabs      
Grid (grid, table)   width,span for children [1]  
Manual       
Custom Fields       
Nextmatch       
Nextmatch-!SortHeader       
Nextmatch-!FilterHeader       
Nextmatch-Custom FilterHeader       
Nextmatch-!AccountFilter       
LinkWidgets       
Custom Fields       
Historylog (Always)  None Set field map as if it was a select widget Nathan
Path       
Tree       
URL       
VFS       
Done: Not done:

[1] Grid's default type is to use DIVs, but will automatically switch to a TABLE if a child uses the span attribute.

Other TODO:
TaskResponsibleStatus
Dialog system in egw_framework Andreas Done, Dialog base class is in dialog.js and can be used without etemplate.js. Inside etemplate, the "dialog" widget as shown in the demo can be used.
Old extension post-processing / looping Ralf 
Ajax exec instead of redirectsAndreasMostly functional, redirect handler missing
Readonlys parameter for etemplate_form->exec() implemented using a readonly() function called from widget's render function that checks the form's readonlys arrayNathan
XML Templates into database + updatesRalf 
Styles in template for customization / hosting Nathan
Editor   
Drag & Drop system Ralf  
Context Menu system   
Documentation As we go  
Tutorial   
Clean up jsapi.js   
In place editing   
Exec for same form - automatically handle for existing apps   
Stop sending unnecessary data   

Bugs:
DescriptionResponsibleStatus
Only occurs in IE and Chrome: Open the image_test etemplate test, go to the "Load another image" inputfield and press enter: The for content will be submited to another test!  
You are here