diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index f9549b6dfc..1e37720111 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -411,14 +411,17 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], * 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 + * - update: request just modified data from given rows. Sorting is not considered, + * so if the sort field is changed, the row will not be moved. + * - edit: rows changed, but sorting may be affected. Requires full reload. * - 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" + * @param {string[]|string} _row_ids rows to refresh + * @param {?string} _type "update", "edit", "delete" or "add" * - * @fires refresh + * @see jsapi.egw_refresh() + * @fires refresh from the widget itself */ refresh: function(_row_ids, _type) { if (typeof _type == 'undefined') _type = 'edit'; @@ -444,9 +447,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], var uid = app + "::" + _row_ids[i]; switch(_type) { - /* case "update": - case "edit": if(!egw().dataRefreshUID(uid)) { // Could not update just that row @@ -454,7 +455,6 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], break id_loop; } break; - */ case "delete": // Blank the row egw().dataStoreUID(uid,null); diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index d3d9cafc38..e43f6268f8 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -638,7 +638,7 @@ etemplate2.prototype.getValues = function(_root) * * @param msg String Message to try to display. eg: "Entry added" (not used anymore, handeled by egw_refresh and egw_message) * @param id String|null Application specific entry ID to try to refresh - * @param type String|null Type of change. One of 'edit', 'delete', 'add' or null + * @param type String|null Type of change. One of 'update','edit', 'delete', 'add' or null * * @see jsapi.egw_refresh() * @see egw_fw.egw_refresh() diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index 2bfcac924b..ec9df7e736 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -238,7 +238,13 @@ abstract class egw_framework * @param string $msg message (already translated) to show, eg. 'Entry deleted' * @param string $app application name * @param string|int $id=null id of entry to refresh - * @param string $type=null either 'edit', 'delete', 'add' or null + * @param string $type=null either 'update', 'edit', 'delete', 'add' or null + * - update: request just modified data from given rows. Sorting is not considered, + * so if the sort field is changed, the row will not be moved. + * - edit: rows changed, but sorting may be affected. Requires full reload. + * - delete: just delete the given rows clientside (no server interaction neccessary) + * - add: requires full reload for proper sorting + * - null: full reload * @param string $targetapp=null which app's window should be refreshed, default current * @param string|RegExp $replace=null regular expression to replace in url * @param string $with=null diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 443242fe49..1c3d1b834a 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -214,7 +214,12 @@ function egw_getAppName() * @param string _msg message (already translated) to show, eg. 'Entry deleted' * @param string _app application name * @param string|int _id=null id of entry to refresh - * @param string _type=null either 'edit', 'delete', 'add' or null + * @param string _type=null either 'update', 'edit', 'delete', 'add' or null + * - update: request just modified data from given rows. Sorting is not considered, + * so if the sort field is changed, the row will not be moved. + * - edit: rows changed, but sorting may be affected. Requires full reload. + * - delete: just delete the given rows clientside (no server interaction neccessary) + * - add: requires full reload for proper sorting * @param string _targetapp which app's window should be refreshed, default current * @param string|RegExp _replace regular expression to replace in url * @param string _with