Moved to new namespaces.
This commit is contained in:
parent
e6a0380fa8
commit
a5a3a8070b
11 changed files with 85 additions and 63 deletions
|
@ -37,7 +37,7 @@ class App.TicketCustomer extends App.ControllerModal
|
||||||
@modalHide()
|
@modalHide()
|
||||||
|
|
||||||
# reload zoom view
|
# reload zoom view
|
||||||
@zoom.render()
|
@ui.render()
|
||||||
|
|
||||||
# load user if not already exists
|
# load user if not already exists
|
||||||
App.User.retrieve( params['customer_id'], callback )
|
App.User.retrieve( params['customer_id'], callback )
|
||||||
|
|
|
@ -525,6 +525,17 @@ class Navbar extends App.Controller
|
||||||
else
|
else
|
||||||
@render( [] )
|
@render( [] )
|
||||||
|
|
||||||
|
# init fetch via ajax, all other updates on time via websockets
|
||||||
|
@ajax(
|
||||||
|
id: 'ticket_overviews',
|
||||||
|
type: 'GET',
|
||||||
|
url: @apiPath + '/ticket_overviews',
|
||||||
|
processData: true,
|
||||||
|
success: (data) =>
|
||||||
|
App.Store.write( 'navupdate_ticket_overview', data )
|
||||||
|
@render(data)
|
||||||
|
)
|
||||||
|
|
||||||
render: (dataOrig) ->
|
render: (dataOrig) ->
|
||||||
|
|
||||||
data = _.clone(dataOrig)
|
data = _.clone(dataOrig)
|
||||||
|
|
|
@ -140,6 +140,7 @@ class App.TicketZoom extends App.Controller
|
||||||
@frontendTimeUpdate()
|
@frontendTimeUpdate()
|
||||||
|
|
||||||
@TicketTitle()
|
@TicketTitle()
|
||||||
|
@TicketWidgets()
|
||||||
@TicketAction()
|
@TicketAction()
|
||||||
@ArticleView()
|
@ArticleView()
|
||||||
|
|
||||||
|
@ -195,15 +196,24 @@ class App.TicketZoom extends App.Controller
|
||||||
ui: @
|
ui: @
|
||||||
)
|
)
|
||||||
|
|
||||||
TicketAction: =>
|
TicketWidgets: =>
|
||||||
# show ticket action row
|
# show ticket action row
|
||||||
new TicketAction(
|
new TicketWidgets(
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
task_key: @task_key
|
task_key: @task_key
|
||||||
el: @el.find('.ticket-action')
|
el: @el.find('.ticket-widgets')
|
||||||
ui: @
|
ui: @
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TicketAction: =>
|
||||||
|
# start action controller
|
||||||
|
if !@isRole('Customer')
|
||||||
|
new TicketActionRow(
|
||||||
|
el: @el.find('.ticket-action')
|
||||||
|
ticket: @ticket
|
||||||
|
ui: @
|
||||||
|
)
|
||||||
|
|
||||||
class TicketTitle extends App.Controller
|
class TicketTitle extends App.Controller
|
||||||
events:
|
events:
|
||||||
'blur .ticket-title-update': 'update'
|
'blur .ticket-title-update': 'update'
|
||||||
|
@ -213,7 +223,7 @@ class TicketTitle extends App.Controller
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
@html App.view('ticket_zoom/ticket_title')(
|
@html App.view('ticket_zoom/title')(
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -247,7 +257,7 @@ class TicketInfo extends App.ControllerDrox
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
@html @template(
|
@html @template(
|
||||||
file: 'ticket_zoom/ticket_info'
|
file: 'ticket_zoom/info'
|
||||||
header: '#' + @ticket.number
|
header: '#' + @ticket.number
|
||||||
params:
|
params:
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
|
@ -261,14 +271,14 @@ class TicketInfo extends App.ControllerDrox
|
||||||
object: @ticket
|
object: @ticket
|
||||||
)
|
)
|
||||||
|
|
||||||
class TicketAction extends App.Controller
|
class TicketWidgets extends App.Controller
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
|
|
||||||
@html App.view('ticket_zoom/ticket_action')()
|
@html App.view('ticket_zoom/widgets')()
|
||||||
|
|
||||||
# show ticket info
|
# show ticket info
|
||||||
new TicketInfo(
|
new TicketInfo(
|
||||||
|
@ -284,15 +294,6 @@ class TicketAction extends App.Controller
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
)
|
)
|
||||||
|
|
||||||
# start action controller
|
|
||||||
###
|
|
||||||
if !@isRole('Customer')
|
|
||||||
new TicketActionRow(
|
|
||||||
el: @el.find('.action_info')
|
|
||||||
ticket: @ticket
|
|
||||||
zoom: @ui
|
|
||||||
)
|
|
||||||
###
|
|
||||||
# start link info controller
|
# start link info controller
|
||||||
if !@isRole('Customer')
|
if !@isRole('Customer')
|
||||||
new App.LinkInfo(
|
new App.LinkInfo(
|
||||||
|
@ -301,8 +302,6 @@ class TicketAction extends App.Controller
|
||||||
object: @ticket
|
object: @ticket
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Edit extends App.Controller
|
class Edit extends App.Controller
|
||||||
events:
|
events:
|
||||||
'click .submit': 'update'
|
'click .submit': 'update'
|
||||||
|
@ -789,7 +788,7 @@ class TicketActionRow extends App.Controller
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
@html App.view('ticket_action')()
|
@html App.view('ticket_zoom/actions')()
|
||||||
|
|
||||||
history_dialog: (e) ->
|
history_dialog: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
@ -797,11 +796,11 @@ class TicketActionRow extends App.Controller
|
||||||
|
|
||||||
merge_dialog: (e) ->
|
merge_dialog: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
new App.TicketMerge( ticket_id: @ticket.id, task_key: @zoom.task_key )
|
new App.TicketMerge( ticket_id: @ticket.id, task_key: @ui.task_key )
|
||||||
|
|
||||||
customer_dialog: (e) ->
|
customer_dialog: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
new App.TicketCustomer( ticket_id: @ticket.id, zoom: @zoom )
|
new App.TicketCustomer( ticket_id: @ticket.id, ui: @ui )
|
||||||
|
|
||||||
class TicketZoomRouter extends App.ControllerPermanent
|
class TicketZoomRouter extends App.ControllerPermanent
|
||||||
constructor: (params) ->
|
constructor: (params) ->
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="content-one">
|
<div class="content-one ticket-create">
|
||||||
<div class="page-header clearfix">
|
<div class="page-header clearfix">
|
||||||
<div class="page-header-title">
|
<div class="page-header-title">
|
||||||
<h1 class="pull-left"><%- @T( 'New Ticket' ) %></h1>
|
<h1 class="pull-left"><%- @T( 'New Ticket' ) %></h1>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="content-two">
|
<div class="content-two">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="ticket-action panel-group"></div>
|
<div class="ticket-widgets"></div>
|
||||||
|
<div class="ticket-action"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<br>
|
<div class="btn-group dropup">
|
||||||
<div class="btn-group">
|
|
||||||
<button type="button" class="btn btn-default dropdown-toggle action" data-toggle="dropdown"><%- @T('Action') %> <span class="caret"></span>
|
<button type="button" class="btn btn-default dropdown-toggle action" data-toggle="dropdown"><%- @T('Action') %> <span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
@ -7,15 +6,4 @@
|
||||||
<li><a href="#" data-type="merge"><%- @T( 'Merge' ) %></a></li>
|
<li><a href="#" data-type="merge"><%- @T( 'Merge' ) %></a></li>
|
||||||
<li><a href="#" data-type="customer"><%- @T( 'Change Customer' ) %></a></li>
|
<li><a href="#" data-type="customer"><%- @T( 'Change Customer' ) %></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
|
||||||
<!--
|
|
||||||
<div class="">
|
|
||||||
<h3><%- @T( 'Actions' ) %></h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#" data-type="history"><%- @T( 'History' ) %></a></li>
|
|
||||||
<li><a href="#" data-type="merge"><%- @T( 'Merge' ) %></a></li>
|
|
||||||
<li><a href="#" data-type="customer"><%- @T( 'Change Customer' ) %></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
-->
|
|
|
@ -1,23 +1,21 @@
|
||||||
<div class="">
|
<div class="article clearfix">
|
||||||
<!--
|
<div class="avatar thumbnails">
|
||||||
<div class="avatar thumbnails">
|
<img class="thumbnail user-data" data-id="<%= @S('id') %>" src="<%- @S('image') %>" alt="">
|
||||||
<img class="thumbnail user-data" data-id="<%= @S('id') %>" src="<%- @S('image') %>" alt="">
|
</div>
|
||||||
</div>
|
<div class="well edit-ticket article-message <% if @formChanged: %>form-changed<% end %>">
|
||||||
-->
|
<div class="edit-title article-content">
|
||||||
<div class="well edit-ticket <% if @formChanged: %>form-changed<% end %>">
|
<h4><%- @T('Edit') %>
|
||||||
<div class="edit-title">
|
<small class="reset-message<% if !@formChanged: %> hide<% end %>">
|
||||||
<h4><%- @T('Edit') %>
|
<a href="#" data-type="reset"><%- @T('Discard your unsaved changes.') %></a> <href="#" class="glyphicon glyphicon-repeat" data-type="reset"></a>
|
||||||
<small class="reset-message<% if !@formChanged: %> hide<% end %>">
|
</small>
|
||||||
<a href="#" data-type="reset"><%- @T('Discard your unsaved changes.') %></a> <href="#" class="glyphicon glyphicon-repeat" data-type="reset"></a>
|
</h4>
|
||||||
</small>
|
</div>
|
||||||
</h4>
|
<div class="edit-content">
|
||||||
|
<form class="form-stacked ticket-update">
|
||||||
|
<div class="form-ticket-update"></div>
|
||||||
|
<div class="form-article-update"></div>
|
||||||
|
<button type="submit" class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||||
|
</form>
|
||||||
|
<div>
|
||||||
</div>
|
</div>
|
||||||
<div class="edit-content">
|
|
||||||
<form class="form-stacked ticket-update">
|
|
||||||
<div class="form-ticket-update"></div>
|
|
||||||
<div class="form-article-update"></div>
|
|
||||||
<button type="submit" class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
|
||||||
</form>
|
|
||||||
<div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<div class="ticket_info"></div>
|
<div class="ticket_info"></div>
|
||||||
<div class="customer_info"></div>
|
<div class="customer_info"></div>
|
||||||
<div class="action_info"></div>
|
|
||||||
<div class="link_info"></div>
|
<div class="link_info"></div>
|
|
@ -602,7 +602,8 @@ form.form-inline input[type="password"] {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.edit-content {
|
.edit-content {
|
||||||
margin-top: 20px;
|
margin-left: 68px;
|
||||||
|
margin-right: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete {
|
.delete {
|
||||||
|
@ -660,7 +661,32 @@ footer {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ticket-action {
|
.ticket-action {
|
||||||
padding-left: 2px;
|
padding: 6px 8px 6px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
left: 0px;
|
||||||
|
border-top: 1px solid #eeeeee;
|
||||||
|
width: 200px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
.ticket-action {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.ticket-action {
|
||||||
|
width: 260px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.ticket-action {
|
||||||
|
width: 280px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ticket-answer .avatar {
|
.ticket-answer .avatar {
|
||||||
|
@ -677,7 +703,7 @@ footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.ticket-update .span2 {
|
.ticket-update .span2 {
|
||||||
width: 160px;
|
width: 152px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
.ticket-update .medium {
|
.ticket-update .medium {
|
||||||
|
|
Loading…
Reference in a new issue