diff options
author | msquare <msquare@notrademark.de> | 2018-08-12 12:42:58 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-08-12 12:42:58 +0200 |
commit | df30f7d5d89d8de3f61905d8e25eb361a06faa7f (patch) | |
tree | c9c07c9133b266224f1e91e7aabc4c40bf27f67d /includes | |
parent | c55ae7c3190e48180371bab8f4d7ab4c5726ff13 (diff) | |
parent | b409d2986fcca5bcafdad4b3b33094c12d8530a6 (diff) |
merge pr #427: Use npm to handle frontend dependencies
Diffstat (limited to 'includes')
-rw-r--r-- | includes/helper/graph_helper.php | 2 | ||||
-rw-r--r-- | includes/sys_form.php | 22 | ||||
-rw-r--r-- | includes/sys_template.php | 10 | ||||
-rw-r--r-- | includes/view/UserDriverLicenses_view.php | 14 |
4 files changed, 24 insertions, 24 deletions
diff --git a/includes/helper/graph_helper.php b/includes/helper/graph_helper.php index 12c7df6c..f49ab635 100644 --- a/includes/helper/graph_helper.php +++ b/includes/helper/graph_helper.php @@ -33,7 +33,7 @@ function bargraph($dom_id, $key, $row_names, $colors, $data) return '<canvas id="' . $dom_id . '" style="width: 100%; height: 300px;"></canvas> <script type="text/javascript"> $(function(){ - var ctx = $("#' . $dom_id . '").get(0).getContext("2d"); + var ctx = $(\'#' . $dom_id . '\').get(0).getContext(\'2d\'); var chart = new Chart(ctx).Bar(' . json_encode([ 'labels' => $labels, 'datasets' => $datasets diff --git a/includes/sys_form.php b/includes/sys_form.php index b29dd364..c974c1d1 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -38,12 +38,12 @@ function form_spinner($name, $label, $value) </div> </div> <script type="text/javascript"> - $("#spinner-' . $name . '-down").click(function() { - var spinner = $("#spinner-' . $name . '"); + $(\'#spinner-' . $name . '-down\').click(function() { + var spinner = $(\'#spinner-' . $name . '\'); spinner.val(parseInt(spinner.val()) - 1); }); - $("#spinner-' . $name . '-up").click(function() { - var spinner = $("#spinner-' . $name . '"); + $(\'#spinner-' . $name . '-up\').click(function() { + var spinner = $(\'#spinner-' . $name . '\'); spinner.val(parseInt(spinner.val()) + 1); }); </script> @@ -73,13 +73,13 @@ function form_date($name, $label, $value, $start_date = '', $end_date = '') </div> <script type="text/javascript"> $(function(){ - $("#' . $dom_id . '").datepicker({ - language: "' . locale_short() . '", - todayBtn: "linked", - format: "yyyy-mm-dd", - startDate: "' . $start_date . '", - endDate: "' . $end_date . '", - orientation: "bottom" + $(\'#' . $dom_id . '\').datepicker({ + language: \'' . locale_short() . '\', + todayBtn: \'linked\', + format: \'yyyy-mm-dd\', + startDate: \'' . $start_date . '\', + endDate: \'' . $end_date . '\', + orientation: \'bottom\' }); }); </script> diff --git a/includes/sys_template.php b/includes/sys_template.php index a988ca7c..986270b5 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -231,12 +231,12 @@ function toolbar_popover($glyphicon, $label, $content, $class = '') . ' <span class="caret"></span></a> <script type="text/javascript"> $(function(){ - $("#' . $dom_id . '").popover({ - trigger: "focus", + $(\'#' . $dom_id . '\').popover({ + trigger: \'focus\', html: true, - content: "' . addslashes(join('', $content)) . '", - placement: "bottom", - container: "#navbar-collapse-1" + content: \'' . addslashes(join('', $content)) . '\', + placement: \'bottom\', + container: \'#navbar-collapse-1\' }) }); </script></li>'; diff --git a/includes/view/UserDriverLicenses_view.php b/includes/view/UserDriverLicenses_view.php index b92f5f07..be21ca53 100644 --- a/includes/view/UserDriverLicenses_view.php +++ b/includes/view/UserDriverLicenses_view.php @@ -53,18 +53,18 @@ function UserDriverLicense_edit_view($user_source, $wants_to_drive, $user_driver ]), '<script type="text/javascript"> $(function() { - var checkbox = $("#wants_to_drive"); - if(checkbox.is(":checked")) - $("#driving_license").show(); + var checkbox = $(\'#wants_to_drive\'); + if(checkbox.is(\':checked\')) + $(\'#driving_license\').show(); else - $("#driving_license").hide(); + $(\'#driving_license\').hide(); checkbox.click( function() { - if($("#wants_to_drive").is(":checked")) - $("#driving_license").show(); + if($(\'#wants_to_drive\').is(\':checked\')) + $(\'#driving_license\').show(); else - $("#driving_license").hide(); + $(\'#driving_license\').hide(); } ); }); |