Replace document.ready with shortcut "$(function () {"

document.ready is not working in jquery v3, needed in master.
pull/3173/head
Julio Montoya 6 years ago
parent cd0e1d6e61
commit f922a9ebd9
  1. 4
      main/announcements/announcements.php
  2. 2
      main/inc/lib/javascript/annotation/js/annotation.js
  3. 2
      main/template/default/admin/teacher_time_report.tpl
  4. 2
      main/template/default/blog/blog.tpl
  5. 2
      main/template/default/blog/post.tpl
  6. 2
      main/template/default/chat/chat.tpl
  7. 2
      main/template/default/chat/video.tpl
  8. 2
      main/template/default/exercise/submit.js.tpl
  9. 2
      plugin/advanced_subscription/views/open_session.tpl
  10. 2
      plugin/bbb/resources/utils.js
  11. 2
      plugin/buycourses/view/sales_report.tpl
  12. 2
      plugin/buycourses/view/service_panel.tpl
  13. 2
      plugin/buycourses/view/service_sales_report.tpl
  14. 2
      plugin/grading_electronic/view/grading.html.twig
  15. 2
      plugin/tour/views/script.tpl

@ -523,7 +523,7 @@ switch ($action) {
$form->addHtml(" $form->addHtml("
<script> <script>
$(document).on('ready', function () { $(function () {
$('#announcement_preview').on('click', function() { $('#announcement_preview').on('click', function() {
var users = []; var users = [];
$('#users_to option').each(function() { $('#users_to option').each(function() {
@ -566,7 +566,7 @@ switch ($action) {
$form->addHtml( $form->addHtml(
" "
<script> <script>
$(document).on('ready', function () { $(function () {
$('#choose_recipients').click(); $('#choose_recipients').click();
}); });
</script> </script>

@ -324,7 +324,7 @@
}; };
window.AnnotationQuestion = function (userSettings) { window.AnnotationQuestion = function (userSettings) {
$(document).on('ready', function () { $(function () {
var settings = $.extend( var settings = $.extend(
{ {
questionId: 0, questionId: 0,

@ -1,5 +1,5 @@
<script> <script>
$(document).on('ready', function () { $(function () {
$('#course').on('change', function () { $('#course').on('change', function () {
$('#session').prop('selectedIndex', 0); $('#session').prop('selectedIndex', 0);
$('#teacher').prop('selectedIndex', 0); $('#teacher').prop('selectedIndex', 0);

@ -101,7 +101,7 @@
</div> </div>
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$('.btn-read-more').on('click', function (e) { $('.btn-read-more').on('click', function (e) {
e.preventDefault(); e.preventDefault();

@ -156,7 +156,7 @@
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$('.btn-reply-to').on('click', function (e) { $('.btn-reply-to').on('click', function (e) {
e.preventDefault(); e.preventDefault();

@ -65,7 +65,7 @@
<source src="{{ _p.web_main }}chat/sound/notification.mp3" type="audio/mpeg"></source> <source src="{{ _p.web_main }}chat/sound/notification.mp3" type="audio/mpeg"></source>
</audio> </audio>
<script> <script>
$(document).on('ready', function () { $(function () {
var ChChat = { var ChChat = {
_ajaxUrl: '{{ _p.web_ajax }}course_chat.ajax.php?{{ _p.web_cid_query }}', _ajaxUrl: '{{ _p.web_ajax }}course_chat.ajax.php?{{ _p.web_cid_query }}',
_historySize: -1, _historySize: -1,

@ -152,7 +152,7 @@
} }
}; };
$(document).on('ready', function () { $(function () {
VideoChat.init(); VideoChat.init();
}); });
})(); })();

@ -222,7 +222,7 @@ jsPlumb.ready(function () {
} }
}); });
$(document).on('ready', function () { $(function () {
DraggableAnswer.init( DraggableAnswer.init(
$(".exercise-draggable-answer"), $(".exercise-draggable-answer"),
$(".droppable") $(".droppable")

@ -1,7 +1,7 @@
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css"> <link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">
<script> <script>
$(document).on('ready', function () { $(function () {
$('#asp-close-window').on('click', function (e) { $('#asp-close-window').on('click', function (e) {
e.preventDefault(); e.preventDefault();

@ -1,4 +1,4 @@
$(document).on('ready', function () { $(function () {
$('.check-meeting-video').on('click', function (e) { $('.check-meeting-video').on('click', function (e) {
e.preventDefault(); e.preventDefault();

@ -81,7 +81,7 @@
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$('[name="filter_type"]').on('change', function () { $('[name="filter_type"]').on('change', function () {
var self = $(this); var self = $(this);

@ -56,7 +56,7 @@
</table> </table>
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$("td a").click(function () { $("td a").click(function () {
var id = $(this).attr('tag'); var id = $(this).attr('tag');
var action = $(this).attr('id'); var action = $(this).attr('id');

@ -73,7 +73,7 @@
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$("td a").click(function () { $("td a").click(function () {
var id = $(this).attr('tag'); var id = $(this).attr('tag');
var action = $(this).attr('id'); var action = $(this).attr('id');

@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<script> <script>
$(document).on('ready', function () { $(function () {
$('form[name="frm_grading_electronic"]').on('submit', function (e) { $('form[name="frm_grading_electronic"]').on('submit', function (e) {
e.preventDefault(); e.preventDefault();

@ -57,7 +57,7 @@
}; };
})(); })();
$(document).on('ready', function() { $(function () {
var pages = {{ tour.pages }}; var pages = {{ tour.pages }};
$.each(pages, function(index, page) { $.each(pages, function(index, page) {

Loading…
Cancel
Save