From c049090987b24be7cdacf28a43959ee26947504d Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 19 Apr 2019 13:16:37 +0200 Subject: [PATCH] - Added jquery checkboxes to FHC-Header template - select checkbox range with shift key is automatically possible in FilterWidget tables --- application/views/system/infocenter/infocenter.php | 1 + .../views/system/infocenter/infocenterFreigegeben.php | 1 + .../system/infocenter/infocenterReihungstestAbsolviert.php | 1 + application/views/templates/FHC-Header.php | 7 +++++++ public/js/FilterWidget.js | 7 +++++++ public/js/infocenter/infocenterPersonDataset.js | 1 - 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index f92658fc7..ebc99ba93 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -5,6 +5,7 @@ 'title' => 'Info Center', 'jquery' => true, 'jqueryui' => true, + 'jquerycheckboxes' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, diff --git a/application/views/system/infocenter/infocenterFreigegeben.php b/application/views/system/infocenter/infocenterFreigegeben.php index 96fd3349b..40f69528d 100644 --- a/application/views/system/infocenter/infocenterFreigegeben.php +++ b/application/views/system/infocenter/infocenterFreigegeben.php @@ -5,6 +5,7 @@ 'title' => 'Info Center', 'jquery' => true, 'jqueryui' => true, + 'jquerycheckboxes' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php index 1a06f8e07..d40b7a572 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php @@ -5,6 +5,7 @@ 'title' => 'Info Center', 'jquery' => true, 'jqueryui' => true, + 'jquerycheckboxes' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index 2c9768a50..c2fd3915c 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -23,6 +23,7 @@ $fontawesome = isset($fontawesome) ? $fontawesome : false; $jquery = isset($jquery) ? $jquery : false; $jqueryui = isset($jqueryui) ? $jqueryui : false; + $jquerycheckboxes = isset($jquerycheckboxes) ? $jquerycheckboxes : false; $jquerytreetable = isset($jquerytreetable) ? $jquerytreetable : false; $navigationwidget = isset($navigationwidget) ? $navigationwidget : false; $pivotui = isset($pivotui) ? $pivotui : false; @@ -120,6 +121,12 @@ generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); // datepicker german language file } + // jQuery checkboxes + if ($jquerycheckboxes === true) + { + generateJSsInclude('vendor/rmariuzzo/jquery-checkboxes/dist/jquery.checkboxes-1.0.7.min.js'); + } + // Bootstrap JS if ($bootstrap === true) generateJSsInclude('vendor/twbs/bootstrap/dist/js/bootstrap.min.js'); diff --git a/public/js/FilterWidget.js b/public/js/FilterWidget.js index 36c313783..767cd228a 100644 --- a/public/js/FilterWidget.js +++ b/public/js/FilterWidget.js @@ -848,6 +848,13 @@ var FHC_FilterWidget = { { if (data.hasOwnProperty("dataset") && $.isArray(data.dataset)) { + if (data.checkboxes != null && data.checkboxes != "") + { + // select checkbox range with shift key + if (typeof $("#filterTableDataset").checkboxes === 'function') + $("#filterTableDataset").checkboxes("range", true); + } + for (var i = 0; i < data.dataset.length; i++) { var record = data.dataset[i]; diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index 641bc7c42..dc6af2284 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -22,7 +22,6 @@ var InfocenterPersonDataset = { /** * adds person table additional actions html (above and beneath it) - /* */ appendTableActionsHtml: function() {