This commit is contained in:
Devin Howard 2015-09-30 05:57:24 +00:00
commit 19e675617e
5 changed files with 34 additions and 6 deletions

18
.example-env Normal file
View file

@ -0,0 +1,18 @@
RAILS_ENV=development
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
BUNDLE_GEMFILE
SMTP_DOMAIN
SMTP_PASSWORD
SMTP_PORT
SMTP_SERVER
SMTP_USERNAME
SSO_KEY
## find the ENV currently in use in the app using :
## grep -rIso -P "(?<=ENV)(\.fetch\(|\[).[A-Z_]+.(\)|\])"
# for a uniq ordered list of env vars:
## grep -rIsoh -P "(?<=ENV)(\.fetch\(|\[).[A-Z_]+.(\)|\])" | grep -oP "[A-Z_]+" | sort -u > temp

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
realtime/node_modules realtime/node_modules
config/database.yml config/database.yml
.env
#public/assets #public/assets
# Ignore bundler config # Ignore bundler config

View file

@ -17,6 +17,7 @@ gem 'rails3-jquery-autocomplete'
gem 'best_in_place' #in-place editing gem 'best_in_place' #in-place editing
gem 'kaminari' # pagination gem 'kaminari' # pagination
gem 'uservoice-ruby' gem 'uservoice-ruby'
gem 'dotenv'
gem 'paperclip' gem 'paperclip'
gem 'aws-sdk' gem 'aws-sdk'

View file

@ -59,6 +59,7 @@ GEM
responders responders
thread_safe (~> 0.1) thread_safe (~> 0.1)
warden (~> 1.2.3) warden (~> 1.2.3)
dotenv (2.0.0)
erubis (2.7.0) erubis (2.7.0)
execjs (2.2.1) execjs (2.2.1)
ezcrypto (0.7.2) ezcrypto (0.7.2)
@ -165,6 +166,7 @@ DEPENDENCIES
cancan cancan
coffee-rails (~> 3.2.1) coffee-rails (~> 3.2.1)
devise devise
dotenv
formtastic formtastic
formula formula
jbuilder (= 0.8.2) jbuilder (= 0.8.2)

View file

@ -665,8 +665,11 @@ Metamaps.Create = {
}); });
// initialize the autocomplete results for the metacode spinner // initialize the autocomplete results for the metacode spinner
$('#topic_name').typeahead([ $('#topic_name').typeahead(
{ {
minLength: 2,
},
[{
name: 'topic_autocomplete', name: 'topic_autocomplete',
limit: 8, limit: 8,
template: $('#topicAutocompleteTemplate').html(), template: $('#topicAutocompleteTemplate').html(),
@ -674,8 +677,8 @@ Metamaps.Create = {
url: '/topics/autocomplete_topic?term=%QUERY' url: '/topics/autocomplete_topic?term=%QUERY'
}, },
engine: Hogan engine: Hogan
} }]
]); );
// tell the autocomplete to submit the form with the topic you clicked on if you pick from the autocomplete // tell the autocomplete to submit the form with the topic you clicked on if you pick from the autocomplete
$('#topic_name').bind('typeahead:selected', function (event, datum, dataset) { $('#topic_name').bind('typeahead:selected', function (event, datum, dataset) {
@ -724,8 +727,11 @@ Metamaps.Create = {
}); });
// initialize the autocomplete results for synapse creation // initialize the autocomplete results for synapse creation
$('#synapse_desc').typeahead([ $('#synapse_desc').typeahead(
{ {
minLength: 2,
},
[{
name: 'synapse_autocomplete', name: 'synapse_autocomplete',
template: "<div class='genericSynapseDesc'>{{label}}</div>", template: "<div class='genericSynapseDesc'>{{label}}</div>",
remote: { remote: {
@ -745,8 +751,8 @@ Metamaps.Create = {
}, },
engine: Hogan, engine: Hogan,
header: "<h3>Existing synapses</h3>" header: "<h3>Existing synapses</h3>"
} }]
]); );
$('#synapse_desc').bind('typeahead:selected', function (event, datum, dataset) { $('#synapse_desc').bind('typeahead:selected', function (event, datum, dataset) {
if (datum.id) { // if they clicked on an existing synapse get it if (datum.id) { // if they clicked on an existing synapse get it