From 3f54a33fda03529241798eae773c401e56e157ae Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 25 Sep 2014 08:45:06 +0000 Subject: [PATCH] Make sure nm row_ids are string in order to address them as string, seems some ids are not --- etemplate/js/et2_extension_nextmatch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 9fd6a1c8b0..0de47fea37 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -518,7 +518,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) @@ -531,7 +531,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); @@ -557,7 +557,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":