|
|
@ -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'); |
|
|
|