Make sure nm row_ids are string in order to address them as string, seems some ids are not

This commit is contained in:
Ralf Becker 2014-10-21 10:30:14 +00:00
parent fe7d9aa31f
commit e545a9fdf0

View File

@ -522,7 +522,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
if(_type == "delete")
{
// Record current & next index
var uid = _row_ids[0].indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[0] : this.controller.dataStorePrefix + "::" + _row_ids[0];
var uid = _row_ids[0].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[0] : this.controller.dataStorePrefix + "::" + _row_ids[0];
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
var next = (entry.ao?entry.ao.getNext(_row_ids.length):null);
if(next == null || !next.id || next.id == uid)
@ -535,7 +535,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
this.dataview.grid.doInvalidate = false;
for(var i = 0; i < _row_ids.length; i++)
{
uid = _row_ids[i].indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
uid = _row_ids[i].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
// Delete from internal references
this.controller.deleteRow(uid);
@ -561,7 +561,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
id_loop:
for(var i = 0; i < _row_ids.length; i++)
{
var uid = _row_ids[i].indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
var uid = _row_ids[i].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
switch(_type)
{
case "update":