mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
function signature for new nextmatch refresh method, already working clientside by calling applyFilters, but should be smarter, serverside will require row-data plugin on clientside
This commit is contained in:
parent
89ec3ba866
commit
4ab0aaab9f
@ -800,6 +800,22 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
if(is_array(self::$request->preserve[$cname])) unset(self::$request->preserve[$cname][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh given rows for specified change
|
||||
*
|
||||
* Change type parameters allows for quicker refresh then complete server side reload:
|
||||
* - edit: send just modified data from given rows
|
||||
* - delete: just send null for given rows to clientside (no backend call neccessary)
|
||||
* - add: requires full reload
|
||||
*
|
||||
* @param array|string $row_ids rows to refresh
|
||||
* @param string $type='edit' "edit" (default), "delete" or "add"
|
||||
*/
|
||||
public function refresh($row_ids, $type='edit')
|
||||
{
|
||||
throw new Exception('Not yet implemented');
|
||||
}
|
||||
}
|
||||
|
||||
// Registration needs to go here, otherwise customfields won't be loaded until some other cf shows up
|
||||
|
@ -254,6 +254,25 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], {
|
||||
// Trigger an update
|
||||
this.controller.update();
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh given rows for specified change
|
||||
*
|
||||
* Change type parameters allows for quicker refresh then complete server side reload:
|
||||
* - edit: request just modified data from given rows
|
||||
* - delete: just delete the given rows clientside (no server interaction neccessary)
|
||||
* - add: requires full reload
|
||||
*
|
||||
* @param array|string _row_ids rows to refresh
|
||||
* @param string _type "edit" (default), "delete" or "add"
|
||||
*/
|
||||
refresh: function(_row_ids, _type) {
|
||||
if (typeof _type == 'undefined') _type = 'edit';
|
||||
if (typeof _row_ids == 'string') _rowids = [_row_ids];
|
||||
// ToDo: use given context, to be more smart about what to change
|
||||
this.applyFilters();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates the column caption for the given column widget
|
||||
|
Loading…
Reference in New Issue
Block a user