Fix Load ckeditor js plugin only when user is logged on - Refs #8233

remotes/angel/1.11.x
José Loguercio 9 years ago
parent 0ea0a859c5
commit c39a86fb1c
  1. 2
      main/inc/lib/template.lib.php
  2. 3
      main/template/default/layout/header.js.tpl

@ -689,8 +689,10 @@ class Template
} }
foreach ($bowerJsFiles as $file) { foreach ($bowerJsFiles as $file) {
if (!empty($file)) {
$js_file_to_string .= '<script type="text/javascript" src="'.api_get_path(WEB_PATH).'web/assets/'.$file.'"></script>'."\n"; $js_file_to_string .= '<script type="text/javascript" src="'.api_get_path(WEB_PATH).'web/assets/'.$file.'"></script>'."\n";
} }
}
foreach ($js_files as $file) { foreach ($js_files as $file) {
$js_file_to_string .= api_get_js($file); $js_file_to_string .= api_get_js($file);

@ -1,4 +1,5 @@
<script> <script>
{% if _u.logged %}
// External plugins not part of the default Ckeditor package. // External plugins not part of the default Ckeditor package.
var plugins = [ var plugins = [
'asciimath', 'asciimath',
@ -68,7 +69,7 @@ var showTemplates = function (ckeditorName) {
$templatesUL.appendTo("#frmModel"); $templatesUL.appendTo("#frmModel");
}); });
}; };
{% endif %}
$(document).ready(function(){ $(document).ready(function(){
$("#open-view-list").click(function(){ $("#open-view-list").click(function(){
$("#student-list-work").fadeIn(300); $("#student-list-work").fadeIn(300);

Loading…
Cancel
Save