mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-26 18:59:45 +02:00
remove riot and use the new tag engine
This commit is contained in:
@ -27,7 +27,8 @@ class Calendar extends this.OS.GUI.BaseService
|
||||
@watch 1000, () ->
|
||||
now = new Date
|
||||
me.text = now.toString()
|
||||
me.update()
|
||||
me.domel.set "text", me.text
|
||||
|
||||
|
||||
awake: (e) ->
|
||||
@.openDialog "CalendarDialog", (d) ->
|
||||
@ -38,4 +39,4 @@ class Calendar extends this.OS.GUI.BaseService
|
||||
console.log "cleanup for quit"
|
||||
# do nothing
|
||||
|
||||
this.OS.register "Calendar",Calendar
|
||||
this.OS.register "Calendar", Calendar
|
@ -20,7 +20,6 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
constructor: (args) ->
|
||||
super "PushNotification", args
|
||||
@iconclass = "fa fa-bars"
|
||||
@onmenuselect = (e) -> console.log e
|
||||
@cb = undefined
|
||||
@pending = []
|
||||
init: ->
|
||||
@ -45,7 +44,7 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
@mfeed = @find "notifeed"
|
||||
@nzone = @find "notifyzone"
|
||||
@fzone = @find "feedzone"
|
||||
(@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", []
|
||||
(@find "btclear").set "onbtclick", (e) -> me.mlist.set "data", []
|
||||
#@subscribe "fail", (e) -> console.log e
|
||||
@subscribe "notification", (o) -> me.pushout 'INFO', o
|
||||
@subscribe "fail", (o) -> me.pushout 'FAIL', o
|
||||
@ -64,15 +63,21 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
|
||||
($ @nzone).css "right", 0
|
||||
.css "top", "-3px"
|
||||
.css "height", ""
|
||||
.css "height", "100%"
|
||||
.css "bottom", "0"
|
||||
.css "z-index", 1000000
|
||||
.css "display", "flex"
|
||||
.css "flex-direction", "column"
|
||||
.hide()
|
||||
($ @mlist).css "flex", "1"
|
||||
($ @fzone)
|
||||
#.css("z-index", 99999)
|
||||
.css("bottom", "0")
|
||||
.css("height", "")
|
||||
.css("height", "100%")
|
||||
.css "display", "flex"
|
||||
.css "flex-direction", "column"
|
||||
.hide()
|
||||
($ @mfeed).css "flex", "1"
|
||||
|
||||
pushout: (s, o, mfeed) ->
|
||||
d = {
|
||||
@ -82,7 +87,7 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
closable: true }
|
||||
#console.log o.data.s
|
||||
#console.log o.data.e
|
||||
@mlist.unshift d, true
|
||||
@mlist.unshift d
|
||||
@notifeed d
|
||||
|
||||
notifeed: (d) ->
|
||||
@ -90,18 +95,17 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
@mfeed.unshift d, true
|
||||
($ @fzone).show()
|
||||
timer = setTimeout () ->
|
||||
me.mfeed.remove d, true
|
||||
me.mfeed.remove d.domel
|
||||
clearTimeout timer
|
||||
, 3000
|
||||
|
||||
awake: (e) ->
|
||||
awake: (evt) ->
|
||||
if @view then ($ @nzone).hide() else ($ @nzone).show()
|
||||
@view = not @view
|
||||
me = @
|
||||
if not @cb
|
||||
@cb = (e) ->
|
||||
return if e.originalEvent.item and e.originalEvent.item.i isnt undefined
|
||||
if not ($ e.target).closest($ me.nzone).length and not ($ e.target).closest($ me.holder.root).length
|
||||
if not ($ e.target).closest($ me.nzone).length and not ($ e.target).closest(evt.data.item).length
|
||||
($ me.nzone).hide()
|
||||
$(document).unbind "click", me.cb
|
||||
me.view = not me.view
|
||||
@ -113,15 +117,15 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
cleanup: (evt) ->
|
||||
# do nothing
|
||||
PushNotification.scheme = """
|
||||
<afx-dummy>
|
||||
<divs>
|
||||
<afx-overlay data-id = "notifyzone" width = "250">
|
||||
<afx-button text = "__(Clear all)" data-id = "btclear"></afx-button>
|
||||
<afx-button text = "__(Clear all)" data-id = "btclear" ></afx-button>
|
||||
<afx-list-view data-id="notifylist"></afx-list-view>
|
||||
</afx-overlay>
|
||||
<afx-overlay data-id = "feedzone" width = "250">
|
||||
<afx-list-view data-id = "notifeed">
|
||||
</afx-list-view>
|
||||
</afx-overlay>
|
||||
</afx-dummy>
|
||||
</div>
|
||||
"""
|
||||
this.OS.register "PushNotification",PushNotification
|
||||
this.OS.register "PushNotification", PushNotification
|
@ -37,7 +37,7 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
($ document).keyup @fn
|
||||
|
||||
@fn1 = (e) ->
|
||||
return if $(e.target).closest(me.parent.holder.root).length
|
||||
return if $(e.target).closest(me.parent.holder).length
|
||||
if not $(e.target).closest(me.scheme).length
|
||||
($ document).unbind "click", me.fn1
|
||||
($ document).unbind "keyup", me.fn
|
||||
@ -49,7 +49,7 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
($ @searchbox).focus()
|
||||
($ @searchbox).keyup (e) ->
|
||||
me.search e
|
||||
@container.set "onlistdbclick", (e)->
|
||||
@container.set "onlistdbclick", (e) ->
|
||||
return if e.data.dataid and e.data.dataid is "header"
|
||||
me.handler(e) if me.handler
|
||||
me._gui.openWith e.data
|
||||
@ -86,11 +86,14 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
return unless text.length >= 3
|
||||
result = @_api.search text
|
||||
return if result.length is 0
|
||||
@container.set "items", result
|
||||
@container.set "data", result
|
||||
console.log result
|
||||
($ @scheme).css("height", @height)
|
||||
|
||||
SpotlightDialog.scheme = """
|
||||
<afx-app-window data-id = "spotlight-win" apptitle="" minimizable="false" resizable = "false" width="500" height="300">
|
||||
<afx-app-window data-id = "spotlight-win"
|
||||
apptitle="" minimizable="false"
|
||||
resizable = "false" width="500" height="300">
|
||||
<afx-vbox>
|
||||
<afx-hbox data-height="45">
|
||||
<div data-id = "searchicon" data-width="45"></div>
|
||||
@ -99,7 +102,7 @@ SpotlightDialog.scheme = """
|
||||
<afx-list-view data-id="container"></afx-list-view>
|
||||
</afx-vbox>
|
||||
</afx-app-window>
|
||||
"""
|
||||
"""
|
||||
this.OS.register "SpotlightDialog", SpotlightDialog
|
||||
|
||||
class Spotlight extends this.OS.GUI.BaseService
|
||||
@ -111,13 +114,7 @@ class Spotlight extends this.OS.GUI.BaseService
|
||||
me = @
|
||||
@_gui.bindKey "CTRL- ", (e) ->
|
||||
me.awake(e)
|
||||
#@child = [
|
||||
# {
|
||||
# text: "#{@.name} (#{@.pid}): dummy notif",
|
||||
# child: [ { text: "submenu" } ]
|
||||
# }
|
||||
#]
|
||||
# do nothing
|
||||
|
||||
main: ->
|
||||
|
||||
awake: (e) ->
|
||||
@ -134,4 +131,4 @@ class Spotlight extends this.OS.GUI.BaseService
|
||||
cleanup: (evt) ->
|
||||
# do nothing
|
||||
|
||||
this.OS.register "Spotlight",Spotlight
|
||||
this.OS.register "Spotlight", Spotlight
|
@ -19,26 +19,27 @@
|
||||
class UserService extends this.OS.GUI.BaseService
|
||||
constructor: (args) ->
|
||||
super "UserService", args
|
||||
@text =@systemsetting.user.username
|
||||
@text = @systemsetting.user.username
|
||||
@iconclass = undefined
|
||||
init: ->
|
||||
me = @
|
||||
@child = [
|
||||
@children = [
|
||||
{
|
||||
text: "__(About)", dataid: "user-about",
|
||||
iconclass: "fa fa-user-circle-o"
|
||||
},
|
||||
{
|
||||
text: "__(Logout)", dataid: "sys-logout",
|
||||
iconclass: "fa fa-user-times"
|
||||
iconclass: "fa fa-user-times",
|
||||
onmenuselect: (d) ->
|
||||
me.notify __("This feature is not implemented yet")
|
||||
}
|
||||
]
|
||||
@onmenuselect = (d) ->
|
||||
return window.OS.exit() if d.item.data.dataid is "sys-logout"
|
||||
me.notify __("This feature is not implemented yet")
|
||||
|
||||
init: ->
|
||||
|
||||
awake: (e) ->
|
||||
|
||||
cleanup: (evt) ->
|
||||
|
||||
|
||||
this.OS.register "UserService",UserService
|
||||
this.OS.register "UserService", UserService
|
@ -65,7 +65,7 @@ class ShowCase extends this.OS.GUI.BaseApplication
|
||||
</afx-vbox>
|
||||
</afx-hbox>
|
||||
<afx-hbox tabname="Virtual desktop">
|
||||
<afx-float-list1 data-id = "flist"/>
|
||||
<afx-float-list data-id = "flist"/>
|
||||
</afx-hbox>
|
||||
<afx-hbox tabname="Calendar">
|
||||
<afx-calendar-view data-id = "cal"/>
|
||||
|
Reference in New Issue
Block a user