From e2e7ead90bf0a358fbc955496acef14ca95b81ad Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 28 Feb 2018 15:10:38 +0100 Subject: [PATCH] Fixed commits --- include/functions.inc.php | 5 ++--- include/js/bootstrapper.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 include/js/bootstrapper.js diff --git a/include/functions.inc.php b/include/functions.inc.php index bffec336a..6f6c5cc3b 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -27,12 +27,11 @@ require_once(dirname(__FILE__).'/personlog.class.php'); // Auth: Benutzer des Webportals /** * DEPRECATED - Use Authentication Class - */ + */ function get_uid() { $auth = new authentication(); -// return $auth->getUser(); - return 'eckelt'; + return $auth->getUser(); } /** diff --git a/include/js/bootstrapper.js b/include/js/bootstrapper.js new file mode 100644 index 000000000..47cd6d609 --- /dev/null +++ b/include/js/bootstrapper.js @@ -0,0 +1,12 @@ +/* +file for adding bootstrap classes, e.g. in case usage of non-bootstrap widgets in a bootstrap page +AVOID USING THIS IF POSSIBLE + */ +$(document).ready( + function() + { + $("input[type=text], select").addClass("form-control"); + $("button, input[type=button]").addClass("btn btn-default"); + $("table").addClass('table-condensed'); + } +);