From e6234d0b610586630d279c1c94935336cfff5118 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/slx-fixes.js') 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