{ "id": "89621", "key": "TIMOB-8582", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "15114", "description": "2013 Sprint 09 BB", "name": "2013 Sprint 09 BB", "archived": true, "released": true, "releaseDate": "2013-05-06" }, { "id": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-30T06:53:43.000+0000", "created": "2012-04-06T06:36:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "notable" ], "versions": [ { "id": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T06:41:14.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Implement the Gesture module.\r\n\r\nh3. Acceptance Test\r\n{code}\r\nfunction orientationToString(orientation) {\r\n switch (orientation) {\r\n case Ti.UI.PORTRAIT:\r\n return 'portrait';\r\n case Ti.UI.UPSIDE_PORTRAIT:\r\n return 'upside portrait';\r\n case Ti.UI.LANDSCAPE_LEFT:\r\n return 'landscape left';\r\n case Ti.UI.LANDSCAPE_RIGHT:\r\n return 'landscape right';\r\n case Ti.UI.FACE_UP:\r\n return 'face up';\r\n case Ti.UI.FACE_DOWN:\r\n return 'face down';\r\n default:\r\n return 'unknown';\r\n }\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n layout: 'vertical'\r\n});\r\n\r\nvar labelA = Ti.UI.createLabel({\r\n width: Ti.UI.FILL,\r\n text: 'e.orientation = N/A'\r\n});\r\nwin.add(labelA);\r\n\r\nvar labelB = Ti.UI.createLabel({\r\n width: Ti.UI.FILL,\r\n text: 'Gesture.orientation = N/A'\r\n});\r\nwin.add(labelB);\r\n\r\nvar labelC = Ti.UI.createLabel({\r\n width: Ti.UI.FILL,\r\n wrap: true,\r\n text: 'No shake yet.'\r\n});\r\nwin.add(labelC);\r\n\r\nfunction onShake(e) {\r\n Ti.API.info('Shake: {' + e.x + ', ' + e.y + ', ' + e.z + '}');\r\n labelC.text = 'Shake!';\r\n win.backgroundColor = 'yellow';\r\n setTimeout(function() {\r\n labelC.text = 'No shake yet.';\r\n win.backgroundColor = 'red';\r\n }, 500);\r\n}\r\n\r\nvar toggleShake = Ti.UI.createButton({\r\n title: 'Toggle Shake'\r\n});\r\nvar shakeEnabled = false;\r\ntoggleShake.addEventListener('click', function() {\r\n shakeEnabled ? Ti.Gesture.removeEventListener('shake', onShake)\r\n : Ti.Gesture.addEventListener('shake', onShake);\r\n shakeEnabled = !shakeEnabled;\r\n});\r\nwin.add(toggleShake);\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(e) {\r\n labelA.text = 'e.orientation = ' + orientationToString(e.orientation);\r\n labelB.text = 'Gesture.orientation = ' + orientationToString(Ti.Gesture.orientation);\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n# Rotate the device and flip it around. The first two labels should be equal and display the current orientation.\r\n# Try shaking the device, nothing should happen.\r\n# Click the \"Toggle Shake\" button and shake again. The background should flash yellow.\r\n# Try clicking the \"Toggle Shake\" button and shake again. Nothing should happen.", "attachment": [], "flagged": false, "summary": "BlackBerry: Implement important Gesture functionality", "creator": { "name": "fboisvert", "key": "fboisvert", "displayName": "Francois Boisvert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [ { "id": "97708", "key": "TIMOB-10055", "fields": { "summary": "BlackBerry: Implement orientations", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "97709", "key": "TIMOB-10056", "fields": { "summary": "BlackBerry: Implement the rest of Gestures module", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "fboisvert", "key": "fboisvert", "displayName": "Francois Boisvert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "248974", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created pull request [#30|https://github.com/appcelerator/titanium_mobile_blackberry/pull/30].", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-24T22:52:45.000+0000", "updated": "2013-04-24T22:52:45.000+0000" }, { "id": "408804", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to Blackberry no longer being supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T06:41:14.000+0000", "updated": "2017-03-03T06:41:14.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }