summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-29 13:30:54 +0200
committerSimon Rettberg2019-05-29 13:30:54 +0200
commitfabe31aa314d1549193e87ef149b89b20fcc6b14 (patch)
tree750e3faefc9a6d38e3df7d5876a1359029502d5f /script
parent[news] Modularize; add 'login-news' category (diff)
downloadslx-admin-fabe31aa314d1549193e87ef149b89b20fcc6b14.tar.gz
slx-admin-fabe31aa314d1549193e87ef149b89b20fcc6b14.tar.xz
slx-admin-fabe31aa314d1549193e87ef149b89b20fcc6b14.zip
[exams/bootstrap_datepicker] Always load slx-admin language plugin
Fixes #3567
Diffstat (limited to 'script')
-rw-r--r--script/slx-fixes.js10
1 files changed, 10 insertions, 0 deletions
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 );
+};