{ "id": "103848", "key": "AC-1816", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-04-02T23:35:43.000+0000", "created": "2012-10-24T18:09:01.000+0000", "labels": [ "android", "core", "jss" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:40:43.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "It seems to be a problem with the use of require()\r\nIn this example only the styles from jss is applied to the window and not to the label.\r\n\r\n*app.js*\r\n{quote} \r\n{code} \r\n\r\nvar NewLabel = require('NewLabel');\r\nvar label = new NewLabel();\r\nvar win = Ti.UI.createWindow({\r\n id : 'mainwin'\r\n});\r\nwin.add(label);\r\nwin.open();\r\n{code} \r\n\r\n\r\n*NewLabel.js*\r\n{code} \r\n\r\nfunction NewLabel() {\r\n var label = Ti.UI.createLabel({\r\n id : 'ptlabel'\r\n });\r\n return label;\r\n};\r\nmodule.exports = NewLabel;\r\n{code} \r\n\r\n*app.jss*\r\n{code} \r\n\r\n#mainwin {\r\n background-color: '#f00';\r\n}\r\n#ptlabel {\r\n color:'#fff';\r\n top:10;\r\n width:'auto';\r\n height:'auto';\r\n text:'I am Android!'\r\n}\r\n{code} \r\n", "attachment": [], "flagged": false, "summary": "JSS files and require seems to conflict on Android", "creator": { "name": "johnq", "key": "johnq", "displayName": "john q hiu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "johnq", "key": "johnq", "displayName": "john q hiu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Mobile SDK 2.1.3\r\nAndroid 2.3 and up", "comment": { "comments": [ { "id": "245353", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The label in on a different file and the JSS file needs to be called the same as the JS file. Also, JSS was created for when we used the window \"url\" and it is not mean to be used with CommonJS modules.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T23:35:43.000+0000", "updated": "2013-04-02T23:35:43.000+0000" }, { "id": "280965", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:18:24.000+0000", "updated": "2013-11-24T22:18:24.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }