Fixing js error javascript:void() to javascript:void(0)

skala
Julio Montoya 14 years ago
parent 24592f0b8b
commit ae1b3b7b29
  1. 10
      main/inc/lib/course.lib.php
  2. 5
      main/inc/lib/document.lib.php

@ -2747,7 +2747,7 @@ class CourseManager {
echo '<div style="float:right;">';
if ($load_dirs) {
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void();">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'),22).'</a>';
echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container'));
} else {
@ -2761,7 +2761,7 @@ class CourseManager {
} else {
echo '<div style="float:right;">';
if ($load_dirs) {
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void();">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container'));
}
echo '</div>';
@ -2905,7 +2905,7 @@ class CourseManager {
echo '<div style="float:right;">';
if ($load_dirs) {
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void();">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'),22).'</a>';
echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container'));
} else {
@ -2919,7 +2919,7 @@ class CourseManager {
} else {
echo '<div style="float:right;">';
if ($load_dirs) {
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void();">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container'));
}
echo '</div>';
@ -3150,7 +3150,7 @@ class CourseManager {
if ($load_dirs) {
$result .= '<div style="float:right;">';
$result .= '<a id="document_preview_'.$info['real_id'].'_'.$my_course['id_session'].'" class="document_preview" href="javascript:void();">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
$result .= '<a id="document_preview_'.$info['real_id'].'_'.$my_course['id_session'].'" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),22).'</a>';
$result .= Display::div('', array('id' => 'document_result_'.$info['real_id'].'_'.$my_course['id_session'], 'class'=>'document_preview_container'));
$result .= '</div>';
}

@ -2503,7 +2503,8 @@ return 'application/octet-stream';
}
} else {
$user_status = SessionManager::get_user_status_in_session($user_id, $course_info['code'], $session_id);
if (in_array($user_status, array('0', '2', '6'))) { //is true if is an student, course session teacher or coach
//is true if is an student, course session teacher or coach
if (in_array($user_status, array('0', '2', '6'))) {
$user_in_course = true;
}
}
@ -2543,7 +2544,7 @@ return 'application/octet-stream';
$return .= Display::url(get_lang('NewDocument'), api_get_self().'?'.api_get_cidreq().'&action=add_item&type='.TOOL_DOCUMENT.'&lp_id='.$_SESSION['oLP']->lp_id);
$return .= '</div>';
} else {
$return .= Display::div(Display::url(Display::return_icon('delete.png', get_lang('Close'), array(), 22), 'javascript:void();', array('id'=>'close_div_'.$course_info['real_id'].'_'.$session_id,'class' =>'close_div')), array('style' => 'position:absolute;right:10px'));
$return .= Display::div(Display::url(Display::return_icon('delete.png', get_lang('Close'), array(), 22), ' javascript:void(0);', array('id'=>'close_div_'.$course_info['real_id'].'_'.$session_id,'class' =>'close_div')), array('style' => 'position:absolute;right:10px'));
}
// If you want to debug it, I advise you to do "echo" on the eval statements.

Loading…
Cancel
Save