Implement tooltips for suppliers table view
This commit is contained in:
@@ -6,7 +6,8 @@ root.Qsupplier=
|
||||
if(e.event == 'new_order')
|
||||
body = $('#active-orders-table tbody')
|
||||
order = new Order(e.data)
|
||||
body.append @mustache('#active-order-template', order)
|
||||
if body.length
|
||||
body.append @mustache('#active-order-template', order)
|
||||
$('.section-table-list-'+order.list_id()).addClass('active_order')
|
||||
else if(e.event == 'list_needs_help')
|
||||
$('#list-needs-help-indicator-'+e.data.id).removeClass('hide')
|
||||
@@ -202,6 +203,11 @@ root.Qsupplier=
|
||||
mustache: (selector, locals)->
|
||||
html = $(selector).html()
|
||||
return '' unless html
|
||||
template = Handlebars.compile(html)
|
||||
container = $('<div></div>')
|
||||
container.html(template(locals))
|
||||
setTranslations(container)
|
||||
return container.html()
|
||||
locs = $.extend(locals,
|
||||
currency: ->
|
||||
(val)->
|
||||
|
||||
Reference in New Issue
Block a user