{ "id": "121700", "key": "TIMOB-15596", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-03-06T21:52:34.000+0000", "created": "2013-10-28T16:34:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "supportTeam" ], "versions": [], "issuelinks": [ { "id": "47998", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "148513", "key": "TIDOC-2219", "fields": { "summary": "Update ListView guide for new improvements", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-07-07T20:51:54.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Request description \r\nLike in iOS7 Default Mail app, on swipe left the table view row will show options \"More\" and \"Trash\" which on click will prompt optional dialog to pursue the action.\r\n\r\nh6.Feature Request\r\nTitanium Developers would like to request built in functionality for this custom behaviour in upcoming release since many of latest apps requires such a functionality of showing more than one button likewise.\r\n\r\nBasically need to implement the same tableview row with features similar to iOS7 mail App with 2 or 3 options on swipe left. Please find the attached image to have better idea about the request.", "attachment": [ { "id": "46895", "filename": "Archive.zip", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-26T20:52:29.000+0000", "size": 2486, "mimeType": "application/zip" }, { "id": "43513", "filename": "Swipe_CellRows.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-28T16:34:13.000+0000", "size": 14259, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS7: Support built in functionality to add \"More\" button(s) when user swipe to delete a cell in rows", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 356, "state": "closed", "name": "2015 Sprint 05 SDK", "startDate": "2015-02-28T15:50:08.527Z", "endDate": "2015-03-14T00:00:00.000Z", "completeDate": "2015-03-14T13:54:50.695Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "277398", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "This would solve a problem for me, ideally backward compatible to iOS6, but could live with iOS7 only.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2013-10-30T20:27:06.000+0000", "updated": "2013-10-30T20:27:06.000+0000" }, { "id": "279958", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "That would be awesome!", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-18T13:38:29.000+0000", "updated": "2013-11-18T13:38:29.000+0000" }, { "id": "280296", "author": { "name": "sagargv", "key": "sagargv", "displayName": "Sagar GV", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a really cool feature. Can this feature also be added to ListView? Thanks.", "updateAuthor": { "name": "sagargv", "key": "sagargv", "displayName": "Sagar GV", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-20T06:05:30.000+0000", "updated": "2013-11-20T06:05:30.000+0000" }, { "id": "291527", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We may not implement this natively in the framework, but we will at least attempt to provide a mechanism (perhaps a module) for people to do it externally.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T22:47:23.000+0000", "updated": "2014-02-05T22:47:23.000+0000" }, { "id": "298863", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "There is no built in functionality to add \"More\" buttons. What the mail app does is some clever subview manipulation in a TableViewCell.\r\n\r\nThis is pretty straightforward to do in TableView since you have a direct handle to the proxy and hence the view which you can manipulate.\r\n\r\nIts a little bit difficult in ListView since ListView is a data centric API which does not give you a handle to the view so animations are impossible. However it can be approximated using the right Row Animations when updating cells.\r\n\r\nAttaching a sample project which shows a proof of concept on TableView and ListView.\r\n\r\nCustomize and use as required.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-26T20:52:29.000+0000", "updated": "2014-03-26T20:52:53.000+0000" }, { "id": "330549", "author": { "name": "crossbits", "key": "crossbits", "displayName": "Danny Pham", "active": true, "timeZone": "Europe/Berlin" }, "body": "In iOS8 there is now a method for this functionality: \"editActionsForRowAtIndexPath\"\r\n\r\nCan we expect a native implementation now?", "updateAuthor": { "name": "crossbits", "key": "crossbits", "displayName": "Danny Pham", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-11-03T14:00:44.000+0000", "updated": "2014-11-03T14:00:44.000+0000" }, { "id": "332319", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening based on the ability to do this natively in iOS 8.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-14T22:43:56.000+0000", "updated": "2014-11-14T22:43:56.000+0000" }, { "id": "344008", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any news on that?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-02-20T11:52:26.000+0000", "updated": "2015-02-20T11:52:26.000+0000" }, { "id": "344563", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "In this feature, I am really looking forward. Can I often use in many projects.", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-02-27T12:18:13.000+0000", "updated": "2015-02-27T12:18:13.000+0000" }, { "id": "344788", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "+1", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-03-02T16:10:35.000+0000", "updated": "2015-03-02T16:10:35.000+0000" }, { "id": "344990", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case\r\n{code}\r\nfunction isIOS8Plus()\r\n{\r\n // add iphone specific tests\r\n if (Titanium.Platform.name == 'iPhone OS')\r\n {\r\n var version = Titanium.Platform.version.split(\".\");\r\n var major = parseInt(version[0],10);\r\n \r\n if (major > 7)\r\n {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nvar deleteAction = {title:'Delete',style:Ti.UI.iOS.ROW_ACTION_STYLE_DESTRUCTIVE};\r\nvar expandAction = {title:'Expand',style:Ti.UI.iOS.ROW_ACTION_STYLE_NORMAL,color:'green'};\r\nvar collapseAction = {title:'Collapse',style:Ti.UI.iOS.ROW_ACTION_STYLE_NORMAL,color:'blue'};\r\n\r\nvar cTemplate = {\r\n properties:{height:40,selectionStyle:Ti.UI.iPhone.ListViewCellSelectionStyle.NONE,editActions:[deleteAction,expandAction],canEdit:true},\r\n childTemplates: [\r\n {\r\n type: 'Ti.UI.Label',\r\n bindId: 'itemTitle',\r\n properties: {\r\n font: { fontFamily:'Arial', fontSize: 15, fontWeight:'bold' },\r\n left: 10,right: 10,top:5,height:30\r\n },\r\n },\r\n {\r\n type: 'Ti.UI.View',\r\n bindId: 'sep',\r\n properties: {\r\n height: 1, bottom:0,backgroundColor:'black'\r\n },\r\n }\r\n ]\r\n}\r\n\r\nvar eTemplate = {\r\n properties:{height:70,selectionStyle:Ti.UI.iPhone.ListViewCellSelectionStyle.NONE,editActions:[deleteAction,collapseAction],canEdit:true},\r\n childTemplates: [\r\n {\r\n type: 'Ti.UI.Label',\r\n bindId: 'itemTitle',\r\n properties: {\r\n font: { fontFamily:'Arial', fontSize: 15, fontWeight:'bold' },\r\n left: 10,right: 10,top:5,height:30\r\n },\r\n },\r\n {\r\n type: 'Ti.UI.Label',\r\n bindId: 'itemDetail',\r\n properties: {\r\n font: { fontFamily:'Arial', fontSize: 13, fontWeight:'normal' },\r\n left: 20,right: 10,top:35,height:30\r\n },\r\n },\r\n {\r\n type: 'Ti.UI.View',\r\n bindId: 'sep',\r\n properties: {\r\n height: 1, bottom:0,backgroundColor:'black'\r\n },\r\n }\r\n ]\r\n}\r\n\r\nvar sec1 = Ti.UI.createListSection({headerTitle:'Numbers'})\r\nvar sec1data = [\r\n {template:'simple',itemTitle:{text:'One Two'}, itemDetail:{text:'Buckle My Shoe'}},\r\n {template:'simple',itemTitle:{text:'Three Four'}, itemDetail:{text:'Shut The Door'}},\r\n {template:'simple',itemTitle:{text:'Five Six'}, itemDetail:{text:'Pick Up Sticks'}},\r\n {template:'simple',itemTitle:{text:'Seven Eight'}, itemDetail:{text:'Lay Them Straight'}},\r\n {template:'simple',itemTitle:{text:'Nine Ten'}, itemDetail:{text:'A BIG FAT HEN!!!'}},\r\n]\r\nsec1.setItems(sec1data);\r\n\r\nvar sec2 = Ti.UI.createListSection({headerTitle:'Here\\'s Johnny'})\r\nvar sec2data = [\r\n {template:'simple',itemTitle:{text:'Johnny Johnny'}, itemDetail:{text:'Yes Papa'}},\r\n {template:'simple',itemTitle:{text:'Eating Sugar'}, itemDetail:{text:'No Papa'}},\r\n {template:'simple',itemTitle:{text:'Telling Lies'}, itemDetail:{text:'No Papa'}},\r\n {template:'simple',itemTitle:{text:'Open Your Mouth'}, itemDetail:{text:'HA HA HA!!!'}},\r\n]\r\nsec2.setItems(sec2data);\r\n\r\nvar listView = Ti.UI.createListView({\r\n templates:{'simple':cTemplate,'detail':eTemplate},\r\n sections:[sec1,sec2],\r\n headerTitle:'Custom Row Actions',\r\n separatorStyle:0\r\n})\r\n\r\nlistView.addEventListener('rowAction',function(e){\r\n Ti.API.info(e.action+' '+e.sectionIndex+' '+e.itemIndex)\r\n if(e.action == 'Expand') {\r\n var item = e.section.getItemAt(e.itemIndex);\r\n item.template = 'detail';\r\n e.section.updateItemAt(e.itemIndex,item,{animated:true});\r\n } else if(e.action == 'Collapse') {\r\n var item = e.section.getItemAt(e.itemIndex);\r\n item.template = 'simple';\r\n e.section.updateItemAt(e.itemIndex,item,{animated:true});\r\n } else if(e.action == 'Delete') {\r\n if(e.section.itemCount == 1) {\r\n listView.deleteSectionAt(e.sectionIndex,{animated:true});\r\n } else {\r\n e.section.deleteItemsAt(e.itemIndex,1,{animated:true});\r\n }\r\n }\r\n})\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'white',\r\n fullscreen:true\r\n});\r\n\r\nif(isIOS8Plus()) {\r\n win.add(listView);\r\n} else {\r\n var errorLabel = Ti.UI.createLabel({\r\n text:'Run this test on iOS8 and above',\r\n color:'red'\r\n }) ;\r\n\r\n win.add(errorLabel);\r\n}\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-03T23:10:01.000+0000", "updated": "2015-03-03T23:10:01.000+0000" }, { "id": "344991", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6684", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-03T23:11:06.000+0000", "updated": "2015-03-03T23:11:06.000+0000" }, { "id": "345028", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Is it possible to set the title of the more button?\r\n\r\nUPDATE\r\nSorry, seen in the code now", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-04T07:30:16.000+0000", "updated": "2015-03-04T07:31:18.000+0000" }, { "id": "345029", "author": { "name": "jamesdlow", "key": "jamesdlow", "displayName": "James David Low", "active": true, "timeZone": "Europe/London" }, "body": "Does this work on TableViews as well or just the ListView?\r\n\r\nThanks,\r\nJames", "updateAuthor": { "name": "jamesdlow", "key": "jamesdlow", "displayName": "James David Low", "active": true, "timeZone": "Europe/London" }, "created": "2015-03-04T07:48:36.000+0000", "updated": "2015-03-04T07:48:36.000+0000" }, { "id": "345042", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "@James - from the pull request it seems its for a ListView only.", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-03-04T11:52:59.000+0000", "updated": "2015-03-04T11:52:59.000+0000" }, { "id": "345058", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Release 4.1.0? Why not 3.5.2? Or 3.6.0 maybe?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-04T17:39:50.000+0000", "updated": "2015-03-04T17:39:50.000+0000" }, { "id": "345059", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~benutzername] It is a new feature, so it will only appear in a major release, not 3.5.1. 4.0 is past feature freeze, so the next release is 4.1.0. If you like, you are welcome to pull it into a custom SDK.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-04T17:44:27.000+0000", "updated": "2015-03-04T17:44:27.000+0000" }, { "id": "345060", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "maybe 4.1.0 is the next release? However I would expect a 4.0.x prior to that. Sounds like this feature is a long way to be formally implemented... however we can manually update the API ourselves in our local sdk", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-03-04T17:45:42.000+0000", "updated": "2015-03-04T17:45:42.000+0000" }, { "id": "345061", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "The Example provided by [~vduggal] is sufficient & works well.", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-03-04T17:57:12.000+0000", "updated": "2015-03-04T18:22:36.000+0000" }, { "id": "345066", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "@joseph sachs could you provide your sdk until the official release is out?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-04T18:26:32.000+0000", "updated": "2015-03-04T18:26:32.000+0000" }, { "id": "345068", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "I started working on it... but then I read [~vduggal] offered a great example in Archive.zip (scroll up in description) which works nicely & \"very\" customizable in Ti. ", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-03-04T18:48:33.000+0000", "updated": "2015-03-04T18:48:33.000+0000" }, { "id": "345070", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-04T18:58:25.000+0000", "updated": "2015-03-04T18:58:25.000+0000" }, { "id": "357202", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11\r\nStudio 4.1.0.201507061821\r\nTi SDK 4.2.0\r\nAppc NPM 4.1.0-1\r\nAppc CLI 4.1.0-5\r\nTi CLI 4.0.1\r\nAlloy 1.6.2\r\nNode v0.10.37\r\nJava 1.7.0_45\r\npreproduction\r\n\r\nAble to create custom \"more\" buttons and they behave appropriately.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-07-07T20:51:54.000+0000", "updated": "2015-07-07T20:51:54.000+0000" } ], "maxResults": 25, "total": 25, "startAt": 0 } } }