Urls working.
This commit is contained in:
@@ -45,7 +45,8 @@
|
||||
<% if (item['action_text'] !== '' && item['action_url'] !== '') { %>
|
||||
<ul class="list-actions task-actions">
|
||||
<li>
|
||||
<a href="<%= item['action_url'] %>" class="action action-primary"><%= item['action_text'] %></a>
|
||||
<a href="<%= item['action_url'] %>" rel="external" class="action action-primary"
|
||||
title="This link will open in a new browser window/tab"><%= item['action_text'] %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<% } %>
|
||||
|
||||
@@ -5,7 +5,8 @@ CMS.Views.Checklists = Backbone.View.extend({
|
||||
|
||||
events : {
|
||||
'click .course-checklist .checklist-title' : "toggleChecklist",
|
||||
'click .course-checklist .task input' : "toggleTask"
|
||||
'click .course-checklist .task input' : "toggleTask",
|
||||
'click a[rel="external"]' : "openInNewTab"
|
||||
},
|
||||
|
||||
initialize : function() {
|
||||
@@ -60,7 +61,7 @@ CMS.Views.Checklists = Backbone.View.extend({
|
||||
},
|
||||
|
||||
toggleChecklist : function(e) {
|
||||
(e).preventDefault();
|
||||
e.preventDefault();
|
||||
$(e.target).closest('.course-checklist').toggleClass('is-collapsed');
|
||||
},
|
||||
|
||||
@@ -84,6 +85,11 @@ CMS.Views.Checklists = Backbone.View.extend({
|
||||
},
|
||||
error : CMS.ServerError
|
||||
});
|
||||
},
|
||||
|
||||
openInNewTab : function(e) {
|
||||
e.preventDefault();
|
||||
window.open($(e.target).attr('href'));
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user