Minor - format code, replace $(document).ready() with $(function() {

pull/3623/head
Julio Montoya 5 years ago
parent b1bb775741
commit dcaafe9f7d
  1. 4
      main/exercise/UniqueAnswerImage.php
  2. 2
      main/exercise/exercise.class.php
  3. 2
      main/exercise/exercise_submit.php
  4. 2
      main/exercise/question.class.php
  5. 2
      main/inc/lib/CoursesAndSessionsCatalog.class.php
  6. 2
      main/lp/lp_view.php

@ -68,10 +68,8 @@ class UniqueAnswerImage extends UniqueAnswer
$html .= '<link rel="stylesheet" type="text/css" media="screen"
href="'.$finderFolder.'css/elfinder.full.css">';
$html .= '<link rel="stylesheet" type="text/css" media="screen" href="'.$finderFolder.'css/theme.css">';
$html .= '<!-- elFinder JS (REQUIRED) -->';
$html .= '<script type="text/javascript" src="'.$finderFolder.'js/elfinder.full.js"></script>';
$html .= '<!-- elFinder translation (OPTIONAL) -->';
$language = 'en';
$platformLanguage = api_get_interface_language();
@ -86,7 +84,7 @@ class UniqueAnswerImage extends UniqueAnswer
$html .= $includeFile;
$html .= '<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$(function() {
$(".add_img_link").on("click", function(e){
e.preventDefault();
e.stopPropagation();

@ -10242,7 +10242,7 @@ class Exercise
*
* @param array $categoriesAddedInExercise
* @param array $question_list
* @param array $questions_by_category per category
* @param array $questions_by_category
* @param bool $flatResult
* @param bool $randomizeQuestions
* @param array $questionsByCategoryMandatory

@ -88,7 +88,7 @@ if (isset($zoomOptions['options']) && !in_array($origin, ['embeddable', 'mobilea
$options = $zoomOptions['options'];
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.elevatezoom.js"></script>';
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
$(function() {
$("img").each(function() {
var attr = $(this).attr("data-zoom-image");
// For some browsers, `attr` is undefined; for others,

@ -1664,7 +1664,7 @@ abstract class Question
echo $includeFile;
echo '<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$(function() {
$(".create_img_link").click(function(e){
e.preventDefault();
e.stopPropagation();

@ -1278,7 +1278,7 @@ class CoursesAndSessionsCatalog
'a' => 'get_requirements',
'id' => $id,
'type' => $type,
'sid' => $sessionId
'sid' => $sessionId,
]
);

@ -136,7 +136,7 @@ if (isset($zoomOptions['options']) && !in_array($origin, ['embeddable', 'noheade
$options = $zoomOptions['options'];
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.elevatezoom.js"></script>';
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
$(function() {
$("img").each(function() {
var attr = $(this).attr("data-zoom-image");
// For some browsers, `attr` is undefined; for others,

Loading…
Cancel
Save