diff --git a/app/assets/javascripts/app/controllers/maintenance.js.coffee b/app/assets/javascripts/app/controllers/maintenance.js.coffee index 682e807d3..63bcc7093 100644 --- a/app/assets/javascripts/app/controllers/maintenance.js.coffee +++ b/app/assets/javascripts/app/controllers/maintenance.js.coffee @@ -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' ) diff --git a/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee b/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee index 9b927e8bf..6e3b1c543 100644 --- a/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee @@ -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' ) diff --git a/app/assets/javascripts/app/views/maintenance.jst.eco b/app/assets/javascripts/app/views/maintenance.jst.eco index f4b75acb9..995cb9a22 100644 --- a/app/assets/javascripts/app/views/maintenance.jst.eco +++ b/app/assets/javascripts/app/views/maintenance.jst.eco @@ -16,7 +16,7 @@