From 9f06ac39924a4d94ce74e69e4fd8bf238a6f11d4 Mon Sep 17 00:00:00 2001 From: tylercraig9332 Date: Thu, 16 Nov 2017 15:31:44 -0500 Subject: [PATCH 1/2] Was having problems with JQuery not loading due to the defines typehead directory --- javascript/studentSearch/default.php | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/javascript/studentSearch/default.php b/javascript/studentSearch/default.php index 3e1fb024..8b3df258 100644 --- a/javascript/studentSearch/default.php +++ b/javascript/studentSearch/default.php @@ -6,5 +6,5 @@ */ $studentSearch = PHPWS_SOURCE_HTTP . 'mod/hms/javascript/studentSearch/script.js'; -\Layout::addJSHeader(''); -\Layout::addJSHeader(""); \ No newline at end of file +\Layout::addJSHeader(''); +\Layout::addJSHeader(""); diff --git a/package.json b/package.json index 72134825..ea0d9004 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "dependencies": { "chartist": "^0.11.0", "corejs-typeahead": "^1.1.1", - "flot": "^0.8.0-alpha" + "flot": "^0.8.0-alpha", + "react-data-grid-addons": "^2.0.73" }, "devDependencies": { "assets-webpack-plugin": "^3.4.0", From 5b7878b13f2b10effec342ffdedfc176d4d3cbf0 Mon Sep 17 00:00:00 2001 From: tylercraig9332 Date: Mon, 27 Nov 2017 16:31:46 -0500 Subject: [PATCH 2/2] Fixed an issue with JQuery timepicker not functioning properly --- javascript/timePicker/jquery.timePicker.js | 39 ++++++++++++++++++++++ javascript/timePicker/timePicker.css | 4 +-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/javascript/timePicker/jquery.timePicker.js b/javascript/timePicker/jquery.timePicker.js index 41b35c13..9ab251d5 100644 --- a/javascript/timePicker/jquery.timePicker.js +++ b/javascript/timePicker/jquery.timePicker.js @@ -18,6 +18,45 @@ * show24Hours: use a 24-hour scheme */ +/* +The code below is the $.browser intitalization, since the .browser method was removed in the newest jquery update +*/ + var matched, browser; + + jQuery.uaMatch = function( ua ) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || + /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + + matched = jQuery.uaMatch( navigator.userAgent ); + browser = {}; + + if ( matched.browser ) { + browser[ matched.browser ] = true; + browser.version = matched.version; + } + + // Chrome is Webkit, but Webkit is also Safari. + if ( browser.chrome ) { + browser.webkit = true; + } else if ( browser.webkit ) { + browser.safari = true; + } + + jQuery.browser = browser; + + (function($){ $.fn.timePicker = function(options) { // Build main options before element iteration diff --git a/javascript/timePicker/timePicker.css b/javascript/timePicker/timePicker.css index 79385098..5e415597 100644 --- a/javascript/timePicker/timePicker.css +++ b/javascript/timePicker/timePicker.css @@ -19,11 +19,11 @@ div.time-picker ul { } div.time-picker li { cursor: pointer; - height: 10px; + height: 20px; font: 12px/1 Helvetica, Arial, sans-serif; padding: 4px 3px; } div.time-picker li.selected { background: #0063CE; color: #fff; -} \ No newline at end of file +}