diff --git a/resource/js/docready.js b/resource/js/docready.js
index 57ad600a5..f899d4995 100644
--- a/resource/js/docready.js
+++ b/resource/js/docready.js
@@ -1,6 +1,6 @@
$(function() { // DOCUMENT READY
- var spinner = '
'+ loading_text + '
';
+ var spinner = ''+ loading_text + '
';
var searchString = ''; // stores the search field's value before autocomplete selection changes it
var selectedVocabs = [];
var vocabId;
@@ -14,7 +14,7 @@ $(function() { // DOCUMENT READY
shortenProperties();
// kills the autocomplete after a form submit so we won't have to wait for the ajax to complete.
- $('.navbar-form').submit(
+ $('.navbar-form').on('submit',
function() {
$('#search-field').typeahead('destroy');
$.ajaxQ.abortAll();
@@ -198,8 +198,8 @@ $(function() { // DOCUMENT READY
// ajaxing the concept count and the preflabel counts on the vocabulary front page
if ($('#vocab-info').length && $('#statistics').length) {
// adding the spinners
- $('#counts tr:nth-of-type(1)').after(' |
');
- $('#statistics tr:nth-of-type(1)').after(' |
');
+ $('#counts tr:nth-of-type(1)').after(' |
');
+ $('#statistics tr:nth-of-type(1)').after(' |
');
$.ajax({
url : rest_base_url + vocab + '/vocabularyStatistics',
req_kind: $.ajaxQ.requestKind.GLOBAL,
@@ -501,7 +501,7 @@ $(function() { // DOCUMENT READY
// Event handlers for the language selection links for setting the cookie
$('#language a').each( function(index, el) {
- $(el).click(function() {
+ $(el).on('click', function() {
var langCode = el.id.substr(el.id.indexOf("-") + 1);
setLangCookie(langCode);
});
@@ -579,7 +579,7 @@ $(function() { // DOCUMENT READY
createCookie('SKOSMOS_SEARCH_LANG', qlang, 365);
}
- $('.lang-button').click(function() {
+ $('.lang-button').on('click', function() {
qlang = $(this)[0].attributes.hreflang ? $(this)[0].attributes.hreflang.value : 'anything';
$('#lang-dropdown-toggle').html($(this).html() + ' ');
$('#lang-input').val(qlang);
@@ -587,7 +587,7 @@ $(function() { // DOCUMENT READY
if (concepts) { concepts.clear(); }
});
- $('.lang-button, .lang-button-all').click(function() {
+ $('.lang-button, .lang-button-all').on('click', function() {
$('#search-field').focus();
});
@@ -597,7 +597,7 @@ $(function() { // DOCUMENT READY
}
// disables the button with an empty search form
- $('#search-field').keyup(function() {
+ $('#search-field').on('keyup', function() {
var empty = false;
$('#search-field').each(function() {
if ($(this).val().length === 0) { empty = true; }
@@ -779,7 +779,7 @@ $(function() { // DOCUMENT READY
source: concepts.ttAdapter()
}).on('typeahead:cursorchanged', function() {
$('.tt-dropdown-menu').mCustomScrollbar("scrollTo", '.tt-cursor');
- }).on('typeahead:selected', onSelection).bind('focus', function() {
+ }).on('typeahead:selected', onSelection).on('focus', function() {
$('#search-field').typeahead('open');
}).after(clearButton).on('keypress', function() {
if ($typeahead.val().length > 0 && $(this).hasClass('clear-search-dark') === false) {
@@ -811,7 +811,7 @@ $(function() { // DOCUMENT READY
});
// Some form validation for the feedback form
- $("#send-feedback").click(function() {
+ $('#send-feedback').on('click', function() {
$('#message').removeClass('missing-value');
$('#msgsubject').removeClass('missing-value');
var emailMessageVal = $("#message").val();
@@ -829,7 +829,7 @@ $(function() { // DOCUMENT READY
});
// Initializes the waypoints plug-in used for the search listings.
- var $loading = $("" + loading_text + "…
");
+ var $loading = $("" + loading_text + "…
");
var $trigger = $('.search-result:nth-last-of-type(6)');
var options = { offset : '100%', continuous: false, triggerOnce: true };
var alpha_complete = false;
@@ -1060,7 +1060,7 @@ $(function() { // DOCUMENT READY
if ($('#alpha').hasClass('active') && $('#vocab-info').length === 1 && $('.alphabetical-search-results').length === 0) {
// taking into account the possibility that the lang parameter has been changed by the WebController.
var urlLangCorrected = vocab + '/' + lang + '/index?limit=250&offset=0&clang=' + clang;
- $('.sidebar-grey').empty().append(''+ loading_text + '
');
+ $('.sidebar-grey').empty().append(''+ loading_text + '
');
$.ajax({
url : urlLangCorrected,
req_kind: $.ajaxQ.requestKind.SIDEBAR,
@@ -1114,7 +1114,7 @@ $(function() { // DOCUMENT READY
source: concepts.ttAdapter()
}).on('typeahead:cursorchanged', function() {
$('.tt-dropdown-menu').mCustomScrollbar("scrollTo", '.tt-cursor');
- }).on('typeahead:selected', onSelection).bind('focus', function() {
+ }).on('typeahead:selected', onSelection).on('focus', function() {
$('#search-field').typeahead('open');
});
}
diff --git a/resource/js/scripts.js b/resource/js/scripts.js
index d86c5d567..6ec85e381 100644
--- a/resource/js/scripts.js
+++ b/resource/js/scripts.js
@@ -185,7 +185,7 @@ function setLangCookie(lang) {
}
function clearResultsAndAddSpinner() {
- var $loading = $("");
+ var $loading = $("");
$('.search-result-listing').empty().append($loading);
}
diff --git a/view/scripts.twig b/view/scripts.twig
index 5bdc7c734..6d832e43b 100644
--- a/view/scripts.twig
+++ b/view/scripts.twig
@@ -1,4 +1,4 @@
-
{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{% for files in request.plugins.pluginsJS %}{% for file in files %}{% endfor %}{% endfor %}
-{% if request.plugins.callbacks %}{% endif %}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% for files in request.plugins.pluginsJS %}{% for file in files %}{% endfor %}{% endfor %}
+{% if request.plugins.callbacks %}{% endif %}
+