diff --git a/colleges/static/colleges/colleges.js b/colleges/static/colleges/colleges.js index 34cb85d6efbca0d52bdcd857397a962d96ee6f8c..8dc9da577207516df5f31d69101acea79486096e 100644 --- a/colleges/static/colleges/colleges.js +++ b/colleges/static/colleges/colleges.js @@ -29,7 +29,7 @@ $(function() { }) .on('click', function() { // Remove hover-class - $(this) + $(this) .toggleClass('active-search') .trigger('search-specialization'); }) diff --git a/ontology/templates/ontology/_topic_card.html b/ontology/templates/ontology/_topic_card.html index 360a46aeb0279688d4fd50397fcbd78015e07c44..6237bd5920067dcca1f4b5f43e5949f9bf314093 100644 --- a/ontology/templates/ontology/_topic_card.html +++ b/ontology/templates/ontology/_topic_card.html @@ -4,11 +4,11 @@ <script type="text/javascript" nonce="{{ request.csp_nonce }}"> $(document).ready(function() { - $("#id_A_text").keyup(function() { + $("#id_A_text").on("keyup", function() { $("#id_B_text").val("{{ topic }}"); $("#id_B").val({{ topic.id }}); }); - $("#id_B_text").keyup(function() { + $("#id_B_text").on("keyup", function() { $("#id_A_text").val("{{ topic }}"); $("#id_A").val({{ topic.id }}); }); diff --git a/scipost/static/scipost/assets/js/newsticker.js b/scipost/static/scipost/assets/js/newsticker.js index 882691fab0725663755cd7ab376d91ae86939acf..dd88b78ea439976c69cbe05fd97ea849269522d7 100644 --- a/scipost/static/scipost/assets/js/newsticker.js +++ b/scipost/static/scipost/assets/js/newsticker.js @@ -70,7 +70,6 @@ NewsTicker = (function() { // Extend jQuery $.fn.scipost_newsticker = function(options) { var ticker = new NewsTicker(this, options) - console.log('SciPost NewTicker') return this; } diff --git a/scipost/static/scipost/assets/js/scripts.js b/scipost/static/scipost/assets/js/scripts.js index e8ecb3b021d7008cf4a32922012c6a2eb2193559..cbe040ed70ec0f9d54a8200a294b443960321f47 100644 --- a/scipost/static/scipost/assets/js/scripts.js +++ b/scipost/static/scipost/assets/js/scripts.js @@ -78,7 +78,7 @@ function init_page() { // Auto-submit hook for general form elements $("form .auto-submit input, form.auto-submit input, form.auto-submit select").on('change', function(){ - $(this).parents('form').submit() + $(this).parents('form').trigger('submit') }); // Start general toggle diff --git a/scipost/static/scipost/formset.js b/scipost/static/scipost/formset.js_deprec20191117 similarity index 100% rename from scipost/static/scipost/formset.js rename to scipost/static/scipost/formset.js_deprec20191117 diff --git a/scipost/static/scipost/report-compile.js b/scipost/static/scipost/report-compile.js index 3984ee3a3fb963b648fef8775d07f89d8e22d014..0639a08f83eca3d836ee2c2f21b68fa060c64f91 100644 --- a/scipost/static/scipost/report-compile.js +++ b/scipost/static/scipost/report-compile.js @@ -11,7 +11,7 @@ jQuery.fn.selectText = function(){ if (doc.body.createTextRange) { var range = document.body.createTextRange(); range.moveToElementText(element); - range.select(); + range.trigger('select'); } else if (window.getSelection) { var selection = window.getSelection(); var range = document.createRange(); diff --git a/scipost/static/scipost/slugify-name.js b/scipost/static/scipost/slugify-name.js index 21abef48e5896b2e0903d78df3aa782f2171b688..b8f9eb350e7b93acb54bb9aa8d2320bef20882bd 100644 --- a/scipost/static/scipost/slugify-name.js +++ b/scipost/static/scipost/slugify-name.js @@ -1,5 +1,5 @@ $(document).ready(function() { - $("#id_name").keyup(function() { + $("#id_name").on("keyup", function() { slug_value = this.value.split(" ").join("_"); $("#id_slug").val(slug_value); }); diff --git a/scipost/static/scipost/table-row-blank.js b/scipost/static/scipost/table-row-blank.js index 75db4444a39fb1fcd9795952e7d4a1849a3fb6e4..b109ed3ae6579beaa62d6af89f7592de0f43ebd5 100644 --- a/scipost/static/scipost/table-row-blank.js +++ b/scipost/static/scipost/table-row-blank.js @@ -1,5 +1,5 @@ $(document).ready(function($) { - $(".table-row").click(function() { + $(".table-row").on("click", function() { var addr = $(this).data("href"); window.open(addr, "_blank"); }); diff --git a/scipost/templates/scipost/bare_base.html b/scipost/templates/scipost/bare_base.html index ca203b0e3e734721b2b3a08fae5c6afe715627e1..b04d5e0a369365d621914afee935f83af4522078 100644 --- a/scipost/templates/scipost/bare_base.html +++ b/scipost/templates/scipost/bare_base.html @@ -9,7 +9,7 @@ <link href="https://fonts.googleapis.com/css?family=Merriweather+Sans:300,400,700" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="{% static 'scipost/SciPost.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'fa/css/font-awesome.min.css' %}" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.1.0.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>