mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
Etemplate: Fix drag and drop linking made the rows involved disappear
This commit is contained in:
parent
aec60b5c19
commit
27fd45c9ab
@ -500,6 +500,15 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
jQuery(this).triggerHandler("refresh", [this]);
|
||||
return;
|
||||
}
|
||||
// Clean IDs in case they're UIDs with app prefixed
|
||||
_row_ids = _row_ids.map(function (id) {
|
||||
if (id.toString().indexOf(this.controller.dataStorePrefix) == -1) {
|
||||
return id;
|
||||
}
|
||||
var parts = id.split("::");
|
||||
parts.shift();
|
||||
return parts.join("::");
|
||||
}.bind(this));
|
||||
if (_type == et2_nextmatch.DELETE) {
|
||||
// Record current & next index
|
||||
var uid = _row_ids[0].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[0] : this.controller.dataStorePrefix + "::" + _row_ids[0];
|
||||
@ -560,7 +569,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
this.nm.controller.deleteRow(this.uid);
|
||||
// Adjust total rows, clean grid
|
||||
this.nm.controller._grid.setTotalCount(this.nm.controller._grid._total - _row_ids.length);
|
||||
this.controller._selectionMgr.setTotalCount(this.nm.controller._grid._total);
|
||||
this.nm.controller._selectionMgr.setTotalCount(this.nm.controller._grid._total);
|
||||
}
|
||||
}, { type: _type, nm: this_1, uid: uid_1, prefix: this_1.controller.dataStorePrefix }, [_row_ids]);
|
||||
return { value: void 0 };
|
||||
|
@ -777,6 +777,16 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
return;
|
||||
}
|
||||
|
||||
// Clean IDs in case they're UIDs with app prefixed
|
||||
_row_ids = _row_ids.map( function(id) {
|
||||
if( id.toString().indexOf(this.controller.dataStorePrefix) == -1)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
let parts = id.split("::");
|
||||
parts.shift();
|
||||
return parts.join("::");
|
||||
}.bind(this));
|
||||
if(_type == et2_nextmatch.DELETE)
|
||||
{
|
||||
// Record current & next index
|
||||
@ -862,7 +872,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
|
||||
// Adjust total rows, clean grid
|
||||
this.nm.controller._grid.setTotalCount(this.nm.controller._grid._total- _row_ids.length);
|
||||
this.controller._selectionMgr.setTotalCount(this.nm.controller._grid._total);
|
||||
this.nm.controller._selectionMgr.setTotalCount(this.nm.controller._grid._total);
|
||||
}
|
||||
}, {type: _type, nm: this, uid: uid, prefix: this.controller.dataStorePrefix}, [_row_ids]
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user