Created
November 7, 2012 21:24
complicated UI controll designed with if/else
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
# no bueno | |
class DateWidget | |
constructor: -> | |
@firstLevel = true | |
@fromDate = null | |
@toDate = null | |
fillFromDate: -> | |
if @firstLevel | |
#initialize fromDate and toDate day selects | |
else if @fromDate | |
#do some | |
else if @toDate | |
#do something else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment