{ "id": "65896", "key": "TIMOB-5542", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-31T05:45:04.000+0000", "created": "2011-05-31T05:18:37.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:50:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "The method insertRowAfter adds the row after all rows in the tableView. It should add row after the selected index of the row.\r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n\twidth: 300,\r\n\theight: 200,\r\n\ttop: 90,\r\n\tleft: 10,\r\n\tbackgroundColor: '#00ACDC'\r\n});\r\n\r\nvar addRow = Ti.UI.createButton({\r\n\ttitle: 'addRow',\r\n\twidth: 50,\r\n\ttop:0,\r\n\tleft: 0,\r\n\theigth: 30\r\n});\r\n\r\nvar delRow = Ti.UI.createButton({\r\n\ttitle: 'delRow',\r\n\twidth: 50,\r\n\ttop:0,\r\n\theigth: 30,\r\n\tleft: 50\r\n});\r\n\r\nvar selRow = Ti.UI.createButton({\r\n\ttitle: 'selRow',\r\n\twidth: 50,\r\n\ttop:0,\r\n\theigth: 30,\r\n\tleft: 100\r\n});\r\n\r\nvar deselRow = Ti.UI.createButton({\r\n\ttitle: 'deSelRow',\r\n\twidth: 50,\r\n\ttop:0,\r\n\theigth: 30,\r\n\tleft: 150\r\n});\r\n\r\n\r\nvar insAftRow = Ti.UI.createButton({\r\n\ttitle: 'insAfter',\r\n\twidth: 50,\r\n\ttop:30,\r\n\theigth: 30,\r\n\tleft: 0\r\n});\r\n\r\n\r\nvar insBefRow = Ti.UI.createButton({\r\n\ttitle: 'insBefor',\r\n\twidth: 50,\r\n\theigth: 30,\r\n\ttop:30,\r\n\tleft: 50\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n\ttop: 60,\r\n\tleft: 5,\r\n\ttext: 'Row #:'\r\n});\r\n\r\n\r\nvar tf1= Ti.UI.createTextField({\r\n\twidth: 50,\r\n\theight: 30,\r\n\ttop:60,\r\n\tleft: 80\r\n});\r\n\r\n\r\nwin.add(tableView);\r\nwin.add(addRow);\r\nwin.add(delRow);\r\nwin.add(selRow);\r\nwin.add(deselRow);\r\nwin.add(insAftRow);\r\nwin.add(insBefRow);\r\nwin.add(tf1);\r\nwin.add(label1);\r\n\r\n\r\n\r\nvar i = 0;\r\nvar newRow = function (){\r\n\trow = Ti.UI.createTableViewRow({\r\n\t\ttitle: 'This is ' + i + ' row'\r\n\t});\r\n\ti++;\r\n};\r\n\r\naddRow.addEventListener('click', function(){\r\n\tnewRow();\r\n\ttableView.appendRow(row);\r\n});\r\n\r\ndelRow.addEventListener('click', function(){\r\n\ttableView.deleteRow(tf1.value);\r\n});\r\n\r\nselRow.addEventListener('click', function(){\r\n\ttableView.selectRow(tf1.value);\r\n});\r\n\r\ndeselRow.addEventListener('click', function(){\r\n\ttableView.deselectRow(tf1.value);\r\n});\r\n\r\ninsAftRow.addEventListener('click', function(){\r\n\tnewRow();\r\n\ttableView.insertRowAfter(tf1.value, row);\r\n});\r\n\r\ninsBefRow.addEventListener('click', function(){\r\n\tnewRow();\r\n\ttableView.insertRowBefore(tf1.value, row);\r\n});\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Method insertRowAfter works incorrect in the tableView", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "410483", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T20:50:28.000+0000", "updated": "2017-03-09T20:50:28.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }