Commit Graph

139 Commits

Author SHA1 Message Date
Ralf Becker
a11a04b78d Enhanced nextmatch and link-widget to be able to use a link-entry
widget as a custom nextmatch header
Allows eg. in InfoLog to search and then filter by any linked entry of an other application:
- Infologs linked to a project or
- Infologs linked to a contact
2009-09-25 07:59:34 +00:00
Nathan Gray
780bfee1ec Add ability for nextmatch-customfields header to filter custom fields that are links to another application 2009-09-23 15:27:33 +00:00
Ralf Becker
8db94f2471 "fix csv export to correctly export multiple categories (semicolon separated)" 2009-09-18 14:09:11 +00:00
Ralf Becker
8e55998ce2 "fix for some columns, which could not be switched off (eg. InfoLog category col), after the last fix" 2009-08-25 14:40:28 +00:00
Ralf Becker
beee590fc2 "fix nm widget to deal with same header in multiple columns (eg. InfoLog's 2 time columns)" 2009-08-25 13:14:00 +00:00
Ralf Becker
c4e24a1e58 if we have more then 5 cf's to display --> limit header height to 5 lines plus vertical scrollbar 2009-06-30 18:21:15 +00:00
Ralf Becker
232252475f patch fixing many depricated functions (eg. posix regular expressions) and features, which fill up the error_log under php5.3 (and will no longer be available under php6).
Patch is mostly created by script in egroupware/doc/fix_depricated.php in separate commit.
I do NOT advice to apply this patch to a production system (it's commited to trunk!), as the automatic modified regular expressions have a good change to break something ...
2009-06-08 16:21:14 +00:00
Ralf Becker
31cb95989e "allow static get_rows callbacks, eg. 'app_ui::get_rows':
- on php5.3+ they get directly called via a variable: $callback($query,$rows,$readonlys)
- on php < 5.3 we instancate the class, an call the method non-static: $obj->$method($query,$rows,$readonlys)
--> allows application code to be prepared for static callbacks
Note:
- we can not use call_user_func, as it does NOT support passing by reverence, which is required for $rows and $readonlys parameter
- static callbacks allow to NOT instanciate the class again for the callback (without current dirty methods like placing the object in $GLOBALS[$class])"
2009-05-14 10:22:13 +00:00
Klaus Leithoff
3e0ff9b004 prevent strpos to fail, if lable is empty 2009-04-03 14:01:24 +00:00
Ralf Becker
4cbbbc3892 "upps" 2009-03-26 14:38:37 +00:00
Ralf Becker
4311a66215 "improved csv-export:
- use options to export values of select boxes
- use strtotime on not-numerical date or time values
- use specified number formats for int and float"
2009-03-26 14:25:41 +00:00
Ralf Becker
486a32e86d Refractured eTemplate to use:
- the etemplate_request object which stores the request data in the
  a) session (as before) or
  b) compressed and encrypted in the form transmitted to the user
  Benefit of b) is that the session does not grow and the form can
  be submitted as long as the session exists, as we need no garbadge
  collection. Of cause more data needs to be submitt between
  browser and webserver. b) is choosen automatic if mcrypt and
  gzcompress are available, but can be turned off via setting
  etemplate_request::$request_class = 'etemplate_request_session';
- static class variables instead of the before used global ones
--> This new version of eTemplate is fully backward compatible with 1.6!
2009-03-16 12:58:24 +00:00
Ralf Becker
587a3b92bc automatic fix / pad 0 based arrays with the required number of false
values, to match the number of header lines in the rows template
--> allows to customize the template (number of header lines) without
the need to patch the code
(fixed pm's element list with uses 2 header lines, but required exactly
one pad done by the old code)
2009-02-24 07:42:12 +00:00
Nathan Gray
d3d47af015 Fix bug where if there are multiple nextmatches on a page, and your default num_rows is not in the list (ex: 15), and you cause a nextmatch to submit (by changing a filter or num_rows), the num_rows of the next nextmatch to be processed will be cleared 2009-01-23 19:33:19 +00:00
Ralf Becker
aa4d4c3d0f "fixed typo prefenting sel_options set in get_rows to be displayed" 2008-11-16 07:20:23 +00:00
Ralf Becker
33d617aa8f "stop storing rows content in session by using an empty new var $rows in calling the get_rows funktion:
get_rows($value,$rows,$readonlys) instead get_rows($value,$value['rows'],$readonlys)  
because $values['rows'] as reference would be stored in the session, when apps store $query parameter in the session
"
2008-11-13 16:55:03 +00:00
Ralf Becker
273bd722e2 fix for bug #1739: config for CSV export for non-admins is not working.
Reworked it not in the following way:
- numerical limit or total disabling (setting "no"), are only valid for
  non-admins
