Commit 4ff42d0cb485b628b09722790c55fecb96e91992
1 parent
037a8733
Exists in
master
and in
5 other branches
icon open card #205
Showing
3 changed files
with
15 additions
and
8 deletions
Show diff stats
courses/static/js/course.js
@@ -49,13 +49,13 @@ function subscribe(elem, url, id, confirm_message) { | @@ -49,13 +49,13 @@ function subscribe(elem, url, id, confirm_message) { | ||
49 | function delete_course(url, course, message, return_url) { | 49 | function delete_course(url, course, message, return_url) { |
50 | alertify.confirm(message, function(){ | 50 | alertify.confirm(message, function(){ |
51 | var csrftoken = getCookie('csrftoken'); | 51 | var csrftoken = getCookie('csrftoken'); |
52 | - | 52 | + |
53 | $.ajax({ | 53 | $.ajax({ |
54 | method: 'post', | 54 | method: 'post', |
55 | beforeSend: function (request) { | 55 | beforeSend: function (request) { |
56 | request.setRequestHeader('X-CSRFToken', csrftoken); | 56 | request.setRequestHeader('X-CSRFToken', csrftoken); |
57 | }, | 57 | }, |
58 | - url: url, | 58 | + url: url, |
59 | success: function(data) { | 59 | success: function(data) { |
60 | alertify.alert('Remove Course', 'Course removed successfully!', function(){ | 60 | alertify.alert('Remove Course', 'Course removed successfully!', function(){ |
61 | window.location.href = return_url; | 61 | window.location.href = return_url; |
@@ -71,10 +71,19 @@ function delete_course(url, course, message, return_url) { | @@ -71,10 +71,19 @@ function delete_course(url, course, message, return_url) { | ||
71 | */ | 71 | */ |
72 | function replicate_course(url, course) { | 72 | function replicate_course(url, course) { |
73 | $.ajax({ | 73 | $.ajax({ |
74 | - url: url, | 74 | + url: url, |
75 | data: {'form': course}, | 75 | data: {'form': course}, |
76 | success: function(data) { | 76 | success: function(data) { |
77 | $(".course_replicate_form").html(data); | 77 | $(".course_replicate_form").html(data); |
78 | } | 78 | } |
79 | }); | 79 | }); |
80 | -} | ||
81 | \ No newline at end of file | 80 | \ No newline at end of file |
81 | +} | ||
82 | +$(".caret-square").on('click', function(){ | ||
83 | + if( $(this).attr('title') == 'less'){ | ||
84 | + $(this).attr('title','more'); | ||
85 | + jQuery(this).html("<i class='fa fa-caret-square-o-up fa-2x' aria-hidden='true'></i>"); | ||
86 | + }else{ | ||
87 | + $(this).attr('title','less'); | ||
88 | + jQuery(this).html("<i class='fa fa-caret-square-o-down fa-2x' aria-hidden='true'></i>"); | ||
89 | + } | ||
90 | + }); | ||
82 | \ No newline at end of file | 91 | \ No newline at end of file |
courses/templates/course/course_card.html
@@ -7,9 +7,7 @@ | @@ -7,9 +7,7 @@ | ||
7 | <div class="panel-heading course" role="tab" > | 7 | <div class="panel-heading course" role="tab" > |
8 | <div class="row"> | 8 | <div class="row"> |
9 | <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{course.slug}}" href=".collapseOne-{{course.slug}}" aria-expanded="false" aria-controls="collapseOne-{{course.slug}}"> | 9 | <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{course.slug}}" href=".collapseOne-{{course.slug}}" aria-expanded="false" aria-controls="collapseOne-{{course.slug}}"> |
10 | - <div class="btn-group"> | ||
11 | - <button class="btn btn-default btn-sm"><i class="fa fa-chevron-circle-down fa-2x" aria-hidden="true"></i></button> | ||
12 | - </div> | 10 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> |
13 | </div> | 11 | </div> |
14 | <div class="col-xs-9 col-md-4 titleTopic"> | 12 | <div class="col-xs-9 col-md-4 titleTopic"> |
15 | <a role="button" href="{% url 'course:view' course.slug %}"> | 13 | <a role="button" href="{% url 'course:view' course.slug %}"> |
courses/templates/course/index.html
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | 44 | ||
45 | {% if user|has_role:'professor' or user|has_role:'system_admin' %} | 45 | {% if user|has_role:'professor' or user|has_role:'system_admin' %} |
46 | 46 | ||
47 | - <div class="panel panel-primary navigation"> | 47 | + <div class="panel panel-primary"> |
48 | <div class="panel-heading"> | 48 | <div class="panel-heading"> |
49 | <h3 class="panel-title">Category</h3> | 49 | <h3 class="panel-title">Category</h3> |
50 | </div> | 50 | </div> |