User jquery3, replace use of window.load, fix webpack loader

pull/2487/head
Julio 7 years ago
parent a0b9ee306e
commit 808ac654fc
  1. 13
      assets/js/main.js
  2. 16
      main/inc/lib/api.lib.php
  3. 2
      main/lp/lp_controller.php
  4. 2
      main/template/default/glossary/glossary_auto.js.tpl
  5. 2
      main/template/default/layout/header.js.tpl
  6. 2
      package.json
  7. 6
      yarn.lock

@ -2,16 +2,17 @@ var moment = require("moment");
require("moment/min/locales.min");
global.moment = moment;
const $ = require("jquery");
var $ = require("jquery");
// create global $ and jQuery variables
window.jQuery = window.$ = global.$ = global.jQuery = $;
require("webpack-jquery-ui");
require("webpack-jquery-ui/css");
// JS is equivalent to the normal "bootstrap" package
// no need to set this to a variable, just require it
require("bootstrap-sass");
require("chosen-js");
require("webpack-jquery-ui");
require("webpack-jquery-ui/css");
require("font-awesome-webpack");
require("ckeditor");
require("mediaelement");
@ -23,12 +24,14 @@ require("image-map-resizer");
require("cropper");
require("jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon");
require("jquery.scrollbar");
require("blueimp-file-upload");
//require ("readmore-js");
import "select2";
require("bootstrap-select");
require("bootstrap-select/dist/css/bootstrap-select.css")
require('bootstrap-select/dist/js/bootstrap-select.js');
require('bootstrap-select/dist/css/bootstrap-select.css');
/*

@ -766,7 +766,7 @@ function api_get_path($path = '', $configuration = [])
SYS_LANG_PATH => 'lang/',
WEB_IMG_PATH => 'img/',
WEB_CSS_PATH => 'public/build/css/',
SYS_CSS_PATH => 'app/Resosurces/public/css/',
SYS_CSS_PATH => 'public/build/css/',
SYS_PLUGIN_PATH => 'plugin/',
WEB_PLUGIN_PATH => 'plugin/',
WEB_PLUGIN_ASSET_PATH => 'public/plugins/',
@ -1936,6 +1936,18 @@ function api_get_course_info($course_code = null, $strict = false)
return $_course;
}
/**
* @param int $courseId
* @return \Chamilo\CoreBundle\Entity\Course
*/
function api_get_course_entity($courseId)
{
if (empty($courseId)) {
$courseId = api_get_course_int_id();
}
return CourseManager::getManager()->find($courseId);
}
/**
* Returns the current course info array.
@ -6713,7 +6725,7 @@ function api_get_jquery_libraries_js($libraries)
}
//Document multiple upload funcionality
if (in_array('jquery-upload', $libraries)) {
if (in_array('jquery-uploadzs', $libraries)) {
$js .= api_get_asset('blueimp-load-image/js/load-image.all.min.js');
$js .= api_get_asset('blueimp-canvas-to-blob/js/canvas-to-blob.min.js');
$js .= api_get_asset('jquery-file-upload/js/jquery.iframe-transport.js');

@ -53,7 +53,7 @@ $htmlHeadXtra[] = '<script>
function setFocus(){
$("#idTitle").focus();
}
$(window).load(function () {
$(window).on("load", function (e) {
setFocus();
});
</script>';

@ -1,6 +1,6 @@
{% if add_ready %}
$(document).ready(function() {
$(window).load(function () {
$(window).on("load", function (e) {
{% endif %}
var my_text = $(".glossary-content").html();
var ajaxRequestUrl = "{{ _p.web }}main/glossary/glossary_ajax_request.php?{{ _p.web_cid_query }}";

@ -105,7 +105,7 @@ $(document).ready(function() {
// Removes the yellow input in Chrome
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).load(function(){
$(window).on("load", function (e) {
$('input:-webkit-autofill').each(function(){
var text = $(this).val();
var name = $(this).attr('name');

@ -20,7 +20,7 @@
"fullcalendar": "3.1.0",
"highlight.js": "^9.12.0",
"image-map-resizer": "^1.0.3",
"jquery": "^2.2",
"jquery": "^3.0",
"jquery-ui-timepicker-addon": "^1.6.3",
"jquery.scrollbar": "^0.2.11",
"js-cookie": "^2.2.0",

@ -3300,14 +3300,10 @@ jquery.scrollbar@^0.2.11:
version "0.2.11"
resolved "https://registry.yarnpkg.com/jquery.scrollbar/-/jquery.scrollbar-0.2.11.tgz#e91bd4a97d83859463024d26e730dc36676ab59d"
jquery@>=1.10, jquery@>=1.2.3, jquery@>=1.6.0, jquery@>=1.8, jquery@>=2.0.0, jquery@>=3.0.0, jquery@^3.2.1:
jquery@>=1.10, jquery@>=1.2.3, jquery@>=1.6.0, jquery@>=1.8, jquery@>=2.0.0, jquery@>=3.0.0, jquery@^3.0, jquery@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787"
jquery@^2.2:
version "2.2.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02"
jquery@~2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.1.4.tgz#228bde698a0c61431dc2630a6a154f15890d2317"

Loading…
Cancel
Save