- addressbook has it's own value, but uses now the global one, if no
  addressbook specific limit is set
2008-10-16 11:17:49 +00:00
Ralf Becker
f64c51778b "nextmatch filter- or sort-headers can now made to nextmatch-headers (label only), by making them readonly" 2008-10-05 16:56:37 +00:00
Nathan Gray
044cc0f679 Last piece needed for multiple nextmatches / page. 2008-08-21 18:09:20 +00:00
Ralf Becker
037704a801 "php5.1 seems to have a bug: array_slice($parts,$offeset) != array_slice($parts,$offeset,null)" 2008-08-16 07:40:04 +00:00
Ralf Becker
a4133ab894 "temporary disabled additional nextmatch row on the bottom of the list for php5.2.6, until I find time to fix it" 2008-06-23 06:46:58 +00:00
Ralf Becker
f66e2e4004 fixed php5.2.6 problem: unknown type '' 2008-06-22 07:16:40 +00:00
Ralf Becker
2e77c2a4c6 "a little bit nicer implementation" 2008-06-11 04:20:39 +00:00
Ralf Becker
c57b02c59f "allow to have more then one nextmatch widget on a page, for nathan and pERP :-)" 2008-06-11 04:05:10 +00:00
Ralf Becker
5fd2d8def8 removed unnecessary instancations and using static methods of html and egw_link class 2008-03-25 16:42:23 +00:00
Ralf Becker
ced6adf23f reworked and generalised Klaus new custom field header feature, to use it in the addressbook too, easy to addapt for the other apps now, only requires the get_rows/search method to understand filter and order_by with cfs 2008-01-19 05:36:20 +00:00
Ralf Becker
3beb483c09 CSV Export for all eTemplate applications using the nextmatch widget to list their entries. The column names, labels and types can be set by the application or get autodetected by eTemplate. Admins can configure an export limit (max. number of entries to export) or disable the functionality completly for non-admins. The charset for the csv export can be configured in the common prefs. Applications can and have to turn the export explicitly off by setting ['nm']['csv_fields']=false. I only made a column-definition for InfoLog, which includes translated column-names. 2007-09-22 14:58:10 +00:00
Ralf Becker
1735a53f85 "fixed bug #946: Nextmatch last ( >| ) button goes to start
also fixed number-of-rows selection, which worked only on the 2. go
--> both problems were introduced by the memory saving fix applied after the last RC"
2007-06-21 09:59:53 +00:00
Ralf Becker
af5804129f "two fixes for the num_rows in the next-match widget:
- use a default of 15 rows, if user&group has no pref set
- use what's stored in the extension data, if value not set (nm-header not shown)"
2007-06-08 08:51:05 +00:00
Ralf Becker
915e5f74f2 "fixed now working saving of column-selection after the memory-saving-fix" 2007-05-26 07:51:17 +00:00
Ralf Becker
1e9b08d510 fixed problems pointed out by Janosch Machowinski <scotch-AT-tzi.de> 2007-05-25 12:18:00 +00:00
Ralf Becker
196046f66c "fix to drastically reduce the memmory used by eTemplate sessions (accidently the whole eTemplate object was stored incl. db-object with all table definitions and the returned rows)" 2007-05-23 18:06:21 +00:00
Ralf Becker
b07f9f9704 "fix for bug #478: Invalid argument supplied for foreach() when no nexmatch *headers in rows" 2007-05-13 06:19:11 +00:00
Ralf Becker
d1d4e02aad "fix: suppresed php5.2's stupid emty haystack warning" 2007-04-29 14:18:08 +00:00
Ralf Becker
0eac6dd897 "killed a warning" 2007-03-16 12:20:19 +00:00
Ralf Becker
6bd5ac2da8 users can now switch every single column on or off in all nextmatch lists, admins can configure defaults (plus some bugfixes and other improvments) 2007-03-07 12:30:17 +00:00
Ralf Becker
e844de99cd "fixed previous php5.2 fix, which caused readonlys set in the get_rows function not to work" 2007-02-14 07:11:42 +00:00
Ralf Becker
f53c68f94d php5.2 fix and ability to return something from the get_rows function 2007-01-22 07:06:15 +00:00
Ralf Becker
0315d30672 revert last commit, as it gives a fatal error with php5.0 2007-01-08 21:23:02 +00:00
Ralf Becker
08aadb56cf quitened a warning 2007-01-08 15:58:32 +00:00
Ralf Becker
8c6cb48d85 fix for bug #87: Infolog - Addressbook categories mixed in 1.2.x
The select_widget allways used the cats of the current application. That's still the default, but it can be overwritten now via an option. The nextmatch_widget has now and optional parameter 'cat_app', which defaults to the app of the get_rows method.
2006-12-04 14:39:22 +00:00
Cornelius Weiß
cc0705e83a cleanup 2006-10-24 20:12:33 +00:00
Cornelius Weiß
8d7bca0d8f start with reimplementation of advanced search 2006-10-21 20:16:25 +00:00
Ralf Becker
73cfd5e7cc fixed error-message in the editor: method is no string 2006-10-19 19:05:48 +00:00
Ralf Becker
c461da0bbd fixed an off by one problem 2006-10-17 17:27:15 +00:00
Ralf Becker
9cbbf9bef9 classes for filterheaders and fixed the way the *active_sortcolum class is applied 2006-09-25 13:11:00 +00:00
Ralf Becker
03a7efb8a0 new sub-type for the nextmatch widget: custom filter. It allows to use any (select-)widget (specified as 1. option) as filterheader for the nextmatch widget. The accountfilter is now only a special case for the customfilter or filterheader. 2006-09-12 15:14:39 +00:00
Ralf Becker
fcfa0f81d5 giving the template name in the content precedence over the one supplied in the template 2006-04-30 07:10:42 +00:00
Ralf Becker
2a909066da nextmatch widget can have an (optional) lettersearch now 2006-04-23 14:44:44 +00:00
Cornelius Weiß
69aa6abdec update docu to better run trough phpdocumentor 2006-04-20 17:12:30 +00:00
Ralf Becker
f4ee3a80db - fixing the fix: uninitialised ...
- additional alignment, caused some space behind the arrow in an active nextmatch header, in a right aligned cell - complicated ;-)
2006-04-05 15:28:48 +00:00
Ralf Becker
c18b81ffbf fixed old nextmatch-widget problem, which cause the first click on a button in the list got not registered, because of an uninitialised filter 2006-03-27 15:08:47 +00:00
Ralf Becker
9a6649a931 - fixed not working buttons in nextmatch-list, if pressed before direct after login
- improved printing:
  + disabled unnecessary UI-elements in nextmatch
  + nextmatch has now selection for the number of rows to display
  + nextmatch-filters (selectboxes) are now printed as text
