{ "id": "136961", "key": "AC-1275", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-11-04T17:14:15.000+0000", "created": "2014-09-22T20:29:54.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:40.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": [], "description": "h3. Steps to Reproduce\nCreate a project\nReplace existing index.* and alloy.js files with those attached.\nRun project.\nIf you comment out the Alloy.Globals reference in index.js, and use the setGradient() function with the supplied values, the correct result will display.\n\nh3. Actual Result\nBlank page\n\nh3. Expected Result\nText label, center-screen, with red gradient background and white text 'Label'.", "attachment": [ { "id": "51483", "filename": "backgroundGradientFails.zip", "author": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-22T20:31:09.000+0000", "size": 2123, "mimeType": "application/zip" } ], "flagged": false, "summary": "Cannot apply backgroundGradient via alloy.globals", "creator": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio 3.3.0", "comment": { "comments": [ { "id": "325005", "author": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "body": "File upload fails when posting through Studio.", "updateAuthor": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-22T20:31:09.000+0000", "updated": "2014-09-22T20:31:09.000+0000" }, { "id": "325589", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\nWe tested this issue but we didn’t reproduce it. It works as expected in this testing environment and test case. It was some declaration problem.\r\n\r\n*Result:* Works as expected.\r\nh3. Testing Environment: \r\nTitanium SDK: 3.4.0-rc\r\nTitanium CLI: 3.4.0-rc4,\r\nAlloy: 1.5.0-rc3\r\niOS SDK:8\r\nOS X Version: 10.9.5,\r\nAppcelerator Studio: 3.4.0\r\n\r\nh3.Steps to Test\r\n1. Create an alloy project.\r\n2. Paste this code in alloy.js, index.xml and index.js file.\r\n3. Runt this code with the testing environment.\r\n\r\n{code:title=alloy.js}\r\n\r\nAlloy.Globals = {\r\n\toffbutton : {\r\n\t\ttype : 'linear',\r\n\t\tstartPoint : {\r\n\t\t\tx : '50%',\r\n\t\t\ty : '0%'\r\n\t\t},\r\n\t\tendPoint : {\r\n\t\t\tx : '50%',\r\n\t\t\ty : '100%'\r\n\t\t},\r\n\t\tcolors : [{\r\n\t\t\tcolor : 'green',\r\n\t\t\toffset : 0.0\r\n\t\t}, {\r\n\t\t\tcolor : 'blue',\r\n\t\t\toffset : 0.75\r\n\t\t}]\r\n\r\n\t},\r\n\t// onButton : '#c60b20',\r\n\tonButton : {\r\n\r\n\t\ttype : 'linear',\r\n\t\tstartPoint : {\r\n\t\t\tx : '50%',\r\n\t\t\ty : '0%'\r\n\t\t},\r\n\t\tendPoint : {\r\n\t\t\tx : '50%',\r\n\t\t\ty : '100%'\r\n\t\t},\r\n\t\tcolors : [{\r\n\t\t\tcolor : '#c60b20',\r\n\t\t\toffset : 0.0\r\n\t\t}, {\r\n\t\t\tcolor : '#7c0714',\r\n\t\t\toffset : 0.75\r\n\t\t}]\r\n\r\n\t},\r\n};\r\n\r\n{code}\r\n\r\n{code:title=index.js}\r\n// $.test.backgroundGradient = Alloy.Globals.onButton;\r\n$.test.setBackgroundGradient(Alloy.Globals.offbutton);\r\nconsole.log('backgroundgradient = ' + JSON.stringify(Alloy.Globals.offbutton));\r\n\r\n$.index.open();\r\n\r\n{code}\r\n\r\n{code:title=index.xml}\r\n\r\n\t\r\n\t\r\n\r\n{code}\r\n\r\nThanks.", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-25T04:59:48.000+0000", "updated": "2014-11-04T17:13:52.000+0000" }, { "id": "330681", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Please check previous comment with a fix. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-11-04T17:14:15.000+0000", "updated": "2014-11-04T17:14:15.000+0000" }, { "id": "330690", "author": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "body": "Your reply misses a key point. If I apply the property backgroundGradient in alloy.js, the background for the object is NOT set.\r\n\r\nNote the difference here. Your example has an object with the properties of backgroundGradient implied:\r\n{code}\r\n\toffbutton: {\r\n\t\ttype: 'linear',\r\n\t\tstartPoint: {\r\n\t\t\tx: '50%',\r\n\t\t\ty: '0%'\r\n\t\t},\r\n\t\tendPoint: {\r\n\t\t\tx: '50%',\r\n\t\t\ty: '100%'\r\n\t\t},\r\n\t\tcolors: [{\r\n\t\t\tcolor: 'green',\r\n\t\t\toffset: 0.0\r\n\t\t}, {\r\n\t\t\tcolor: 'blue',\r\n\t\t\toffset: 0.75\r\n\t\t}]\r\n\t},\r\n{code}\r\n\r\nMy example has the backgroundGradient property explicitly set:\r\n{code}\r\n\toffbutton: {\r\n\t\tbackgroundGradient: {\r\n\t\t\ttype: 'linear',\r\n\t\t\tstartPoint: {\r\n\t\t\t\tx: '50%',\r\n\t\t\t\ty: '0%'\r\n\t\t\t},\r\n\t\t\tendPoint: {\r\n\t\t\t\tx: '50%',\r\n\t\t\t\ty: '100%'\r\n\t\t\t},\r\n\t\t\tcolors: [{\r\n\t\t\t\tcolor: '#727272',\r\n\t\t\t\toffset: 0.0\r\n\t\t\t}, {\r\n\t\t\t\tcolor: '#3e3e3e',\r\n\t\t\t\toffset: 0.75\r\n\t\t\t}]\r\n\t\t}\r\n\t},\r\n{code}\r\nSo, the problem remains. The backgroundGradient property, when applied to a global object does not work.", "updateAuthor": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "created": "2014-11-04T17:59:46.000+0000", "updated": "2014-11-04T17:59:46.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }