issues
search
balderdashy
/
mast
UI conventions built on top of Backbone.JS
MIT License
81
stars
14
forks
source link
Tree.fetch(), Component.save(), Component.destroy(), and Tree.create()
#75
Closed
mikermcneil
closed
11 years ago
mikermcneil
commented
12 years ago
When rendering a Component/Tree:
After doing an initial render, if autoFetch is true, call Component.fetch (autoFetch is currently in Mast.Collection. It should be removed)
Mast.Tree.create()
Mast.Tree.fetch()
Mast.Component.save()
Mast.Component.destroy()
Start server-side operation and listen for completion event
Fire appropriate before event
Tree.beforeFetch, Component.beforeSave, Component.beforeDestroy, and Tree.beforeCreateItem
Default behavior is: Stop previous timer and animations, then show loadingTemplate or loadingHTML
When the server-side operation responds, fire appropriate after event
Tree.afterFetch, Component.afterSave, Component.afterDestroy, Tree.afterCreateItem
Default behavior is: stop previous timer and animations and replace loadingHTML with the proper new html or template (could be errorTemplate or errorHTML)
mikermcneil
commented
12 years ago
autoFetch works
When rendering a Component/Tree:
Mast.Tree.create()
Mast.Tree.fetch()
Mast.Component.save()
Mast.Component.destroy()