Skip to content

Commit

Permalink
Update to latest fin for client-side caching
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswestin committed Aug 19, 2011
1 parent 45aab00 commit e077860
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion node_modules/fin
2 changes: 1 addition & 1 deletion node_modules/ui.js
Submodule ui.js updated 1 files
+1 −1 dom/getElementOf.js
14 changes: 10 additions & 4 deletions src/client/base/WorkScreen.js
Expand Up @@ -10,14 +10,15 @@ module.exports = new Class(UIComponent, function(supr) {
}

this.renderContent = function() {
gData.taskList
.on('push', bind(this, this._renderTask))
.on('remove', bind(this, this._removeTask))

DIV('WorkScreen',
this._header = this._renderHeader().render(this).style({ height:this._headerHeight }),
this._body = this._renderBody().render(this).style({ top:this._headerHeight + 4 })
).appendTo(this)

gData.taskList
.on('clear', bind(this, this._clearTasks))
.on('push', bind(this, this._renderTask))
.on('remove', bind(this, this._removeTask))
}

this._renderHeader = function() {
Expand All @@ -32,6 +33,11 @@ module.exports = new Class(UIComponent, function(supr) {
)
}

this._clearTasks = function() {
this._taskList.getElement().innerHTML = ''
this._nodes = {}
}

this._renderTask = function(task) {
var node = this._nodes[task._oid] = DIV('task',
INPUT('done', { type:'checkbox', data:task.done }),
Expand Down

0 comments on commit e077860

Please sign in to comment.