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
// | |
// Start the app while being offline | |
// Then after these requests have been cache - go back online | |
// | |
var HTTPHelper = require("networkHelper"); | |
// simulate some request while being offline | |
for(var i = 0; i < 5; i++){ | |
setTimeout(function(){ |
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
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- array of downloads. --> | |
<key>items</key> | |
<array> | |
<dict> | |
<!-- an array of assets to download --> |
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
## | |
## Build an Appcelerator Android Module | |
## Then copy it to the default module directory | |
## | |
## (c) Napp ApS | |
## Mads Møller | |
## | |
## HOW TO GUIDE |
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
// bugsnag module | |
angular.module('napp-angular-bugsnag', []).run(['$rootScope', function($rootScope) { | |
$rootScope.$on('ServerException', function(evt, err) { | |
Bugsnag.user = { | |
id: napp.getUserId(), | |
name: napp.getUsername() | |
}; | |
var exception = "ErrorException"; |
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
/** | |
* Download Manager | |
* Manage downloads of assets through a third party module | |
* It also keeps track of the downloaded files in a queue. | |
* Dependency: A native module for iOS & Android | |
* @author Mads Møller | |
* @version 1.0.0 | |
* Copyright Napp ApS | |
* www.napp.dk | |
*/ |
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
app.factory('API', ['$http', function($http){ | |
// API url | |
var apiURL = "/api/v1/"; | |
// defuauly HTTP Headers | |
var defaultHeaders = { | |
"X-API-KEY": angular.getAPIKey() | |
"X-SOMETHING": "123" | |
}; |
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
/*! Socket.IO.js build:0.9.6, development. Copyright(c) 2011 LearnBoost <[email protected]> MIT Licensed */ | |
/** | |
* Originally Ported to titanium by Jordi Domenech <[email protected]> | |
* source: https://github.com/iamyellow/socket.io-client | |
*/ | |
this.io = {}; | |
module.exports = this.io; | |
/** |
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
<catalog_category_layered translate="label"> | |
<reference name="left"> | |
<!-- Adds the toolbar to the left column --> | |
<block type="catalog/category_view" name="category.page.toolbar" template="catalog/category/sidetoolbar.phtml"> | |
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> | |
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml" /> | |
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action> | |
</block> | |
</block> | |
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
// We need to add the following proxies to our project before Napp UI works. | |
// This is due to some limitations of the Titanium Module SDK | |
// Please run this after you require the | |
exports.initNappUI() { | |
require('dk.napp.ui'); // require the module | |
// window and tabs |
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
// This is an example of use. | |
// Here we use the new Bearer Token thats make it possible to get tweets without user login | |
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth | |
// Full Codebird API is here: https://github.com/mynetx/codebird-js | |
var Codebird = require("codebird"); | |
var cb = new Codebird(); | |
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY'); | |
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null); |