added web socket support without spooling
changed button layout to action button
This commit is contained in:
parent
d754f71ba6
commit
bfe316f9f5
3 changed files with 11 additions and 6 deletions
|
@ -13,8 +13,13 @@ class App.Maintenance extends App.ControllerContent
|
|||
sendMessage: (e) ->
|
||||
e.preventDefault()
|
||||
params = @formParam(e.target)
|
||||
console.log(params)
|
||||
App.Event.trigger('session:maintanance', {title: params.HeaderText, message: params.Message})
|
||||
App.Event.trigger(
|
||||
'ws:send'
|
||||
action: 'broadcast'
|
||||
event: 'session:maintenance'
|
||||
spool: false
|
||||
data: {title: params.headerText, message: params.message}
|
||||
)
|
||||
|
||||
|
||||
App.Config.set( 'maintenance', App.Maintenance, 'Routes' )
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
class App.MaintananceWidget extends App.Controller
|
||||
class App.MaintenanceWidget extends App.Controller
|
||||
constructor: ->
|
||||
super
|
||||
|
||||
# bind on event to show message
|
||||
App.Event.bind 'session:maintanance', (data) =>
|
||||
App.Event.bind 'session:maintenance', (data) =>
|
||||
console.log('hannes was here')
|
||||
new Message(data)
|
||||
|
||||
|
@ -25,4 +25,4 @@ class Message extends App.ControllerModal
|
|||
keyboard: true,
|
||||
)
|
||||
|
||||
App.Config.set( 'maintanance', App.MaintananceWidget, 'Widgets' )
|
||||
App.Config.set( 'maintenance', App.MaintenanceWidget, 'Widgets' )
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn">Send Message</button>
|
||||
<button type="submit" class="btn btn-primary submit">Send Message</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in a new issue