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 #449

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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public String toString() {

public enum Css {
CUSTOM_FORM("/edit/forms/css/customForm.css"),
JQUERY_UI("/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css");
JQUERY_UI("/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css");

private final String path;

Expand All @@ -90,9 +90,9 @@ public String toString() {

public enum JavaScript {
CUSTOM_FORM_UTILS("/js/customFormUtils.js"),
JQUERY("/js/jquery-1.12.4.min.js"),
JQUERY_MIGRATE("/js/jquery-migrate-1.4.1.js"),
JQUERY_UI("/js/jquery-ui/js/jquery-ui-1.12.1.min.js"),
JQUERY("/js/jquery-3.7.1.min.js"),
JQUERY_MIGRATE("/js/jquery-migrate-3.4.1.js"),
JQUERY_UI("/js/jquery-ui/js/jquery-ui-1.13.2.min.js"),
UTILS("/js/utils.js");

private final String path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ protected void urlEncodingStyleB(String urlToEncode, String expectedUrlResult){


@Test
public void test40984(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test40984(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }

@Test
public void test40988(){ urlEncodingStyleA(
Expand Down Expand Up @@ -287,8 +287,8 @@ public void test39153(){ urlEncodingStyleA(
public void test39472(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test394730(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test394730(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test39473(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -302,8 +302,8 @@ public void test39475(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/ui.datepicker.js",
"/vivo/js/jquery_plugins/ui.datepicker.js"); }
@Test
public void test14958(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test14958(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test14968(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/getURLParam.js",
Expand Down Expand Up @@ -345,8 +345,8 @@ public void test15143(){ urlEncodingStyleA(
"/vivo/js/imageUpload/imageUploadUtils.js"); }
@Test
public void test184670(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css"); }
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css"); }
@Test
public void test18467(){ urlEncodingStyleA(
"/vivo/edit/forms/css/customForm.css",
Expand All @@ -373,8 +373,8 @@ public void test18512(){ urlEncodingStyleA(
public void test18516(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test18543(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test18543(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test185440(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -389,8 +389,8 @@ public void test18545(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/ui.datepicker.js"); }
@Test
public void test18546(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js"); }
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js"); }
@Test
public void test185470(){ urlEncodingStyleA(
"/vivo/js/customFormUtils.js", "/vivo/js/customFormUtils.js"); }
Expand All @@ -410,8 +410,8 @@ public void test27130(){ urlEncodingStyleA(
public void test271590(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test27159(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test27159(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test27160(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -436,8 +436,8 @@ public void test14846(){ urlEncodingStyleA(
public void test148510(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test14851(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test14851(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test14852(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -452,8 +452,8 @@ public void test14853(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/ui.datepicker.js"); }
@Test
public void test43748(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css"); }
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css"); }
@Test
public void test43749(){ urlEncodingStyleA(
"/vivo/edit/forms/css/customForm.css",
Expand All @@ -480,8 +480,8 @@ public void test43757(){ urlEncodingStyleA(
public void test43760(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test437610(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test437610(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test43761(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -496,8 +496,8 @@ public void test437630(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/ui.datepicker.js"); }
@Test
public void test43763(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js"); }
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js"); }
@Test
public void test437640(){ urlEncodingStyleA(
"/vivo/js/customFormUtils.js", "/vivo/js/customFormUtils.js"); }
Expand All @@ -507,8 +507,8 @@ public void test43764(){ urlEncodingStyleA(
"/vivo/edit/forms/js/customFormWithAutocomplete.js"); }
@Test
public void test14550(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css"); }
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css",
"/vivo/js/jquery-ui/css/smoothness/jquery-ui-1.13.2.css"); }
@Test
public void test14551(){ urlEncodingStyleA(
"/vivo/edit/forms/css/customForm.css",
Expand Down Expand Up @@ -538,8 +538,8 @@ public void test14561(){ urlEncodingStyleA( "/vivo/admin/sparqlquery",
public void test14565(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test145650(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test145650(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test145660(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -554,8 +554,8 @@ public void test14567(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/ui.datepicker.js"); }
@Test
public void test145680(){ urlEncodingStyleA(
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.12.1.min.js"); }
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js",
"/vivo/js/jquery-ui/js/jquery-ui-1.13.2.min.js"); }
@Test
public void test14568(){ urlEncodingStyleA(
"/vivo/js/customFormUtils.js", "/vivo/js/customFormUtils.js"); }
Expand All @@ -578,8 +578,8 @@ public void test29081(){ urlEncodingStyleA(
public void test29084(){ urlEncodingStyleA(
"/vivo/js/extensions/String.js", "/vivo/js/extensions/String.js"); }
@Test
public void test29085(){ urlEncodingStyleA( "/vivo/js/jquery-1.12.4.min.js",
"/vivo/js/jquery-1.12.4.min.js"); }
public void test29085(){ urlEncodingStyleA( "/vivo/js/jquery-3.7.1.min.js",
"/vivo/js/jquery-3.7.1.min.js"); }
@Test
public void test290860(){ urlEncodingStyleA(
"/vivo/js/jquery_plugins/jquery.bgiframe.pack.js",
Expand All @@ -597,8 +597,8 @@ public void test29087(){ urlEncodingStyleA(


@Test
public void test35560(){ urlEncodingStyleB( "/js/jquery-1.12.4.min.js",
"/js/jquery-1.12.4.min.js"); }
public void test35560(){ urlEncodingStyleB( "/js/jquery-3.7.1.min.js",
"/js/jquery-3.7.1.min.js"); }
@Test
public void test35562(){ urlEncodingStyleB(
"/js/jquery_plugins/getURLParam.js",
Expand Down
8 changes: 4 additions & 4 deletions webapp/src/main/webapp/js/account/accountAssociateProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ var associateProfileFields = {
associateProfileFields.externalAuthIdFieldHasChanged();
});

this.verifyAssociatedProfileLink.click(function() {
this.verifyAssociatedProfileLink.on("click", function() {
associateProfileFields.openVerifyWindow();
return false;
});

this.changeAssociatedProfileLink.click(function() {
this.changeAssociatedProfileLink.on("click", function() {
associateProfileFields.showAssociatingOptionsArea();
return false;
});
Expand All @@ -99,7 +99,7 @@ var associateProfileFields = {
externalAuthId: associateProfileFields.externalAuthIdField.val()
},
complete: function(xhr, status) {
var results = jQuery.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
associateProfileFields.acCache[request.term] = results;
response(results);
}
Expand Down Expand Up @@ -146,7 +146,7 @@ var associateProfileFields = {
externalAuthId: externalAuthId
},
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
associateProfileFields.idCache[externalAuthId] = results;
associateProfileFields.applyAjaxResultsForExternalAuthIdField(results);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(document).ready(function(){

// The externalAuthOnly checkbox drives the display of the password and re-set
// password fields. When checked, the password fields are hidden
$('input:checkbox[name=externalAuthOnly]').click(function(){
$('input:checkbox[name=externalAuthOnly]').on("click", function(){
if ( this.checked ) {
// If checked, hide those puppies
$('#passwordContainer').addClass('hidden');
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/main/webapp/js/account/accountListenerSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $(document).ready(function(){
});
});

$('.remove-proxy').click(function(){
$('.remove-proxy').on("click", function(){
disableSubmit()
})
});
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/webapp/js/account/accountProxyCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function itemElement(template, uri, label, classLabel, imageUrl, removeInfo) {
element.addClass("proxyInfoElement");

var removeLink = $("[templatePart='remove']", element).first();
removeLink.click(function(event) {
removeLink.on("click", function(event) {
self.removeInfo(self);
return false;
});
Expand Down Expand Up @@ -140,7 +140,7 @@ function proxyAutocomplete(parms, excludedUris, getProxyInfos, addProxyInfo, rep
term: request.term
},
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
cache[request.term] = results;
sendResponse(request, response, filterResults(results));
}
Expand Down
10 changes: 5 additions & 5 deletions webapp/src/main/webapp/js/account/accountProxyItemsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function proxyItemsPanel(panel, contextInfo) {
uri: info.uri
},
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
var results = JSON.parse(xhr.responseText);
if (results.length > 0) {
if ("classLabel" in results[0]) {
info.classLabel = results[0].classLabel;
Expand Down Expand Up @@ -190,19 +190,19 @@ $(document).ready(function() {

var progressImage;

$('#addProfileEditor').click(function(event){
$('#addProfileEditor').on("click", function(event){
progressImage = $(event.target).closest("section").find(".loading-profileMyAccoount")
});

$('#selectProfileEditors').click(function(event){
$('#selectProfileEditors').on("click", function(event){
progressImage = $(event.target).closest("section").find(".loading-relateEditor")
});

$('#selectProfiles').click(function(event){
$('#selectProfiles').on("click", function(event){
progressImage = $(event.target).closest("section").find(".loading-relateProfile")
});

$('#addProfile').click(function(event){
$('#addProfile').on("click", function(event){
progressImage = $(event.target).closest("section").find(".loading-addProfile")
});

Expand Down
6 changes: 3 additions & 3 deletions webapp/src/main/webapp/js/account/accountUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $(document).ready(function(){
//Show is javascript is enabled
$('input:checkbox[name=delete-all]').removeClass('hidden');

$('input:checkbox[name=delete-all]').click(function(){
$('input:checkbox[name=delete-all]').on("click", function(){
if ( this.checked ) {
// if checked, select all the checkboxes
$('input:checkbox[name=deleteAccount]').prop('checked','checked');
Expand All @@ -49,12 +49,12 @@ $(document).ready(function(){
}
});

$('input:checkbox[name=deleteAccount]').click(function(){
$('input:checkbox[name=deleteAccount]').on("click", function(){
$('input:checkbox[name=delete-all]').prop('checked', null);
});

// Confirmation alert for account deletion in userAccounts-list.ftl template
$('input[name="delete-account"]').click(function(){
$('input[name="delete-account"]').on("click", function(){
var countAccount = $('input:checkbox[name=deleteAccount]:checked').length;
if (countAccount == 0){
return false;
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/webapp/js/account/proxyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ $(document).ready(function(){
// Get the i18n variables from the template
$.extend(this, i18nStrings);
//Remove initial value of input text 'Select an existing last name'
$('input[name="proxySelectorAC"]').click(function(){
$('input[name="proxySelectorAC"]').on("click", function(){
$(this).val('');
$("span[name='proxySelectorSearchStatus']").text('')
});

//Alert when user doesn't select an editor and a profile after submitting from for relating proxy-profiles
$('input[name="createRelationship"]').click(function(){
$('input[name="createRelationship"]').on("click", function(){
var $proxyUri = $('#add-relation input[name="proxyUri"]').val();
var $profileUri = $('#add-relation input[name="profileUri"]').val();

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/webapp/js/browseClassGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var browseClassGroups = {
// Event listeners. Called on page load
bindEventListeners: function() {
// Listener for classGroup switching
this.browseClassGroupLinks.click(function() {
this.browseClassGroupLinks.on("click", function() {
uri = $(this).attr("data-uri");
individualCount = $(this).attr("data-count");
browseClassGroups.getVClasses(uri, individualCount);
Expand Down Expand Up @@ -160,7 +160,7 @@ var graphClassGroups = {

// Was unable to append <a> within <svg> -- was always hidden and couldn't get it to display
// so using jQuery click to add links
$('rect').click(function() {
$('rect').on("click", function() {
var index = $('rect').index(this);
var uri = uris[index];
var link = browseClassGroups.baseUrl + '/individuallist?vclassId=' + encodeURIComponent(uri);
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/main/webapp/js/developer/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
} catch (e) {}

return xhr.status >= 200 && xhr.status <= 299;
} // `a.click()` doesn't work for all browsers (#465)
} // `a.on("click", )` doesn't work for all browsers (#465)


function click(node) {
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/main/webapp/js/developer/developerPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function DeveloperPanel(developerAjaxUrl) {
}

function addBehaviorToElements() {
$( "#developerPanelClickMe" ).click(openPanel);
$( "#developerPanelSaveButton" ).click(saveSettings);
$( "#developerPanelBody input:checkbox" ).change(updateDisabledFields);
$( "#developerPanelClickMe" ).on("click", openPanel);
$( "#developerPanelSaveButton" ).on("click",saveSettings);
$( "#developerPanelBody input:checkbox" ).on("change", updateDisabledFields);
}

function openPanel() {
Expand Down
Loading
Loading