{"id":15674601,"url":"https://github.com/skypanther/alloypopover","last_synced_at":"2025-05-06T23:24:16.247Z","repository":{"id":12021541,"uuid":"14604955","full_name":"skypanther/AlloyPopover","owner":"skypanther","description":"iPad popover-like component for Titanium Alloy projects","archived":false,"fork":false,"pushed_at":"2014-05-09T20:02:13.000Z","size":3767,"stargazers_count":14,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T03:51:45.322Z","etag":null,"topics":["alloy","appcelerator","titanium-alloy"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skypanther.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-22T00:56:56.000Z","updated_at":"2022-05-19T18:37:19.000Z","dependencies_parsed_at":"2022-09-14T08:02:54.743Z","dependency_job_id":null,"html_url":"https://github.com/skypanther/AlloyPopover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skypanther%2FAlloyPopover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skypanther%2FAlloyPopover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skypanther%2FAlloyPopover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skypanther%2FAlloyPopover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skypanther","download_url":"https://codeload.github.com/skypanther/AlloyPopover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252784312,"owners_count":21803646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alloy","appcelerator","titanium-alloy"],"created_at":"2024-10-03T15:47:56.561Z","updated_at":"2025-05-06T23:24:16.209Z","avatar_url":"https://github.com/skypanther.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlloyPopover\n\nA Titanium Alloy-ready popover component for iOS and Android (probably works on MobileWeb \u0026 BB10, but untested). This component somewhat replicates the iPad-specific iPad control. It does _not_ instantiate Ti.UI.iPad.PopOver on iOS.\n\n\u003cimg src=\"https://raw.github.com/skypanther/AlloyPopover/master/iphone.png\" width=\"300\"\u003e \u003cimg src=\"https://raw.github.com/skypanther/AlloyPopover/master/android.png\" width=\"300\"\u003e\n\n## Instructions\n\n1. Download \u0026 unzip the dist/alloypopover.zip file\n2. Copy it to your project's app/widgets folder\n3. Modify app/config.json:\n```\n\"dependencies\": {\n\t\"com.skypanther.alloypopover\": \"1.2\"\n}\n```\n4. Instantiate in your controller following the example code below. \n5. Optional, style the popover following the instructions below\n\n## Examples\n\nSee the included sample app. Or, check out the following.\n\n### Example 1: Passing child views in markup example\n\nYou can pass child views to the widget in the XML (added in Alloy 1.3.0):\n\n####popover.xml - popover view\n\n```XML\n\u003cAlloy\u003e\n\t\u003cWidget id=\"popover\" src=\"com.skypanther.alloypopover\"\u003e\n\t\t\u003cTableView id=\"table\"/\u003e\n\t\u003c/Widget\u003e\n\u003c/Alloy\u003e\n```\n\n#####popover.js - popover controller\n```JavaScript\n// initialize the popover\n$.popover.init({\n\ttitle: 'Popover',\n\tshowLeftNavButton: true,\n\tleftNavButtonTitle: 'Done',\n\tleftNavCallback: function() {\n\t\t// function run after left button is clicked\n\t},\n\tshowRightNavButton: true,\n\trightNavButtonTitle: 'Next',\n\trightNavCallback: function() {\n\t},\n\n\t// set to true to disable tapping on backshade to close\n\tdisableBackshadeClose: false,\n\n\t// view to show within the popover (if using this method of passing the view. \n\t// If undefined, the widget child views from the view will be used)\n\tview: args.view,\n\n\t// time after left or right done buttons before the popover window is closed\n\tduration: 200,  // defaults: iOS: 200 ms, Android: 1000 ms\n\n\topenCallback: function() {\n\t\t// called when popover is opened\n\t\talert('open callback');\n\t},\n\tcloseCallback: function() {\n\t\t// called when popover is closed\n\t\talert('close callback');\n\t}\n\n});\n```\n\n### Example 2: Creating/initializing in the controller\n\n```\n// initialize popover within a click handler\nfunction doClick() {\n\t// create the view that will be shown within the popover\n\tvar custview = Alloy.createController('custview');\n\t// create and initialize the popover\n\tvar pop = Alloy.createWidget('com.skypanther.alloypopover');\n\tpop.init({\n\t\ttitle: 'Popover',\n\t\tshowLeftNavButton: true,\n\t\tleftNavButtonTitle: 'Done',\n\t\tleftNavCallback: function() {\n\t\t\t// function run after left button is clicked\n\t\t\talert(JSON.stringify(Alloy.Globals.theRow));\n\t\t},\n\t\tshowRightNavButton: false,\n\t\trightNavButtonTitle: 'Next',\n\t\trightNavCallback: function() {\n\t\t\talert(JSON.stringify(Alloy.Globals.theRow));\n\t\t},\n\t\t// set to true to disable tapping on backshade to close\n\t\tdisableBackshadeClose: false,\n\t\t// view to show within the popover\n\t\tview: custview.getView()\n\t});\n\t// call showMe() to display the popover\n\tpop.showMe();\n}\n\n```\n\n### Styling the popover\n\nYou can override the default styles by adding any of the following selectors to your project's app/styles/app.tss file:\n\n```\n\"#popover\": {}, /* window containing popover */\n\"#backshade\": {}, /* background */\n\"#shadow[platform=ios]\": {}, /* iOS only, shadow around popover contents */\n\"#wrapper\": {}, /* border and container around contents */\n\"#titlebar\": {}, /* title bar */\n\"#leftnavbutton\": {}, /* left title bar button */\n\"#title\": {}, /* title label */\n\"#rightnavbutton\": {}, /* right title bar button */\n\"#contents\": {} /* content area */\n```\n\n# Author\n\nTim Poulsen, @skypanther\n\n## License\n\nMIT License\n\nCopyright \u0026copy; 2013-2014, Skypanther Studios, Inc.\n \nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskypanther%2Falloypopover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskypanther%2Falloypopover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskypanther%2Falloypopover/lists"}