2006-03-26 22:17:55 +00:00
Ralf Becker
fc5c2baa45 added ablity to set onchange via content 2006-03-21 22:13:46 +00:00
Ralf Becker
7a4a18ec0a phpgw --> egw
from this revision eTemplate requires a 1.0.1/1.2 API, the last working version for 1.0.0 has been taged "last_working_1_0_0"
2005-11-09 20:50:45 +00:00
Cornelius Weiß
519e6875d6 added option to supress search filed 2005-11-02 16:46:34 +00:00
Ralf Becker
b68fb24b25 nextmatch sortheader can specify a default sort now: default is ASC and can now be set to DESC 2005-07-17 21:42:11 +00:00
Ralf Becker
608d5131a4 implemented "Nextmatch Accountfilter", a nextmatch filterheader to filter by accounts using the perfered account-selection method 2005-07-14 06:47:14 +00:00
Ralf Becker
50ab75e58a option to never hide the nextmatch line (if less then max-matches entries 2005-07-13 08:39:42 +00:00
Ralf Becker
2c8193ab05 do not disable data-line if rows-template has only one row 2005-06-11 20:15:02 +00:00
Ralf Becker
0476bb0032 fixed not working (first) selection of a filter 2005-04-27 20:48:53 +00:00
Ralf Becker
1b53dc172b if no left or right header is specified, disable the cell to not create an empty (1 row, 1colum) table 2005-04-24 17:14:41 +00:00
Ralf Becker
e2df899c59 - if no content-rows, hiding the last line not the 2.
- removed $loop=false, as it is already intialised and evtl. unsets loops set by other widgets
2005-04-14 22:13:42 +00:00
Ralf Becker
6c4843263f the nextmatch callback can now change or add items to sel_options, eg. to set column-filter contents depending on other column-filters 2005-03-13 23:38:37 +00:00
Ralf Becker
89dadea91f removing the pressed first, left, right and last button-values from the returned result, as we use them (only) internal 2005-03-05 14:55:38 +00:00
Ralf Becker
b3249095a3 only try instanciating get_rows object, it a non-empty name given, else we get an error-message in the editor 2005-03-05 09:25:17 +00:00
Ralf Becker
6874870274 silently fixing 0 based array 2005-02-27 21:32:06 +00:00
Ralf Becker
f5133fa9d5 allowing to set no_lang attribute for filter and filter2 via the content-array (as needed by Cornelius Weiss) 2005-02-21 09:21:48 +00:00
Ralf Becker
dfd35114a5 next step to a new eTemplate editor:
- widget editor works quite nice
- beware it can create Templates the old editor cant understand and destroy if you save or export them from the old editor!
=> need to move the other functionality (import, export, dump, ..) of the old editor to the new one, so the old editor can retire ;-)
2005-02-18 22:44:42 +00:00
Ralf Becker
e0a0cfc9fe first step to a new eTemplate editor:
- based on existing show function the template can be edited in place
- dblclicked widgets will be edited in a popup
- new editor supports not only one grid, but a hirachical tree of widgets
still missing:
- editing and operations of grid rows and columns
- type-specific templates for the popup, to make the options more intuitiv
In the meantime the old editor is still functional
2005-02-15 23:22:10 +00:00
Ralf Becker
ebf6ab3262 Sending "... is no valid method" error now as validation error, instead just echoing it 2005-02-08 17:46:34 +00:00
Ralf Becker
b05fc623e2 some fixes for the improved nextmatch 2003-12-10 01:21:31 +00:00
Ralf Becker
db4fe046f5 killed a debug message 2003-12-09 00:22:27 +00:00
Ralf Becker
2b7b9e388f sort- and filter-headers for the nextmatch widget 2003-12-09 00:03:41 +00:00
Ralf Becker
b8557e49d9 make the phpgw Version-0_9_16-branch HEAD 2003-08-28 14:31:11 +00:00
Ralf Becker
7073ae95c2 nextmatch_widget:
- 2 header-templates left and right from the range-display
- optional nextmatch-line with arrows, search, cats, ... after the rows
link_widget:
- new sub-type link-string
Updateted the documenations and lang-files.
2003-06-29 17:00:05 +00:00
Ralf Becker
91138a3a10 update 2002-10-16 16:41:17 +00:00
Ralf Becker
653bdc9658 - no empty data-line shown, if no data
- added option to disable nextmatch, if total entries <= nextmatch-max and no search, filter or cat set
2002-10-16 15:22:06 +00:00
Ralf Becker
01e13c81ea - no empty data-line shown, if no data
- added option to disable nextmatch, if total entries <= nextmatch-max and no search, filter or cat set
2002-10-16 14:11:36 +00:00
Ralf Becker
290ba0b094 completly rewritten uietemplate::process_show to not longer need to work recursively and be able to do input-checks later on 2002-10-01 18:26:30 +00:00
Ralf Becker
ed81de3f86 big performance improvment by using references (droped php3 compatibility) 2002-09-27 16:17:39 +00:00
Ralf Becker
ee31b85185 multiple tpls in file get are now automaticaly load, even if name != filename 2002-09-25 16:36:07 +00:00
Ralf Becker
7bd87b1180 changed interface for extensions to:
pre_process(&$cell,&$value,&$extension_data,&$readonlys)
post_process(&$cell,&$value,&$extension_data,&$loop)
2002-09-24 21:57:15 +00:00
Ralf Becker
ede69c0a38 eTemplate extensions can now change the $readonlys-array.
nextmatch-widget uses this to allow get_rows to switch button on and off.
2002-09-24 17:28:45 +00:00
Ralf Becker
55793a448f fixed nextmatch not reporting the value of start, if not scrolled (one of the arrows used) 2002-09-24 12:44:03 +00:00
Ralf Becker
74ffa874bd fix to jump back to the start, if search returns less items than acutal position is 2002-09-22 18:10:06 +00:00
Ralf Becker
b98f9f2978 fixed the behavior of the right and last arrows,
added the parm 'no_cat' to disable the cats-selection
2002-09-22 09:30:29 +00:00
Ralf Becker
4cbd6807c4 showing the range of shown entries like eg. '1 - 20 of 100' 2002-09-17 22:54:43 +00:00
Ralf Becker
29ec804531 first version of the nextmatch-widget 2002-09-17 21:31:45 +00:00