Internal: Fix calendar, add 'bootstrap-daterangepicker' js call

pull/3464/head
Julio Montoya 5 years ago
parent eb5d2ea68b
commit a67415239a
  1. 2
      assets/js/app.js
  2. 8
      public/main/calendar/agenda_js.php
  3. 4
      public/main/inc/global.inc.php

@ -16,7 +16,7 @@ global.moment = moment;
require('select2/dist/js/select2.full.min');
require("flatpickr");
import('bootstrap-vue');
import('bootstrap-daterangepicker');
require('bootstrap-daterangepicker');
import('webpack-jquery-ui');
import('webpack-jquery-ui/css');
import('./vendor');

@ -7,13 +7,15 @@ $use_anonymous = true;
$typeList = ['personal', 'course', 'admin', 'platform'];
// Calendar type
$type = isset($_REQUEST['type']) && in_array($_REQUEST['type'], $typeList) ? $_REQUEST['type'] : 'personal';
$userId = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null;
if ('personal' == $type || 'admin' == $type) {
if ('personal' === $type || 'admin' === $type) {
$cidReset = true; // fixes #5162
}
require_once __DIR__.'/../inc/global.inc.php';
$userId = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null;
$current_course_tool = TOOL_CALENDAR_EVENT;
$this_section = SECTION_MYAGENDA;
@ -22,7 +24,7 @@ $htmlHeadXtra[] = api_get_asset('fullcalendar/dist/locale-all.js');
$htmlHeadXtra[] = api_get_asset('fullcalendar/dist/gcal.js');
$htmlHeadXtra[] = api_get_css_asset('fullcalendar/dist/fullcalendar.min.css');*/
if (api_is_platform_admin() && ('admin' == $type || 'platform' == $type)) {
if (api_is_platform_admin() && ('admin' === $type || 'platform' === $type)) {
$type = 'admin';
}

@ -80,9 +80,9 @@ try {
$container->get('request_stack')->push($request);
if (!empty($saveFlashBag)) {
foreach ($saveFlashBag as $type => $messageList) {
foreach ($saveFlashBag as $typeMessage => $messageList) {
foreach ($messageList as $message) {
Container::getSession()->getFlashBag()->add($type, $message);
Container::getSession()->getFlashBag()->add($typeMessage, $message);
}
}
}

Loading…
Cancel
Save