This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Titanium.App.addEventListener("playvideo", function (e) { | |
| var win11 = Titanium.UI.createWindow({ | |
| orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
| title: "Video", | |
| zIndex: 222222 | |
| }); | |
| var activeMovie = Titanium.Media.createVideoPlayer({ | |
| fullscreen: !0, | |
| autoplay: !0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Facebook 'alike' menu in Titanium Appcelerator | |
| * Mauro Parra-Miranda <mauropm@gmail.com> | |
| * License: Free to use, no support at all. | |
| * USAGE: Create a new mobile project in Ti Studio, paste this file into app.js | |
| */ | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor : 'white', | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LoadingTableViewRow = function(message) { | |
| var row = Titanium.UI.createTableViewRow({ | |
| height: 70, | |
| touchEnabled: false | |
| }); | |
| var indicator = Titanium.UI.createActivityIndicator({ | |
| width:"auto", | |
| height: 30, | |
| color: "665b5b", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var UI = require('ui'); | |
| var btn = UI.Button({ | |
| title: 'Hello World', | |
| width: Ti.UI.SIZE, | |
| height: Ti.UI.SIZE, | |
| onClick: function(){ | |
| alert('Button Clicked'); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DialogWindow = function(message, type){ | |
| // Default params | |
| var message = message || "How about you add some message to this? :)"; | |
| var type = type || "error"; | |
| var window = Titanium.UI.createWindow({ | |
| width: 320, | |
| height: 44, | |
| top: 44, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## jQuery [plain_text] | |
| Make sure you make a reference to the jQuery library in the header of your HTML. Also remember that you must load the HTML into the WebView from a local file. | |
| ## This event definition goes in you app.js [javascript] | |
| Ti.App.addEventListener('openBrowser',function(e){ | |
| Ti.Platform.openURL(e.URL); | |
| }); | |
| ## This JQuery goes in the HTML file [javascript] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SEE QUESTION IN QA FORUM | |
| // http://developer.appcelerator.com/question/142378/integrating-nodeacs-with-expressjs-not-working | |
| // @aaronksaunders | |
| // | |
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //// ---- Menu window, positioned on the left | |
| var menuWindow = Ti.UI.createWindow({ | |
| top:0, | |
| left:0, | |
| width:150 | |
| }); | |
| menuWindow.open(); | |
| //// ---- Menu Table | |
| // Menu Titles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function showItems(e) { | |
| Ti.API.info(e.rowData.itemName); | |
| } | |
| var rowData=[]; | |
| for(var i=1;i<=10;i++){ | |
| var payload={ | |
| rowId:i, | |
| itemName:'Test' + i | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.definition = | |
| config: | |
| adapter: | |
| type: "rest" | |
| name: "Agent" | |
| extendModel: (Model) -> | |
| _.extend Model::, | |
| url: -> |