Changeset:
3814be93b42d
https://sourceforge.net/p/mrbs/hg-code/ci/3814be93b42dc184a7b3605df03f151ec8ca5c7a
Author:
Campbell Morrison <[email protected]>
Date:
Fri Oct 02 16:38:29 2015 +0100
Log message:
Internationalised column visibility button text
diffstat:
web/js/datatables.js.php | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r 880c90aa1fd4 -r 3814be93b42d web/js/datatables.js.php
--- a/web/js/datatables.js.php Fri Oct 02 16:05:47 2015 +0100
+++ b/web/js/datatables.js.php Fri Oct 02 16:38:29 2015 +0100
@@ -90,7 +90,8 @@
<?php // Set up the default options ?>
defaultOptions = {
- buttons: [{extend: 'colvis'}],
+ buttons: [{extend: 'colvis',
+ text: '<?php echo escape_js(get_vocab("show_hide_columns"))
?>'}],
deferRender: true,
paging: true,
pageLength: 25,
@@ -100,9 +101,7 @@
stateSave: true,
dom: 'B<"clear">lfrtip',
scrollX: '100%',
- colReorder: {},
- colVis: {buttonText: '<?php echo
escape_js(get_vocab("show_hide_columns")) ?>',
- restore: '<?php echo escape_js(get_vocab("restore_original"))
?>'}
+ colReorder: {}
};
<?php
@@ -129,9 +128,11 @@
// all columns except any fixed columns.
?>
if (specificOptions &&
- specificOptions.buttons)
+ specificOptions.buttons &&
+ specificOptions.buttons[0] &&
+ specificOptions.buttons[0].columns)
{
- defaultOptions.buttons = specificOptions.buttons;
+ defaultOptions.buttons[0].columns = specificOptions.buttons;
}
else
{
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits