QA on maintenance message.
This commit is contained in:
parent
69fec9e219
commit
70ceaf455f
|
@ -4,7 +4,6 @@ class App.Maintenance extends App.ControllerContent
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
# render page
|
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
|
@ -18,11 +17,9 @@ class App.Maintenance extends App.ControllerContent
|
||||||
action: 'broadcast'
|
action: 'broadcast'
|
||||||
event: 'session:maintenance'
|
event: 'session:maintenance'
|
||||||
spool: false
|
spool: false
|
||||||
data:
|
data: params
|
||||||
title: params.HeaderText
|
)
|
||||||
message: params.Message
|
@render()
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
App.Config.set( 'maintenance', App.Maintenance, 'Routes' )
|
App.Config.set( 'maintenance', App.Maintenance, 'Routes' )
|
||||||
App.Config.set( 'maintenance', { prio: 3600, parent: '#admin', name: 'Maintenance Message', target: '#maintenance', role: ['Admin'] }, 'NavBar' )
|
App.Config.set( 'maintenance', { prio: 3600, parent: '#admin', name: 'Maintenance Message', target: '#maintenance', role: ['Admin'] }, 'NavBar' )
|
||||||
|
|
|
@ -4,21 +4,19 @@ class App.MaintenanceWidget extends App.Controller
|
||||||
|
|
||||||
# bind on event to show message
|
# bind on event to show message
|
||||||
App.Event.bind 'session:maintenance', (data) =>
|
App.Event.bind 'session:maintenance', (data) =>
|
||||||
console.log('hannes was here')
|
new Message( message: data )
|
||||||
new Message(data)
|
|
||||||
|
|
||||||
|
|
||||||
class Message extends App.ControllerModal
|
class Message extends App.ControllerModal
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
@render()
|
@render(@message)
|
||||||
|
|
||||||
render: ->
|
render: (message = {}) ->
|
||||||
@html App.view('modal')(
|
@html App.view('modal')(
|
||||||
title: @title,
|
title: message.title,
|
||||||
message: @message
|
message: message.message
|
||||||
detail: @detail
|
detail: message.detail
|
||||||
close: @close
|
close: message.close
|
||||||
)
|
)
|
||||||
@modalShow(
|
@modalShow(
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Maintenance Message<small></small></h1>
|
<h1><%- @T('Maintenance Message') %><small></small></h1>
|
||||||
</div>
|
</div>
|
||||||
<form class="form-horizontal" id="maintenanceForm">
|
<form class="form-horizontal" id="maintenanceForm">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="HeaderText">Header Text</label>
|
<label class="control-label" for="title"><%- @T('Title') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="HeaderText" name="HeaderText" placeholder="Header Text">
|
<input type="text" name="title" class="span7" placeholder="<%- @Ti('Title') %>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="Message">Message</label>
|
<label class="control-label" for="message"><%- @T('Message') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<textarea id="Message" name="Message" class="" rows="8" placeholder="Maintenance Message"></textarea>
|
<textarea name="message" class="span7" rows="8" placeholder="<%- @Ti('Maintenance Message') %>" required></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button type="submit" class="btn btn-primary submit">Send Message</button>
|
<button type="submit" class="btn btn-primary submit"><%- @T('Send Message') %></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue