This file contains 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 TextSearch = require('rx-text-search'); | |
var walk = require('walk'); | |
var colors = require('colors'); | |
var Promise = require('bluebird'); | |
// ************************************************* | |
// Required Node Packages | |
// |
This file contains 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
define(function(require) { | |
var $ = require('$'); | |
/** | |
* Static utility for forcing a minimum return time for a promise | |
* @class MinimumDelayedPromise | |
*/ | |
/** | |
* A promise based helper function |
This file contains 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
define(function(require) { | |
var $ = require('$'); | |
/** | |
* Static utility for retrying a promise | |
* @class PromiseToRetry | |
*/ | |
/** | |
* A promise based helper function |
This file contains 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
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]]) { | |
NSString *jsString = @"window.googleMapsAppInstalled = true;"; | |
[self.webView stringByEvaluatingJavaScriptFromString:jsString]; | |
} |
This file contains 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
- (void)keyboardWillShowOrHide:(NSNotification*)notif | |
{ | |
CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
keyboardFrame = [self.view convertRect:keyboardFrame fromView:nil]; | |
CGFloat height = keyboardFrame.size.height; | |
BOOL showing = [notif.name isEqualToString:UIKeyboardWillShowNotification]; | |
NSString *showingString = showing ? @"true" : @"false"; | |
NSString *jsString = [NSString stringWithFormat:@"$(window).trigger(jQuery.Event('keyboardToggle', {showing: %@, height: %f}));", showingString, height]; | |