mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-01 13:10:58 -05:00
Merge pull request #1030 from CloCkWeRX/fix_998
Ensure we look at the current control, not the entire collection when marking planting finished
This commit is contained in:
@@ -8,13 +8,12 @@ jQuery ->
|
||||
|
||||
el.datepicker({'format': 'yyyy-mm-dd'})
|
||||
|
||||
href = el.attr('href')
|
||||
|
||||
el.click (e) ->
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
originalText = $(this).text()
|
||||
href = $(this).attr('href')
|
||||
$(this).text('Confirm without date')
|
||||
|
||||
$(this).bind('click.confirm', (e) ->
|
||||
@@ -30,6 +29,8 @@ jQuery ->
|
||||
|
||||
el.one 'changeDate', ->
|
||||
date = $(this).datepicker('getDate')
|
||||
href = $(this).attr('href')
|
||||
|
||||
url = "#{href}&planting[finished_at]=#{date}"
|
||||
|
||||
link = $("<a href='#{url}' data-method='put'></a>")
|
||||
|
||||
Reference in New Issue
Block a user