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
| Alloy.Globals.fontAwesome = require('IconicFont').IconicFont({ | |
| font: 'FontAwesome' | |
| }); | |
| Alloy.Globals.fontAwesomeBackButton = Alloy.Globals.fontAwesome.icon('icon-chevron-left'); | |
| var NappAppearance = require('dk.napp.appearance'); | |
| NappAppearance.setGlobalStyling({ | |
| barButton:{ | |
| color:"#ffffff", | |
| shadowColor: "transparent", |
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 executeSql (sql, data) { | |
| if(data != undefined && data.length > 0) { | |
| var final_sql = sql; | |
| for(var value in data) { | |
| final_sql = final_sql.replace(sqlSeperator, '"' + escapeSql(data[value]) + '"'); | |
| } | |
| return db_instance.execute(final_sql); | |
| } else { | |
| return db_instance.execute(sql); |
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
| migration.up = function(db) { | |
| db.createTable({ | |
| "columns": { | |
| "id":"INTEGER PRIMARY KEY AUTOINCREMENT", | |
| "userid":"INTEGER", | |
| "title":"text", | |
| "description":"text", | |
| "image":"text", | |
| "thumb":"text", | |
| "modules":"text", |
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 collection = Alloy.Collections.collection; | |
| var openAddItem = function(){ | |
| var win = Alloy.createController("CollectionDetail").getView(); | |
| win.open(); | |
| } | |
| function dataTransform(model) { | |
| var transform = model.toJSON(); | |
| transform.title = transform.first + " " + transform.last; |
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
| //Setup module to run Behave tests | |
| require('behave').andSetup(this); | |
| describe('SQLREST: create a model', function() { | |
| it.eventually('*** creates a new model', function(done) { | |
| var model = Alloy.createModel('wine', { | |
| name : "CHATEAU LE DOYENNE", | |
| year : 2012, | |
| grapes : "Merlot", | |
| country : "France", |
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
| //method 1: minklasse.js | |
| function MinKlasse(args){ | |
| function hejsa(){ | |
| return 1; | |
| } | |
| return { | |
| hejsa:function(){ | |
| return 1; |
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
| /* | |
| * Napp Framework | |
| * (c) 2012 Napp ApS | |
| * www.napp.dk | |
| * | |
| * NAPP SQL ALLOY ADAPTER | |
| * Dual SQLite/SQL sync adapter which will store all models in | |
| * an on device database | |
| */ |
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
| Ti.include('overrideTabs.js'); | |
| /* | |
| This is a typical new project -- a tab group with three tabs. | |
| */ | |
| var tabGroup = Ti.UI.createTabGroup(); | |
| /* | |
| Tab 1. |
NewerOlder