From fabe31aa314d1549193e87ef149b89b20fcc6b14 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 May 2019 13:30:54 +0200 Subject: [exams/bootstrap_datepicker] Always load slx-admin language plugin Fixes #3567 --- script/slx-fixes.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'script') diff --git a/script/slx-fixes.js b/script/slx-fixes.js index 06453ca0..be35f56b 100644 --- a/script/slx-fixes.js +++ b/script/slx-fixes.js @@ -106,3 +106,13 @@ $(document).ready(function() { } slxCheckCallbacks(); }); + +// Caching script fetcher (https://api.jquery.com/jQuery.getScript/); use exactly like $.getScript +jQuery.cachedScript = function(url, options) { + options = $.extend( options || {}, { + dataType: "script", + cache: true, + url: url + }); + return jQuery.ajax( options ); +}; -- cgit v1.2.3-55-g7522