{ "id": "77571", "key": "TIMOB-4613", "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": "11362", "description": "Mobile 1.8.0 M09", "name": "Sprint 2011-30", "archived": true, "released": true, "releaseDate": "2011-08-01" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-08-01T09:40:06.000+0000", "created": "2011-07-07T08:09:51.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-port" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [ { "id": "12379", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "78301", "key": "TIMOB-4812", "fields": { "summary": "add Ti.UI.Window.orientation property", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-08-17T03:04:18.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": null, "attachment": [], "flagged": false, "summary": "add Ti.UI.Window.orientation property", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "160929", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "Fix can be verified with the following test code:\r\n\r\n{code:JavaScript}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Test',\r\n backgroundColor:'#000',\r\n\texitOnClose: true\r\n});\r\n\r\n// initialize to all modes\r\nwin.orientationModes = [\r\n\tTitanium.UI.PORTRAIT,\r\n\tTitanium.UI.UPSIDE_PORTRAIT,\r\n\tTitanium.UI.LANDSCAPE_LEFT,\r\n\tTitanium.UI.LANDSCAPE_RIGHT,\r\n\tTitanium.UI.FACE_UP,\r\n\tTitanium.UI.FACE_DOWN\r\n]; \r\n\r\n\r\n//\r\n// helper function\r\n//\r\nfunction getOrientation(o)\r\n{\r\n\tswitch (o)\r\n\t{\r\n\t\tcase Titanium.UI.PORTRAIT:\r\n\t\t\treturn 'portrait';\r\n\t\tcase Titanium.UI.LANDSCAPE_LEFT:\r\n\t\t\treturn 'landscape';\r\n\t\tcase Titanium.UI.UNKNOWN:\r\n\t\t\treturn 'unknown';\r\n\t}\r\n}\r\n\r\n//\r\n// get current orientation\r\n//\r\nvar l = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'Current Orientation: ' + getOrientation(Titanium.Gesture.orientation),\r\n\ttop:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\ttextAlign:'center'\r\n});\r\nwin.add(l);\r\n\r\n//\r\n// orientation change listener\r\n//\r\nTi.Gesture.addEventListener('orientationchange',function(e)\r\n{\r\n\t// device orientation\r\n\tl.text = 'Current Window Orientation: ' + getOrientation(win.orientation);\r\n\t\r\n\t// get orienation from event object\r\n\tvar orientation = getOrientation(e.orientation);\r\n\t\r\n\tTitanium.API.info(\"orientation changed = \"+orientation+\", is portrait?\"+e.source.isPortrait()+\", window orientation = \"+ win.orientation + \"is landscape?\"+e.source.isLandscape());\r\n});\r\n\r\nwin.open()\r\n{code}\r\n", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-07-27T17:34:01.000+0000", "updated": "2011-07-27T17:34:01.000+0000" }, { "id": "214935", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTested with Titanium SDK: 2.2.0.v20120816212512\r\nTested with Titanium  Studio: 2.1.1.201207271312\r\nDevice - Samsung GALAXY Note Android 2.3.6\r\nMachine OS - MAC 10.8", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-17T03:04:18.000+0000", "updated": "2012-08-17T03:04:18.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }