mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Click on table rows to mark checkbox
This commit is contained in:
parent
1c31f6de0f
commit
17b2bc4e69
@ -60,8 +60,6 @@ class Number
|
|||||||
*/
|
*/
|
||||||
public static function formatMoney($value, $currency, $country, $settings)
|
public static function formatMoney($value, $currency, $country, $settings)
|
||||||
{
|
{
|
||||||
Log::error('code = '.$settings->show_currency_code);
|
|
||||||
Log::error('symbol = '.$settings->show_currency_symbol);
|
|
||||||
|
|
||||||
$thousand = $currency->thousand_separator;
|
$thousand = $currency->thousand_separator;
|
||||||
$decimal = $currency->decimal_separator;
|
$decimal = $currency->decimal_separator;
|
||||||
|
@ -114,7 +114,7 @@ $(function() {
|
|||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
|
|
||||||
{data: 'checkbox', name: 'checkbox', title: '<input type="checkbox" class="select_all">', searchable: false, orderable: false},
|
{data: 'checkbox', name: 'checkbox', title: '<input type="checkbox" class="select_all" >', searchable: false, orderable: false},
|
||||||
{data: 'invoice_number', name: 'invoice_number', title: '{{ctrans('texts.invoice_number')}}', visible: true},
|
{data: 'invoice_number', name: 'invoice_number', title: '{{ctrans('texts.invoice_number')}}', visible: true},
|
||||||
{data: 'invoice_date', name: 'invoice_date', title: '{{ctrans('texts.invoice_date')}}', visible: true},
|
{data: 'invoice_date', name: 'invoice_date', title: '{{ctrans('texts.invoice_date')}}', visible: true},
|
||||||
{data: 'amount', name: 'amount', title: '{{ctrans('texts.total')}}', visible: true},
|
{data: 'amount', name: 'amount', title: '{{ctrans('texts.total')}}', visible: true},
|
||||||
@ -136,14 +136,19 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
toggleButtonGroup();
|
toggleButtonGroup();
|
||||||
|
|
||||||
$("#datatable").on('change', 'input[type=checkbox]', function() {
|
|
||||||
selected = [];
|
$('#datatable').on('click', '.odd, .even' ,function(e) {
|
||||||
$.each($("input[name='hashed_ids[]']:checked"), function(){
|
|
||||||
|
if($(e.target).is(':checkbox')) return; //ignore when click on the checkbox
|
||||||
selected.push($(this).val());
|
|
||||||
});
|
|
||||||
|
|
||||||
toggleButtonGroup();
|
var $cb= $(this).find('input[type="checkbox"]');
|
||||||
|
$cb.prop('checked', !$cb.is(':checked'));
|
||||||
|
|
||||||
|
buildCheckboxArray();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#datatable").on('change', 'input[type=checkbox]', function() {
|
||||||
|
buildCheckboxArray();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#table_filter').on('keyup', function(){
|
$('#table_filter').on('keyup', function(){
|
||||||
@ -179,6 +184,17 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function buildCheckboxArray()
|
||||||
|
{
|
||||||
|
selected = [];
|
||||||
|
$.each($("input[name='hashed_ids[]']:checked"), function(){
|
||||||
|
|
||||||
|
selected.push($(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
toggleButtonGroup();
|
||||||
|
}
|
||||||
|
|
||||||
function toggleButtonGroup()
|
function toggleButtonGroup()
|
||||||
{
|
{
|
||||||
if(selected.length == 0)
|
if(selected.length == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user