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
// RomanticDB.js | |
// ---------------------------------- | |
// v0.0.1 | |
// | |
// Copyright (c)2013 Jake Craige | |
// Distributed under MIT license | |
// | |
// http://jcraige.com | |
// | |
// *TODO:* |
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
function toEmberObject(result) { | |
var object = ParseModel.create(result.attributes); | |
object._parseAttributes = Ember.keys(result.attributes) | |
object._parseObject = result; | |
object.set('id', result.id) | |
object.set('createdAt', result.createdAt) | |
return object; | |
} | |
function mapToEmberObjects(results) { |
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
window.ENV.development = true; | |
window.ENV.nodeApiUrl = 'http://worthit-node-server.herokuapp.com/api/v1'; | |
window.ENV.apiUrl = 'http://worthit-development.herokuapp.com/api/v2'; | |
window.ENV.appEnv = 'development'; |
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
// RomanticDB.js | |
// ---------------------------------- | |
// v0.0.1 | |
// | |
// Copyright (c)2013 Jake Craige | |
// Distributed under MIT license | |
// | |
// http://jcraige.com | |
// | |
// *TODO:* |
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
<?php | |
/** | |
* @file | |
* leaflet powered custom maps for newmark homes. | |
*/ | |
$home_style = array( | |
'weight' => 1, | |
'color' => '#008000' | |
); |
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
Ea.GplacesAutocompleteComponent = Em.Component.extend | |
tagName: 'input' | |
classNames: ['google_places_ac'] | |
attributeBindings: ['placeholder', 'type', 'value'] | |
type: 'text' | |
didInsertElement: -> | |
autocomplete = new google.maps.places.Autocomplete($('.google_places_ac')[0], {}) | |
#Fast click fix for gmaps | |
g_autocomplete = $('body > .pac-container').filter(":visible") |
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
function getAll(collection, res){ | |
collection.list(function(err, resModels, options){ | |
var results = [], pages; | |
if(err) { | |
console.log(err); | |
res.send(500); | |
} | |
console.log('page 1'); | |
results.push(resModels); |
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
Em.ArrayProxy.createWithMixins Ember.SortableMixin, { | |
content: @get('contacts') | |
sortProperties: ['sort_key'] | |
sortAscending: true | |
} |
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
Ea.EventController = Em.ObjectController.extend | |
actions: | |
destroyEvent: -> | |
success = (resModel)=> | |
Ea.get('flash').randSuccess 'success.deleted' | |
error = -> | |
Ea.get('flash').randAlert 'error.general' |
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
EventAssist.EventsController = Em.ArrayController.extend Ea.ErrorFormatter, | |
actions: | |
createEvent: -> | |
event = @get('newEvent') | |
success = (savedEvent)=> | |
@transitionToRoute('event.overview', savedEvent) | |
Ea.get('flash').randAuccess 'success.created.event' | |
event.save().then success, (response)=> | |
@setErrors(response) |