From 0b93ebde4f1f65acb000cf573949d694c39c95e5 Mon Sep 17 00:00:00 2001 From: Benjamin Gross Date: Fri, 29 Dec 2023 15:56:00 -0600 Subject: [PATCH 1/2] Upgrade jQuery to 3.7.1 --- webapp/src/main/webapp/js/homePageMaps.js | 10 +- .../webapp/js/individual/individualUtils.js | 4 +- .../js/jquery_plugins/jquery.blockUI.js | 6 +- .../visualization/capabilitymap/graph_new.js | 42 ++-- .../capabilitymap/jquery.color.js | 224 ++++++++++-------- .../coPIship/coPIship-person-level.js | 4 +- .../coauthorship/coauthorship-personlevel.js | 4 +- .../js/visualization/dataTables.helper.js | 8 +- .../js/visualization/entitycomparison/util.js | 8 +- .../mapofscience/ComparisonDataTableWidget.js | 8 +- .../mapofscience/ControlPanel.js | 2 +- .../mapofscience/CustomMarker.js | 2 +- .../mapofscience/DataTableWidget.js | 4 +- .../mapofscience/SimpleDataTableWidget.js | 4 +- .../mapofscience/VisCommonControl.js | 4 +- .../visualization/personlevel/person-level.js | 2 +- .../freemarker/body/harvester/fileharvest.ftl | 4 +- .../individual--foaf-person-2column.ftl | 4 +- .../individual--foaf-person-quickview.ftl | 4 +- .../individual-affiliated-departments.ftl | 4 +- .../individual-affiliated-research-areas.ftl | 4 +- .../edit/forms/addAssociatedConcept.ftl | 4 +- .../forms/addAuthorsToInformationResource.ftl | 4 +- ...nceptThroughObjectPropertyAutoComplete.ftl | 4 +- .../forms/addEditorsToInformationResource.ftl | 4 +- .../edit/forms/addEditorshipToPerson.ftl | 4 +- .../edit/forms/addFullNameToPerson.ftl | 4 +- .../edit/forms/addGrantRoleToPerson.ftl | 4 +- .../edit/forms/addOrcidIdToPerson.ftl | 4 +- .../edit/forms/addPresenterRoleToPerson.ftl | 4 +- .../edit/forms/addPublicationToPerson.ftl | 4 +- .../edit/forms/addRoleToPersonTwoStage.ftl | 4 +- .../edit/forms/addUserDefinedConcept.ftl | 4 +- .../edit/forms/autoCompleteDataPropForm.ftl | 4 +- .../edit/forms/grantAdministeredBy.ftl | 4 +- .../edit/forms/grantHasContributor.ftl | 4 +- .../js/addAuthorsToInformationResource.js | 46 ++-- .../freemarker/edit/forms/js/addConcept.js | 14 +- .../js/addEditorsToInformationResource.js | 34 +-- .../edit/forms/js/adviseeRelationshipUtils.js | 2 +- .../edit/forms/js/advisorRelationshipUtils.js | 2 +- .../edit/forms/js/awardReceiptUtils.js | 2 +- .../js/customFormWithDataAutocomplete.js | 18 +- .../edit/forms/js/manageHideShowStatus.js | 4 +- .../forms/js/manageWebpagesForIndividual.js | 9 +- .../edit/forms/js/publicationToPersonUtils.js | 2 +- .../edit/forms/manageGrantsForIndividual.ftl | 4 +- .../forms/managePeopleForOrganization.ftl | 4 +- .../forms/managePublicationsForIndividual.ftl | 4 +- .../forms/manageWebpagesForIndividual.ftl | 4 +- .../forms/organizationAdministersGrant.ftl | 4 +- .../edit/forms/organizationForTraining.ftl | 4 +- .../forms/organizationHasPositionHistory.ftl | 4 +- .../forms/personHasAdviseeRelationship.ftl | 4 +- .../forms/personHasAdvisorRelationship.ftl | 4 +- .../edit/forms/personHasAwardOrHonor.ftl | 4 +- .../forms/personHasEducationalTraining.ftl | 4 +- .../edit/forms/personHasEmailAddress.ftl | 4 +- .../edit/forms/personHasIssuedCredential.ftl | 4 +- .../edit/forms/personHasPositionHistory.ftl | 4 +- .../edit/forms/personHasPreferredTitle.ftl | 4 +- .../edit/forms/projectHasParticipant.ftl | 4 +- .../edit/forms/subjectHasMailingAddress.ftl | 4 +- .../edit/forms/subjectHasPhoneFaxNumber.ftl | 4 +- .../capabilitymap/capabilityMap.ftl | 6 +- .../entityComparisonSetup.ftl | 6 +- .../mapOfScience/mapOfScienceSetup.ftl | 6 +- .../personlevel/coAuthorPersonLevelD3.ftl | 2 +- .../personlevel/coPIPersonLevelD3.ftl | 2 +- .../src/main/webapp/themes/nemo/js/readers.js | 4 +- .../main/webapp/themes/nemo/js/resultsNav.js | 2 +- .../themes/nemo/templates/headScripts.ftl | 2 +- .../templates/individual--foaf-person.ftl | 6 +- .../themes/nemo/templates/individual-menu.ftl | 2 +- .../nemo/templates/mapOfScienceSetup.ftl | 8 +- .../individual/individual--foaf-person.ftl | 4 +- .../templates/page/partials/headScripts.ftl | 4 +- .../templates/individual--foaf-person.ftl | 4 +- 78 files changed, 350 insertions(+), 329 deletions(-) diff --git a/webapp/src/main/webapp/js/homePageMaps.js b/webapp/src/main/webapp/js/homePageMaps.js index d217418828..f242fdbd80 100644 --- a/webapp/src/main/webapp/js/homePageMaps.js +++ b/webapp/src/main/webapp/js/homePageMaps.js @@ -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"); @@ -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); @@ -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; diff --git a/webapp/src/main/webapp/js/individual/individualUtils.js b/webapp/src/main/webapp/js/individual/individualUtils.js index 4f6550dac6..fd83abff67 100644 --- a/webapp/src/main/webapp/js/individual/individualUtils.js +++ b/webapp/src/main/webapp/js/individual/individualUtils.js @@ -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 @@ -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; } diff --git a/webapp/src/main/webapp/js/jquery_plugins/jquery.blockUI.js b/webapp/src/main/webapp/js/jquery_plugins/jquery.blockUI.js index 90ce5d64df..920d6f1ac5 100644 --- a/webapp/src/main/webapp/js/jquery_plugins/jquery.blockUI.js +++ b/webapp/src/main/webapp/js/jquery_plugins/jquery.blockUI.js @@ -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); }; @@ -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'); diff --git a/webapp/src/main/webapp/js/visualization/capabilitymap/graph_new.js b/webapp/src/main/webapp/js/visualization/capabilitymap/graph_new.js index e461dcdcad..81a4357bf3 100755 --- a/webapp/src/main/webapp/js/visualization/capabilitymap/graph_new.js +++ b/webapp/src/main/webapp/js/visualization/capabilitymap/graph_new.js @@ -412,7 +412,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) { $(this.panel) .empty() .append(title = $("

" + i18nStringsCap.term + ": " + decodeURIComponent(id) + "

") - .bind("click", function() { + .on("click", function() { highlight(id); detailsPane.showDetails(mode, id); }) @@ -420,7 +420,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) { .prepend($("").addClass("orange-square")) ) .append($("") - .bind("click", function() { + .on("click", function() { g.removeCapability(id); that.clearDetails(); render(); @@ -428,7 +428,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) { ) .append($(" ")) .append($("") - .bind("click", function() { + .on("click", function() { expandLastQuery = 1; addKwd(decodeURIComponent(id)); }) @@ -473,7 +473,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) { $("

