Imptoved URIs.
This commit is contained in:
parent
a6f2b4d63c
commit
014d761bf8
1 changed files with 14 additions and 14 deletions
|
@ -42,11 +42,11 @@ class App.TicketCreate extends App.Controller
|
||||||
|
|
||||||
# if no map entry exists, route to default
|
# if no map entry exists, route to default
|
||||||
if !@article_attributes
|
if !@article_attributes
|
||||||
@navigate '#ticket_create/' + default_type + split
|
@navigate '#ticket/create/' + default_type + split
|
||||||
return
|
return
|
||||||
|
|
||||||
# update navbar highlighting
|
# update navbar highlighting
|
||||||
@navupdate '#ticket_create/' + @type + '/id/' + @id + split
|
@navupdate '#ticket/create/' + @type + '/id/' + @id + split
|
||||||
|
|
||||||
@fetch(params)
|
@fetch(params)
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class App.TicketCreate extends App.Controller
|
||||||
id: @type
|
id: @type
|
||||||
|
|
||||||
url: =>
|
url: =>
|
||||||
'#ticket_create/' + @type + '/id/' + @id
|
'#ticket/create/' + @type + '/id/' + @id
|
||||||
|
|
||||||
activate: =>
|
activate: =>
|
||||||
@navupdate '#'
|
@navupdate '#'
|
||||||
|
@ -381,7 +381,7 @@ class UserNew extends App.ControllerModal
|
||||||
ui.modalHide()
|
ui.modalHide()
|
||||||
)
|
)
|
||||||
|
|
||||||
class TicketCreateRouter extends App.ControllerPermanent
|
class Router extends App.ControllerPermanent
|
||||||
constructor: (params) ->
|
constructor: (params) ->
|
||||||
super
|
super
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ class TicketCreateRouter extends App.ControllerPermanent
|
||||||
split = "/#{params['ticket_id']}/#{params['article_id']}"
|
split = "/#{params['ticket_id']}/#{params['article_id']}"
|
||||||
|
|
||||||
id = Math.floor( Math.random() * 99999 )
|
id = Math.floor( Math.random() * 99999 )
|
||||||
@navigate "#ticket_create/#{params['type']}/id/#{id}#{split}"
|
@navigate "#ticket/create/#{params['type']}/id/#{id}#{split}"
|
||||||
return
|
return
|
||||||
|
|
||||||
# cleanup params
|
# cleanup params
|
||||||
|
@ -405,18 +405,18 @@ class TicketCreateRouter extends App.ControllerPermanent
|
||||||
|
|
||||||
App.TaskManager.add( 'TicketCreateScreen-' + params['type'] + '-' + params['id'], 'TicketCreate', clean_params )
|
App.TaskManager.add( 'TicketCreateScreen-' + params['type'] + '-' + params['id'], 'TicketCreate', clean_params )
|
||||||
|
|
||||||
# create new ticket routs/controller
|
# create new ticket routes/controller
|
||||||
App.Config.set( 'ticket_create', TicketCreateRouter, 'Routes' )
|
App.Config.set( 'ticket/create', Router, 'Routes' )
|
||||||
App.Config.set( 'ticket_create/:type', TicketCreateRouter, 'Routes' )
|
App.Config.set( 'ticket/create/:type', Router, 'Routes' )
|
||||||
App.Config.set( 'ticket_create/:type/id/:id', TicketCreateRouter, 'Routes' )
|
App.Config.set( 'ticket/create/:type/id/:id', Router, 'Routes' )
|
||||||
|
|
||||||
|
|
||||||
# split ticket
|
# split ticket
|
||||||
App.Config.set( 'ticket_create/:type/:ticket_id/:article_id', TicketCreateRouter, 'Routes' )
|
App.Config.set( 'ticket/create/:type/:ticket_id/:article_id', Router, 'Routes' )
|
||||||
App.Config.set( 'ticket_create/:type/id/:id/:ticket_id/:article_id', TicketCreateRouter, 'Routes' )
|
App.Config.set( 'ticket/create/:type/id/:id/:ticket_id/:article_id', Router, 'Routes' )
|
||||||
|
|
||||||
# set new task actions
|
# set new task actions
|
||||||
App.Config.set( 'TicketNewCallOutbound', { prio: 8001, name: 'Call Outbound', target: '#ticket_create/call_outbound', role: ['Agent'] }, 'TaskActions' )
|
App.Config.set( 'TicketNewCallOutbound', { prio: 8001, name: 'Call Outbound', target: '#ticket/create/call_outbound', role: ['Agent'] }, 'TaskActions' )
|
||||||
App.Config.set( 'TicketNewCallInbound', { prio: 8002, name: 'Call Inbound', target: '#ticket_create/call_inbound', role: ['Agent'] }, 'TaskActions' )
|
App.Config.set( 'TicketNewCallInbound', { prio: 8002, name: 'Call Inbound', target: '#ticket/create/call_inbound', role: ['Agent'] }, 'TaskActions' )
|
||||||
App.Config.set( 'TicketNewEmail', { prio: 8003, name: 'Email', target: '#ticket_create/email', role: ['Agent'] }, 'TaskActions' )
|
App.Config.set( 'TicketNewEmail', { prio: 8003, name: 'Email', target: '#ticket/create/email', role: ['Agent'] }, 'TaskActions' )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue