{ "id": "101842", "key": "ALOY-295", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "14177", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14176", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": false, "released": true, "releaseDate": "2012-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-01T21:01:17.000+0000", "created": "2012-09-24T15:09:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "14171", "description": "", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:25:39.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "There needs to be a way to have events or hooks in to the app lifecycle. Here's a scenario: Currently Alloy.isTablet applies to anything from 7\" and above. A common scenario for app developers is a 7\" tablet should use the handheld layout. So I need to override Alloy.isTablet to only apply to tablets larger than 7\". Currently there is no way for me to modify this in Alloy. The only way I can think of these types of overrides working is to allow us to change things in the Alloy module and others inside the bootstrap.", "attachment": [], "flagged": false, "summary": "Need bootstrap hooks in the app", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "220350", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seems like an \"alloy'js\" file at the root of the app directory, which is executed _after_ the main CFG is loaded, but _before_ the index controller is created, would cover 90% of the use cases. It would provide a simple way for developers to execute code in their app before any controllers are loaded, or styles are applied. This would also give you the opportunity to override {{Alloy.isTablet}} and {{Alloy.isHandheld}} before they are ever used.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-24T15:26:09.000+0000", "updated": "2012-09-24T15:26:09.000+0000" }, { "id": "221644", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\"app/alloy.js\" file contents will be inserted directly into the new app.js template, which now looks like this:\r\n\r\n{code:javascript}\r\n/**\r\n * Alloy for Titanium by Appcelerator\r\n * This is generated code, DO NOT MODIFY - changes will be lost!\r\n * Copyright (c) 2012 by Appcelerator, Inc.\r\n */\r\nvar Alloy = require('alloy'),\r\n\t_ = require('alloy/underscore')._;\r\n\r\nAlloy.CFG = require('alloy/CFG');\r\n<%= alloyJs %>\r\nAlloy.createController('index');\r\n{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-01T21:01:17.000+0000", "updated": "2012-10-01T21:01:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }