QA on maintenance message.
This commit is contained in:
parent
69fec9e219
commit
70ceaf455f
3 changed files with 17 additions and 22 deletions
|
@ -4,7 +4,6 @@ class App.Maintenance extends App.ControllerContent
|
|||
|
||||
constructor: ->
|
||||
super
|
||||
# render page
|
||||
@render()
|
||||
|
||||
render: ->
|
||||
|
@ -18,11 +17,9 @@ class App.Maintenance extends App.ControllerContent
|
|||
action: 'broadcast'
|
||||
event: 'session:maintenance'
|
||||
spool: false
|
||||
data:
|
||||
title: params.HeaderText
|
||||
message: params.Message
|
||||
data: params
|
||||
)
|
||||
|
||||
@render()
|
||||
|
||||
App.Config.set( 'maintenance', App.Maintenance, 'Routes' )
|
||||
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
|
||||
App.Event.bind 'session:maintenance', (data) =>
|
||||
console.log('hannes was here')
|
||||
new Message(data)
|
||||
|
||||
new Message( message: data )
|
||||
|
||||
class Message extends App.ControllerModal
|
||||
constructor: ->
|
||||
super
|
||||
@render()
|
||||
@render(@message)
|
||||
|
||||
render: ->
|
||||
render: (message = {}) ->
|
||||
@html App.view('modal')(
|
||||
title: @title,
|
||||
message: @message
|
||||
detail: @detail
|
||||
close: @close
|
||||
title: message.title,
|
||||
message: message.message
|
||||
detail: message.detail
|
||||
close: message.close
|
||||
)
|
||||
@modalShow(
|
||||
backdrop: true,
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="page-header">
|
||||
<h1>Maintenance Message<small></small></h1>
|
||||
<h1><%- @T('Maintenance Message') %><small></small></h1>
|
||||
</div>
|
||||
<form class="form-horizontal" id="maintenanceForm">
|
||||
<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">
|
||||
<input type="text" id="HeaderText" name="HeaderText" placeholder="Header Text">
|
||||
<input type="text" name="title" class="span7" placeholder="<%- @Ti('Title') %>" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="Message">Message</label>
|
||||
<label class="control-label" for="message"><%- @T('Message') %></label>
|
||||
<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 class="control-group">
|
||||
<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>
|
||||
</form>
|
Loading…
Reference in a new issue