system model

This commit is contained in:
Radek Stepan 2014-10-01 20:36:10 -07:00
parent 8bfdc407a1
commit b36f9dfeef
1 changed files with 17 additions and 0 deletions

17
src/models/system.coffee Normal file
View File

@ -0,0 +1,17 @@
mediator = require '../modules/mediator'
Model = require '../utils/model'
# System state.
system = new Model
'data':
'loading': no
counter = 0
async = ->
counter += 1
system.set 'loading', yes
->
counter -= 1
system.set 'loading', +counter
module.exports = { system, async }