{ "id": "166226", "key": "TIMOB-24426", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-28T16:33:09.000+0000", "created": "2017-02-22T17:15:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "alert", "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-11-28T16:33:15.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "The current {{alert()}} function will display a dialog box with a fixed \"Alert\" title.\r\nSince it is not really necessary to have this title and very confusing since you can't change or localize it it would be better to remove it and when you want to have a custom title you can create a custom AlertDialog.\r\n\r\nTest code:\r\n\r\n{code:java}\r\nTi.UI.setBackgroundColor('white');\r\nvar win = Ti.UI.createWindow({\r\n title: 'Click window to test',\r\n backgroundColor: 'white',\r\n layout: \"vertical\"\r\n});\r\n\r\nwin.addEventListener(\"open\",function(){\r\n alert(\"Test\");\r\n})\r\nwin.open();\r\n{code}\r\n\r\nCurrent output: Alert dialog with title \"Alert\" and text \"Test\"\r\nChanged output: Alert dialog with just the text \"Test\"", "attachment": [ { "id": "63697", "filename": "Screen Shot 2017-11-27 at 1.35.36 PM.png", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-11-27T18:37:53.000+0000", "size": 7238, "mimeType": "image/png" }, { "id": "63698", "filename": "Screen Shot 2017-11-27 at 1.36.03 PM.png", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-11-27T18:37:55.000+0000", "size": 14302, "mimeType": "image/png" } ], "flagged": false, "summary": "Remove \"Alert\" title from alert()", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 975, "state": "closed", "name": "2017 Sprint 24 SDK", "startDate": "2017-11-19T18:59:24.352Z", "endDate": "2017-12-03T18:59:00.000Z", "completeDate": "2017-12-04T23:20:14.151Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "407593", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8846\r\n\r\nif someone can create the iOS part it would be awesome!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-22T17:16:05.000+0000", "updated": "2017-02-22T17:16:05.000+0000" }, { "id": "407609", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, You can customize the title by defining title property and a value in string to show as the title of the alert dialog. http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.AlertDialog-property-title. Now, if you want to completely remove the alert section from alert dialog (only the message and button), we need sufficient guide link if this is available naively. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-22T19:14:17.000+0000", "updated": "2017-02-22T19:14:17.000+0000" }, { "id": "407613", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "I know about the AlertDialog title, which is the workaround I was talking about. I'm adressing the \"Global Alias\" mentioned on that page that will generate {{This will generate an alert with a title of \"Alert\" and an \"OK\" button.}} and you can't customize it.\r\n\r\nIn a German app you still have \"Alert\" as a title and if you want to customize it you have to create an AlertDialog so it is not useful. And for quick outputs it would be useful to just write alert(txt) instead of creating an own dialog.\r\n\r\nWhen you create a native AlertDialog you can specify the title and if you don't do it it will be blank: https://www.tutorialspoint.com/android/images/alert_dialog.jpg\r\nAs you can see in the PR: https://github.com/appcelerator/titanium_mobile/pull/8846/files#diff-b400c1d8abc31b691b4e5dbcac4b3d43L230 the title \"Alert\" is just set in the code and doesn't come from the native app", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-22T19:23:37.000+0000", "updated": "2017-02-22T19:23:37.000+0000" }, { "id": "407740", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Thanks for your PR. Our engineers will consider the request. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-23T14:42:11.000+0000", "updated": "2017-02-23T14:42:11.000+0000" }, { "id": "407948", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The {{alert}} method is supposed to reflect the JS {{alert}} web-method. If that one doesn't use the \"Alert\" title, that's fine. Otherwise, we need to reject this PR. Please check with a german and english locale and compare the browser alerts.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-24T09:13:31.000+0000", "updated": "2017-02-24T09:13:31.000+0000" }, { "id": "407956", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "At least on Firefox (Linux) it looks like this:\r\n!http://www.migaweb.de/alert.jpg!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-24T11:12:00.000+0000", "updated": "2017-02-24T11:12:00.000+0000" }, { "id": "431308", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "On macOS in Safari and Chrome the popup dialog has no \"chrome\" to it, so there's no real title. There's basically just the message and an ok link on Safari, and on Chrome it precedes the message with the URL. !Screen Shot 2017-11-27 at 1.35.36 PM.png|thumbnail! !Screen Shot 2017-11-27 at 1.36.03 PM.png|thumbnail! ", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-11-27T18:38:02.000+0000", "updated": "2017-11-27T18:38:02.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }