Improved redirect.
This commit is contained in:
parent
0cc5dba532
commit
6ae6504e56
1 changed files with 19 additions and 13 deletions
|
@ -444,6 +444,11 @@ class Router extends App.Controller
|
|||
@key = '#ticket/view/' + @view
|
||||
|
||||
# get data
|
||||
if window.LastRefresh[ @key ] && @start_page is 1
|
||||
@tickets_count = window.LastRefresh[ @key ].tickets_count
|
||||
@tickets = window.LastRefresh[ @key ].tickets
|
||||
@redirect()
|
||||
else
|
||||
App.Com.ajax(
|
||||
type: 'GET',
|
||||
url: '/ticket_overviews',
|
||||
|
@ -457,10 +462,11 @@ class Router extends App.Controller
|
|||
)
|
||||
|
||||
load: (data) =>
|
||||
|
||||
@tickets = data.tickets
|
||||
@tickets_count = data.tickets_count
|
||||
@redirect()
|
||||
|
||||
redirect: =>
|
||||
Config['LastOverview'] = @view
|
||||
Config['LastOverviewPosition'] = @position
|
||||
Config['LastOverviewTotal'] = @tickets_count
|
||||
|
|
Loading…
Reference in a new issue