updates for qr handling

This commit is contained in:
2012-08-27 15:46:18 +02:00
parent c087aa0267
commit 157b2406a0
14 changed files with 79 additions and 36 deletions
-10
View File
@@ -23,16 +23,6 @@ root.Qrammer =
clear_active_list: ->
window.active_products_list = {}
$('#active-order-table').hide()
handle_response: (res) ->
if(typeof(res) == 'string')
return unless res.length
if res[0] == '{'
res = JSON.parse(res)
else
eval(res)
return
window.location = '/' if res['message'] && !res['ok']
window.location = '/user/active_list' if res['ok']
load_active_orders: () ->
$.get('/supplier/active_orders.json', (res) ->
body = $('#active-orders-table tbody')