Commit Graph

174 Commits

Author SHA1 Message Date
Ralf Becker
60edb83929 enable via a class and no more need to set enabled='javascript:nm...' for enableClass or disableClass 2011-04-27 16:54:35 +00:00
Ralf Becker
fb5ea143be - returning checked state of all checkboxes, not only select_all, in $content[nm][checkboxes]
- $content[nm][select_all] is now only reference to $content[nm][checkboxes][select_all]
- checkboxes need no default onExecute, therefore removed nm_select_all method
- improved documentation for action stuff in nextmatch widget
- added egwAction.getActionsByAttr(_attr, _val) method returning all actions with a given attribute and value
2011-04-27 07:49:46 +00:00
Ralf Becker
dc88e0c190 - automatic creation of action_links (enabled actions and ones which need to be checked if enabled) by using all first level actions plus the ones with enabled set to 'javaScript:...'
- a bit of docu about the actions system usable through nextmatch widget
--> addressbook disables now "remove from distirbution list" and "delete selected distribution list", if no distribution list is selected
2011-04-26 19:50:03 +00:00
Ralf Becker
33bbd3465d - fixed bug in timesheet, success/error message of set category or status was not shown
- using now a single (default) action Open, which opens a timesheet to edit or view depending on rights
- added phrases "Open" and "Whole query" to API/common, as they are used in many apps
2011-04-19 09:44:25 +00:00
Ralf Becker
bb0e8617b2 enable/disable edit and delete action, based on ACL rights, set as css classes to each row 2011-04-17 20:45:21 +00:00
Ralf Becker
6081a5749d timesheet context menus are now complete:
- query all is moved into context menu
- legacy support only contains button to trigger context menu
- moved some common phrases into the API:
  + Delete this entry
  + Delete these entries
  + You need to select some entries first!
- support for singular and plural confirmation messages
2011-04-17 18:53:45 +00:00
Ralf Becker
dfeedf64c5 make prefix for documents a parameter and properly decode file names 2011-04-17 08:42:07 +00:00
Ralf Becker
806d3d604c added context menu for nextmatch widget: first implemenation in timesheet
- legacy actions column and multiple action row below table is switched off by default, but can be switched on again
- legacy action button is NOT yet working
- "whole query" checkbox need to go into context menu too
2011-04-16 21:45:13 +00:00
Nathan Gray
3e1f3f9df8 Allow app to provide an export definition, used if preference can't be found 2011-03-29 14:51:26 +00:00
Ralf Becker
b5c3c90260 activated new table style and row selection for etemplate, not yet with contect menus 2011-03-27 16:14:08 +00:00
Nathan Gray
c2f1340075 Give CSV export definition preference priority over app settings 2011-03-24 14:45:12 +00:00
Andreas Stöckel
f6d0edbdc1 Added basic support for the egw_action framework in the nextmatch widget (currently not active) 2011-03-22 17:06:02 +00:00
Nathan Gray
20d6378bd2 Change importexport exporting to be able to pass a definition 2011-02-28 18:10:18 +00:00
Nathan Gray
2e5144b5a2 Add permission check before using importexport for export 2011-02-28 17:35:18 +00:00
Nathan Gray
36ac740a5c * Nextmatch widget can use Import/Export definitions for exporting, if the app has the preference nextmatch-export-definition set to the name of the definition to use. 2011-02-28 17:32:32 +00:00
Nathan Gray
939052437d Fix escaping of double quotes 2011-01-24 16:43:15 +00:00
Nathan Gray
726798c8cb Fix order, escape quotes first or the field delimiters get doubled 2010-12-17 16:59:02 +00:00
Nathan Gray
855c601f98 Escape double quotes 2010-12-17 16:45:57 +00:00
Klaus Leithoff
e3ee0b34fd * CSV Export: Replace CRLF with LF so excel does not break lines early (myStylite#974) 2010-12-16 15:07:19 +00:00
Ralf Becker
5efac64eff fixed wrong parameter type warning 2010-10-26 13:29:09 +00:00
Klaus Leithoff
1ec94a70fe set cat_app with value from get_row (, if not set) to ensure the cats of the template/listview in question are to be loaded 2010-04-12 07:23:21 +00:00
Nathan Gray
4424d49c30 Handle case when ID is missing, happens the time after clearing the cf search 2010-02-22 22:46:17 +00:00
Ralf Becker
cc5c917832 fixed static get_rows callback for php5.3, it is working for all php versions, thought from 5.2.3+ it is a static call AND always calls $query as a var parameter! 2010-01-11 23:37:39 +00:00
Ralf Becker
697cc4f310 otherwise we get stoped by max_excutiontime 2009-11-28 11:07:31 +00:00
Ralf Becker
21edc1ac8a "also disable columns for which application supplies no label (eg. no custom fields exist)" 2009-11-14 08:45:38 +00:00
Ralf Becker
b2436d312b "fixed again which row to use, if we have to autodetect the fields:
we start now from the beginning searching for the first row of type array
(previously we tried the first and last row)"
2009-11-14 07:17:19 +00:00
Ralf Becker
d8ce440e33 fixed not encoded column-headers in csv export (were not useing the
export charset, as used for data)
2009-10-27 14:49:23 +00:00
Ralf Becker
ccdb259f5f setting readonlys to array, if its not that type 2009-10-14 19:06:54 +00:00
Ralf Becker
7ad5e22305 "disabling permanent logging of get_rows calls" 2009-10-12 09:08:11 +00:00
Ralf Becker
7813b84458 "reworked nextmatch widget to be able to call it's csv-export from applications (to not implement it again):
Example: nextmatch_widget::csv_export(array('get_rows' => 'myapp.myclass.mymethod'));"
2009-10-11 12:37:48 +00:00
Nathan Gray
978a1d9642 Make sure if options-selectcols is set by caller, we don't clear it 2009-09-30 15:04:49 +00:00
Nathan Gray
9b29f45a0f Remove return true; it was from the previous way I tried. 2009-09-29 14:22:10 +00:00
Klaus Leithoff
638ec3fcd0 return false for _post_process_cf_header as the return of always true in rows context, breaks functionality with infolog close, closeall and delete called from listview 2009-09-29 12:04:27 +00:00
Ralf Becker
d6aaaf1f73 some widgets have label as second option (column name with _ as first),
not a perfect detection ...
2009-09-28 12:52:50 +00:00
Nathan Gray
c619a5d1ec Clear filter button no longer needed, link-entry handles it 2009-09-25 14:17:41 +00:00
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