{ "id": "63775", "key": "TIMOB-3143", "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": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11250", "name": "Sprint 2011-15", "archived": true, "released": true, "releaseDate": "2011-04-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-16T11:03:13.000+0000", "created": "2011-04-15T03:37:58.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "klist", "release-1.7.0", "reported-1.6.0", "rplist" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-16T11:03:13.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": "{html}

When using a jss the className does not take priority over the\nlabel name as it should.
\nExample:

\n

app.js

\n
\n\nTitanium.UI.setBackgroundColor('#000');\nvar win = Ti.UI.createWindow({\n    backgroundColor: '#fff'\n});\nvar normalLabel = Ti.UI.createLabel({\n    text: 'Normal label!',\n    textAlign: 'center',\n    width: 'auto',\n    top: 50\n});\nvar redLabel = Ti.UI.createLabel({\n    text: 'Red label!',\n    textAlign: 'center',\n    width: 'auto',\n    top: 100,\n    className: 'red'\n});\nwin.add(normalLabel);\nwin.add(redLabel);\nwin.open();\n
\n

app.jss

\n
\n\nlabel{ \n   color: 'blue'; \n} \n.red { \n   font-weight: 'bold';\n   color: 'red';\n}\n
\n

Expected: normalLabel to be blue and redLabel\nto be red

\n

Actual: both labels are blue

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/72821

{html}", "attachment": [], "flagged": false, "summary": "iOS: jss className does not override label", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130151", "author": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Okay, here goes:

\n

When we compile the CSS into a plist, we create four\ndictionaries: \"ids\" and \"classes\", and corresponding dicts with\nthose names appended with \"density\".

\n

The compiler apparently merges tag selectors and\nclasses into the \"classes\" dictionary, while the ids are kept\nseparate as they should be.

\n

So, in our code, we're iterating over the classes first, then\nthe ids to maintain priority. Works great, right?\nNope.

\n

Since we're iterating over the classes first, which are already\nmerged together with the tag selectors, we lose the precedence that\nthe classes have over the tag selectors.

\n

Also, an interesting test case is to try using a class name like\n\".label\" - this will act exactly as a tag selector would - apply\nthe style to all TiUILabels because of the aforementioned merging\nof the dictionaries!

{html}", "updateAuthor": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:37:59.000+0000", "updated": "2011-04-15T03:37:59.000+0000" }, { "id": "131013", "author": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "body": "I have added sub-types of Release type in Task Type field. Can you pick specific sub-type to unbind 'Release' type, please ?.", "updateAuthor": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "created": "2011-04-19T07:53:43.000+0000", "updated": "2011-04-19T07:53:43.000+0000" }, { "id": "133452", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.7.0.879871b...(05/10/11 19:34) on iPod 3rd Gen (4.0.1) and Sim (4.1)", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-11T15:56:16.000+0000", "updated": "2011-05-11T15:56:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }