mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 01:32:40 -04:00
trigger datepicker when planting finished checkbox is ticked
This commit is contained in:
5
Gemfile
5
Gemfile
@@ -83,6 +83,10 @@ group :development do
|
||||
# Installation of the debugger gem fails on Travis CI,
|
||||
# so we don't use it in the test environment
|
||||
gem 'debugger'
|
||||
# A debugger and irb alternative. Pry doesn't play nice
|
||||
# with unicorn, so start a Webrick server when debugging
|
||||
# with Pry
|
||||
gem 'pry'
|
||||
gem 'better_errors'
|
||||
gem 'binding_of_caller'
|
||||
gem 'letter_opener'
|
||||
@@ -119,7 +123,6 @@ gem 'omniauth-flickr', '>= 0.0.15'
|
||||
gem 'rake', '>= 10.0.0'
|
||||
|
||||
group :development, :test do
|
||||
gem 'pry'
|
||||
gem 'haml-rails' # HTML templating language
|
||||
gem 'rspec-rails', '~> 2.12.1' # unit testing framework
|
||||
gem 'database_cleaner', '~> 1.3.0'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Clears the finished at date field when
|
||||
# a planting is marked unfinished, and
|
||||
# repopulates the field with a cached value
|
||||
# marking unfinshed is undone.
|
||||
# marking unfinished is undone.
|
||||
|
||||
jQuery ->
|
||||
previousValue = ''
|
||||
@@ -10,7 +10,9 @@ jQuery ->
|
||||
if @checked
|
||||
if previousValue.length
|
||||
date = previousValue
|
||||
finished.val(date)
|
||||
finished.val(date)
|
||||
else
|
||||
finished.trigger('focus')
|
||||
else
|
||||
previousValue = finished.val()
|
||||
finished.val('')
|
||||
|
||||
Reference in New Issue
Block a user