diff --git a/public/js/grocy.js b/public/js/grocy.js index dbf0ec25..2cc6f772 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -989,7 +989,8 @@ $(".change-table-columns-visibility-button").on("click", function(e) dataTable.columns().every(function() { var index = this.index(); - var title = $(this.header()).text(); + var headerCell = $(this.header()); + var title = headerCell.text(); var visible = this.visible(); if (title.isEmpty() || title.startsWith("Hidden")) @@ -997,7 +998,7 @@ $(".change-table-columns-visibility-button").on("click", function(e) return; } - var shadowColumnIndex = $(this.header()).attr("data-shadow-rowgroup-column"); + var shadowColumnIndex = headerCell.attr("data-shadow-rowgroup-column"); if (shadowColumnIndex) { index = shadowColumnIndex; @@ -1022,7 +1023,7 @@ $(".change-table-columns-visibility-button").on("click", function(e) \ '; - if (rowGroupDefined) + if (rowGroupDefined && headerCell.hasClass("allow-grouping")) { var rowGroupChecked = ""; if (dataTable.rowGroup().enabled() && dataTable.rowGroup().dataSrc() == index) @@ -1046,10 +1047,25 @@ $(".change-table-columns-visibility-button").on("click", function(e) } }); - var message = '
' + __t('Table options') + '

' + __t('Hide/view columns') + '
' + columnCheckBoxesHtml + '
'; + var message = '\ +
\ +
' + __t('Table options') + '
\ +
\ +
' + __t('Hide/view columns') + '
\ +
\ + ' + columnCheckBoxesHtml + ' \ +
\ +
'; + if (rowGroupDefined) { - message += '
' + __t('Group by') + '
' + rowGroupRadioBoxesHtml + '
'; + message += ' \ +
\ +
' + __t('Group by') + '
\ +
\ + ' + rowGroupRadioBoxesHtml + ' \ +
\ +
'; } bootbox.dialog({ diff --git a/views/batteries.blade.php b/views/batteries.blade.php index 89b15260..f4a590f8 100644 --- a/views/batteries.blade.php +++ b/views/batteries.blade.php @@ -89,8 +89,8 @@ {{ $__t('Name') }} {{ $__t('Description') }} - {{ $__t('Used in') }} - {{ $__t('Charge cycle interval (days)') }} + {{ $__t('Used in') }} + {{ $__t('Charge cycle interval (days)') }} @include('components.userfields_thead', array( 'userfields' => $userfields diff --git a/views/batteriesjournal.blade.php b/views/batteriesjournal.blade.php index 89f482d1..2efa8c9c 100644 --- a/views/batteriesjournal.blade.php +++ b/views/batteriesjournal.blade.php @@ -88,7 +88,7 @@ data-table-selector="#batteries-journal-table" href="#"> - {{ $__t('Battery') }} + {{ $__t('Battery') }} {{ $__t('Tracked time') }} diff --git a/views/batteriesoverview.blade.php b/views/batteriesoverview.blade.php index 932d7044..23ebee6d 100644 --- a/views/batteriesoverview.blade.php +++ b/views/batteriesoverview.blade.php @@ -101,7 +101,7 @@ href="#"> {{ $__t('Battery') }} - {{ $__t('Used in') }} + {{ $__t('Used in') }} {{ $__t('Last charged') }} {{ $__t('Next planned charge cycle') }} Hidden status diff --git a/views/chores.blade.php b/views/chores.blade.php index 6b23055c..b0ace94b 100644 --- a/views/chores.blade.php +++ b/views/chores.blade.php @@ -89,7 +89,7 @@ href="#"> {{ $__t('Name') }} - {{ $__t('Period type') }} + {{ $__t('Period type') }} {{ $__t('Description') }} @include('components.userfields_thead', array( diff --git a/views/choresjournal.blade.php b/views/choresjournal.blade.php index 04bb1a29..17bc3da7 100644 --- a/views/choresjournal.blade.php +++ b/views/choresjournal.blade.php @@ -88,10 +88,10 @@ data-table-selector="#chores-journal-table" href="#"> - {{ $__t('Chore') }} + {{ $__t('Chore') }} {{ $__t('Tracked time') }} @if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) - {{ $__t('Done by') }} + {{ $__t('Done by') }} @endif @include('components.userfields_thead', array( diff --git a/views/choresoverview.blade.php b/views/choresoverview.blade.php index 123bb847..45b45ae3 100644 --- a/views/choresoverview.blade.php +++ b/views/choresoverview.blade.php @@ -125,7 +125,7 @@ {{ $__t('Chore') }} {{ $__t('Next estimated tracking') }} {{ $__t('Last tracked') }} - {{ $__t('Assigned to') }} + {{ $__t('Assigned to') }} Hidden status Hidden assigned to user id diff --git a/views/components/userfields_thead.blade.php b/views/components/userfields_thead.blade.php index b7410f52..a79df38d 100644 --- a/views/components/userfields_thead.blade.php +++ b/views/components/userfields_thead.blade.php @@ -3,7 +3,7 @@ @foreach($userfields as $userfield) @if($userfield->show_as_column_in_tables == 1) -{{ $userfield->caption }} +{{ $userfield->caption }} @endif @endforeach diff --git a/views/manageapikeys.blade.php b/views/manageapikeys.blade.php index 6c5f2e80..5cc45604 100644 --- a/views/manageapikeys.blade.php +++ b/views/manageapikeys.blade.php @@ -83,11 +83,11 @@ href="#"> {{ $__t('API key') }} - {{ $__t('User') }} + {{ $__t('User') }} {{ $__t('Expires') }} {{ $__t('Last used') }} {{ $__t('Created') }} - {{ $__t('Key type') }} + {{ $__t('Key type') }} diff --git a/views/productform.blade.php b/views/productform.blade.php index 899df671..a86662b8 100644 --- a/views/productform.blade.php +++ b/views/productform.blade.php @@ -557,8 +557,8 @@ href="#"> {{ $__t('Barcode') }} - {{ $__t('Store') }} - {{ $__t('Quantity unit') }} + {{ $__t('Store') }} + {{ $__t('Quantity unit') }} {{ $__t('Amount') }} {{ $__t('Last price') }} {{ $__t('Note') }} @@ -693,10 +693,10 @@ data-table-selector="#qu-conversions-table-products" href="#"> - {{ $__t('Quantity unit from') }} - {{ $__t('Quantity unit to') }} + {{ $__t('Quantity unit from') }} + {{ $__t('Quantity unit to') }} {{ $__t('Factor') }} - {{ $__t('Group')}} + {{ $__t('Group')}} diff --git a/views/products.blade.php b/views/products.blade.php index b23132a7..ffa278ee 100644 --- a/views/products.blade.php +++ b/views/products.blade.php @@ -118,12 +118,12 @@ href="#"> {{ $__t('Name') }} - {{ $__t('Location') }} - {{ $__t('Min. stock amount') }} - {{ $__t('Default quantity unit purchase') }} - {{ $__t('Quantity unit stock') }} - {{ $__t('Product group') }} - {{ $__t('Default store') }} + {{ $__t('Location') }} + {{ $__t('Min. stock amount') }} + {{ $__t('Default quantity unit purchase') }} + {{ $__t('Quantity unit stock') }} + {{ $__t('Product group') }} + {{ $__t('Default store') }} @include('components.userfields_thead', array( 'userfields' => $userfields @@ -246,7 +246,18 @@