-
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
This is not a tutorail yet but a page which will contain some notes about the ToDo list application.
Watch out for more details to be added in the upcoming days, hhzl, 7th Jan 2015
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'].
! !