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
{{ view App.Textfield | |
class="form-control" | |
placeholderBinding="view.prompt" | |
valueBinding="view.value" | |
viewName="inputField" | |
arrow-up="arrowUp" | |
arrow-down="arrowDown" | |
}} |
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
App.Textfield = Ember.TextField.extend({ | |
init: function() { | |
this._super(); | |
this.on("keyUp", this, this.interpretKeyEvents); | |
}, | |
interpretKeyEvents: function(event){ | |
var map = TM.Textfield .KEY_EVENTS; | |
var method = map[event.keyCode]; |
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
{{ view Ember.Textfield | |
class="form-control" | |
placeholderBinding="controller.prompt" | |
valueBinding="controller.value" | |
onEvent="keyPress" | |
action="typing" | |
}} |
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
App.InactivityWarningComponent = Ember.Component.extend({ | |
active: false, | |
inactiveTimeout: 12000000, // Amount of time before we redirect to the sign in screen - the session should have expired by this point. (20 minutes) | |
warningTimeout: 30000, // Amount of time the user has to perform an action before the last keep alive fires - 30 seconds | |
timeout: 1170000, // 19.5 minutes. We want to be less than the 20 minute timeout to be sure the session is renewed. | |
didInsertElement: function(){ | |
//if($('meta[name="in-development"]').attr('content')){ return; } // Uncomment and add a meta tag to your head if you want to avoid session timeout in development | |
var context = this; |
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
// Chosen, a Select Box Enhancer for jQuery and Prototype | |
// by Patrick Filler for Harvest, http://getharvest.com | |
// | |
// Version 1.0.0 | |
// Full source at https://github.com/harvesthq/chosen | |
// Copyright (c) 2011 Harvest http://getharvest.com | |
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | |
// This file is generated by `grunt build`, do not edit it by hand. | |
(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
App.Chosen = Ember.Select.extend({ | |
multiple: false, | |
width: '95%', | |
disableSearchThreshold: 10, | |
searchContains: true, | |
attributeBindings:['multiple', 'width', 'disableSearchThreshold', 'searchContains'], | |
didInsertElement: function(){ | |
this._super(); |
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
namespace :ember do | |
desc "Build ember models from schema" | |
task :models => :environment do | |
# Change these values to fit your project | |
namespace = 'App' # The Ember application's namespace. | |
# The directory where ember models will be written. We drop them | |
# in the tmp directory since we might not want an ember model for every table in the |
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
namespace :ember do | |
desc "Build ember models from schema" | |
task :models => :environment do | |
# Change these values to fit your project | |
namespace = 'App' # The Ember application's namespace. | |
output_dir = File.join(Rails.root, "app/assets/javascripts/common/models") # The directory where ember models will be written | |
schema_file = File.join(Rails.root, 'db/schema.rb') |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'exifr' | |
require 'fileutils' | |
require 'logger' | |
class PictureScanner | |
def self.scan_files(source_dir) | |
cameras = {} |