Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jQuery to v3.7.1 and jquery-ui to v1.13.2 #3955

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions webapp/src/main/webapp/js/homePageMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ $(document).ready(function(){
getGeoFocusResearcherCount();


$('a#globalLink').click(function() {
$('a#globalLink').on("click", function() {
buildGlobalMap();
$(this).addClass("selected");
$('a#countryLink').removeClass("selected");
$('a#localLink').removeClass("selected");
});

$('a#countryLink').click(function() {
$('a#countryLink').on("click", function() {
buildCountryMap();
$(this).addClass("selected");
$('a#globalLink').removeClass("selected");
$('a#localLink').removeClass("selected");
});

$('a#localLink').click(function() {
$('a#localLink').on("click", function() {
buildLocalMap();
$(this).addClass("selected");
$('a#countryLink').removeClass("selected");
Expand Down Expand Up @@ -365,7 +365,7 @@ $(document).ready(function(){
action: "getGeoFocusLocations",
},
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
if ( results.length == 0 ) {
var html = i18nStrings.currentlyNoResearchers;
$('section#home-geo-focus div#timeIndicatorGeo span').html(html);
Expand Down Expand Up @@ -401,7 +401,7 @@ $(document).ready(function(){
},
complete: function(xhr, status) {

var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
// there will only ever be one key/value pair
if ( results != null ) {
geoResearcherCount = results.count;
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/webapp/js/individual/individualUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $(document).ready(function(){
$('a#verbosePropertySwitch:contains("' + i18nStrings.verboseTurnOff + '")').addClass('verbose-off');

// Reveal vCard QR code when QR icon is clicked
$('#qrIcon, .qrCloseLink').click(function() {
$('#qrIcon, .qrCloseLink').on("click", function() {


// only create the img the first time, so check if it already exists
Expand All @@ -32,7 +32,7 @@ $(document).ready(function(){
uri: individualUri,
},
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
if ( results.length == 0 ) {
var html = i18nStrings.currentlyNoResearchers;
}
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/main/webapp/js/jquery_plugins/jquery.blockUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var msie = /MSIE/.test(navigator.userAgent);
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
var mode = document.documentMode || 0;
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
var setExpr = document.createElement('div').style.setExpression; // altered to make jquery happy

// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
Expand Down Expand Up @@ -551,9 +551,9 @@
// bind anchors and inputs for mouse and key events
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
if (b)
$(document).bind(events, opts, handler);
$(document).on(events, opts, handler); // altered to make jquery happy
else
$(document).unbind(events, handler);
$(document).off(events, handler); // altered to make jquery happy

// former impl...
// var $e = $('a,:input');
Expand Down
42 changes: 21 additions & 21 deletions webapp/src/main/webapp/js/visualization/capabilitymap/graph_new.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,23 +412,23 @@ DetailsPanel.prototype.showDetails = function(mode, id) {
$(this.panel)
.empty()
.append(title = $("<h2>" + i18nStringsCap.term + ": " + decodeURIComponent(id) + "</h2>")
.bind("click", function() {
.on("click", function() {
highlight(id);
detailsPane.showDetails(mode, id);
})
.css("cursor", "pointer")
.prepend($("<span/>").addClass("orange-square"))
)
.append($("<button>" + i18nStringsCap.remove_capability + "</button>")
.bind("click", function() {
.on("click", function() {
g.removeCapability(id);
that.clearDetails();
render();
})
)
.append($("<span> </span>"))
.append($("<button>" + i18nStringsCap.expand + "</button>")
.bind("click", function() {
.on("click", function() {
expandLastQuery = 1;
addKwd(decodeURIComponent(id));
})
Expand Down Expand Up @@ -473,15 +473,15 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) {
$("<h2>" + i18nStringsCap.group + ": " + group.capabilities.map(function(c) {
return decodeURIComponent(c.term);
}).join(", ") + "</h2>")
.bind("click", function() {
.on("click", function() {
highlight(i);
detailsPane.showDetails("group", i);
})
.css("cursor", "pointer")
.prepend($("<span/>").addClass("blue-circle"))
)
.append($("<button>" + i18nStringsCap.remove_group + "</button>")
.bind("click", function() {
.on("click", function() {
g.removeGroup(group);
that.clearDetails();
render();
Expand All @@ -507,7 +507,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) {
.append($("<span> </span>"))
.append($("<a>[X]</a>")
.css("cursor", "pointer")
.bind("click", function(k) {
.on("click", function(k) {
return function() {
group.removePerson(group.people[k]);
render();
Expand All @@ -531,7 +531,7 @@ DetailsPanel.makeslidedown = function(q, l, name) {
return l != undefined
? $("<p>Matching " + name + ": " + l.length + " </p>")
.append($("<button>+</button>")
.bind("click", function() {
.on("click", function() {
if ($(this).html() == "+") {
$(this).parent().children("ul").slideDown();
$(this).html("-");
Expand Down Expand Up @@ -849,7 +849,7 @@ var render = function() {

// refresh UI
$("#log").empty().append($("<button>" + i18nStringsCap.pause + "</button>")
.bind("click", function() {
.on("click", function() {
if ($(this).html() != i18nStringsCap.resume) {
$(this).html(i18nStringsCap.resume);
force.stop();
Expand All @@ -861,7 +861,7 @@ var render = function() {
}
})
).append(" ").append($("<button>" + i18nStringsCap.hide_group_labels + "</button>")
.bind("click", function() {
.on("click", function() {
if ($(this).html() != i18nStringsCap.show_group_labels) {
$(this).html(i18nStringsCap.show_group_labels);
$(".label-group").css("visibility", "hidden");
Expand All @@ -871,7 +871,7 @@ var render = function() {
}
})
);
$("#log_printout").empty().append($("<button>" + i18nStringsCap.delete_selected + "</button>").bind("click", function() {
$("#log_printout").empty().append($("<button>" + i18nStringsCap.delete_selected + "</button>").on("click", function() {
$("input[type=checkbox]:checked").each(function() {
g.removeCapability($(this).attr("name"));
$(this).parent().remove();
Expand All @@ -882,7 +882,7 @@ var render = function() {
$("#log_printout")
.append($("<li/>")
.append($("<a> " + decodeURI(c.term) + "</a>")
.bind("click", function() {
.on("click", function() {
highlight(c.term);
detailsPane.showDetails("capability", c.term);
})
Expand Down Expand Up @@ -1022,7 +1022,7 @@ var reset = function() {
}
var unhide = function() {
hidden = false;
$("#resetButton").removeAttr("disabled");
$("#resetButton").prop("disabled", false );
if ($(window).width() > 1230) {
$("#container").css("box-shadow", "0px 0px 20px -6px #000000");
$("#container").animate({"height" : "600px", "width" : "1200px", "margin-bottom" : "20px", "margin-left" : (($("#main-content").width() - 1200) / 2) + "px"}, 500);
Expand All @@ -1046,7 +1046,7 @@ function run_demo(demoValues) {
var queryKeyDown = function(e) {
e.cancelBubble = true;
if(e.which === 13 || e.keyCode === 13) {
subButton.click();
subButton.trigger("click");
e.returnValue = false;
e.cancel = true;
return false;
Expand All @@ -1068,28 +1068,28 @@ $(document).ready(function() {
});

// querycutoffelem hadling
$(queryCutoffElem).bind("keyup", function() {
$(queryCutoffElem).on("keyup", function() {
var that = this;
console.log($(this).val());
if ($(this).data("prev") != $(this).val() && $("#infovis").html() != "") {
$("#cutofflabel").empty().append($("<img/>")
.attr("src", contextPath + "/images/visualization/capabilitymap/refresh.png")
.bind("click", function() {
.on("click", function() {
$.each(g.getCapabilities(), function(i, c) {
if (c.cutoff != queryCutoffElem.value) {
g.removeCapability(c.term);
queryQueue.push(decodeURI(c.term));
}
});
$(this).unbind("click");
$(this).off("click");
$(this).parent().html("Cutoff:");
progressBar.reset(queryQueue.length, 1);
addKwd(false);
return false;
})
);
setTimeout(function() {
$("#cutofflabel img").unbind("click");
$("#cutofflabel img").off("click");
$("#cutofflabel").html("Cutoff:");
}, 5000);
}
Expand All @@ -1107,20 +1107,20 @@ $(document).ready(function() {
}

// queryfield
$("#query").bind("focus", function() {
$("#query").on("focus", function() {
$(this).data("previous", $(this).val());
$(this).val("");
});
$("#query").bind("blur", function() {
$("#query").on("blur", function() {
if ($(this).val() == "") $(this).val($(this).data("previous"));
else $(this).data("previous", $(this).val());
});
$("#query").focus();
$("#query").trigger("focus");
enableSubButton();

// tabs
$(".tabs div ul li + li + li + li + li").parent().children(":last-child").find("a").trigger("click");
$(".tabs ul.titles li[class!=\"full\"]").bind("click", function(e) {
$(".tabs ul.titles li[class!=\"full\"]").on("click", function(e) {
$(this).parent().children("li").removeClass("activeTab");
$(this).addClass("activeTab");
$(this).parent().parent().find("div .result_section").css("display", "none");
Expand Down
Loading
Loading