Handle long product names in typeahead

This commit is contained in:
Hillel Coren 2017-02-14 15:49:47 +02:00
parent 17889ef5a7
commit 119439a37b
2 changed files with 4 additions and 4 deletions

View File

@ -253,7 +253,7 @@
<thead> <thead>
<tr> <tr>
<th style="min-width:32px;" class="hide-border"></th> <th style="min-width:32px;" class="hide-border"></th>
<th style="width:25%">{{ $invoiceLabels['item'] }}</th> <th style="width:28%">{{ $invoiceLabels['item'] }}</th>
<th style="width:100%">{{ $invoiceLabels['description'] }}</th> <th style="width:100%">{{ $invoiceLabels['description'] }}</th>
@if ($account->showCustomField('custom_invoice_item_label1')) @if ($account->showCustomField('custom_invoice_item_label1'))
<th style="min-width:120px">{{ $account->custom_invoice_item_label1 }}</th> <th style="min-width:120px">{{ $account->custom_invoice_item_label1 }}</th>

View File

@ -894,9 +894,9 @@ ko.bindingHandlers.productTypeahead = {
name: 'data', name: 'data',
display: allBindings.key, display: allBindings.key,
limit: 50, limit: 50,
//templates: { templates: {
// suggestion: function(item) { return '<div>' + item.product_key + '<div class="pull-right">' + item.cost + '</div>' } suggestion: function(item) { return '<div title="' + item.product_key + '">' + item.product_key + '</div>' }
//}, },
source: searchData(allBindings.items, allBindings.key) source: searchData(allBindings.items, allBindings.key)
}).on('typeahead:select', function(element, datum, name) { }).on('typeahead:select', function(element, datum, name) {
@if (Auth::user()->account->fill_products) @if (Auth::user()->account->fill_products)