[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/etemplate/inc/ -> class.nextmatch_widget.inc.php (sommaire)

(pas de description)

Poids: 451 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

nextmatch_widget:: (4 méthodes):
  nextmatch_widget()
  last_part()
  pre_process()
  post_process()


Classe: nextmatch_widget  - X-Ref

eTemplate Extension: Widget that show only a certain number of data-rows and allows to modifiy the rows shown (scroll).

This widget replaces the old nextmatch-class. It is independent of the UI,
as it only uses etemplate-widgets and has therefor no render-function

$content[$id] = array(    // I = value set by the app, 0 = value on return / output
'get_rows'       =>        // I  method/callback to request the data for the rows eg. 'notes.bo.get_rows'
'filter_label'   =>        // I  label for filter    (optional)
'filter_help'    =>        // I  help-msg for filter (optional)
'no_filter'      => True// I  disable the 1. filter
'no_filter2'     => True// I  disable the 2. filter (params are the same as for filter)
'no_cat'         => True// I  disable the cat-selectbox
'cat_app'        =>     // I  application the cat's should be from, default app in get_rows
'template'       =>        // I  template to use for the rows, if not set via options
'header_left'    =>        // I  template to show left of the range-value, left-aligned (optional)
'header_right'   =>        // I  template to show right of the range-value, right-aligned (optional)
'bottom_too'     => True// I  show the nextmatch-line (arrows, filters, search, ...) again after the rows
'never_hide'     => True// I  never hide the nextmatch-line if less then maxmatch entries
'start'          =>        // IO position in list
'num_rows'       =>     // IO number of rows to show, defaults to maxmatches from the general prefs
'cat_id'         =>        // IO category, if not 'no_cat' => True
'search'         =>        // IO search pattern
'order'          =>        // IO name of the column to sort after (optional for the sortheaders)
'sort'           =>        // IO direction of the sort: 'ASC' or 'DESC'
'col_filter'     =>        // IO array of column-name value pairs (optional for the filterheaders)
'filter'         =>        // IO filter, if not 'no_filter' => True
'filter_no_lang' => True// I  set no_lang for filter (=dont translate the options)
'filter_onchange'=> 'this.form.submit();' // I onChange action for filter, default: this.form.submit();
'filter2'        =>        // IO filter2, if not 'no_filter2' => True
'filter2_no_lang'=> True// I  set no_lang for filter2 (=dont translate the options)
'filter2_onchange'=> 'this.form.submit();' // I onChange action for filter2, default: this.form.submit();
'rows'           =>        //  O content set by callback
'total'          =>        //  O the total number of entries
'sel_options'    =>        //  O additional or changed sel_options set by the callback and merged into $tmpl->sel_options
);
nextmatch_widget($ui)   X-Ref
Constructor of the extension

param: string $ui '' for html

last_part($name)   X-Ref
returns last part of a form-name


pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)   X-Ref
pre-processing of the extension

This function is called before the extension gets rendered

param: string $name form-name of the control
param: mixed &$value value / existing content, can be modified
param: array &$cell array with the widget, can be modified for ui-independent widgets
param: array &$readonlys names of widgets as key, to be made readonly
param: mixed &$extension_data data the extension can store persisten between pre- and post-process
param: object &$tmpl reference to the template we belong too
return: boolean true if extra label is allowed, false otherwise

post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)   X-Ref
postprocessing method, called after the submission of the form

It has to copy the allowed/valid data from $value_in to $value, otherwise the widget
will return no data (if it has a preprocessing method). The framework insures that
the post-processing of all contained widget has been done before.

Only used by select-dow so far

param: string $name form-name of the widget
param: mixed &$value the extension returns here it's input, if there's any
param: mixed &$extension_data persistent storage between calls or pre- and post-process
param: boolean &$loop can be set to true to request a re-submision of the form/dialog
param: object &$tmpl the eTemplate the widget belongs too
param: mixed &value_in the posted values (already striped of magic-quotes)
return: boolean true if $value has valid content, on false no content will be returned!



Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7