diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee
index b34b18418..327f0ead7 100644
--- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee
+++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee
@@ -20,6 +20,9 @@ class App.Controller extends Spine.Controller
@Config = App.Config
@Session = App.Session
+ # create common accessors
+ @apiPath = @Config.get('api_path')
+
bind: (event, callback) =>
App.Event.bind(
event
diff --git a/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee
index 5125b4258..4e47ae52b 100644
--- a/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee
+++ b/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee
@@ -23,7 +23,7 @@ class App.DashboardActivityStream extends App.Controller
App.Com.ajax(
id: 'dashoard_activity_stream'
type: 'GET'
- url: @Config.get('api_path') + '/activity_stream'
+ url: @apiPath + '/activity_stream'
data: {
limit: 8
}
diff --git a/app/assets/javascripts/app/controllers/_dashboard/recent_viewed.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/recent_viewed.js.coffee
index e394503b3..f6106d3bd 100644
--- a/app/assets/javascripts/app/controllers/_dashboard/recent_viewed.js.coffee
+++ b/app/assets/javascripts/app/controllers/_dashboard/recent_viewed.js.coffee
@@ -11,7 +11,7 @@ class App.DashboardRecentViewed extends App.Controller
App.Com.ajax(
id: 'dashboard_recent_viewed',
type: 'GET',
- url: @Config.get('api_path') + '/recent_viewed',
+ url: @apiPath + '/recent_viewed',
data: {
limit: 5,
}
diff --git a/app/assets/javascripts/app/controllers/_dashboard/rss.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/rss.js.coffee
index 0f75ac7a1..da2a71d3d 100644
--- a/app/assets/javascripts/app/controllers/_dashboard/rss.js.coffee
+++ b/app/assets/javascripts/app/controllers/_dashboard/rss.js.coffee
@@ -21,7 +21,7 @@ class App.DashboardRss extends App.Controller
App.Com.ajax(
id: 'dashboard_rss'
type: 'GET'
- url: @Config.get('api_path') + '/rss_fetch'
+ url: @apiPath + '/rss_fetch'
data: {
limit: 8
url: 'http://www.heise.de/newsticker/heise-atom.xml'
diff --git a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee
index 3f56ed71a..cd575d591 100644
--- a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee
+++ b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee
@@ -30,7 +30,7 @@ class App.DashboardTicket extends App.Controller
App.Com.ajax(
id: 'dashboard_ticket_' + @key,
type: 'GET',
- url: @Config.get('api_path') + '/ticket_overviews',
+ url: @apiPath + '/ticket_overviews',
data: {
view: @view,
view_mode: 'd',
diff --git a/app/assets/javascripts/app/controllers/_profile/language.js.coffee b/app/assets/javascripts/app/controllers/_profile/language.js.coffee
index 0349a436a..83dc0c9a6 100644
--- a/app/assets/javascripts/app/controllers/_profile/language.js.coffee
+++ b/app/assets/javascripts/app/controllers/_profile/language.js.coffee
@@ -37,7 +37,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'preferences'
type: 'PUT'
- url: @Config.get('api_path') + '/users/preferences'
+ url: @apiPath + '/users/preferences'
data: JSON.stringify(params)
processData: true
success: @success
diff --git a/app/assets/javascripts/app/controllers/_profile/linked_accounts.js.coffee b/app/assets/javascripts/app/controllers/_profile/linked_accounts.js.coffee
index 046f9abee..9928eddf5 100644
--- a/app/assets/javascripts/app/controllers/_profile/linked_accounts.js.coffee
+++ b/app/assets/javascripts/app/controllers/_profile/linked_accounts.js.coffee
@@ -53,7 +53,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'account'
type: 'DELETE'
- url: @Config.get('api_path') + '/users/account'
+ url: @apiPath + '/users/account'
data: JSON.stringify({ provider: provider, uid: uid })
processData: true
success: @success
diff --git a/app/assets/javascripts/app/controllers/_profile/password.js.coffee b/app/assets/javascripts/app/controllers/_profile/password.js.coffee
index 734615aa5..834cad4ce 100644
--- a/app/assets/javascripts/app/controllers/_profile/password.js.coffee
+++ b/app/assets/javascripts/app/controllers/_profile/password.js.coffee
@@ -38,7 +38,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'password_reset'
type: 'POST'
- url: @Config.get('api_path') + '/users/password_change'
+ url: @apiPath + '/users/password_change'
data: JSON.stringify(params)
processData: true
success: @success
diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
index e45601d13..348c8ee3b 100644
--- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
+++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
@@ -105,7 +105,7 @@ class App.TicketCreate extends App.Controller
App.Com.ajax(
id: 'ticket_create'
type: 'GET'
- url: @Config.get('api_path') + '/ticket_create'
+ url: @apiPath + '/ticket_create'
data:
ticket_id: params.ticket_id
article_id: params.article_id
@@ -149,7 +149,7 @@ class App.TicketCreate extends App.Controller
# generate form
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: '»', 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: '»', 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: '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', },
diff --git a/app/assets/javascripts/app/controllers/agent_ticket_history.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_history.js.coffee
index 275b575fa..0c048a4d0 100644
--- a/app/assets/javascripts/app/controllers/agent_ticket_history.js.coffee
+++ b/app/assets/javascripts/app/controllers/agent_ticket_history.js.coffee
@@ -13,7 +13,7 @@ class App.TicketHistory extends App.ControllerModal
App.Com.ajax(
id: 'ticket_history',
type: 'GET',
- url: @Config.get('api_path') + '/ticket_history/' + ticket_id,
+ url: @apiPath + '/ticket_history/' + ticket_id,
success: (data, status, xhr) =>
# remember ticket
@ticket = data.ticket
diff --git a/app/assets/javascripts/app/controllers/agent_ticket_merge.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_merge.js.coffee
index 313c4237e..4ffb9689d 100644
--- a/app/assets/javascripts/app/controllers/agent_ticket_merge.js.coffee
+++ b/app/assets/javascripts/app/controllers/agent_ticket_merge.js.coffee
@@ -9,7 +9,7 @@ class App.TicketMerge extends App.ControllerModal
App.Com.ajax(
id: 'ticket_merge_list',
type: 'GET',
- url: @Config.get('api_path') + '/ticket_merge_list/' + @ticket_id,
+ url: @apiPath + '/ticket_merge_list/' + @ticket_id,
data: {
# view: @view
}
@@ -107,7 +107,7 @@ class App.TicketMerge extends App.ControllerModal
App.Com.ajax(
id: 'ticket_merge',
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: {
# view: @view
}
diff --git a/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee
index e7d38b1fd..3c37e9b2e 100644
--- a/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee
+++ b/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee
@@ -37,7 +37,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'ticket_create',
type: 'GET',
- url: @Config.get('api_path') + '/ticket_create',
+ url: @apiPath + '/ticket_create',
data: {
ticket_id: params.ticket_id,
article_id: params.article_id,
diff --git a/app/assets/javascripts/app/controllers/getting_started.js.coffee b/app/assets/javascripts/app/controllers/getting_started.js.coffee
index 67c2ff0d0..8422c45be 100644
--- a/app/assets/javascripts/app/controllers/getting_started.js.coffee
+++ b/app/assets/javascripts/app/controllers/getting_started.js.coffee
@@ -21,7 +21,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'getting_started',
type: 'GET',
- url: @Config.get('api_path') + '/getting_started',
+ url: @apiPath + '/getting_started',
data: {
# view: @view,
}
diff --git a/app/assets/javascripts/app/controllers/link_info_widget.js.coffee b/app/assets/javascripts/app/controllers/link_info_widget.js.coffee
index 7a2c74f08..01c803cae 100644
--- a/app/assets/javascripts/app/controllers/link_info_widget.js.coffee
+++ b/app/assets/javascripts/app/controllers/link_info_widget.js.coffee
@@ -14,7 +14,7 @@ class App.LinkInfo extends App.Controller
App.Com.ajax(
id: 'links_' + @object.id + '_' + @object_type,
type: 'GET',
- url: @Config.get('api_path') + '/links',
+ url: @apiPath + '/links',
data: {
link_object: @object_type,
link_object_value: @object.id,
@@ -83,7 +83,7 @@ class App.LinkInfo extends App.Controller
App.Com.ajax(
id: 'links_remove_' + @object.id + '_' + @object_type,
type: 'GET',
- url: @Config.get('api_path') + '/links/remove',
+ url: @apiPath + '/links/remove',
data: {
link_type: link_type,
link_object_source: link_object_source,
@@ -126,7 +126,7 @@ class App.LinkAdd extends App.ControllerModal
App.Com.ajax(
id: 'links_add_' + @object.id + '_' + @object_type,
type: 'GET',
- url: @Config.get('api_path') + '/links/add',
+ url: @apiPath + '/links/add',
data: {
link_type: params['link_type'],
link_object_target: 'Ticket',
diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee
index 27394d8e9..baa7703f3 100644
--- a/app/assets/javascripts/app/controllers/navigation.js.coffee
+++ b/app/assets/javascripts/app/controllers/navigation.js.coffee
@@ -93,7 +93,7 @@ class App.Navigation extends App.Controller
App.Com.ajax(
id: 'ticket_search'
type: 'GET'
- url: @Config.get('api_path') + '/search'
+ url: @apiPath + '/search'
data:
term: @term
processData: true,
diff --git a/app/assets/javascripts/app/controllers/package.js.coffee b/app/assets/javascripts/app/controllers/package.js.coffee
index fb5517fad..a061bad34 100644
--- a/app/assets/javascripts/app/controllers/package.js.coffee
+++ b/app/assets/javascripts/app/controllers/package.js.coffee
@@ -16,7 +16,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'packages',
type: 'GET',
- url: @Config.get('api_path') + '/packages',
+ url: @apiPath + '/packages',
processData: true,
success: (data) =>
@render(data)
@@ -50,7 +50,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'packages',
type: httpType,
- url: 'api/packages',
+ url: @apiPath + '/packages',
data: JSON.stringify( { id: id } ),
processData: false,
success: (data) =>
diff --git a/app/assets/javascripts/app/controllers/reset_password.js.coffee b/app/assets/javascripts/app/controllers/reset_password.js.coffee
index 048379258..c154d2f11 100644
--- a/app/assets/javascripts/app/controllers/reset_password.js.coffee
+++ b/app/assets/javascripts/app/controllers/reset_password.js.coffee
@@ -46,7 +46,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'password_reset'
type: 'POST'
- url: @Config.get('api_path') + '/users/password_reset'
+ url: @apiPath + '/users/password_reset'
data: JSON.stringify(params)
processData: true
success: @success
@@ -86,7 +86,7 @@ class Verify extends App.ControllerContent
App.Com.ajax(
id: 'password_reset_verify'
type: 'POST'
- url: @Config.get('api_path') + '/users/password_reset_verify'
+ url: @apiPath + '/users/password_reset_verify'
data: JSON.stringify(params)
processData: true
success: @render_success
@@ -122,7 +122,7 @@ class Verify extends App.ControllerContent
App.Com.ajax(
id: 'password_reset_verify'
type: 'POST'
- url: @Config.get('api_path') + '/users/password_reset_verify'
+ url: @apiPath + '/users/password_reset_verify'
data: JSON.stringify(params)
processData: true
success: @render_changed_success
diff --git a/app/assets/javascripts/app/controllers/session.js.coffee b/app/assets/javascripts/app/controllers/session.js.coffee
index 391720e0e..a9959ac1c 100644
--- a/app/assets/javascripts/app/controllers/session.js.coffee
+++ b/app/assets/javascripts/app/controllers/session.js.coffee
@@ -20,7 +20,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'sessions'
type: 'GET'
- url: @Config.get('api_path') + '/sessions'
+ url: @apiPath + '/sessions'
success: (data) =>
@render(data)
)
@@ -46,7 +46,7 @@ class Index extends App.ControllerContent
App.Com.ajax(
id: 'sessions/' + sessionId
type: 'DELETE'
- url: @Config.get('api_path') + '/sessions/' + sessionId
+ url: @apiPath + '/sessions/' + sessionId
success: (data) =>
@load()
)
diff --git a/app/assets/javascripts/app/controllers/tag_widget.js.coffee b/app/assets/javascripts/app/controllers/tag_widget.js.coffee
index b4916a158..2b08c1936 100644
--- a/app/assets/javascripts/app/controllers/tag_widget.js.coffee
+++ b/app/assets/javascripts/app/controllers/tag_widget.js.coffee
@@ -12,7 +12,7 @@ class App.TagWidget extends App.Controller
App.Com.ajax(
id: @attribute_id
type: 'GET'
- url: @Config.get('api_path') + '/tags'
+ url: @apiPath + '/tags'
data:
object: @object_type
o_id: @object.id
@@ -42,7 +42,7 @@ class App.TagWidget extends App.Controller
onAddTag: (item) =>
App.Com.ajax(
type: 'GET',
- url: @Config.get('api_path') + '/tags/add',
+ url: @apiPath + '/tags/add',
data:
object: @object_type,
o_id: @object.id,
@@ -55,7 +55,7 @@ class App.TagWidget extends App.Controller
onRemoveTag: (item) =>
App.Com.ajax(
type: 'GET'
- url: @Config.get('api_path') + '/tags/remove'
+ url: @apiPath + '/tags/remove'
data:
object: @object_type
o_id: @object.id
diff --git a/app/assets/javascripts/app/controllers/ticket_customer.js.coffee b/app/assets/javascripts/app/controllers/ticket_customer.js.coffee
index 506b16b03..47fef48a4 100644
--- a/app/assets/javascripts/app/controllers/ticket_customer.js.coffee
+++ b/app/assets/javascripts/app/controllers/ticket_customer.js.coffee
@@ -5,7 +5,7 @@ class App.TicketCustomer extends App.ControllerModal
render: ->
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')()
diff --git a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee
index 28d4106ae..9cbafda9f 100644
--- a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee
+++ b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee
@@ -67,7 +67,7 @@ class Table extends App.ControllerContent
App.Com.ajax(
id: 'ticket_overview_' + @key,
type: 'GET',
- url: @Config.get('api_path') + '/ticket_overviews',
+ url: @apiPath + '/ticket_overviews',
data: {
view: @view,
view_mode: @view_mode,
@@ -561,7 +561,7 @@ class Router extends App.Controller
else
App.Com.ajax(
type: 'GET'
- url: @Config.get('api_path') + '/ticket_overviews'
+ url: @apiPath + '/ticket_overviews'
data:
view: @view
array: true
diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee
index 761fa73fd..dbc62c92c 100644
--- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee
+++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee
@@ -67,7 +67,7 @@ class App.TicketZoom extends App.Controller
App.Com.ajax(
id: 'ticket_zoom_' + ticket_id
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:
view: @view
processData: true
diff --git a/app/assets/javascripts/app/models/_application_model.js.coffee b/app/assets/javascripts/app/models/_application_model.js.coffee
index 809815ee7..0bc429b4f 100644
--- a/app/assets/javascripts/app/models/_application_model.js.coffee
+++ b/app/assets/javascripts/app/models/_application_model.js.coffee
@@ -1,6 +1,6 @@
class App.Model extends Spine.Model
@destroyBind: false
- @api_path: App.Config.get('api_path')
+ @apiPath: App.Config.get('api_path')
constructor: ->
super
diff --git a/app/assets/javascripts/app/models/channel.js.coffee b/app/assets/javascripts/app/models/channel.js.coffee
index ab327d4d3..5c3486724 100644
--- a/app/assets/javascripts/app/models/channel.js.coffee
+++ b/app/assets/javascripts/app/models/channel.js.coffee
@@ -1,4 +1,4 @@
class App.Channel extends App.Model
@configure 'Channel', 'adapter', 'area', 'options', 'group_id', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/channels'
+ @url: @apiPath + '/channels'
diff --git a/app/assets/javascripts/app/models/email_address.js.coffee b/app/assets/javascripts/app/models/email_address.js.coffee
index 378d62449..0a85fa3d0 100644
--- a/app/assets/javascripts/app/models/email_address.js.coffee
+++ b/app/assets/javascripts/app/models/email_address.js.coffee
@@ -1,7 +1,7 @@
class App.EmailAddress extends App.Model
@configure 'EmailAddress', 'realname', 'email', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/email_addresses'
+ @url: @apiPath + '/email_addresses'
@configure_attributes = [
{ name: 'realname', display: 'Realname', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
diff --git a/app/assets/javascripts/app/models/group.js.coffee b/app/assets/javascripts/app/models/group.js.coffee
index 8780bdbe7..2336dd463 100644
--- a/app/assets/javascripts/app/models/group.js.coffee
+++ b/app/assets/javascripts/app/models/group.js.coffee
@@ -1,7 +1,7 @@
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'
@extend Spine.Model.Ajax
- @url: @api_path + '/groups'
+ @url: @apiPath + '/groups'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
diff --git a/app/assets/javascripts/app/models/history.js.coffee b/app/assets/javascripts/app/models/history.js.coffee
index d11ee8674..9b82b5699 100644
--- a/app/assets/javascripts/app/models/history.js.coffee
+++ b/app/assets/javascripts/app/models/history.js.coffee
@@ -1,7 +1,7 @@
class App.History extends App.Model
@configure 'History', 'name'
@extend Spine.Model.Ajax
- @url: @api_path + '/histories'
+ @url: @apiPath + '/histories'
@_fillUp: (data) ->
diff --git a/app/assets/javascripts/app/models/history_attributes.js.coffee b/app/assets/javascripts/app/models/history_attributes.js.coffee
index d263df015..8c314c1dd 100644
--- a/app/assets/javascripts/app/models/history_attributes.js.coffee
+++ b/app/assets/javascripts/app/models/history_attributes.js.coffee
@@ -1,4 +1,4 @@
class App.HistoryAttribute extends App.Model
@configure 'HistoryAttribute', 'name'
@extend Spine.Model.Ajax
- @url: @api_path + '/history_attributes'
+ @url: @apiPath + '/history_attributes'
diff --git a/app/assets/javascripts/app/models/history_object.js.coffee b/app/assets/javascripts/app/models/history_object.js.coffee
index 388c6b507..9d03058d0 100644
--- a/app/assets/javascripts/app/models/history_object.js.coffee
+++ b/app/assets/javascripts/app/models/history_object.js.coffee
@@ -1,4 +1,4 @@
class App.HistoryObject extends App.Model
@configure 'HistoryObject', 'name'
@extend Spine.Model.Ajax
- @url: @api_path + '/history_objects'
+ @url: @apiPath + '/history_objects'
diff --git a/app/assets/javascripts/app/models/history_type.js.coffee b/app/assets/javascripts/app/models/history_type.js.coffee
index e4bdaf69c..0865e9e23 100644
--- a/app/assets/javascripts/app/models/history_type.js.coffee
+++ b/app/assets/javascripts/app/models/history_type.js.coffee
@@ -1,4 +1,4 @@
class App.HistoryType extends App.Model
@configure 'HistoryType', 'name'
@extend Spine.Model.Ajax
- @url: @api_path + '/history_types'
+ @url: @apiPath + '/history_types'
diff --git a/app/assets/javascripts/app/models/organization.js.coffee b/app/assets/javascripts/app/models/organization.js.coffee
index c7a88c2be..bb71cd4a9 100644
--- a/app/assets/javascripts/app/models/organization.js.coffee
+++ b/app/assets/javascripts/app/models/organization.js.coffee
@@ -1,7 +1,7 @@
class App.Organization extends App.Model
@configure 'Organization', 'name', 'shared', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/organizations'
+ @url: @apiPath + '/organizations'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, info: true, '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, info: false, 'class': 'span4' },
diff --git a/app/assets/javascripts/app/models/overview.js.coffee b/app/assets/javascripts/app/models/overview.js.coffee
index eebc0be41..626b0b5f4 100644
--- a/app/assets/javascripts/app/models/overview.js.coffee
+++ b/app/assets/javascripts/app/models/overview.js.coffee
@@ -1,7 +1,7 @@
class App.Overview extends App.Model
@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
- @url: @api_path + '/overviews'
+ @url: @apiPath + '/overviews'
@configure_attributes = [
{ 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' },
diff --git a/app/assets/javascripts/app/models/postmaster_filter.js.coffee b/app/assets/javascripts/app/models/postmaster_filter.js.coffee
index 65e88d626..1e08ad590 100644
--- a/app/assets/javascripts/app/models/postmaster_filter.js.coffee
+++ b/app/assets/javascripts/app/models/postmaster_filter.js.coffee
@@ -1,7 +1,7 @@
class App.PostmasterFilter extends App.Model
@configure 'PostmasterFilter', 'name', 'channel', 'match', 'perform', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/postmaster_filters'
+ @url: @apiPath + '/postmaster_filters'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },
diff --git a/app/assets/javascripts/app/models/role.js.coffee b/app/assets/javascripts/app/models/role.js.coffee
index 1250c9b92..1e1830ba0 100644
--- a/app/assets/javascripts/app/models/role.js.coffee
+++ b/app/assets/javascripts/app/models/role.js.coffee
@@ -1,7 +1,7 @@
class App.Role extends App.Model
@configure 'Role', 'name', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/roles'
+ @url: @apiPath + '/roles'
@configure_attributes = [
{ 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' },
diff --git a/app/assets/javascripts/app/models/setting.js.coffee b/app/assets/javascripts/app/models/setting.js.coffee
index 43c24a327..e03978654 100644
--- a/app/assets/javascripts/app/models/setting.js.coffee
+++ b/app/assets/javascripts/app/models/setting.js.coffee
@@ -1,4 +1,4 @@
class App.Setting extends App.Model
@configure 'Setting', 'name', 'state'
@extend Spine.Model.Ajax
- @url: @api_path + '/settings'
+ @url: @apiPath + '/settings'
diff --git a/app/assets/javascripts/app/models/signature.js.coffee b/app/assets/javascripts/app/models/signature.js.coffee
index ef338759c..52add5a6e 100644
--- a/app/assets/javascripts/app/models/signature.js.coffee
+++ b/app/assets/javascripts/app/models/signature.js.coffee
@@ -1,7 +1,7 @@
class App.Signature extends App.Model
@configure 'Signature', 'name', 'body', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/signatures'
+ @url: @apiPath + '/signatures'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
diff --git a/app/assets/javascripts/app/models/sla.js.coffee b/app/assets/javascripts/app/models/sla.js.coffee
index 0d4955ab5..c49ddb4cf 100644
--- a/app/assets/javascripts/app/models/sla.js.coffee
+++ b/app/assets/javascripts/app/models/sla.js.coffee
@@ -1,7 +1,7 @@
class App.Sla extends App.Model
@configure 'Sla', 'name', 'first_response_time', 'update_time', 'close_time', 'condition', 'timezone', 'data', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/slas'
+ @url: @apiPath + '/slas'
@configure_attributes = [
{ 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.' },
diff --git a/app/assets/javascripts/app/models/taskbar.js.coffee b/app/assets/javascripts/app/models/taskbar.js.coffee
index 7010f38f4..6dfb7d9f0 100644
--- a/app/assets/javascripts/app/models/taskbar.js.coffee
+++ b/app/assets/javascripts/app/models/taskbar.js.coffee
@@ -2,4 +2,4 @@ class App.Taskbar extends App.Model
@configure 'Taskbar', 'key', 'client_id', 'callback', 'state', 'params', 'prio', 'notify', 'active', 'updated_at'
# @extend Spine.Model.Local
@extend Spine.Model.Ajax
- @url: @api_path + '/taskbar'
+ @url: @apiPath + '/taskbar'
diff --git a/app/assets/javascripts/app/models/template.js.coffee b/app/assets/javascripts/app/models/template.js.coffee
index e051d3755..444363f2c 100644
--- a/app/assets/javascripts/app/models/template.js.coffee
+++ b/app/assets/javascripts/app/models/template.js.coffee
@@ -1,4 +1,4 @@
class App.Template extends App.Model
@configure 'Template', 'name', 'options', 'group_ids', 'user_id', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/templates'
+ @url: @apiPath + '/templates'
diff --git a/app/assets/javascripts/app/models/text_module.js.coffee b/app/assets/javascripts/app/models/text_module.js.coffee
index b31c3d4a6..b35c9cfee 100644
--- a/app/assets/javascripts/app/models/text_module.js.coffee
+++ b/app/assets/javascripts/app/models/text_module.js.coffee
@@ -1,7 +1,7 @@
class App.TextModule extends App.Model
@configure 'TextModule', 'name', 'keywords', 'content', 'active', 'group_ids', 'user_id', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/text_modules'
+ @url: @apiPath + '/text_modules'
@configure_attributes = [
{ 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' },
diff --git a/app/assets/javascripts/app/models/ticket.js.coffee b/app/assets/javascripts/app/models/ticket.js.coffee
index 33a6d068d..f4283ac6b 100644
--- a/app/assets/javascripts/app/models/ticket.js.coffee
+++ b/app/assets/javascripts/app/models/ticket.js.coffee
@@ -1,7 +1,7 @@
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'
@extend Spine.Model.Ajax
- @url: @api_path + '/tickets'
+ @url: @apiPath + '/tickets'
@configure_attributes = [
{ 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: '»' },
diff --git a/app/assets/javascripts/app/models/ticket_article.js.coffee b/app/assets/javascripts/app/models/ticket_article.js.coffee
index b3364e42a..2fa16dd27 100644
--- a/app/assets/javascripts/app/models/ticket_article.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_article.js.coffee
@@ -1,7 +1,7 @@
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'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_articles'
+ @url: @apiPath + '/ticket_articles'
@configure_attributes = [
{ name: 'ticket_id', display: 'TicketID', null: false, readonly: 1, },
{ name: 'from', display: 'From', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', },
diff --git a/app/assets/javascripts/app/models/ticket_article_sender.js.coffee b/app/assets/javascripts/app/models/ticket_article_sender.js.coffee
index d3a9d5fd8..122a7aecd 100644
--- a/app/assets/javascripts/app/models/ticket_article_sender.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_article_sender.js.coffee
@@ -1,4 +1,4 @@
class App.TicketArticleSender extends App.Model
@configure 'TicketArticleSender', 'name', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_article_senders'
+ @url: @apiPath + '/ticket_article_senders'
diff --git a/app/assets/javascripts/app/models/ticket_article_type.js.coffee b/app/assets/javascripts/app/models/ticket_article_type.js.coffee
index 777db0940..c2975c575 100644
--- a/app/assets/javascripts/app/models/ticket_article_type.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_article_type.js.coffee
@@ -1,4 +1,4 @@
class App.TicketArticleType extends App.Model
@configure 'TicketArticleType', 'name', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_article_types'
+ @url: @apiPath + '/ticket_article_types'
diff --git a/app/assets/javascripts/app/models/ticket_priority.js.coffee b/app/assets/javascripts/app/models/ticket_priority.js.coffee
index 66ada53ff..2c45303cb 100644
--- a/app/assets/javascripts/app/models/ticket_priority.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_priority.js.coffee
@@ -1,4 +1,4 @@
class App.TicketPriority extends App.Model
@configure 'TicketPriority', 'name', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_priorities'
+ @url: @apiPath + '/ticket_priorities'
diff --git a/app/assets/javascripts/app/models/ticket_state.js.coffee b/app/assets/javascripts/app/models/ticket_state.js.coffee
index 6b9d5d22a..251ad864c 100644
--- a/app/assets/javascripts/app/models/ticket_state.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_state.js.coffee
@@ -1,4 +1,4 @@
class App.TicketState extends App.Model
@configure 'TicketState', 'name', 'note', 'active'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_states'
+ @url: @apiPath + '/ticket_states'
diff --git a/app/assets/javascripts/app/models/ticket_state_type.js.coffee b/app/assets/javascripts/app/models/ticket_state_type.js.coffee
index 8f97da215..02dfa0470 100644
--- a/app/assets/javascripts/app/models/ticket_state_type.js.coffee
+++ b/app/assets/javascripts/app/models/ticket_state_type.js.coffee
@@ -1,4 +1,4 @@
class App.TicketStateType extends App.Model
@configure 'TicketStateType', 'name', 'note', 'active', 'updated_at'
@extend Spine.Model.Ajax
- @url: @api_path + '/ticket_state_types'
+ @url: @apiPath + '/ticket_state_types'
diff --git a/app/assets/javascripts/app/models/translation.js.coffee b/app/assets/javascripts/app/models/translation.js.coffee
index a5876ba5e..2ecec3ff4 100644
--- a/app/assets/javascripts/app/models/translation.js.coffee
+++ b/app/assets/javascripts/app/models/translation.js.coffee
@@ -1,4 +1,4 @@
class App.Translation extends App.Model
@configure 'Translation', 'source', 'target', 'locale'
@extend Spine.Model.Ajax
- @url: @api_path + '/translations'
\ No newline at end of file
+ @url: @apiPath + '/translations'
\ No newline at end of file
diff --git a/app/assets/javascripts/app/models/user.js.coffee b/app/assets/javascripts/app/models/user.js.coffee
index 21d7c00f9..e8551d42f 100644
--- a/app/assets/javascripts/app/models/user.js.coffee
+++ b/app/assets/javascripts/app/models/user.js.coffee
@@ -1,7 +1,7 @@
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'
@extend Spine.Model.Ajax
- @url: @api_path + '/users'
+ @url: @apiPath + '/users'
# @hasMany 'roles', 'App.Role'
@configure_attributes = [