TAP5-805: Always show the popup, even when the text field can't be parsed
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3d006069 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3d006069 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3d006069 Branch: refs/heads/master Commit: 3d00606918a0a6b9123678e0adf844b58288d3db Parents: 1b85105 Author: Howard M. Lewis Ship <[email protected]> Authored: Fri May 9 11:49:43 2014 -0700 Committer: Howard M. Lewis Ship <[email protected]> Committed: Fri May 9 11:49:43 2014 -0700 ---------------------------------------------------------------------- .../META-INF/modules/t5/core/datefield.coffee | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d006069/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee index 6d57b17..530f6f6 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee @@ -88,6 +88,9 @@ define ["./dom", "./events", "./messages", "./ajax", "underscore", "./datepicker @field.removeClass "ajax-wait" @fieldError message + @showPopup() + return + success: (response) => @field.removeClass "ajax-wait" reply = response.json @@ -98,11 +101,13 @@ define ["./dom", "./events", "./messages", "./ajax", "underscore", "./datepicker date = new Date() date.setTime reply.result @datePicker.setDate date - @showPopup() - return - @fieldError (_.escape reply.error) - @hidePopup() + if reply.error + @fieldError (_.escape reply.error) + + @datePicker.setDate null + + @showPopup() return fieldError: (message) ->
