From 3313a7cdc67db5e5cc45019ccbd0d08087258208 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 11 Oct 2016 15:07:00 +0200 Subject: [PATCH] Update qtip2 library using bower --- bower.json | 3 ++- main/calendar/agenda_js.php | 20 +++++++++---------- main/inc/lib/api.lib.php | 2 ++ .../lib/javascript/qtip2/jquery.qtip.min.css | 1 - .../lib/javascript/qtip2/jquery.qtip.min.js | 13 ------------ 5 files changed, 14 insertions(+), 25 deletions(-) delete mode 100755 main/inc/lib/javascript/qtip2/jquery.qtip.min.css delete mode 100755 main/inc/lib/javascript/qtip2/jquery.qtip.min.js diff --git a/bower.json b/bower.json index 4f8bb81838..c45368de29 100644 --- a/bower.json +++ b/bower.json @@ -28,7 +28,8 @@ "jquery.scrollbar": "0.2.*", "jquery-file-upload": "*", "pwstrength-bootstrap": "*", - "readmore-js": "2.1.0" + "readmore-js": "2.1.0", + "qtip2": "*" }, "resolutions": { "jquery": "2.1.4" diff --git a/main/calendar/agenda_js.php b/main/calendar/agenda_js.php index a8472fbbde..5e19050b04 100755 --- a/main/calendar/agenda_js.php +++ b/main/calendar/agenda_js.php @@ -21,11 +21,12 @@ $current_course_tool = TOOL_CALENDAR_EVENT; $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_asset('qtip2/jquery.qtip.min.js'); $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'); +$htmlHeadXtra[] = api_get_css_asset('fullcalendar/dist/fullcalendar.min.css'); +$htmlHeadXtra[] = api_get_css_asset('qtip2/jquery.qtip.min.css'); if (api_is_platform_admin() && ($type == 'admin' || $type == 'platform')) { $type = 'admin'; @@ -111,7 +112,6 @@ switch ($type) { break; } - //Setting translations $day_short = api_get_week_days_short(); $days = api_get_week_days_long(); @@ -208,7 +208,7 @@ $form = new FormValidator( array('id' => 'add_event_form') ); -$form->addElement('html', '
'); +$form->addHtml('
'); $sendTo = $agenda->parseAgendaFilter($userId); $addOnlyItemsInSendTo = true; @@ -218,11 +218,11 @@ if ($sendTo['everyone']) { } $agenda->showToForm($form, $sendTo, array(), $addOnlyItemsInSendTo); -$form->addElement('html', '
'); +$form->addHtml('
'); -$form->addElement('html', ''); $form->addElement('label', get_lang('Agenda'), '
'); $form->addElement('label', get_lang('Date'), ''); @@ -239,9 +239,9 @@ $form->addHtmlEditor( ); if ($agenda->type === 'course') { - $form->addElement('html', ''); $form->addElement('textarea', 'comment', get_lang('Comment'), array('id' => 'comment')); } diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php index 42780498c3..c8fee9bc93 100644 --- a/main/inc/lib/api.lib.php +++ b/main/inc/lib/api.lib.php @@ -6367,6 +6367,7 @@ function api_get_js($file) { /** * Returns the