logic separation for join table requests
This commit is contained in:
@@ -107,7 +107,12 @@ window.Quser=
|
||||
foot = $('#active-list-table tfoot')
|
||||
Quser.build_list_table(body, foot, res)
|
||||
)
|
||||
load_history_list: (list_id) ->
|
||||
load_history_list: () ->
|
||||
match = window.document.URL.toString().match('([0-9a-zA-Z]+)(\\?|$)')
|
||||
if match
|
||||
list_id = match[1]
|
||||
else
|
||||
return
|
||||
$.get(data_host + '/user/list_history/'+list_id+'.json', (res) ->
|
||||
body = $('#history-list-table tbody')
|
||||
foot = $('#history-list-table tfoot')
|
||||
@@ -254,7 +259,13 @@ window.Quser=
|
||||
redirect_to 'list_products_for_table', {table_id: table.table_id}
|
||||
, 'json')
|
||||
|
||||
join_occupied_table: (table_id) ->
|
||||
join_occupied_table: () ->
|
||||
match = window.document.URL.toString().match('table_id=([0-9a-zA-Z]+)')
|
||||
if match
|
||||
table_id = match[1]
|
||||
else
|
||||
redirect_to 'user_root', {message: 'cannot_identify_table'}
|
||||
return
|
||||
$('.form-actions').remove()
|
||||
cont = $('#join-occupied-table-progress-container')
|
||||
cont.html('')
|
||||
|
||||
Reference in New Issue
Block a user