diff --git a/.gitignore b/.gitignore
index d77d52a456..6a330f4a63 100755
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,8 @@ plugin/bbb/config.vm.php
main/cron/incoming/*
vendor
+web/assets/*
data/*
!data/index.html
data/badges/*
-!data/badges/index.html
\ No newline at end of file
+!data/badges/index.html
diff --git a/main/calendar/agenda_js.php b/main/calendar/agenda_js.php
index f8e0b62b7f..1ace0a12cb 100755
--- a/main/calendar/agenda_js.php
+++ b/main/calendar/agenda_js.php
@@ -28,9 +28,9 @@ $this_section = SECTION_MYAGENDA;
$htmlHeadXtra[] = api_get_jquery_libraries_js(array('jquery-ui', 'jquery-ui-i18n'));
$htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
-$htmlHeadXtra[] = api_get_js('fullcalendar/fullcalendar.min.js');
-$htmlHeadXtra[] = api_get_js('fullcalendar/gcal.js');
-$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/fullcalendar/fullcalendar.css');
+$htmlHeadXtra[] = api_get_asset('fullcalendar/dist/fullcalendar.min.js');
+$htmlHeadXtra[] = api_get_asset('fullcalendar/dist/gcal.js');
+$htmlHeadXtra[] = api_get_css(api_get_path(WEB_PATH).'web/assets/fullcalendar/dist/fullcalendar.min.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
if (api_is_platform_admin() && ($type == 'admin' || $type == 'platform')) {
diff --git a/main/chat/header_frame.inc.php b/main/chat/header_frame.inc.php
index 1978574d46..cc45a1bd13 100755
--- a/main/chat/header_frame.inc.php
+++ b/main/chat/header_frame.inc.php
@@ -123,7 +123,7 @@ header('Content-Type: text/html; charset='.api_get_system_encoding());
';
-$file_url_web = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$header_file.'?'.api_get_cidreq();
-
-$pathinfo = pathinfo($header_file);
-if ($pathinfo['extension']=='wav' && preg_match('/_chnano_.wav/i', $file_url_web) && api_get_setting('enable_nanogong') == 'true'){
- echo '
';
- echo '
';
- echo '
';
- echo '
';
-} else {
- if ($pathinfo['extension']=='swf'){ $width='83%'; $height='83%';} else {$width='100%'; $height='';}
-
- echo '
';
-}
diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php
index 4d06aac1c9..3e59dde9de 100644
--- a/main/inc/lib/api.lib.php
+++ b/main/inc/lib/api.lib.php
@@ -6404,6 +6404,13 @@ function api_get_js($file) {
return ''."\n";
}
+/**
+ * Returns the '."\n";
+}
+
/**
* Returns the
HTML tag
*/
@@ -6415,9 +6422,19 @@ function api_get_css($file, $media = 'screen') {
* Returns the js header to include the jquery library
*/
function api_get_jquery_js() {
- return api_get_js('jquery.min.js');
+ return api_get_asset('jquery/dist/jquery.min.js');
}
+/**
+ * Returns the jquery path
+ * @return string
+ */
+function api_get_jquery_web_path() {
+ return api_get_path(WEB_PATH).'web/assets/jquery/dist/jquery.min.js';
+}
+
+
+
/**
* Returns the jquery-ui library js headers
* @param bool add the jqgrid library
@@ -6452,20 +6469,6 @@ function api_get_jquery_libraries_js($libraries) {
$js = '';
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
- //jquery-ui js and css
- if (in_array('jquery-ui', $libraries)) {
- //Jquery ui
- //$theme = 'smoothness'; // Current themes: cupertino, smoothness, ui-lightness. Find the themes folder in main/inc/lib/javascript/jquery-ui
-
- $js .= api_get_css($js_path.'jquery-ui/jquery-ui.css');
- $js .= api_get_css($js_path.'jquery-ui/jquery-ui.theme.css');
- $js .= api_get_js('jquery-ui/jquery-ui.min.js');
- }
-
- if (in_array('jquery-ui-i18n', $libraries)) {
- //$js .= api_get_js('jquery-ui/jquery-ui-i18n.min.js');
- }
-
//jqgrid js and css
if (in_array('jqgrid', $libraries)) {
$languaje = 'en';
diff --git a/main/inc/lib/svg-edit/extensions/imagelib/groups.php b/main/inc/lib/svg-edit/extensions/imagelib/groups.php
index 2c7a33cf40..fba1332826 100755
--- a/main/inc/lib/svg-edit/extensions/imagelib/groups.php
+++ b/main/inc/lib/svg-edit/extensions/imagelib/groups.php
@@ -52,7 +52,7 @@ $style .='';
?>
-
+
';
?>
-
+
';
?>
-
+
diff --git a/main/inc/lib/svg-edit/svg-editor.php b/main/inc/lib/svg-edit/svg-editor.php
index 8eb0f61568..78783e4829 100755
--- a/main/inc/lib/svg-edit/svg-editor.php
+++ b/main/inc/lib/svg-edit/svg-editor.php
@@ -26,7 +26,7 @@ if (!isset($_SESSION['draw_dir'])) {
-
+
diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php
index 8353081863..7d065ee78b 100755
--- a/main/inc/lib/template.lib.php
+++ b/main/inc/lib/template.lib.php
@@ -474,7 +474,20 @@ class Template
}
// Default CSS Bootstrap
- $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'bootstrap.css');
+
+ $bowerCSSFiles = [
+ 'bootstrap/dist/css/bootstrap.min.css',
+ 'bootstrap-daterangepicker/daterangepicker-bs3.css',
+ 'fontawesome/css/font-awesome.min.css',
+ 'jquery-ui/themes/smoothness/jquery-ui.min.css',
+ 'jquery-ui/themes/smoothness/theme.css',
+ 'mediaelement/build/mediaelementplayer.min.css',
+ ];
+
+ foreach ($bowerCSSFiles as $file) {
+ $css[] = api_get_path(WEB_PATH).'web/assets/'.$file;
+ }
+
// Base CSS
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'base.css');
@@ -486,10 +499,6 @@ class Template
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css';
}
- $css[] = api_get_path(WEB_CSS_PATH).'font-awesome.css';
- $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/mediaelementplayer.css';
- $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/daterange/daterangepicker-bs3.css';
-
//THEME CSS STYLE
// $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'responsive.css');
// $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/default.css');
@@ -552,14 +561,12 @@ class Template
//JS files
$js_files = array(
- 'modernizr.js',
- 'jquery.min.js',
- 'fullcalendar/lib/moment.min.js',
- 'daterange/daterangepicker.js',
+ //'jquery.min.js',
+ //'fullcalendar/lib/moment.min.js',
+ //'daterange/daterangepicker.js',
'chosen/chosen.jquery.min.js',
'thickbox.js',
- 'bootstrap/bootstrap.js',
- 'mediaelement/mediaelement-and-player.min.js'
+ //'mediaelement/mediaelement-and-player.min.js'
);
if (api_is_global_chat_enabled()) {
@@ -579,13 +586,29 @@ class Template
$js_file_to_string = null;
- foreach ($js_files as $js_file) {
- $js_file_to_string .= api_get_js($js_file);
+
+ $bowerJsFiles = [
+ 'modernizr/modernizr.js',
+ 'jquery/dist/jquery.min.js',
+ 'jquery-ui/jquery-ui.min.js',
+ 'bootstrap/dist/js/bootstrap.min.js',
+ 'ckeditor/ckeditor.js',
+ 'bootstrap-daterangepicker/daterangepicker.js',
+ 'jquery-timeago/jquery.timeago.js',
+ 'moment/min/moment-with-locales.min.js',
+ 'mediaelement/build/mediaelement-and-player.min.js'
+ ];
+
+ foreach ($bowerJsFiles as $file) {
+ $js_file_to_string .= '';
}
- // @todo fix this path
- $js_file_to_string .= '';
- //Loading email_editor js
+ foreach ($js_files as $file) {
+ $js_file_to_string .= api_get_js($file);
+ }
+
+
+ // Loading email_editor js
if (!api_is_anonymous() && api_get_setting('allow_email_editor') == 'true') {
$js_file_to_string .= $this->fetch('default/mail_editor/email_link.js.tpl');
}
diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php
index da3527622b..6a804a3504 100755
--- a/main/newscorm/lp_controller.php
+++ b/main/newscorm/lp_controller.php
@@ -44,7 +44,7 @@ if ($showGlossary) {
) {
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = '';
diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php
index 77ea003ab4..b028f4f7b3 100755
--- a/main/newscorm/lp_view.php
+++ b/main/newscorm/lp_view.php
@@ -491,7 +491,7 @@ if ($is_allowed_to_edit) {
// $("
I am a div courses
").prependTo("body");
}, "top.content_name",
{ load: [
- { type:"script", id:"_fr1", src:"javascript/jquery.min.js"},
+ { type:"script", id:"_fr1", src:""},
{ type:"script", id:"_fr4", src:"javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.min.js"},
{ type:"stylesheet", id:"_fr5", src:"javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.css"},
{ type:"script", id:"_fr2", src:"javascript/jquery.highlight.js"}
@@ -504,7 +504,7 @@ if ($is_allowed_to_edit) {
"top.content_name",
{
load: [
- { type:"script", id:"_fr1", src:"javascript/jquery.min.js"},
+ { type:"script", id:"_fr1", src:""},
{ type:"script", id:"_fr4", src:"javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.min.js"},
{ type:"stylesheet", id:"_fr5", src:"javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.css"},
{ type:"script", id:"_fr2", src:"javascript/jquery.highlight.js"}