-
Notifications
You must be signed in to change notification settings - Fork 123
ToDo list application
Hannes Hirzel edited this page Jan 7, 2015
·
3 revisions
There is a ToDo list application done for Amber version 0.12
https://github.com/hhzl/Amber-ToDo-List
From: https://github.com/hhzl/Amber-ToDo-List/edit/master/src/Examples-ToDo.st
!Todo methodsFor: 'rendering'!
renderOn: html | input delete | html li id: self id; with: [ input := html input type: 'checkbox'; onClick: [ self toggleIsDone. onTodoChanged value: self. (input asJQuery next) toggleClass: 'done' ]. html span with: text . delete := html span with: ' [x]'; onClick: [ onDeleteClicked value: self ]]. isDone ifTrue: [ input at: 'checked' put: 'checked'. (input asJQuery next) addClass: 'done']. ! !