В настоящее время я работаю в версии 0.5 Siwapp и пытаюсь отобразить всплывающее окно для кнопки платежей в каждой строке таблицы счетов-фактур.Но я должен сделать это одним щелчком мыши.У меня есть следующий код JS:
jQuery(function($){
$('table[data-type="invoices"] a.payments').popover({
live: true,
placement: 'left',
offset: 5,
html: true,
content: function() {
return $(this).attr('class');
},
trigger: 'manual'
}).live('click', function(e){
e.preventDefault();
$(this).popover('show');
});
});
Таблица HTML выглядит следующим образом (см. Ссылку в конце):
<table class="zebra-striped align-middle" data-type="invoices">
<colgroup>
<col />
<col />
<col class="date" />
<col class="date" />
<col class="status" />
<col class="currency" />
<col class="currency" />
<col class="payments" />
</colgroup>
<thead>
<tr>
<th>{% trans %}Number{% endtrans %}</th>
<th>{% trans %}Customer{% endtrans %}</th>
<th>{% trans %}Date{% endtrans %}</th>
<th>{% trans %}Due Date{% endtrans %}</th>
<th>{% trans %}Status{% endtrans %}</th>
<th>{% trans %}Due{% endtrans %}</th>
<th>{% trans %}Total{% endtrans %}</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>ASET-22</td>
<td>Roxxon</td>
<td>5/28/11</td>
<td>9/16/11</td>
<td>
<span class="label important">{% trans %}overdue{% endtrans %}</span>
</td>
<td></td>
<td>$11,435.23</td>
<td>
<a href="{{ path('invoice_payments', { 'invoiceId': 4 }) }}" class="btn secondary icon clock payments" title="Payments">{% trans %}Payments{% endtrans %}</a>
</td>
</tr>
</tbody>
</table>
Если я удаляю «ручной» триггер, он работаетно если я установлю это, это не так.
Кто-нибудь знает, как это сделать?Спасибо!