diff options
author | Simon Rettberg | 2019-05-29 13:32:08 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-05-29 13:32:08 +0200 |
commit | 98897a62ddf6ef3b260f23b47ea52c22c06a388d (patch) | |
tree | e1f504409e3db68a5158be4ccd8232c219b175ce /modules-available/summernote/clientscript.js | |
parent | [exams/bootstrap_datepicker] Always load slx-admin language plugin (diff) | |
download | slx-admin-98897a62ddf6ef3b260f23b47ea52c22c06a388d.tar.gz slx-admin-98897a62ddf6ef3b260f23b47ea52c22c06a388d.tar.xz slx-admin-98897a62ddf6ef3b260f23b47ea52c22c06a388d.zip |
[summernote] Use caching when loading language plugin
Diffstat (limited to 'modules-available/summernote/clientscript.js')
-rw-r--r-- | modules-available/summernote/clientscript.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules-available/summernote/clientscript.js b/modules-available/summernote/clientscript.js index 69d7da93..a42853d3 100644 --- a/modules-available/summernote/clientscript.js +++ b/modules-available/summernote/clientscript.js @@ -5,11 +5,7 @@ return a.each(f,function(a,b){p.appendChildNodes(e,b.childNodes),p.remove(b)}),d /* load the specific locale */ -var filename = "modules/summernote/lang/summernote-" + LANG + ".js"; - -$.getScript(filename, function () { - console.log('loaded language ' + LANG + ', now enable the editor'); - console.log($('.summernote')); +$.cachedScript("modules/summernote/lang/summernote-" + LANG + ".js").always(function () { $('.summernote').summernote( { toolbar: [ // [groupName, [list of button]] |