" + i18nStringsCap.group + ": " + group.capabilities.map(function(c) { return decodeURIComponent(c.term); }).join(", ") + "

") - .bind("click", function() { + .on("click", function() { highlight(i); detailsPane.showDetails("group", i); }) @@ -481,7 +481,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) { .prepend($("").addClass("blue-circle")) ) .append($("") - .bind("click", function() { + .on("click", function() { g.removeGroup(group); that.clearDetails(); render(); @@ -507,7 +507,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) { .append($(" ")) .append($("[X]") .css("cursor", "pointer") - .bind("click", function(k) { + .on("click", function(k) { return function() { group.removePerson(group.people[k]); render(); @@ -531,7 +531,7 @@ DetailsPanel.makeslidedown = function(q, l, name) { return l != undefined ? $("

Matching " + name + ": " + l.length + "

") .append($("") - .bind("click", function() { + .on("click", function() { if ($(this).html() == "+") { $(this).parent().children("ul").slideDown(); $(this).html("-"); @@ -849,7 +849,7 @@ var render = function() { // refresh UI $("#log").empty().append($("") - .bind("click", function() { + .on("click", function() { if ($(this).html() != i18nStringsCap.resume) { $(this).html(i18nStringsCap.resume); force.stop(); @@ -861,7 +861,7 @@ var render = function() { } }) ).append(" ").append($("") - .bind("click", function() { + .on("click", function() { if ($(this).html() != i18nStringsCap.show_group_labels) { $(this).html(i18nStringsCap.show_group_labels); $(".label-group").css("visibility", "hidden"); @@ -871,7 +871,7 @@ var render = function() { } }) ); - $("#log_printout").empty().append($("").bind("click", function() { + $("#log_printout").empty().append($("").on("click", function() { $("input[type=checkbox]:checked").each(function() { g.removeCapability($(this).attr("name")); $(this).parent().remove(); @@ -882,7 +882,7 @@ var render = function() { $("#log_printout") .append($("
  • ") .append($(" " + decodeURI(c.term) + "") - .bind("click", function() { + .on("click", function() { highlight(c.term); detailsPane.showDetails("capability", c.term); }) @@ -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); @@ -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; @@ -1068,20 +1068,20 @@ $(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($("") .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); @@ -1089,7 +1089,7 @@ $(document).ready(function() { }) ); setTimeout(function() { - $("#cutofflabel img").unbind("click"); + $("#cutofflabel img").off("click"); $("#cutofflabel").html("Cutoff:"); }, 5000); } @@ -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"); diff --git a/webapp/src/main/webapp/js/visualization/capabilitymap/jquery.color.js b/webapp/src/main/webapp/js/visualization/capabilitymap/jquery.color.js index 64a0b0717b..7a9f8ef99e 100755 --- a/webapp/src/main/webapp/js/visualization/capabilitymap/jquery.color.js +++ b/webapp/src/main/webapp/js/visualization/capabilitymap/jquery.color.js @@ -2,20 +2,36 @@ * jQuery Color Animations v@VERSION * https://github.com/jquery/jquery-color * - * Copyright 2013 jQuery Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * Date: @DATE */ -(function( jQuery, undefined ) { - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", +( function( root, factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery" ], factory ); + } else if ( typeof exports === "object" ) { + module.exports = factory( require( "jquery" ) ); + } else { + factory( root.jQuery ); + } +} )( this, function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + class2type = {}, + toString = class2type.toString, // plusequals test for += 100 -= 100 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. - stringParsers = [{ + stringParsers = [ { re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function( execResult ) { return [ @@ -36,23 +52,32 @@ ]; } }, { + // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/, parse: function( execResult ) { return [ parseInt( execResult[ 1 ], 16 ), parseInt( execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ], 16 ) + parseInt( execResult[ 3 ], 16 ), + execResult[ 4 ] ? + ( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) : + 1 ]; } }, { + // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/, parse: function( execResult ) { return [ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ), + execResult[ 4 ] ? + ( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 ) + .toFixed( 2 ) : + 1 ]; } }, { @@ -66,7 +91,7 @@ execResult[ 4 ] ]; } - }], + } ], // jQuery.Color( ) color = jQuery.Color = function( color, green, blue, alpha ) { @@ -120,10 +145,6 @@ floor: true } }, - support = color.support = {}, - - // element for support tests - supportElem = jQuery( "

    " )[ 0 ], // colors = jQuery.Color.names colors, @@ -131,10 +152,6 @@ // local aliases of functions called often each = jQuery.each; -// determine rgba support immediately -supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; -support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; - // define cache name and alpha properties // for rgba and hsla spaces each( spaces, function( spaceName, space ) { @@ -144,32 +161,43 @@ each( spaces, function( spaceName, space ) { type: "percent", def: 1 }; -}); +} ); + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function getType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + return typeof obj === "object" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} function clamp( value, prop, allowEmpty ) { var type = propTypes[ prop.type ] || {}; if ( value == null ) { - return (allowEmpty || !prop.def) ? null : prop.def; + return ( allowEmpty || !prop.def ) ? null : prop.def; } // ~~ is an short way of doing floor for positive numbers value = type.floor ? ~~value : parseFloat( value ); - // IE will pass in empty strings as value for alpha, - // which will hit this case - if ( isNaN( value ) ) { - return prop.def; - } - if ( type.mod ) { + // we add mod before modding to make sure that negatives values // get converted properly: -10 -> 350 - return (value + type.mod) % type.mod; + return ( value + type.mod ) % type.mod; } // for now all property types without mod have min and max - return 0 > value ? 0 : type.max < value ? type.max : value; + return Math.min( type.max, Math.max( 0, value ) ); } function stringParse( string ) { @@ -178,7 +206,7 @@ function stringParse( string ) { string = string.toLowerCase(); - each( stringParsers, function( i, parser ) { + each( stringParsers, function( _i, parser ) { var parsed, match = parser.re.exec( string ), values = match && parser.parse( match ), @@ -195,7 +223,7 @@ function stringParse( string ) { // exit each( stringParsers ) here because we matched return false; } - }); + } ); // Found a stringParser that handled it if ( rgba.length ) { @@ -224,7 +252,7 @@ color.fn = jQuery.extend( color.prototype, { } var inst = this, - type = jQuery.type( red ), + type = getType( red ), rgba = this._rgba = []; // more than 1 argument specified - assume ( red, green, blue, alpha ) @@ -238,21 +266,21 @@ color.fn = jQuery.extend( color.prototype, { } if ( type === "array" ) { - each( spaces.rgba.props, function( key, prop ) { + each( spaces.rgba.props, function( _key, prop ) { rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); - }); + } ); return this; } if ( type === "object" ) { if ( red instanceof color ) { - each( spaces, function( spaceName, space ) { + each( spaces, function( _spaceName, space ) { if ( red[ space.cache ] ) { inst[ space.cache ] = red[ space.cache ].slice(); } - }); + } ); } else { - each( spaces, function( spaceName, space ) { + each( spaces, function( _spaceName, space ) { var cache = space.cache; each( space.props, function( key, prop ) { @@ -270,17 +298,21 @@ color.fn = jQuery.extend( color.prototype, { // this is the only case where we allow nulls for ALL properties. // call clamp with alwaysAllowEmpty inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); - }); + } ); // everything defined but alpha? if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + // use the default of 1 - inst[ cache ][ 3 ] = 1; + if ( inst[ cache ][ 3 ] == null ) { + inst[ cache ][ 3 ] = 1; + } + if ( space.from ) { inst._rgba = space.from( inst[ cache ] ); } } - }); + } ); } return this; } @@ -293,17 +325,17 @@ color.fn = jQuery.extend( color.prototype, { each( spaces, function( _, space ) { var localCache, isCache = is[ space.cache ]; - if (isCache) { + if ( isCache ) { localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; each( space.props, function( _, prop ) { if ( isCache[ prop.idx ] != null ) { same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); return same; } - }); + } ); } return same; - }); + } ); return same; }, _space: function() { @@ -313,7 +345,7 @@ color.fn = jQuery.extend( color.prototype, { if ( inst[ space.cache ] ) { used.push( spaceName ); } - }); + } ); return used.pop(); }, transition: function( other, distance ) { @@ -325,7 +357,7 @@ color.fn = jQuery.extend( color.prototype, { result = start.slice(); end = end[ space.cache ]; - each( space.props, function( key, prop ) { + each( space.props, function( _key, prop ) { var index = prop.idx, startValue = start[ index ], endValue = end[ index ], @@ -335,6 +367,7 @@ color.fn = jQuery.extend( color.prototype, { if ( endValue === null ) { return; } + // if null - use end if ( startValue === null ) { result[ index ] = endValue; @@ -348,10 +381,11 @@ color.fn = jQuery.extend( color.prototype, { } result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); } - }); + } ); return this[ spaceName ]( result ); }, blend: function( opaque ) { + // if we are already opaque - return ourself if ( this._rgba[ 3 ] === 1 ) { return this; @@ -363,20 +397,23 @@ color.fn = jQuery.extend( color.prototype, { return color( jQuery.map( rgb, function( v, i ) { return ( 1 - a ) * blend[ i ] + a * v; - })); + } ) ); }, toRgbaString: function() { var prefix = "rgba(", rgba = jQuery.map( this._rgba, function( v, i ) { - return v == null ? ( i > 2 ? 1 : 0 ) : v; - }); + if ( v != null ) { + return v; + } + return i > 2 ? 1 : 0; + } ); if ( rgba[ 3 ] === 1 ) { rgba.pop(); prefix = "rgb("; } - return prefix + rgba.join() + ")"; + return prefix + rgba.join( ", " ) + ")"; }, toHslaString: function() { var prefix = "hsla(", @@ -390,13 +427,13 @@ color.fn = jQuery.extend( color.prototype, { v = Math.round( v * 100 ) + "%"; } return v; - }); + } ); if ( hsla[ 3 ] === 1 ) { hsla.pop(); prefix = "hsl("; } - return prefix + hsla.join() + ")"; + return prefix + hsla.join( ", " ) + ")"; }, toHexString: function( includeAlpha ) { var rgba = this._rgba.slice(), @@ -409,14 +446,13 @@ color.fn = jQuery.extend( color.prototype, { return "#" + jQuery.map( rgba, function( v ) { // default to 0 when nulls exist - v = ( v || 0 ).toString( 16 ); - return v.length === 1 ? "0" + v : v; - }).join(""); + return ( "0" + ( v || 0 ).toString( 16 ) ).substr( -2 ); + } ).join( "" ); }, toString: function() { - return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + return this.toRgbaString(); } -}); +} ); color.fn.parse.prototype = color.fn; // hsla conversions adapted from: @@ -425,18 +461,18 @@ color.fn.parse.prototype = color.fn; function hue2rgb( p, q, h ) { h = ( h + 1 ) % 1; if ( h * 6 < 1 ) { - return p + (q - p) * h * 6; + return p + ( q - p ) * h * 6; } - if ( h * 2 < 1) { + if ( h * 2 < 1 ) { return q; } if ( h * 3 < 2 ) { - return p + (q - p) * ((2/3) - h) * 6; + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; } return p; } -spaces.hsla.to = function ( rgba ) { +spaces.hsla.to = function( rgba ) { if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { return [ null, null, null, rgba[ 3 ] ]; } @@ -470,10 +506,10 @@ spaces.hsla.to = function ( rgba ) { } else { s = diff / ( 2 - add ); } - return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; + return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; }; -spaces.hsla.from = function ( hsla ) { +spaces.hsla.from = function( hsla ) { if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { return [ null, null, null, hsla[ 3 ] ]; } @@ -511,7 +547,7 @@ each( spaces, function( spaceName, space ) { } var ret, - type = jQuery.type( value ), + type = getType( value ), arr = ( type === "array" || type === "object" ) ? value : arguments, local = this[ cache ].slice(); @@ -521,7 +557,7 @@ each( spaces, function( spaceName, space ) { val = local[ prop.idx ]; } local[ prop.idx ] = clamp( val, prop ); - }); + } ); if ( from ) { ret = color( from( local ) ); @@ -534,16 +570,22 @@ each( spaces, function( spaceName, space ) { // makes red() green() blue() alpha() hue() saturation() lightness() each( props, function( key, prop ) { + // alpha is included in more than one space if ( color.fn[ key ] ) { return; } color.fn[ key ] = function( value ) { - var vtype = jQuery.type( value ), - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), - local = this[ fn ](), - cur = local[ prop.idx ], - match; + var local, cur, match, fn, + vtype = getType( value ); + + if ( key === "alpha" ) { + fn = this._hsla ? "hsla" : "rgba"; + } else { + fn = spaceName; + } + local = this[ fn ](); + cur = local[ prop.idx ]; if ( vtype === "undefined" ) { return cur; @@ -551,7 +593,7 @@ each( spaces, function( spaceName, space ) { if ( vtype === "function" ) { value = value.call( this, cur ); - vtype = jQuery.type( value ); + vtype = getType( value ); } if ( value == null && prop.empty ) { return this; @@ -565,46 +607,23 @@ each( spaces, function( spaceName, space ) { local[ prop.idx ] = value; return this[ fn ]( local ); }; - }); -}); + } ); +} ); // add cssHook and .fx.step function for each named hook. // accept a space separated string of properties color.hook = function( hook ) { var hooks = hook.split( " " ); - each( hooks, function( i, hook ) { + each( hooks, function( _i, hook ) { jQuery.cssHooks[ hook ] = { set: function( elem, value ) { - var parsed, curElem, - backgroundColor = ""; + var parsed; - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { + if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { value = color( parsed || value ); - if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { - curElem = hook === "backgroundColor" ? elem.parentNode : elem; - while ( - (backgroundColor === "" || backgroundColor === "transparent") && - curElem && curElem.style - ) { - try { - backgroundColor = jQuery.css( curElem, "backgroundColor" ); - curElem = curElem.parentNode; - } catch ( e ) { - } - } - - value = value.blend( backgroundColor && backgroundColor !== "transparent" ? - backgroundColor : - "_default" ); - } - value = value.toRgbaString(); } - try { - elem.style[ hook ] = value; - } catch( e ) { - // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' - } + elem.style[ hook ] = value; } }; jQuery.fx.step[ hook ] = function( fx ) { @@ -615,7 +634,7 @@ color.hook = function( hook ) { } jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); }; - }); + } ); }; @@ -625,9 +644,9 @@ jQuery.cssHooks.borderColor = { expand: function( value ) { var expanded = {}; - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) { expanded[ "border" + part + "Color" ] = value; - }); + } ); return expanded; } }; @@ -636,6 +655,7 @@ jQuery.cssHooks.borderColor = { // Usage of any of the other color names requires adding yourself or including // jquery.color.svg-names.js. colors = jQuery.Color.names = { + // 4.1. Basic color keywords aqua: "#00ffff", black: "#000000", @@ -660,4 +680,4 @@ colors = jQuery.Color.names = { _default: "#ffffff" }; -})( jQuery ); +} ); diff --git a/webapp/src/main/webapp/js/visualization/coPIship/coPIship-person-level.js b/webapp/src/main/webapp/js/visualization/coPIship/coPIship-person-level.js index 0e2fb52bb1..b26d979baa 100644 --- a/webapp/src/main/webapp/js/visualization/coPIship/coPIship-person-level.js +++ b/webapp/src/main/webapp/js/visualization/coPIship/coPIship-person-level.js @@ -18,7 +18,7 @@ var visKeyForFlash = "CoPI"; function renderStatsOnNodeClicked(json){ //console.log(json); - var obj = jQuery.parseJSON(json); + var obj = JSON.parse(json); var works = ""; var persons = ""; @@ -78,7 +78,7 @@ function renderStatsOnNodeClicked(json){ processProfileInformation("investigatorName", "profileMoniker", "profileImage", - jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")), + JSON.parse(getWellFormedURLs(obj.url, "profile_info")), true, true); diff --git a/webapp/src/main/webapp/js/visualization/coauthorship/coauthorship-personlevel.js b/webapp/src/main/webapp/js/visualization/coauthorship/coauthorship-personlevel.js index e560432179..e9ba22abc6 100644 --- a/webapp/src/main/webapp/js/visualization/coauthorship/coauthorship-personlevel.js +++ b/webapp/src/main/webapp/js/visualization/coauthorship/coauthorship-personlevel.js @@ -16,7 +16,7 @@ var visKeyForFlash = "CoAuthor"; function renderStatsOnNodeClicked(json){ - var obj = jQuery.parseJSON(json); + var obj = JSON.parse(json); var works = ""; var persons = ""; @@ -74,7 +74,7 @@ function renderStatsOnNodeClicked(json){ processProfileInformation("authorName", "profileMoniker", "profileImage", - jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")), + JSON.parse(getWellFormedURLs(obj.url, "profile_info")), true, true); diff --git a/webapp/src/main/webapp/js/visualization/dataTables.helper.js b/webapp/src/main/webapp/js/visualization/dataTables.helper.js index 585b04c8bd..25d2795186 100644 --- a/webapp/src/main/webapp/js/visualization/dataTables.helper.js +++ b/webapp/src/main/webapp/js/visualization/dataTables.helper.js @@ -47,25 +47,25 @@ $.fn.dataTableExt.oPagination.gmail_style = { nPaging.appendChild(nNext); nPaging.appendChild(nLast); - $(nFirst).click(function () { + $(nFirst).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "first")) { fnCallbackDraw(oSettings); } }); - $(nPrevious).click(function () { + $(nPrevious).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "previous")) { fnCallbackDraw(oSettings); } }); - $(nNext).click(function () { + $(nNext).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "next")) { fnCallbackDraw(oSettings); } }); - $(nLast).click(function () { + $(nLast).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "last")) { fnCallbackDraw(oSettings); } diff --git a/webapp/src/main/webapp/js/visualization/entitycomparison/util.js b/webapp/src/main/webapp/js/visualization/entitycomparison/util.js index 24e9c1fd1e..2cf5c4751f 100644 --- a/webapp/src/main/webapp/js/visualization/entitycomparison/util.js +++ b/webapp/src/main/webapp/js/visualization/entitycomparison/util.js @@ -42,25 +42,25 @@ $.extend(this, i18nStringsUtil); nPaging.appendChild(nNext); nPaging.appendChild(nLast); - $(nFirst).click(function () { + $(nFirst).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "first")) { fnCallbackDraw(oSettings); } }); - $(nPrevious).click(function () { + $(nPrevious).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "previous")) { fnCallbackDraw(oSettings); } }); - $(nNext).click(function () { + $(nNext).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "next")) { fnCallbackDraw(oSettings); } }); - $(nLast).click(function () { + $(nLast).on("click", function () { if (oSettings.oApi._fnPageChange(oSettings, "last")) { fnCallbackDraw(oSettings); } diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/ComparisonDataTableWidget.js b/webapp/src/main/webapp/js/visualization/mapofscience/ComparisonDataTableWidget.js index da59b24d5a..d6be25a6e2 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/ComparisonDataTableWidget.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/ComparisonDataTableWidget.js @@ -126,19 +126,19 @@ var ComparisonDataTableWidget = Class.extend({ table.append(tbody); me.tableDiv.append(table); - table.children("tbody").children("tr").mouseenter(function() { + table.children("tbody").children("tr").on("mouseenter", function() { var item = me.subEntities[$(this).attr("id")]; me.sciMapWidget.mouseIn(item.type, item.label); }); - table.children("tbody").children("tr").mouseleave(function() { + table.children("tbody").children("tr").on("mouseleave", function() { var item = me.subEntities[$(this).attr("id")]; me.sciMapWidget.mouseOut(item.type, item.label); }); - $('.chk').click(function() { + $('.chk').on("click", function() { var element = $(this); var index = element.attr("value"); var item = me.subEntities[index]; @@ -236,7 +236,7 @@ var ComparisonDataTableWidget = Class.extend({ var item = me.subEntities[$(this).attr("value")]; if (item.type == me.currentSelectedFilter) { // click event didn't work at this point??? - $(this).click(); + $(this).trigger("click"); me.loadEntity(item.uri, $(this).attr("value")); return false; } diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/ControlPanel.js b/webapp/src/main/webapp/js/visualization/mapofscience/ControlPanel.js index e7c49c00a6..68775b2921 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/ControlPanel.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/ControlPanel.js @@ -138,7 +138,7 @@ var CheckBoxPanel = ControlPanel.extend({ } }, click: function(handlerFunc) { - this.checkBox.click(handlerFunc); + this.checkBox.on("click", handlerFunc); }, isChecked: function() { return this.checkBox.prop('checked'); diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/CustomMarker.js b/webapp/src/main/webapp/js/visualization/mapofscience/CustomMarker.js index 913a480993..f5065cedb3 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/CustomMarker.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/CustomMarker.js @@ -36,7 +36,7 @@ var ScinodePolygon = CirclePolygon.extend({ })); me.registerEvent(addMouseOverListener(polygon, function() { - me.focus(); + me.trigger("focus"); })); me.registerEvent(addMouseOutListener(polygon, function() { diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/DataTableWidget.js b/webapp/src/main/webapp/js/visualization/mapofscience/DataTableWidget.js index 6b3d582ea2..87b50b48e6 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/DataTableWidget.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/DataTableWidget.js @@ -172,13 +172,13 @@ var DataTableWidget = Class.extend({ table.append(tbody); me.tableDiv.append(table); - table.children("tbody").children("tr").mouseenter(function() { + table.children("tbody").children("tr").on("mouseenter", function() { var params = me.parseIDIntoScienceTypeAreaID($(this).attr("id")); me.sciMapWidget.mouseIn(params[0], params[1]); }); - table.children("tbody").children("tr").mouseleave(function() { + table.children("tbody").children("tr").on("mouseleave", function() { var params = me.parseIDIntoScienceTypeAreaID($(this).attr("id")); me.sciMapWidget.mouseOut(params[0], params[1]); diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/SimpleDataTableWidget.js b/webapp/src/main/webapp/js/visualization/mapofscience/SimpleDataTableWidget.js index 34e90b42a1..a8eda9f9e8 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/SimpleDataTableWidget.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/SimpleDataTableWidget.js @@ -109,11 +109,11 @@ var SimpleDataTableWidget = Class.extend({ me.tableDiv.append(table); /* Register events */ - table.children("tbody").children("tr").mouseenter(function() { + table.children("tbody").children("tr").on("mouseenter", function() { me.sciMapWidget.mouseInNode(me.type, me.label, $(this).attr("id")); }); - table.children("tbody").children("tr").mouseleave(function() { + table.children("tbody").children("tr").on("mouseleave", function() { me.sciMapWidget.mouseOutNode(me.type, me.label, $(this).attr("id")); }); diff --git a/webapp/src/main/webapp/js/visualization/mapofscience/VisCommonControl.js b/webapp/src/main/webapp/js/visualization/mapofscience/VisCommonControl.js index 27f34d4927..158e204072 100644 --- a/webapp/src/main/webapp/js/visualization/mapofscience/VisCommonControl.js +++ b/webapp/src/main/webapp/js/visualization/mapofscience/VisCommonControl.js @@ -74,13 +74,13 @@ function initFilter(dom) { function initVisModeTypeButton() { // Switch vis mode handling var viewTypeRadio = "input[name='view-type']"; - $(viewTypeRadio).change( function() { + $(viewTypeRadio).on("change", function() { var visMode = $(viewTypeRadio+ ":checked").val(); switchVisMode(visMode); }); /* Init default filter */ - $(viewTypeRadio+ ":eq(0)").click(); + $(viewTypeRadio+ ":eq(0)").trigger("click"); } function initGlobalToolTips() { diff --git a/webapp/src/main/webapp/js/visualization/personlevel/person-level.js b/webapp/src/main/webapp/js/visualization/personlevel/person-level.js index f5fe0ec715..a27e6273a6 100644 --- a/webapp/src/main/webapp/js/visualization/personlevel/person-level.js +++ b/webapp/src/main/webapp/js/visualization/personlevel/person-level.js @@ -208,7 +208,7 @@ function processProfileInformation(nameContainerID, function visLoaded(nodes){ - var jsonedNodes = jQuery.parseJSON(nodes); + var jsonedNodes = JSON.parse(nodes); $(document).ready(function() { createTable(collaboratorTableMetadata.tableID, collaboratorTableMetadata.tableContainer, jsonedNodes); diff --git a/webapp/src/main/webapp/templates/freemarker/body/harvester/fileharvest.ftl b/webapp/src/main/webapp/templates/freemarker/body/harvester/fileharvest.ftl index 3f14411d94..0a38677f3d 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/harvester/fileharvest.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/harvester/fileharvest.ftl @@ -161,12 +161,12 @@ window.onload = init; $(document).ready(function() { - $('a.help').click(function() { + $('a.help').on("click", function() { $('#csvHelp-collapsible').toggleClass('hidden'); return false; }); - $('#harvestButton').click(function() { + $('#harvestButton').on("click", function() { doHarvest(); return false; }); diff --git a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-2column.ftl b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-2column.ftl index a786aeb654..33824b99cc 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-2column.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-2column.ftl @@ -191,7 +191,7 @@ var i18nStringsUriRdf = { ${stylesheets.add('', '', '', - '', + '', '')} ${headScripts.add('', @@ -201,7 +201,7 @@ ${headScripts.add('', '', - '', + '', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl index 2286832529..87a899b308 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl @@ -250,7 +250,7 @@ var i18nStringsUriRdf = { ${stylesheets.add('', '', '', - '', + '', '')} ${headScripts.add('', @@ -261,7 +261,7 @@ ${headScripts.add('', '', - '', + '', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl index 9fb4c7ac5b..07bf1db1e3 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl @@ -18,14 +18,14 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl index 65ba356783..70f92c08dd 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addAuthorsToInformationResource.ftl @@ -196,13 +196,13 @@ var i18nStrings = { }; -${stylesheets.add('', +${stylesheets.add('', '', '', '')} -${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addConceptThroughObjectPropertyAutoComplete.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addConceptThroughObjectPropertyAutoComplete.ftl index 56524f57ad..af78a9687e 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addConceptThroughObjectPropertyAutoComplete.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addConceptThroughObjectPropertyAutoComplete.ftl @@ -134,12 +134,12 @@ Also multiple types parameter set to true only if more than one type returned--> edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator --> -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} - ${scripts.add('', + ${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl index 6f5131aee5..b229f5cb4a 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorsToInformationResource.ftl @@ -166,13 +166,13 @@ var i18nStrings = { }; -${stylesheets.add('', +${stylesheets.add('', '', '', '')} -${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorshipToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorshipToPerson.ftl index a93e61d849..9f2f7d1283 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorshipToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addEditorshipToPerson.ftl @@ -144,12 +144,12 @@ var i18nStrings = { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addFullNameToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addFullNameToPerson.ftl index 6a5b4b4165..069ef60540 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addFullNameToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addFullNameToPerson.ftl @@ -94,11 +94,11 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl index 61c9fce94e..deae9c8f27 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl @@ -172,11 +172,11 @@ var customFormData = { selectedString: '${i18n().selected?js_string}' }; -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addOrcidIdToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addOrcidIdToPerson.ftl index 27a454f71f..8c238605a3 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addOrcidIdToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addOrcidIdToPerson.ftl @@ -75,11 +75,11 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addPresenterRoleToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addPresenterRoleToPerson.ftl index d726a8018b..9378320ba6 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addPresenterRoleToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addPresenterRoleToPerson.ftl @@ -191,11 +191,11 @@ var i18nStrings = { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addPublicationToPerson.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addPublicationToPerson.ftl index 79879f6685..f42d4da519 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addPublicationToPerson.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addPublicationToPerson.ftl @@ -338,12 +338,12 @@ Set this flag on the input acUriReceiver where you would like this behavior to o -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} - ${scripts.add('', + ${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addRoleToPersonTwoStage.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addRoleToPersonTwoStage.ftl index 0c6da7a599..cde999a04c 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addRoleToPersonTwoStage.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addRoleToPersonTwoStage.ftl @@ -234,11 +234,11 @@ Set this flag on the input acUriReceiver where you would like this behavior to o }; -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('')} +${scripts.add('')} ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/addUserDefinedConcept.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/addUserDefinedConcept.ftl index 91e476f59e..adab8bd082 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/addUserDefinedConcept.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/addUserDefinedConcept.ftl @@ -68,12 +68,12 @@ Set this flag on the input acUriReceiver where you would like this behavior to o }; -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} - ${scripts.add('', + ${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/autoCompleteDataPropForm.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/autoCompleteDataPropForm.ftl index 61da380440..e1cb80c8ec 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/autoCompleteDataPropForm.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/autoCompleteDataPropForm.ftl @@ -76,11 +76,11 @@ Also multiple types parameter set to true only if more than one type returned--> }; -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/grantAdministeredBy.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/grantAdministeredBy.ftl index a13779c24a..92672b83ae 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/grantAdministeredBy.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/grantAdministeredBy.ftl @@ -121,11 +121,11 @@ var i18nStrings = { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/grantHasContributor.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/grantHasContributor.ftl index b58fc87430..29593fcf82 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/grantHasContributor.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/grantHasContributor.ftl @@ -169,12 +169,12 @@ $(document).ready(function() { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js index e711821351..c1b9743799 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js @@ -170,8 +170,8 @@ var addAuthorForm = { this.hideSelectedPerson(); this.hideSelectedOrg(); - this.cancel.unbind('click'); - this.cancel.bind('click', function() { + this.cancel.off('click'); + this.cancel.on('click', function() { addAuthorForm.showAuthorListOnlyView(); addAuthorForm.setAuthorType("person"); return false; @@ -184,7 +184,7 @@ var addAuthorForm = { // Show the form this.form.show(); - //this.lastNameField.focus(); + //this.lastNameField.on("focus", ); }, hideSelectedPerson: function() { @@ -254,7 +254,7 @@ var addAuthorForm = { complete: function(xhr, status) { // Not sure why, but we need an explicit json parse here. jQuery // should parse the response text and return a json object. - var results = jQuery.parseJSON(xhr.responseText), + var results = JSON.parse(xhr.responseText), filteredResults = addAuthorForm.filterAcResults(results); addAuthorForm.acCache[request.term] = filteredResults; response(filteredResults); @@ -338,7 +338,7 @@ var addAuthorForm = { // field when the form is redisplayed. Thus it's done explicitly in initFormView. this.hideFields(this.lastNameWrapper); // These get displayed if the selection was made through an enter keystroke, - // since the keydown event on the last name field is also triggered (and + // since the "keydown" event on the last name field is also triggered (and // executes first). So re-hide them here. this.hideFieldsForNewPerson(); this.personLink.attr('href', this.verifyMatch.data('baseHref') + ui.item.uri); @@ -356,8 +356,8 @@ var addAuthorForm = { } // Cancel restores initial form view - this.cancel.unbind('click'); - this.cancel.bind('click', function() { + this.cancel.off('click'); + this.cancel.on('click', function() { addAuthorForm.initFormView(); addAuthorForm.setAuthorType(authType); return false; @@ -478,29 +478,29 @@ var addAuthorForm = { bindEventListeners: function() { - this.showFormButton.click(function() { + this.showFormButton.on("click", function() { addAuthorForm.initFormView(); return false; }); - this.orgRadio.click(function() { + this.orgRadio.on("click", function() { addAuthorForm.setAuthorType("org"); }); - this.personRadio.click(function() { + this.personRadio.on("click", function() { addAuthorForm.setAuthorType("person"); }); - this.form.submit(function() { + this.form.on("submit", function() { // NB Important JavaScript scope issue: if we call it this way, this = addAuthorForm - // in prepareSubmit. If we do this.form.submit(this.prepareSubmit); then + // in prepareSubmit. If we do this.form.on("submit", this.prepareSubmit); then // this != addAuthorForm in prepareSubmit. $selectedObj = addAuthorForm.form.find('input.acSelector'); addAuthorForm.deleteAcHelpText($selectedObj); addAuthorForm.prepareSubmit(); }); - this.lastNameField.blur(function() { + this.lastNameField.on("blur", function() { // Cases where this event should be ignored: // 1. personUri field has a value: the autocomplete select event has already fired. // 2. The last name field is empty (especially since the field has focus when the form is displayed). @@ -511,43 +511,43 @@ var addAuthorForm = { addAuthorForm.onLastNameChange(); }); - this.personLink.click(function() { + this.personLink.on("click", function() { window.open($(this).attr('href'), 'verifyMatchWindow', 'width=640,height=640,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=no'); return false; }); - this.orgLink.click(function() { + this.orgLink.on("click", function() { window.open($(this).attr('href'), 'verifyMatchWindow', 'width=640,height=640,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=no'); return false; }); - this.acSelector.focus(function() { + this.acSelector.on("focus", function() { addAuthorForm.deleteAcHelpText(this); }); - this.acSelector.blur(function() { + this.acSelector.on("blur", function() { addAuthorForm.addAcHelpText(this); }); - this.orgName.focus(function() { + this.orgName.on("focus", function() { addAuthorForm.deleteAcHelpText(this); }); - this.orgName.blur(function() { + this.orgName.on("blur", function() { addAuthorForm.addAcHelpText(this); }); // When hitting enter in last name field, show first and middle name fields. // NB This event fires when selecting an autocomplete suggestion with the enter // key. Since it fires first, we undo its effects in the ac select event listener. - this.lastNameField.keydown(function(event) { + this.lastNameField.on("keydown", function(event) { if (event.which === 13) { addAuthorForm.onLastNameChange(); return false; // don't submit form } }); - this.removeAuthorshipLinks.click(function() { + this.removeAuthorshipLinks.on("click", function() { addAuthorForm.removeAuthorship(this); return false; }); @@ -590,7 +590,7 @@ var addAuthorForm = { onLastNameChange: function() { this.showFieldsForNewPerson(); - this.firstNameField.focus(); + this.firstNameField.on("focus", ); // this.fixNames(); }, @@ -646,7 +646,7 @@ var addAuthorForm = { data: { deletion: $(link).parents('li.authorship').data('authorshipUri') }, - dataType: 'json', + dataType: 'html', context: link, // context for callback complete: function(request, status) { var authorship, diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addConcept.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addConcept.js index 1443d70300..0556338962 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addConcept.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addConcept.js @@ -76,25 +76,25 @@ var addConceptForm = { }, bindEventListeners: function() { - this.searchSubmit.click(function() { + this.searchSubmit.on("click", function() { addConceptForm.clearErrors(); addConceptForm.submitSearchTerm(); return false; }); - this.form.submit(function() { + this.form.on("submit", function() { return addConceptForm.prepareSubmit(); }); - this.addConceptButton.click(function() { + this.addConceptButton.on("click", function() { addConceptForm.initForm(); }); - this.removeConceptLinks.click(function() { + this.removeConceptLinks.on("click", function() { addConceptForm.removeExistingConcept(this); return false; }); - this.showHideSearchResults.find("a#showHideLink").click(function() { + this.showHideSearchResults.find("a#showHideLink").on("click", function() { addConceptForm.showHideMultipleSearchResults(this); return false; }); @@ -109,7 +109,7 @@ var addConceptForm = { this.submit.hide(); //Also clear the search input this.searchTerm.val(""); - this.cancel.unbind('click'); + this.cancel.off('click'); //make sure results loading indicator is hidden this.loadingIndicator.addClass("hidden"); this.showHideSearchResults.hide(); @@ -430,7 +430,7 @@ var addConceptForm = { additions: '', retractions: addConceptForm.generateDeletionN3($(link).parents('.existingConcept').data('conceptNodeUri')) }, - dataType: 'json', + dataType: 'html', context: link, // context for callback complete: function(request, status) { var existingConcept, diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addEditorsToInformationResource.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addEditorsToInformationResource.js index ebc103399e..d9ded1ae8c 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addEditorsToInformationResource.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/addEditorsToInformationResource.js @@ -158,8 +158,8 @@ var addEditorForm = { this.hideSelectedPerson(); - this.cancel.unbind('click'); - this.cancel.bind('click', function() { + this.cancel.off('click'); + this.cancel.on('click', function() { addEditorForm.showEditorListOnlyView(); addEditorForm.setEditorType("person"); return false; @@ -172,7 +172,7 @@ var addEditorForm = { // Show the form this.form.show(); - //this.lastNameField.focus(); + //this.lastNameField.trigger("focus"); }, hideSelectedPerson: function() { @@ -226,7 +226,7 @@ var addEditorForm = { complete: function(xhr, status) { // Not sure why, but we need an explicit json parse here. jQuery // should parse the response text and return a json object. - var results = jQuery.parseJSON(xhr.responseText), + var results = JSON.parse(xhr.responseText), filteredResults = addEditorForm.filterAcResults(results); addEditorForm.acCache[request.term] = filteredResults; response(filteredResults); @@ -317,8 +317,8 @@ var addEditorForm = { } // Cancel restores initial form view - this.cancel.unbind('click'); - this.cancel.bind('click', function() { + this.cancel.off('click'); + this.cancel.on('click', function() { addEditorForm.initFormView(); addEditorForm.setEditorType(authType); return false; @@ -439,21 +439,21 @@ var addEditorForm = { bindEventListeners: function() { - this.showFormButton.click(function() { + this.showFormButton.on("click", function() { addEditorForm.initFormView(); return false; }); - this.form.submit(function() { + this.form.on("submit", function() { // NB Important JavaScript scope issue: if we call it this way, this = addEditorForm - // in prepareSubmit. If we do this.form.submit(this.prepareSubmit); then + // in prepareSubmit. If we do this.form.on("submit", this.prepareSubmit); then // this != addEditorForm in prepareSubmit. $selectedObj = addEditorForm.form.find('input.acSelector'); addEditorForm.deleteAcHelpText($selectedObj); addEditorForm.prepareSubmit(); }); - this.lastNameField.blur(function() { + this.lastNameField.on("blur", function() { // Cases where this event should be ignored: // 1. personUri field has a value: the autocomplete select event has already fired. // 2. The last name field is empty (especially since the field has focus when the form is displayed). @@ -464,30 +464,30 @@ var addEditorForm = { addEditorForm.onLastNameChange(); }); - this.personLink.click(function() { + this.personLink.on("click", function() { window.open($(this).attr('href'), 'verifyMatchWindow', 'width=640,height=640,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=no'); return false; }); - this.acSelector.focus(function() { + this.acSelector.on("focus", function() { addEditorForm.deleteAcHelpText(this); }); - this.acSelector.blur(function() { + this.acSelector.on("blur", function() { addEditorForm.addAcHelpText(this); }); // When hitting enter in last name field, show first and middle name fields. // NB This event fires when selecting an autocomplete suggestion with the enter // key. Since it fires first, we undo its effects in the ac select event listener. - this.lastNameField.keydown(function(event) { + this.lastNameField.on("keydown", function(event) { if (event.which === 13) { addEditorForm.onLastNameChange(); return false; // don't submit form } }); - this.removeEditorshipLinks.click(function() { + this.removeEditorshipLinks.on("click", function() { addEditorForm.removeEditorship(this); return false; }); @@ -526,7 +526,7 @@ var addEditorForm = { onLastNameChange: function() { this.showFieldsForNewPerson(); - this.firstNameField.focus(); + this.firstNameField.trigger("focus"); // this.fixNames(); }, @@ -564,7 +564,7 @@ var addEditorForm = { data: { deletion: $(link).parents('.editorship').data('editorshipUri') }, - dataType: 'json', + dataType: 'html', context: link, // context for callback complete: function(request, status) { var editorship, diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js index 4266b89d29..44b09c6bbf 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js @@ -49,7 +49,7 @@ var adviseeRelUtils = { this.advisor.change( function(objEvent) { window.setTimeout('adviseeRelUtils.mapAdvisorValue()', 180); }); - this.advisor.blur( function(objEvent) { + this.advisor.on("blur", function(objEvent) { window.setTimeout('adviseeRelUtils.mapAdvisorValue()', 180); }); diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js index 5cc76e85bb..14b1572991 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js @@ -49,7 +49,7 @@ var advisorRelUtils = { this.advisee.change( function(objEvent) { window.setTimeout('advisorRelUtils.mapAdviseeValue()', 180); }); - this.advisee.blur( function(objEvent) { + this.advisee.on("blur", function(objEvent) { window.setTimeout('advisorRelUtils.mapAdviseeValue()', 180); }); diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/awardReceiptUtils.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/awardReceiptUtils.js index 85f26eafb4..6cf3265f44 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/awardReceiptUtils.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/awardReceiptUtils.js @@ -47,7 +47,7 @@ var awardReceiptUtils = { window.setTimeout('awardReceiptUtils.hideConferredBy()', 180); }); - this.award.blur( function(objEvent) { + this.award.on("blur", function(objEvent) { window.setTimeout('awardReceiptUtils.hideConferredBy()', 180); }); diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/customFormWithDataAutocomplete.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/customFormWithDataAutocomplete.js index b462632930..155664d2f6 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/customFormWithDataAutocomplete.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/customFormWithDataAutocomplete.js @@ -117,7 +117,7 @@ var customForm = { this.requiredLegend.hide(); this.or.hide(); - this.cancel.unbind('click'); + this.cancel.off('click'); }, @@ -133,9 +133,9 @@ var customForm = { // Set the initial autocomplete help text in the acSelector field. this.addAcHelpText(); - this.cancel.unbind('click'); + this.cancel.off('click'); if (this.formSteps > 1) { - this.cancel.click(function() { + this.cancel.on("click", function() { customForm.clearFormData(); // clear any input and validation errors customForm.initFormTypeView(); return false; @@ -183,15 +183,15 @@ var customForm = { //no longer need type selector and verify match - this.acSelector.focus(function() { + this.acSelector.on("focus", function() { customForm.deleteAcHelpText(); }); - this.acSelector.blur(function() { + this.acSelector.on("blur", function() { customForm.addAcHelpText(); }); - this.form.submit(function() { + this.form.on("submit", function() { customForm.deleteAcHelpText(); }); @@ -229,7 +229,7 @@ var customForm = { }, complete: function(xhr, status) { // Not sure why, but we need an explicit json parse here. - var results = $.parseJSON(xhr.responseText), + var results = JSON.parse(xhr.responseText), filteredResults = customForm.filterAcResults(results); customForm.acCache[request.term] = filteredResults; response(filteredResults); @@ -333,8 +333,8 @@ var customForm = { // this.setButtonText('existing'); - this.cancel.unbind('click'); - this.cancel.click(function() { + this.cancel.off('click'); + this.cancel.on("click", function() { customForm.undoAutocompleteSelection(); customForm.initFormFullView(); return false; diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageHideShowStatus.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageHideShowStatus.js index 22e736c72b..b7c7cf591f 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageHideShowStatus.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageHideShowStatus.js @@ -37,7 +37,7 @@ var manageHideShowStatus = { bindEventListeners: function() { - $('.itemCheckbox').click(function() { + $('.itemCheckbox').on("click", function() { manageHideShowStatus.processItem(this); //return false; }); @@ -64,7 +64,7 @@ var manageHideShowStatus = { additions: add, retractions: retract }, - dataType: 'json', + dataType: 'text', context: item, // context for callback complete: function(request, status) { diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageWebpagesForIndividual.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageWebpagesForIndividual.js index a1887eda6e..fe9a8f775c 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageWebpagesForIndividual.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/manageWebpagesForIndividual.js @@ -49,7 +49,7 @@ var manageWebpages = { bindEventListeners: function() { - $('.remove').click(function() { + $('.remove').on("click", function() { manageWebpages.removeWebpage(this); return false; }); @@ -175,13 +175,14 @@ var manageWebpages = { data: { deletion: $(link).parents('.webpage').data('webpageUri') }, - dataType: 'json', + dataType: 'html', context: link, // context for callback complete: function(request, status) { var webpage; - + console.info("hey") + console.info(status) if (status === 'success') { - + webpage = $(this).parents('.webpage'); webpage.fadeOut(400, function() { diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/publicationToPersonUtils.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/publicationToPersonUtils.js index 52fcdd7fff..6288ecce8e 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/publicationToPersonUtils.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/publicationToPersonUtils.js @@ -84,7 +84,7 @@ var publicationToPersonUtils = { window.setTimeout('publicationToPersonUtils.hideFieldsForPub()', 180); }); - this.pubTitle.blur( function(objEvent) { + this.pubTitle.on("blur", function(objEvent) { window.setTimeout('publicationToPersonUtils.hideFieldsForPub()', 180); }); diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/manageGrantsForIndividual.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/manageGrantsForIndividual.ftl index ebada87c2b..92ff92d369 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/manageGrantsForIndividual.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/manageGrantsForIndividual.ftl @@ -54,10 +54,10 @@ var i18nStrings = { ${stylesheets.add('', - '')} + '')} ${scripts.add('', - '', + '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/managePeopleForOrganization.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/managePeopleForOrganization.ftl index 9171bf8b6d..86c15964d6 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/managePeopleForOrganization.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/managePeopleForOrganization.ftl @@ -50,10 +50,10 @@ var i18nStrings = { ${stylesheets.add('', - '')} + '')} ${scripts.add('', - '', + '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/managePublicationsForIndividual.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/managePublicationsForIndividual.ftl index 70b72f5c2f..3c77b13c67 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/managePublicationsForIndividual.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/managePublicationsForIndividual.ftl @@ -67,10 +67,10 @@ var i18nStrings = { ${stylesheets.add('', - '')} + '')} ${scripts.add('', - '', + '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl index 83f95042ba..feb995f876 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl @@ -79,9 +79,9 @@ var i18nStrings = { ${stylesheets.add('', '', - '')} + '')} ${scripts.add('', - '', + '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationAdministersGrant.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationAdministersGrant.ftl index cc72fd077f..f3e1a3a154 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationAdministersGrant.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationAdministersGrant.ftl @@ -121,11 +121,11 @@ var i18nStrings = { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationForTraining.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationForTraining.ftl index f5e0bd13b5..f2d761b69f 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationForTraining.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationForTraining.ftl @@ -215,12 +215,12 @@ $(document).ready(function() { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationHasPositionHistory.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationHasPositionHistory.ftl index 3541fe28af..60f48c2a3e 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationHasPositionHistory.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/organizationHasPositionHistory.ftl @@ -178,12 +178,12 @@ $(document).ready(function(){ }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl index 476028a435..d4f641a0b9 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl @@ -231,11 +231,11 @@ $(document).ready(function(){ }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl index ad1e1930a9..8d36bb791c 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl @@ -231,11 +231,11 @@ $(document).ready(function(){ }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAwardOrHonor.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAwardOrHonor.ftl index d9c0580956..71fd0cb401 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAwardOrHonor.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasAwardOrHonor.ftl @@ -210,11 +210,11 @@ var i18nStrings = { }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEducationalTraining.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEducationalTraining.ftl index c3917b9860..a6088546b1 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEducationalTraining.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEducationalTraining.ftl @@ -236,12 +236,12 @@ $(document).ready(function() { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEmailAddress.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEmailAddress.ftl index bf0b1e79b1..33d6eb68ce 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEmailAddress.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasEmailAddress.ftl @@ -74,11 +74,11 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasIssuedCredential.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasIssuedCredential.ftl index 97acf9125a..f0e9ebd26a 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasIssuedCredential.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasIssuedCredential.ftl @@ -213,11 +213,11 @@ var i18nStrings = { }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPositionHistory.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPositionHistory.ftl index e479f139ac..606878d063 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPositionHistory.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPositionHistory.ftl @@ -189,12 +189,12 @@ var i18nStrings = { }; -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPreferredTitle.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPreferredTitle.ftl index 0b4f8ffe69..1113f2ab2c 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPreferredTitle.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/personHasPreferredTitle.ftl @@ -74,11 +74,11 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/projectHasParticipant.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/projectHasParticipant.ftl index 468f5400a4..ca84c57244 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/projectHasParticipant.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/projectHasParticipant.ftl @@ -165,12 +165,12 @@ $(document).ready(function() { -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl index ff3210edbb..9b6157e204 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl @@ -120,11 +120,11 @@ }); -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasPhoneFaxNumber.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasPhoneFaxNumber.ftl index 9fbe6bdab6..8429538565 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasPhoneFaxNumber.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/subjectHasPhoneFaxNumber.ftl @@ -85,11 +85,11 @@ -${stylesheets.add('')} +${stylesheets.add('')} ${stylesheets.add('')} ${stylesheets.add('')} -${scripts.add('', +${scripts.add('', '', '', '')} diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/capabilitymap/capabilityMap.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/capabilitymap/capabilityMap.ftl index 75d76d15bc..8ce0921154 100644 --- a/webapp/src/main/webapp/templates/freemarker/visualization/capabilitymap/capabilityMap.ftl +++ b/webapp/src/main/webapp/templates/freemarker/visualization/capabilitymap/capabilityMap.ftl @@ -1,5 +1,5 @@ ${scripts.add( - '', + '', '', '', '', @@ -7,7 +7,7 @@ ${scripts.add( )} ${stylesheets.add( - '', + '', '', '', '', @@ -40,7 +40,7 @@ ${stylesheets.add( return result; } }); - var conceptArray = $.parseJSON(loadedConcepts.responseText); + var conceptArray = JSON.parse(loadedConcepts.responseText); $("#query").autocomplete({ source: conceptArray }); diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/entitycomparison/entityComparisonSetup.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/entitycomparison/entityComparisonSetup.ftl index 086706be8a..874fa0d944 100644 --- a/webapp/src/main/webapp/templates/freemarker/visualization/entitycomparison/entityComparisonSetup.ftl +++ b/webapp/src/main/webapp/templates/freemarker/visualization/entitycomparison/entityComparisonSetup.ftl @@ -140,9 +140,9 @@ var i18nStringsUtil = { ${scripts.add('', '', '', - '', + '', '', - '', + '', '', '', '', @@ -150,7 +150,7 @@ ${scripts.add(' -${stylesheets.add('', +${stylesheets.add('', '', '', '', diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl index 4d6d6c5654..1d7c993818 100644 --- a/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl +++ b/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl @@ -112,9 +112,9 @@ var i18nStrings = { <#else> ${scripts.add('')} -${scripts.add('', +${scripts.add('', '', - '', + '', '', '', '', @@ -144,7 +144,7 @@ ${scripts.add(' diff --git a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl index aaecbb86b0..8ffc10c3ae 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl @@ -207,10 +207,10 @@ Add divs and wrapper to create funnelback basket controls. MUST BE REMOVED BEFOR <#-- ${stylesheets.add('', '', - '')} + '')} --> -${stylesheets.add('')} +${stylesheets.add('')} ${headScripts.add('', '', @@ -221,7 +221,7 @@ ${scripts.add('', '', '', - '', + '', '')} <#macro showFullName statement> diff --git a/webapp/src/main/webapp/themes/nemo/templates/individual-menu.ftl b/webapp/src/main/webapp/themes/nemo/templates/individual-menu.ftl index 40a901d1b0..1effd6b5ab 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/individual-menu.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/individual-menu.ftl @@ -43,7 +43,7 @@ ${stylesheets.add('', '')} - ${headScripts.add('')} + ${headScripts.add('')} <#assign positionPredicate = "${namespaces.display}menuPosition" /> diff --git a/webapp/src/main/webapp/themes/nemo/templates/mapOfScienceSetup.ftl b/webapp/src/main/webapp/themes/nemo/templates/mapOfScienceSetup.ftl index da0ba4f33c..196e0e2d44 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/mapOfScienceSetup.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/mapOfScienceSetup.ftl @@ -108,10 +108,10 @@ var i18nStrings = { <#--//'', --> ${scripts.add('', - '', - '' + '', + '' '', - '', + '', '', '', '', @@ -141,7 +141,7 @@ ${scripts.add('', + '', '', '', '', diff --git a/webapp/src/main/webapp/themes/tenderfoot/templates/page/partials/headScripts.ftl b/webapp/src/main/webapp/themes/tenderfoot/templates/page/partials/headScripts.ftl index 49c9181a9c..6cdfa7a74f 100644 --- a/webapp/src/main/webapp/themes/tenderfoot/templates/page/partials/headScripts.ftl +++ b/webapp/src/main/webapp/themes/tenderfoot/templates/page/partials/headScripts.ftl @@ -6,8 +6,8 @@ var i18nStrings = { allCapitalized: '${i18n().all_capitalized?js_string}', }; - - + + <#-- script for enabling new HTML5 semantic markup in IE browsers --> diff --git a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl index 20e3f8cd40..fd5313e504 100644 --- a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl @@ -182,7 +182,7 @@ ${stylesheets.add('', '', - '', + '', '')} ${headScripts.add('', @@ -193,7 +193,7 @@ ${scripts.add('', '', '', - '', + '', '', '', '')} From 933db3fb9cf5f4aae7f29bac32f90d01349b3e6c Mon Sep 17 00:00:00 2001 From: Benjamin Gross Date: Thu, 1 Feb 2024 16:42:48 -0700 Subject: [PATCH 2/2] Another jquery update --- .../freemarker/edit/forms/js/newIndividualFormUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/newIndividualFormUtils.js b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/newIndividualFormUtils.js index 2e14e1f9fe..15a84a246d 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/js/newIndividualFormUtils.js +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/js/newIndividualFormUtils.js @@ -21,7 +21,7 @@ var newIndividualFormUtils = { bindEventListeners: function() { this.idCache = {}; - this.form.submit(function() { + this.form.on("submit", function() { newIndividualFormUtils.buildRDFSLabel(); newIndividualFormUtils.submitButton.attr("disabled",true); });