Improved use if apiPath.
This commit is contained in:
parent
e60198b927
commit
56c26cb413
49 changed files with 62 additions and 59 deletions
|
@ -20,6 +20,9 @@ class App.Controller extends Spine.Controller
|
||||||
@Config = App.Config
|
@Config = App.Config
|
||||||
@Session = App.Session
|
@Session = App.Session
|
||||||
|
|
||||||
|
# create common accessors
|
||||||
|
@apiPath = @Config.get('api_path')
|
||||||
|
|
||||||
bind: (event, callback) =>
|
bind: (event, callback) =>
|
||||||
App.Event.bind(
|
App.Event.bind(
|
||||||
event
|
event
|
||||||
|
|
|
@ -23,7 +23,7 @@ class App.DashboardActivityStream extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'dashoard_activity_stream'
|
id: 'dashoard_activity_stream'
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/activity_stream'
|
url: @apiPath + '/activity_stream'
|
||||||
data: {
|
data: {
|
||||||
limit: 8
|
limit: 8
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class App.DashboardRecentViewed extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'dashboard_recent_viewed',
|
id: 'dashboard_recent_viewed',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/recent_viewed',
|
url: @apiPath + '/recent_viewed',
|
||||||
data: {
|
data: {
|
||||||
limit: 5,
|
limit: 5,
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class App.DashboardRss extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'dashboard_rss'
|
id: 'dashboard_rss'
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/rss_fetch'
|
url: @apiPath + '/rss_fetch'
|
||||||
data: {
|
data: {
|
||||||
limit: 8
|
limit: 8
|
||||||
url: 'http://www.heise.de/newsticker/heise-atom.xml'
|
url: 'http://www.heise.de/newsticker/heise-atom.xml'
|
||||||
|
|
|
@ -30,7 +30,7 @@ class App.DashboardTicket extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'dashboard_ticket_' + @key,
|
id: 'dashboard_ticket_' + @key,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_overviews',
|
url: @apiPath + '/ticket_overviews',
|
||||||
data: {
|
data: {
|
||||||
view: @view,
|
view: @view,
|
||||||
view_mode: 'd',
|
view_mode: 'd',
|
||||||
|
|
|
@ -37,7 +37,7 @@ class App.ProfileLanguage extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'preferences'
|
id: 'preferences'
|
||||||
type: 'PUT'
|
type: 'PUT'
|
||||||
url: @Config.get('api_path') + '/users/preferences'
|
url: @apiPath + '/users/preferences'
|
||||||
data: JSON.stringify(params)
|
data: JSON.stringify(params)
|
||||||
processData: true
|
processData: true
|
||||||
success: @success
|
success: @success
|
||||||
|
|
|
@ -53,7 +53,7 @@ class App.ProfileLinkedAccounts extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'account'
|
id: 'account'
|
||||||
type: 'DELETE'
|
type: 'DELETE'
|
||||||
url: @Config.get('api_path') + '/users/account'
|
url: @apiPath + '/users/account'
|
||||||
data: JSON.stringify({ provider: provider, uid: uid })
|
data: JSON.stringify({ provider: provider, uid: uid })
|
||||||
processData: true
|
processData: true
|
||||||
success: @success
|
success: @success
|
||||||
|
|
|
@ -38,7 +38,7 @@ class App.ProfilePassword extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'password_reset'
|
id: 'password_reset'
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
url: @Config.get('api_path') + '/users/password_change'
|
url: @apiPath + '/users/password_change'
|
||||||
data: JSON.stringify(params)
|
data: JSON.stringify(params)
|
||||||
processData: true
|
processData: true
|
||||||
success: @success
|
success: @success
|
||||||
|
|
|
@ -105,7 +105,7 @@ class App.TicketCreate extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_create'
|
id: 'ticket_create'
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/ticket_create'
|
url: @apiPath + '/ticket_create'
|
||||||
data:
|
data:
|
||||||
ticket_id: params.ticket_id
|
ticket_id: params.ticket_id
|
||||||
article_id: params.article_id
|
article_id: params.article_id
|
||||||
|
@ -149,7 +149,7 @@ class App.TicketCreate extends App.Controller
|
||||||
|
|
||||||
# generate form
|
# generate form
|
||||||
configure_attributes = [
|
configure_attributes = [
|
||||||
{ name: 'customer_id', display: 'Customer', tag: 'autocompletion', type: 'text', limit: 200, null: false, relation: 'User', class: 'span7', autocapitalize: false, help: 'Select the customer of the Ticket or create one.', link: '<a href="" class="customer_new">»</a>', callback: @localUserInfo, source: @Config.get('api_path') + '/users/search', minLengt: 2 },
|
{ name: 'customer_id', display: 'Customer', tag: 'autocompletion', type: 'text', limit: 200, null: false, relation: 'User', class: 'span7', autocapitalize: false, help: 'Select the customer of the Ticket or create one.', link: '<a href="" class="customer_new">»</a>', callback: @localUserInfo, source: @apiPath + '/users/search', minLengt: 2 },
|
||||||
{ name: 'group_id', display: 'Group', tag: 'select', multiple: false, null: false, filter: @edit_form, nulloption: true, relation: 'Group', default: defaults['group_id'], class: 'span7', },
|
{ name: 'group_id', display: 'Group', tag: 'select', multiple: false, null: false, filter: @edit_form, nulloption: true, relation: 'Group', default: defaults['group_id'], class: 'span7', },
|
||||||
{ name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, null: true, filter: @edit_form, nulloption: true, relation: 'User', default: defaults['owner_id'], class: 'span7', },
|
{ name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, null: true, filter: @edit_form, nulloption: true, relation: 'User', default: defaults['owner_id'], class: 'span7', },
|
||||||
{ name: 'tags', display: 'Tags', tag: 'tag', type: 'text', null: true, default: defaults['tags'], class: 'span7', },
|
{ name: 'tags', display: 'Tags', tag: 'tag', type: 'text', null: true, default: defaults['tags'], class: 'span7', },
|
||||||
|
|
|
@ -13,7 +13,7 @@ class App.TicketHistory extends App.ControllerModal
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_history',
|
id: 'ticket_history',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_history/' + ticket_id,
|
url: @apiPath + '/ticket_history/' + ticket_id,
|
||||||
success: (data, status, xhr) =>
|
success: (data, status, xhr) =>
|
||||||
# remember ticket
|
# remember ticket
|
||||||
@ticket = data.ticket
|
@ticket = data.ticket
|
||||||
|
|
|
@ -9,7 +9,7 @@ class App.TicketMerge extends App.ControllerModal
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_merge_list',
|
id: 'ticket_merge_list',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_merge_list/' + @ticket_id,
|
url: @apiPath + '/ticket_merge_list/' + @ticket_id,
|
||||||
data: {
|
data: {
|
||||||
# view: @view
|
# view: @view
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class App.TicketMerge extends App.ControllerModal
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_merge',
|
id: 'ticket_merge',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_merge/' + @ticket_id + '/' + params['master_ticket_number'],
|
url: @apiPath + '/ticket_merge/' + @ticket_id + '/' + params['master_ticket_number'],
|
||||||
data: {
|
data: {
|
||||||
# view: @view
|
# view: @view
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_create',
|
id: 'ticket_create',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_create',
|
url: @apiPath + '/ticket_create',
|
||||||
data: {
|
data: {
|
||||||
ticket_id: params.ticket_id,
|
ticket_id: params.ticket_id,
|
||||||
article_id: params.article_id,
|
article_id: params.article_id,
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'getting_started',
|
id: 'getting_started',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/getting_started',
|
url: @apiPath + '/getting_started',
|
||||||
data: {
|
data: {
|
||||||
# view: @view,
|
# view: @view,
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class App.LinkInfo extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'links_' + @object.id + '_' + @object_type,
|
id: 'links_' + @object.id + '_' + @object_type,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/links',
|
url: @apiPath + '/links',
|
||||||
data: {
|
data: {
|
||||||
link_object: @object_type,
|
link_object: @object_type,
|
||||||
link_object_value: @object.id,
|
link_object_value: @object.id,
|
||||||
|
@ -83,7 +83,7 @@ class App.LinkInfo extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'links_remove_' + @object.id + '_' + @object_type,
|
id: 'links_remove_' + @object.id + '_' + @object_type,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/links/remove',
|
url: @apiPath + '/links/remove',
|
||||||
data: {
|
data: {
|
||||||
link_type: link_type,
|
link_type: link_type,
|
||||||
link_object_source: link_object_source,
|
link_object_source: link_object_source,
|
||||||
|
@ -126,7 +126,7 @@ class App.LinkAdd extends App.ControllerModal
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'links_add_' + @object.id + '_' + @object_type,
|
id: 'links_add_' + @object.id + '_' + @object_type,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/links/add',
|
url: @apiPath + '/links/add',
|
||||||
data: {
|
data: {
|
||||||
link_type: params['link_type'],
|
link_type: params['link_type'],
|
||||||
link_object_target: 'Ticket',
|
link_object_target: 'Ticket',
|
||||||
|
|
|
@ -86,7 +86,7 @@ class App.Navigation extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_search'
|
id: 'ticket_search'
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/search'
|
url: @apiPath + '/search'
|
||||||
data:
|
data:
|
||||||
term: @term
|
term: @term
|
||||||
processData: true,
|
processData: true,
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'packages',
|
id: 'packages',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/packages',
|
url: @apiPath + '/packages',
|
||||||
processData: true,
|
processData: true,
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@render(data)
|
@render(data)
|
||||||
|
@ -50,7 +50,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'packages',
|
id: 'packages',
|
||||||
type: httpType,
|
type: httpType,
|
||||||
url: 'api/packages',
|
url: @apiPath + '/packages',
|
||||||
data: JSON.stringify( { id: id } ),
|
data: JSON.stringify( { id: id } ),
|
||||||
processData: false,
|
processData: false,
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'password_reset'
|
id: 'password_reset'
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
url: @Config.get('api_path') + '/users/password_reset'
|
url: @apiPath + '/users/password_reset'
|
||||||
data: JSON.stringify(params)
|
data: JSON.stringify(params)
|
||||||
processData: true
|
processData: true
|
||||||
success: @success
|
success: @success
|
||||||
|
@ -86,7 +86,7 @@ class Verify extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'password_reset_verify'
|
id: 'password_reset_verify'
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
url: @Config.get('api_path') + '/users/password_reset_verify'
|
url: @apiPath + '/users/password_reset_verify'
|
||||||
data: JSON.stringify(params)
|
data: JSON.stringify(params)
|
||||||
processData: true
|
processData: true
|
||||||
success: @render_success
|
success: @render_success
|
||||||
|
@ -122,7 +122,7 @@ class Verify extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'password_reset_verify'
|
id: 'password_reset_verify'
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
url: @Config.get('api_path') + '/users/password_reset_verify'
|
url: @apiPath + '/users/password_reset_verify'
|
||||||
data: JSON.stringify(params)
|
data: JSON.stringify(params)
|
||||||
processData: true
|
processData: true
|
||||||
success: @render_changed_success
|
success: @render_changed_success
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Session extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'sessions'
|
id: 'sessions'
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/sessions'
|
url: @apiPath + '/sessions'
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@render(data)
|
@render(data)
|
||||||
)
|
)
|
||||||
|
@ -45,7 +45,7 @@ class Session extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'sessions/' + sessionId
|
id: 'sessions/' + sessionId
|
||||||
type: 'DELETE'
|
type: 'DELETE'
|
||||||
url: @Config.get('api_path') + '/sessions/' + sessionId
|
url: @apiPath + '/sessions/' + sessionId
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@load()
|
@load()
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,7 +12,7 @@ class App.TagWidget extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: @attribute_id
|
id: @attribute_id
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/tags'
|
url: @apiPath + '/tags'
|
||||||
data:
|
data:
|
||||||
object: @object_type
|
object: @object_type
|
||||||
o_id: @object.id
|
o_id: @object.id
|
||||||
|
@ -42,7 +42,7 @@ class App.TagWidget extends App.Controller
|
||||||
onAddTag: (item) =>
|
onAddTag: (item) =>
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/tags/add',
|
url: @apiPath + '/tags/add',
|
||||||
data:
|
data:
|
||||||
object: @object_type,
|
object: @object_type,
|
||||||
o_id: @object.id,
|
o_id: @object.id,
|
||||||
|
@ -55,7 +55,7 @@ class App.TagWidget extends App.Controller
|
||||||
onRemoveTag: (item) =>
|
onRemoveTag: (item) =>
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/tags/remove'
|
url: @apiPath + '/tags/remove'
|
||||||
data:
|
data:
|
||||||
object: @object_type
|
object: @object_type
|
||||||
o_id: @object.id
|
o_id: @object.id
|
||||||
|
|
|
@ -5,7 +5,7 @@ class App.TicketCustomer extends App.ControllerModal
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
configure_attributes = [
|
configure_attributes = [
|
||||||
{ name: 'customer_id', display: 'Customer', tag: 'autocompletion', type: 'text', limit: 100, null: false, relation: 'User', class: 'span5', autocapitalize: false, help: 'Select the new customer of the Ticket.', source: @Config.get('api_path') + '/users/search', minLengt: 2 },
|
{ name: 'customer_id', display: 'Customer', tag: 'autocompletion', type: 'text', limit: 100, null: false, relation: 'User', class: 'span5', autocapitalize: false, help: 'Select the new customer of the Ticket.', source: @apiPath + '/users/search', minLengt: 2 },
|
||||||
]
|
]
|
||||||
|
|
||||||
@html App.view('agent_ticket_customer')()
|
@html App.view('agent_ticket_customer')()
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Index extends App.ControllerContent
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_overview_' + @key,
|
id: 'ticket_overview_' + @key,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: @Config.get('api_path') + '/ticket_overviews',
|
url: @apiPath + '/ticket_overviews',
|
||||||
data: {
|
data: {
|
||||||
view: @view,
|
view: @view,
|
||||||
view_mode: @view_mode,
|
view_mode: @view_mode,
|
||||||
|
@ -502,7 +502,7 @@ class Router extends App.Controller
|
||||||
else
|
else
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/ticket_overviews'
|
url: @apiPath + '/ticket_overviews'
|
||||||
data:
|
data:
|
||||||
view: @view
|
view: @view
|
||||||
array: true
|
array: true
|
||||||
|
|
|
@ -67,7 +67,7 @@ class App.TicketZoom extends App.Controller
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
id: 'ticket_zoom_' + ticket_id
|
id: 'ticket_zoom_' + ticket_id
|
||||||
type: 'GET'
|
type: 'GET'
|
||||||
url: @Config.get('api_path') + '/ticket_full/' + ticket_id + '?do_not_log=' + @doNotLog
|
url: @apiPath + '/ticket_full/' + ticket_id + '?do_not_log=' + @doNotLog
|
||||||
data:
|
data:
|
||||||
view: @view
|
view: @view
|
||||||
processData: true
|
processData: true
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class App.Model extends Spine.Model
|
class App.Model extends Spine.Model
|
||||||
@destroyBind: false
|
@destroyBind: false
|
||||||
@api_path: App.Config.get('api_path')
|
@apiPath: App.Config.get('api_path')
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.Channel extends App.Model
|
class App.Channel extends App.Model
|
||||||
@configure 'Channel', 'adapter', 'area', 'options', 'group_id', 'active', 'updated_at'
|
@configure 'Channel', 'adapter', 'area', 'options', 'group_id', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/channels'
|
@url: @apiPath + '/channels'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.EmailAddress extends App.Model
|
class App.EmailAddress extends App.Model
|
||||||
@configure 'EmailAddress', 'realname', 'email', 'note', 'active', 'updated_at'
|
@configure 'EmailAddress', 'realname', 'email', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/email_addresses'
|
@url: @apiPath + '/email_addresses'
|
||||||
|
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'realname', display: 'Realname', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
|
{ name: 'realname', display: 'Realname', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Group extends App.Model
|
class App.Group extends App.Model
|
||||||
@configure 'Group', 'name', 'assignment_timeout', 'follow_up_possible', 'follow_up_assignment', 'email_address_id', 'signature_id', 'note', 'active', 'updated_at'
|
@configure 'Group', 'name', 'assignment_timeout', 'follow_up_possible', 'follow_up_assignment', 'email_address_id', 'signature_id', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/groups'
|
@url: @apiPath + '/groups'
|
||||||
|
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.History extends App.Model
|
class App.History extends App.Model
|
||||||
@configure 'History', 'name'
|
@configure 'History', 'name'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/histories'
|
@url: @apiPath + '/histories'
|
||||||
|
|
||||||
@_fillUp: (data) ->
|
@_fillUp: (data) ->
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.HistoryAttribute extends App.Model
|
class App.HistoryAttribute extends App.Model
|
||||||
@configure 'HistoryAttribute', 'name'
|
@configure 'HistoryAttribute', 'name'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/history_attributes'
|
@url: @apiPath + '/history_attributes'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.HistoryObject extends App.Model
|
class App.HistoryObject extends App.Model
|
||||||
@configure 'HistoryObject', 'name'
|
@configure 'HistoryObject', 'name'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/history_objects'
|
@url: @apiPath + '/history_objects'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.HistoryType extends App.Model
|
class App.HistoryType extends App.Model
|
||||||
@configure 'HistoryType', 'name'
|
@configure 'HistoryType', 'name'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/history_types'
|
@url: @apiPath + '/history_types'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Organization extends App.Model
|
class App.Organization extends App.Model
|
||||||
@configure 'Organization', 'name', 'shared', 'note', 'active', 'updated_at'
|
@configure 'Organization', 'name', 'shared', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/organizations'
|
@url: @apiPath + '/organizations'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
{ name: 'shared', display: 'Shared organiztion', tag: 'boolean', note: 'Customers in the organiztion can view each other items.', type: 'boolean', 'default': true, 'null': false, 'class': 'span4' },
|
{ name: 'shared', display: 'Shared organiztion', tag: 'boolean', note: 'Customers in the organiztion can view each other items.', type: 'boolean', 'default': true, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Overview extends Spine.Model
|
class App.Overview extends Spine.Model
|
||||||
@configure 'Overview', 'name', 'link', 'prio', 'condition', 'order', 'group_by', 'view', 'user_id', 'organization_shared', 'role_id', 'order', 'group_by', 'active', 'updated_at'
|
@configure 'Overview', 'name', 'link', 'prio', 'condition', 'order', 'group_by', 'view', 'user_id', 'organization_shared', 'role_id', 'order', 'group_by', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/overviews'
|
@url: @apiPath + '/overviews'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
{ name: 'link', display: 'URL', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'link', display: 'URL', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.PostmasterFilter extends App.Model
|
class App.PostmasterFilter extends App.Model
|
||||||
@configure 'PostmasterFilter', 'name', 'channel', 'match', 'perform', 'note', 'active', 'updated_at'
|
@configure 'PostmasterFilter', 'name', 'channel', 'match', 'perform', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/postmaster_filters'
|
@url: @apiPath + '/postmaster_filters'
|
||||||
|
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Role extends App.Model
|
class App.Role extends App.Model
|
||||||
@configure 'Role', 'name', 'note', 'active', 'updated_at'
|
@configure 'Role', 'name', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/roles'
|
@url: @apiPath + '/roles'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true, 'class': 'span4' },
|
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true, 'class': 'span4' },
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.Setting extends App.Model
|
class App.Setting extends App.Model
|
||||||
@configure 'Setting', 'name', 'state'
|
@configure 'Setting', 'name', 'state'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/settings'
|
@url: @apiPath + '/settings'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Signature extends App.Model
|
class App.Signature extends App.Model
|
||||||
@configure 'Signature', 'name', 'body', 'note', 'active', 'updated_at'
|
@configure 'Signature', 'name', 'body', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/signatures'
|
@url: @apiPath + '/signatures'
|
||||||
|
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Sla extends App.Model
|
class App.Sla extends App.Model
|
||||||
@configure 'Sla', 'name', 'first_response_time', 'update_time', 'close_time', 'condition', 'timezone', 'data', 'active', 'updated_at'
|
@configure 'Sla', 'name', 'first_response_time', 'update_time', 'close_time', 'condition', 'timezone', 'data', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/slas'
|
@url: @apiPath + '/slas'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, 'class': 'span4' },
|
||||||
{ name: 'first_response_time', display: 'First Response Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
|
{ name: 'first_response_time', display: 'First Response Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
|
||||||
|
|
|
@ -2,4 +2,4 @@ class App.Taskbar extends App.Model
|
||||||
@configure 'Taskbar', 'key', 'client_id', 'callback', 'state', 'params', 'prio', 'notify', 'active', 'updated_at'
|
@configure 'Taskbar', 'key', 'client_id', 'callback', 'state', 'params', 'prio', 'notify', 'active', 'updated_at'
|
||||||
# @extend Spine.Model.Local
|
# @extend Spine.Model.Local
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/taskbar'
|
@url: @apiPath + '/taskbar'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.Template extends App.Model
|
class App.Template extends App.Model
|
||||||
@configure 'Template', 'name', 'options', 'group_ids', 'user_id', 'updated_at'
|
@configure 'Template', 'name', 'options', 'group_ids', 'user_id', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/templates'
|
@url: @apiPath + '/templates'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.TextModule extends App.Model
|
class App.TextModule extends App.Model
|
||||||
@configure 'TextModule', 'name', 'keywords', 'content', 'active', 'group_ids', 'user_id', 'updated_at'
|
@configure 'TextModule', 'name', 'keywords', 'content', 'active', 'group_ids', 'user_id', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/text_modules'
|
@url: @apiPath + '/text_modules'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||||
{ name: 'keywords', display: 'Keywords', tag: 'input', type: 'text', limit: 100, 'null': true, 'class': 'span4' },
|
{ name: 'keywords', display: 'Keywords', tag: 'input', type: 'text', limit: 100, 'null': true, 'class': 'span4' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.Ticket extends App.Model
|
class App.Ticket extends App.Model
|
||||||
@configure 'Ticket', 'number', 'title', 'group_id', 'owner_id', 'customer_id', 'ticket_state_id', 'ticket_priority_id', 'article', 'tags', 'updated_at'
|
@configure 'Ticket', 'number', 'title', 'group_id', 'owner_id', 'customer_id', 'ticket_state_id', 'ticket_priority_id', 'article', 'tags', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/tickets'
|
@url: @apiPath + '/tickets'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'number', display: '#', tag: 'input', type: 'text', limit: 100, null: true, read_only: true, style: 'width: 8%' },
|
{ name: 'number', display: '#', tag: 'input', type: 'text', limit: 100, null: true, read_only: true, style: 'width: 8%' },
|
||||||
{ name: 'customer_id', display: 'Customer', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', autocapitalize: false, help: 'Select the customer of the Ticket or create one.', link: '<a href="" class="customer_new">»</a>' },
|
{ name: 'customer_id', display: 'Customer', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', autocapitalize: false, help: 'Select the customer of the Ticket or create one.', link: '<a href="" class="customer_new">»</a>' },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class App.TicketArticle extends App.Model
|
class App.TicketArticle extends App.Model
|
||||||
@configure 'TicketArticle', 'from', 'to', 'cc', 'subject', 'body', 'ticket_id', 'ticket_article_type_id', 'ticket_article_sender_id', 'internal', 'in_reply_to', 'form_id', 'updated_at'
|
@configure 'TicketArticle', 'from', 'to', 'cc', 'subject', 'body', 'ticket_id', 'ticket_article_type_id', 'ticket_article_sender_id', 'internal', 'in_reply_to', 'form_id', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_articles'
|
@url: @apiPath + '/ticket_articles'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
{ name: 'ticket_id', display: 'TicketID', null: false, readonly: 1, },
|
{ name: 'ticket_id', display: 'TicketID', null: false, readonly: 1, },
|
||||||
{ name: 'from', display: 'From', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', },
|
{ name: 'from', display: 'From', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', },
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.TicketArticleSender extends App.Model
|
class App.TicketArticleSender extends App.Model
|
||||||
@configure 'TicketArticleSender', 'name', 'updated_at'
|
@configure 'TicketArticleSender', 'name', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_article_senders'
|
@url: @apiPath + '/ticket_article_senders'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.TicketArticleType extends App.Model
|
class App.TicketArticleType extends App.Model
|
||||||
@configure 'TicketArticleType', 'name', 'updated_at'
|
@configure 'TicketArticleType', 'name', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_article_types'
|
@url: @apiPath + '/ticket_article_types'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.TicketPriority extends App.Model
|
class App.TicketPriority extends App.Model
|
||||||
@configure 'TicketPriority', 'name', 'note', 'active', 'updated_at'
|
@configure 'TicketPriority', 'name', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_priorities'
|
@url: @apiPath + '/ticket_priorities'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.TicketState extends App.Model
|
class App.TicketState extends App.Model
|
||||||
@configure 'TicketState', 'name', 'note', 'active'
|
@configure 'TicketState', 'name', 'note', 'active'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_states'
|
@url: @apiPath + '/ticket_states'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.TicketStateType extends App.Model
|
class App.TicketStateType extends App.Model
|
||||||
@configure 'TicketStateType', 'name', 'note', 'active', 'updated_at'
|
@configure 'TicketStateType', 'name', 'note', 'active', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/ticket_state_types'
|
@url: @apiPath + '/ticket_state_types'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class App.Translation extends App.Model
|
class App.Translation extends App.Model
|
||||||
@configure 'Translation', 'source', 'target', 'locale'
|
@configure 'Translation', 'source', 'target', 'locale'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/translations'
|
@url: @apiPath + '/translations'
|
|
@ -1,7 +1,7 @@
|
||||||
class App.User extends App.Model
|
class App.User extends App.Model
|
||||||
@configure 'User', 'login', 'firstname', 'lastname', 'email', 'web', 'password', 'phone', 'fax', 'mobile', 'street', 'zip', 'city', 'country', 'organization_id', 'department', 'note', 'role_ids', 'group_ids', 'active', 'invite', 'updated_at'
|
@configure 'User', 'login', 'firstname', 'lastname', 'email', 'web', 'password', 'phone', 'fax', 'mobile', 'street', 'zip', 'city', 'country', 'organization_id', 'department', 'note', 'role_ids', 'group_ids', 'active', 'invite', 'updated_at'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @api_path + '/users'
|
@url: @apiPath + '/users'
|
||||||
|
|
||||||
# @hasMany 'roles', 'App.Role'
|
# @hasMany 'roles', 'App.Role'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
|
|
Loading…
Reference in a new issue