diff --git a/main/inc/ajax/skill.ajax.php b/main/inc/ajax/skill.ajax.php index 4acd5d4ace..b13e0e1e17 100755 --- a/main/inc/ajax/skill.ajax.php +++ b/main/inc/ajax/skill.ajax.php @@ -74,7 +74,11 @@ switch ($action) { break; case 'get_course_info_popup': $course_info = api_get_course_info($_REQUEST['code']); - $courses = CourseManager::process_hot_course_item(array($course_info['real_id'])); + $courses = CourseManager::process_hot_course_item( + [ + ['c_id' => $course_info['real_id']] + ] + ); Display::display_no_header(); Display::$global_template->assign('hot_courses', $courses); echo Display::$global_template->fetch('default/layout/hot_course_item_popup.tpl'); diff --git a/main/template/default/layout/hot_course_item_popup.tpl b/main/template/default/layout/hot_course_item_popup.tpl index 90cad0a7ca..e7716cccc3 100755 --- a/main/template/default/layout/hot_course_item_popup.tpl +++ b/main/template/default/layout/hot_course_item_popup.tpl @@ -1,27 +1,23 @@ {% for hot_course in hot_courses %} {% if hot_course.extra_info.title %} -
-
-
-
-
- -
-
-
-
-

{{ hot_course.extra_info.title}}

-
{{ hot_course.extra_info.teachers }}
- {# hot_course.extra_info.rating_html #} -
-

- {{ hot_course.extra_info.description_button }} - {{ hot_course.extra_info.go_to_course_button }} - {{ hot_course.extra_info.register_button }} -

-
+
+
+
+
+
+
+

{{ hot_course.extra_info.title}}

+
{{ hot_course.extra_info.teachers }}
+ {# hot_course.extra_info.rating_html #} +
+

+ {{ hot_course.extra_info.description_button }} + {{ hot_course.extra_info.go_to_course_button }} + {{ hot_course.extra_info.register_button }} +

+
{% endif %} -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/main/template/default/skill/skill_wheel_student.tpl b/main/template/default/skill/skill_wheel_student.tpl index 7b35f3690c..4e668b5099 100755 --- a/main/template/default/skill/skill_wheel_student.tpl +++ b/main/template/default/skill/skill_wheel_student.tpl @@ -92,20 +92,22 @@ $(document).ready(function() { }); /* When clicking in a course title */ - $("#skill_info").on("click", "a.course_description_popup", function() { - course_code = $(this).attr('rel'); - $.ajax({ - url: url+'&a=get_course_info_popup&code='+course_code, - async: false, - success: function(data) { - $('#course_info').html(data); - $("#dialog-course-info").dialog({ - close: function() { - $('#course_info').html(''); - } - }); - $("#dialog-course-info").dialog("open"); + $("#skill_info").on("click", "a.course_description_popup", function(e) { + e.preventDefault(); + + var getCourseInfo = $.ajax( + url, + { + data: { + a: 'get_course_info_popup', + code: $(this).attr('rel') + } } + ); + + $.when(getCourseInfo).done(function(response) { + $('#frm-course-info').find('.modal-body').html(response); + $('#frm-course-info').modal('show'); }); }); @@ -141,15 +143,11 @@ $(document).ready(function() { newel: true }); - //Open dialog - $("#dialog-course-info").dialog({ - autoOpen: false, - modal : true, - width : 550, - height : 250 - }); - load_nodes(0, main_depth); + + $('#frm-course-info').on('', function() { + $('#frm-course-info').find('.modal-body').html(''); + }); }); @@ -260,10 +258,6 @@ $(document).ready(function() {
- @@ -285,3 +279,20 @@ $(document).ready(function() { + +