mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-04-07 17:16:44 +02:00
23 lines
712 B
CoffeeScript
23 lines
712 B
CoffeeScript
class Calendar extends this.OS.GUI.BaseService
|
|
constructor: () ->
|
|
super "Calendar"
|
|
#@iconclass = "fa fa-commenting"
|
|
@text = ""
|
|
@iconclass = "fa fa-calendar"
|
|
init: ->
|
|
#update time each second
|
|
me = @
|
|
@watch 1000, () ->
|
|
now = new Date
|
|
me.text = "#{now.getDate()}/#{(now.getMonth()+1)}/#{now.getFullYear()} " +
|
|
"#{now.getHours()}:#{now.getMinutes()}:#{now.getSeconds()}"
|
|
me.update()
|
|
|
|
awake: (e) ->
|
|
@.openDialog "CalendarDialog", (d) ->
|
|
# do nothing
|
|
cleanup: (evt) ->
|
|
console.log "cleanup for quit"
|
|
# do nothing
|
|
|
|
this.OS.register "Calendar",Calendar |