Skip to content

Commit e667860

Browse files
Remove jQuery UI: replace datepicker with air-datepicker, drop tooltips
jQuery UI was vendored in two locations (~250KB of JS+CSS+images) but only two of its widgets were actually used: - .datepicker() in two report-param JSPs — replaced with air-datepicker v2 (already vendored at javascript/air-datepicker/, never wired up before). Same jQuery-plugin call shape ($("#x").datepicker({...})). Cross-field min/maxDate constraint is now wired via onSelect callbacks. - .tooltip() — global init in transitime.js plus per-page wirings on Select2 containers in 8 form-param JSPs. Dropped entirely; native browser tooltips on the underlying <input>/<select> remain. The two "tooltip-disable" workarounds in maps/map.jsp and synoptic/index.jsp existed solely to suppress side effects of the global init and disappear with it. Also: - $('#mapTitle').hide('fade', 1000) — a jQuery UI effect — replaced with core jQuery $.fadeOut(1000). - transitime.js now has a cache-buster query string, mirroring the existing pattern for general.css. - <br>-based HTML in date/time tooltip title attrs converted to &#10; line-break entities so native browser tooltips render multi-line content correctly. Deleted: - transitclockWebapp/src/main/webapp/jquery-ui/ (full vendored library with 12 files including 10 PNG images, full CSS+JS, and a demo). - transitclockWebapp/src/main/webapp/javascript/jquery-ui.{js,min.js} (duplicate vendored copy in the javascript/ dir).
1 parent fbbf862 commit e667860

42 files changed

Lines changed: 45 additions & 31997 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

transitclockWebapp/src/main/webapp/javascript/jquery-ui.js

Lines changed: 0 additions & 2440 deletions
This file was deleted.

transitclockWebapp/src/main/webapp/javascript/jquery-ui.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

transitclockWebapp/src/main/webapp/javascript/transitime.js

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/**
7-
* For getting parameters from query string
7+
* For getting parameters from query string
88
*/
99
function getQueryVariable(paramName) {
1010
var query = window.location.search.substring(1);
@@ -15,29 +15,7 @@ function getQueryVariable(paramName) {
1515
return pair[1];
1616
}
1717
}
18-
18+
1919
// Didn't find the specified param so return false
2020
return false;
2121
}
22-
23-
/**
24-
* Enable JQuery tooltips. In order to use html in tooltip need to
25-
* specify content function. Turning off 'focusin' events is important
26-
* so that tooltip doesn't popup again if previous or next month
27-
* buttons are clicked in a datepicker.
28-
*/
29-
$(function() {
30-
$( document ).tooltip({
31-
// Content for tooltip comes from title attribute of html object
32-
content: function () {
33-
return $(this).prop('title');
34-
},
35-
36-
// Position tooltips to right of element so that not covering
37-
// up element below as happens with default positioning
38-
position: { my: "left+10 center", at: "right center" }
39-
}).off('focusin');
40-
});
41-
42-
43-

transitclockWebapp/src/main/webapp/jquery-ui/README.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)