{ "id": "112975", "key": "TIMOB-13600", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-04-20T06:07:29.000+0000", "created": "2013-04-17T01:04:52.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "27862", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "112847", "key": "AC-2136", "fields": { "summary": "BlackBerry: Bug in bb arabic in data returned from server", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "27980", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "113163", "key": "TIMOB-13638", "fields": { "summary": "BlackBerry: TableViewRow.title does not handle Unicode characters.", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T20:23: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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "{code:javascript}\r\nvar MyGlobalVars = {\r\ntoken: null,\r\nuserid: null,\r\ncity: null\r\n};\r\n\r\n// create first window - login window -\r\n// if success in login redirect to home window\r\nvar windowLogin = Ti.UI.createWindow({\r\nbackgroundColor : \"#A8111B\",\r\n});\r\n// create form login\r\nvar username = Ti.UI.createTextField({\r\ncolor : '#336699',\r\ntop : 10,\r\nwidth : 200,\r\ntextAlign : 'center',\r\nheight : 40,\r\nhintText : 'اسم المستخدم'\r\n});\r\n\r\nvar password = Ti.UI.createTextField({\r\ncolor : '#336699',\r\ntop : 40,\r\nwidth : 200,\r\nheight : 40,\r\ntextAlign : 'center',\r\npasswordMask : true,\r\nhintText : 'كلمة المرور'\r\n\r\n});\r\n\r\nvar buttonLogin = Ti.UI.createButton({ title : 'تسجيل الدخول', textAlign : 'center', top : 90, height : 40, width : 100, right : 20 });\r\n\r\nvar buttonRegister = Ti.UI.createButton({ title : 'مستخدم جديد', textAlign : 'center', top : 130, height : 40, width : 100, right : 20 });\r\n\r\nvar buttonForget = Ti.UI.createButton({ title : 'نسيت كلمة المرور', textAlign : 'center', top : 170, width : 100, height : 40, right : 20 });\r\n\r\n// redirect to show window on click\r\nbuttonRegister.addEventListener(\"click\", function() { Titanium.include('ui/register.js'); });\r\n\r\n// redirect to show window on click\r\nbuttonForget.addEventListener(\"click\", function() { Titanium.include('ui/forget.js'); });\r\n\r\nvar loginReq = Titanium.Network.createHTTPClient();\r\nbuttonLogin.addEventListener('click', function(e) {\r\n\r\nif (username.value != '' && password.value != '') {\r\nloginReq.open(\"POST\", \"http://demoo.smaris.net/keftaltareq/user_json/login\");\r\nvar params = { username : username.value, password : password.value };\r\nloginReq.send(params);\r\n\r\n} else { alert(\"username and password are required\"); }\r\n\r\n});\r\n\r\nloginReq.onload = function() {\r\n\r\nvar json = this.responseText;\r\nvar response = JSON.parse(json);\r\nif (response.success == 1) { //windowLogin.close() MyGlobalVars.token = response.token; MyGlobalVars.userid = response.id; Titanium.include('ui/index.js'); } else if (response.success == 2) { alert(\"خطأ باسم المستخدم أو كلمة المرور\"); }\r\n\r\n};\r\n\r\nwindowLogin.add(username);\r\nwindowLogin.add(password);\r\nwindowLogin.add(buttonLogin);\r\nwindowLogin.add(buttonRegister);\r\nwindowLogin.add(buttonForget);\r\n\r\nwindowLogin.open();\r\n\r\n// and this is my code for data returned from server\r\n\r\nopenCityBtn.addEventListener('click', function(e) {\r\nvar getCity = Titanium.Network.createHTTPClient({\r\nonerror : function(e) { Ti.API.debug(e.error); alert('حدث خطأ اثناء الاتصال'); },\r\ntimeout : 5000,\r\n});\r\n\r\ngetCity.open('GET', 'http://demoo.smaris.net/keftaltareq/user_json/city_blackberry/' + MyGlobalVars.userid + '/' + MyGlobalVars.token);\r\ngetCity.send();\r\ngetCity.onload = function() {\r\nvar json = JSON.parse(this.responseText);\r\ndataArray = [];\r\nfor (var i = 0; i < json.length; i++) {\r\nvar row = Ti.UI.createTableViewRow({ title : json[i].city_name_en });\r\ndataArray.push(row);\r\n};\r\ntableX.setData(dataArray);\r\n};\r\n\r\nvar view = Titanium.UI.createView({ backgroundColor : '#3D3D3D', borderColor : '#fff', borderWidth : 4, width : 200, top : 5, height : 150 });\r\n\r\nvar tableX = Titanium.UI.createTableView({ backgroundColor : 'transparent', separatorColor : 'black', textAlign : 'right', });\r\n\r\nview.add(tableX);\r\nwinHome.add(view);\r\n\r\ntableX.addEventListener('click', function(e) { view.hide(tableX); MyGlobalVars.city = e.rowData.title; });\r\n\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "BlackBerry: JSON Parser is not parsing extended character like used in Arabic correctly", "creator": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "248513", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I believe the issue was with TableViewRow.title not handling the unicode characters, not the JSON parsing.\nThere is a fix that was just pushed that fixes the issue with \"title\".\n\nI am not able to run this sample since it requires credentials.\nA CI build should appear shortly [here|http://builds.appcelerator.com.s3.amazonaws.com/index.html#master] with this fix included. If you could verify the issue goes away the latest build. If the issue persists please re-open.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-20T06:06:33.000+0000", "updated": "2013-04-20T06:06:33.000+0000" }, { "id": "248514", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-13638.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-20T06:07:29.000+0000", "updated": "2013-04-20T06:07:29.000+0000" }, { "id": "412862", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as BlackBerry is no longer supported by us.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T20:23:13.000+0000", "updated": "2017-03-16T20:23:13.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }