Simplified json rendering.
This commit is contained in:
parent
6047e63666
commit
7b3d341568
1 changed files with 62 additions and 100 deletions
|
@ -67,9 +67,7 @@ class TicketOverviewsController < ApplicationController
|
||||||
result.push all.merge( { :count => count } )
|
result.push all.merge( { :count => count } )
|
||||||
}
|
}
|
||||||
|
|
||||||
respond_to do |format|
|
render :json => result
|
||||||
format.json { render :json => result }
|
|
||||||
end
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -110,8 +108,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:overview => overview_selected,
|
:overview => overview_selected,
|
||||||
:tickets => tickets,
|
:tickets => tickets,
|
||||||
|
@ -123,8 +119,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,8 +151,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
# :ticket => ticket,
|
# :ticket => ticket,
|
||||||
# :articles => articles,
|
# :articles => articles,
|
||||||
|
@ -178,8 +170,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /ticket_full/1
|
# GET /ticket_full/1
|
||||||
|
@ -230,8 +220,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
log_view(ticket)
|
log_view(ticket)
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:ticket => ticket,
|
:ticket => ticket,
|
||||||
:articles => articles,
|
:articles => articles,
|
||||||
|
@ -242,8 +230,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /ticket_attachment/new
|
# POST /ticket_attachment/new
|
||||||
|
@ -268,13 +254,9 @@ class TicketOverviewsController < ApplicationController
|
||||||
)
|
)
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:success => true,
|
:success => true,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /ticket_attachment/1
|
# GET /ticket_attachment/1
|
||||||
|
@ -340,8 +322,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:tickets => {
|
:tickets => {
|
||||||
:open => tickets_open,
|
:open => tickets_open,
|
||||||
|
@ -349,8 +329,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
# :users => users,
|
# :users => users,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /ticket_history/1
|
# GET /ticket_history/1
|
||||||
|
@ -377,8 +355,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
history_attributes = History::Attribute.all()
|
history_attributes = History::Attribute.all()
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:ticket => ticket,
|
:ticket => ticket,
|
||||||
:users => users,
|
:users => users,
|
||||||
|
@ -387,8 +363,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
:history_types => history_types,
|
:history_types => history_types,
|
||||||
:history_attributes => history_attributes
|
:history_attributes => history_attributes
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /activity_stream
|
# GET /activity_stream
|
||||||
|
@ -419,15 +393,11 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:activity_stream => activity_stream,
|
:activity_stream => activity_stream,
|
||||||
:tickets => tickets,
|
:tickets => tickets,
|
||||||
:users => users,
|
:users => users,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /recent_viewed
|
# GET /recent_viewed
|
||||||
|
@ -458,15 +428,11 @@ class TicketOverviewsController < ApplicationController
|
||||||
}
|
}
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:recent_viewed => recent_viewed,
|
:recent_viewed => recent_viewed,
|
||||||
:tickets => tickets,
|
:tickets => tickets,
|
||||||
:users => users,
|
:users => users,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /user_search
|
# GET /user_search
|
||||||
|
@ -497,10 +463,6 @@ class TicketOverviewsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
# return result
|
# return result
|
||||||
respond_to do |format|
|
|
||||||
format.json {
|
|
||||||
render :json => users
|
render :json => users
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue