Using simple js see #4757 and #5634

skala
Julio Montoya 12 years ago
parent 344174c8a8
commit 6330f0e8fa
  1. 6
      main/announcements/announcements.inc.php

@ -830,13 +830,15 @@ class AnnouncementManager {
*/ */
public static function to_javascript() { public static function to_javascript() {
$www = api_get_path(WEB_PATH); $www = api_get_path(WEB_PATH);
/*
* Do not allow this kind of behaviour. js minifieds should be manage by the template class or assetic or whatever see #4757 for more info
if (api_get_setting('server_type') == 'test') { if (api_get_setting('server_type') == 'test') {
$src = $www . 'main/announcements/resources/js/main.js'; $src = $www . 'main/announcements/resources/js/main.js';
} else { } else {
$src = $www . 'main/announcements/resources/js/main.min.js'; $src = $www . 'main/announcements/resources/js/main.min.js';
} }*/
$src = $www . 'main/announcements/resources/js/main.js';
$result = Javascript::tag($src); $result = Javascript::tag($src);
$root = Chamilo::url(); $root = Chamilo::url();
$code = "var www = '$root';\n"; $code = "var www = '$root';\n";
$code .= Javascript::get_lang('FieldRequired', 'Send2All', 'AddAnAttachment', 'Everybody'); $code .= Javascript::get_lang('FieldRequired', 'Send2All', 'AddAnAttachment', 'Everybody');

Loading…
Cancel
Save