Removed leading '/' of 'api/' url.

This commit is contained in:
Martin Edenhofer 2013-01-08 11:18:33 +01:00
parent c34240c74d
commit 666dbe7efe
37 changed files with 50 additions and 50 deletions

View file

@ -282,7 +282,7 @@ class App.Controller extends Spine.Controller
tickets = {}
App.Com.ajax(
type: 'GET',
url: '/api/ticket_customer',
url: 'api/ticket_customer',
data: {
customer_id: data.user_id,
}

View file

@ -292,7 +292,7 @@ class App.ControllerForm extends App.Controller
u = =>
@el.find('#' + fileUploaderId ).fineUploader(
request:
endpoint: '/api/ticket_attachment_new'
endpoint: 'api/ticket_attachment_new'
params:
form_id: @form_id
text:
@ -374,7 +374,7 @@ class App.ControllerForm extends App.Controller
###
# @log '111111', @local_attribute_full, item
$(@local_attribute_full).autocomplete(
source: '/api/users/search',
source: 'api/users/search',
minLength: 2,
select: ( event, ui ) =>
# @log 'selected', event, ui

View file

@ -25,7 +25,7 @@ class App.DashboardActivityStream extends App.Controller
App.Com.ajax(
id: 'dashoard_activity_stream'
type: 'GET'
url: '/api/activity_stream'
url: 'api/activity_stream'
data: {
limit: 8
}

View file

@ -14,7 +14,7 @@ class App.DashboardRecentViewed extends App.Controller
App.Com.ajax(
id: 'dashboard_recent_viewed',
type: 'GET',
url: '/api/recent_viewed',
url: 'api/recent_viewed',
data: {
limit: 5,
}

View file

@ -23,7 +23,7 @@ class App.DashboardRss extends App.Controller
App.Com.ajax(
id: 'dashboard_rss'
type: 'GET'
url: '/api/rss_fetch'
url: 'api/rss_fetch'
data: {
limit: 8
url: 'http://www.heise.de/newsticker/heise-atom.xml'

View file

@ -32,7 +32,7 @@ class App.DashboardTicket extends App.Controller
App.Com.ajax(
id: 'dashboard_ticket_' + @key,
type: 'GET',
url: '/api/ticket_overviews',
url: 'api/ticket_overviews',
data: {
view: @view,
view_mode: 'd',

View file

@ -51,7 +51,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'ticket_create'
type: 'GET'
url: '/api/ticket_create'
url: 'api/ticket_create'
data:
ticket_id: params.ticket_id
article_id: params.article_id

View file

@ -12,7 +12,7 @@ class App.TicketHistory extends App.ControllerModal
App.Com.ajax(
id: 'ticket_history',
type: 'GET',
url: '/api/ticket_history/' + ticket_id,
url: 'api/ticket_history/' + ticket_id,
success: (data, status, xhr) =>
# remember ticket
@ticket = data.ticket

View file

@ -9,7 +9,7 @@ class App.TicketMerge extends App.ControllerModal
App.Com.ajax(
id: 'ticket_merge_list',
type: 'GET',
url: '/api/ticket_merge_list/' + @ticket_id,
url: 'api/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: '/api/ticket_merge/' + @ticket_id + '/' + params['master_ticket_number'],
url: 'api/ticket_merge/' + @ticket_id + '/' + params['master_ticket_number'],
data: {
# view: @view
}

View file

@ -44,7 +44,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'ticket_overview_' + @key,
type: 'GET',
url: '/api/ticket_overviews',
url: 'api/ticket_overviews',
data: {
view: @view,
view_mode: @view_mode,
@ -524,7 +524,7 @@ class Router extends App.Controller
else
App.Com.ajax(
type: 'GET'
url: '/api/ticket_overviews'
url: 'api/ticket_overviews'
data:
view: @view
array: true

View file

@ -39,7 +39,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'ticket_zoom'
type: 'GET'
url: '/api/ticket_full/' + ticket_id
url: 'api/ticket_full/' + ticket_id
data:
view: @view
processData: true

View file

@ -39,7 +39,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'ticket_create',
type: 'GET',
url: '/api/ticket_create',
url: 'api/ticket_create',
data: {
ticket_id: params.ticket_id,
article_id: params.article_id,

View file

@ -24,7 +24,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'getting_started',
type: 'GET',
url: '/api/getting_started',
url: 'api/getting_started',
data: {
# view: @view,
}

View file

@ -16,7 +16,7 @@ class App.LinkInfo extends App.Controller
App.Com.ajax(
id: 'links_' + @object.id + '_' + @object_type,
type: 'GET',
url: '/api/links',
url: 'api/links',
data: {
link_object: @object_type,
link_object_value: @object.id,
@ -85,7 +85,7 @@ class App.LinkInfo extends App.Controller
App.Com.ajax(
id: 'links_remove_' + @object.id + '_' + @object_type,
type: 'GET',
url: '/api/links/remove',
url: 'api/links/remove',
data: {
link_type: link_type,
link_object_source: link_object_source,
@ -129,7 +129,7 @@ class App.LinkAdd extends App.ControllerModal
App.Com.ajax(
id: 'links_add_' + @object.id + '_' + @object_type,
type: 'GET',
url: '/api/links/add',
url: 'api/links/add',
data: {
link_type: params['link_type'],
link_object_target: 'Ticket',

View file

@ -74,7 +74,7 @@ class App.Navigation extends App.Controller
App.Com.ajax(
id: 'ticket_search'
type: 'GET'
url: '/api/tickets/search'
url: 'api/tickets/search'
data:
term: @term
processData: true,

View file

@ -16,7 +16,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'packages',
type: 'GET',
url: '/api/packages',
url: 'api/packages',
processData: true,
success: (data) =>
@render(data)
@ -51,7 +51,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'packages',
type: httpType,
url: '/api/packages',
url: 'api/packages',
data: JSON.stringify( { id: id } ),
processData: false,
success: (data) =>

View file

@ -48,7 +48,7 @@ class Index extends App.Controller
App.Com.ajax(
id: 'password_reset'
type: 'POST'
url: '/api/users/password_reset'
url: 'api/users/password_reset'
data: JSON.stringify(params)
processData: true
success: @success
@ -88,7 +88,7 @@ class Verify extends App.Controller
App.Com.ajax(
id: 'password_reset_verify'
type: 'POST'
url: '/api/users/password_reset_verify'
url: 'api/users/password_reset_verify'
data: JSON.stringify(params)
processData: true
success: @render_success
@ -124,7 +124,7 @@ class Verify extends App.Controller
App.Com.ajax(
id: 'password_reset_verify'
type: 'POST'
url: '/api/users/password_reset_verify'
url: 'api/users/password_reset_verify'
data: JSON.stringify(params)
processData: true
success: @render_changed_success

View file

@ -9,7 +9,7 @@ class App.TagWidget extends App.Controller
App.Com.ajax(
id: 'tags_' + @object.id + '_' + @object_type
type: 'GET'
url: '/api/tags'
url: 'api/tags'
data:
object: @object_type
o_id: @object.id
@ -38,7 +38,7 @@ class App.TagWidget extends App.Controller
onAddTag: (item) =>
App.Com.ajax(
type: 'GET',
url: '/api/tags/add',
url: 'api/tags/add',
data:
object: @object_type,
o_id: @object.id,
@ -51,7 +51,7 @@ class App.TagWidget extends App.Controller
onRemoveTag: (item) =>
App.Com.ajax(
type: 'GET'
url: '/api/tags/remove'
url: 'api/tags/remove'
data:
object: @object_type
o_id: @object.id

View file

@ -245,7 +245,7 @@ class _Singleton extends App.Controller
# call init request
@_ajaxInitWorking = App.Com.ajax(
type: 'POST'
url: '/api/message_send'
url: 'api/message_send'
data: JSON.stringify({ data: { action: 'login' } })
processData: false
queue: false
@ -276,7 +276,7 @@ class _Singleton extends App.Controller
data = @queue.shift()
App.Com.ajax(
type: 'POST'
url: '/api/message_send'
url: 'api/message_send'
data: JSON.stringify({ client_id: @client_id, data: data })
processData: false
queue: true
@ -296,7 +296,7 @@ class _Singleton extends App.Controller
App.Com.ajax(
id: 'message_receive',
type: 'POST'
url: '/api/message_receive'
url: 'api/message_receive'
data: JSON.stringify({ client_id: @client_id })
processData: false
success: (data) =>

View file

@ -1,4 +1,4 @@
class App.Channel extends App.Model
@configure 'Channel', 'adapter', 'area', 'options', 'group_id', 'active'
@extend Spine.Model.Ajax
@url: '/api/channels'
@url: 'api/channels'

View file

@ -1,7 +1,7 @@
class App.EmailAddress extends App.Model
@configure 'EmailAddress', 'realname', 'email', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/email_addresses'
@url: 'api/email_addresses'
@configure_attributes = [
{ name: 'realname', display: 'Realname', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },

View file

@ -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'
@extend Spine.Model.Ajax
@url: '/api/groups'
@url: 'api/groups'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },

View file

@ -1,7 +1,7 @@
class App.Organization extends App.Model
@configure 'Organization', 'name', 'shared', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/organizations'
@url: 'api/organizations'
@configure_attributes = [
{ 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' },

View file

@ -1,7 +1,7 @@
class App.Overview extends Spine.Model
@configure 'Overview', 'name', 'meta', 'condition', 'order', 'group_by', 'view', 'user_id', 'group_ids'
@extend Spine.Model.Ajax
@url: '/api/overviews'
@url: 'api/overviews'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
{ name: 'role_id', display: 'Role', tag: 'select', multiple: false, nulloption: true, null: false, relation: 'Role', class: 'span4' },

View file

@ -1,7 +1,7 @@
class App.PostmasterFilter extends App.Model
@configure 'PostmasterFilter', 'name', 'channel', 'match', 'perform', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/postmaster_filters'
@url: 'api/postmaster_filters'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' },

View file

@ -1,7 +1,7 @@
class App.Role extends App.Model
@configure 'Role', 'name', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/roles'
@url: 'api/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' },

View file

@ -1,4 +1,4 @@
class App.Setting extends App.Model
@configure 'Setting', 'name', 'state'
@extend Spine.Model.Ajax
@url: '/api/settings'
@url: 'api/settings'

View file

@ -1,7 +1,7 @@
class App.Signature extends App.Model
@configure 'Signature', 'name', 'body', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/signatures'
@url: 'api/signatures'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },

View file

@ -1,4 +1,4 @@
class App.Template extends App.Model
@configure 'Template', 'name', 'options', 'group_ids', 'user_id'
@extend Spine.Model.Ajax
@url: '/api/templates'
@url: 'api/templates'

View file

@ -1,7 +1,7 @@
class App.TextModule extends App.Model
@configure 'TextModule', 'name', 'keywords', 'content', 'active', 'group_ids', 'user_id'
@extend Spine.Model.Ajax
@url: '/api/text_modules'
@url: 'api/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' },

View file

@ -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'
@extend Spine.Model.Ajax
@url: '/api/tickets'
@url: 'api/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: '<a href="" class="customer_new">&raquo;</a>' },

View file

@ -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'
@extend Spine.Model.Ajax
@url: '/api/ticket_articles'
@url: 'api/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', },

View file

@ -1,4 +1,4 @@
class App.TicketPriority extends App.Model
@configure 'TicketPriority', 'name', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/ticket_priorities'
@url: 'api/ticket_priorities'

View file

@ -1,4 +1,4 @@
class App.TicketState extends App.Model
@configure 'TicketState', 'name', 'note', 'active'
@extend Spine.Model.Ajax
@url: '/api/ticket_states'
@url: 'api/ticket_states'

View file

@ -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'
@extend Spine.Model.Ajax
@url: '/api/users'
@url: 'api/users'
# @hasMany 'roles', 'App.Role'
@configure_attributes = [

View file

@ -35,7 +35,7 @@
<img class="thumbnail user-data" data-id="<%= article.created_by_id %>" src="<%= article.created_by.image %>" alt="">
<ul>
<li style="font-size: 10px;"><%- @T(article.article_type.name) %></li>
<% if article.article_type.name is 'email': %><li style="font-size: 10px;"><a href="/api/ticket_article_plain/<%= article.id %>"><%- @T( 'raw' ) %></a></li><% end %>
<% if article.article_type.name is 'email': %><li style="font-size: 10px;"><a href="api/ticket_article_plain/<%= article.id %>"><%- @T( 'raw' ) %></a></li><% end %>
</ul>
</div>
<div class="span8 well-muted article-message <% if article.internal is true: %> internal<% end %>">
@ -63,7 +63,7 @@
<% if article.attachments: %>
<div>
<% for attachment in article.attachments: %>
<a href="/api/ticket_attachment/<%= article.ticket_id %>/<%= article.id %>/<%= attachment.id %>" target="_blank" data-type="attachment" class="" title="<%= attachment.size %>"><%= attachment.filename %></a>
<a href="api/ticket_attachment/<%= article.ticket_id %>/<%= article.id %>/<%= attachment.id %>" target="_blank" data-type="attachment" class="" title="<%= attachment.size %>"><%= attachment.filename %></a>
<% end %>
</div>
<% end %>

View file

@ -11,7 +11,7 @@
</ul>
-->
<p>
<form action="/api/packages" method="post" enctype="multipart/form-data">
<form action="api/packages" method="post" enctype="multipart/form-data">
<input type="file" name="file_upload"/>
<button class="btn btn-primary" type="submit"><%- @T('Install Package') %></button>
</form>