Commit f94e665e by Chris Rodriguez

Fixing inline JS for CCX navigation

parent 9af50a75
...@@ -89,9 +89,9 @@ from openedx.core.djangolib.js_utils import ( ...@@ -89,9 +89,9 @@ from openedx.core.djangolib.js_utils import (
<script> <script>
function setup_tabs() { function setup_tabs() {
$(".instructor-nav a").on("click", function(event) { $(".instructor-nav .btn-link").on("click", function(event) {
event.preventDefault(); event.preventDefault();
$(".instructor-nav a").removeClass("active-section"); $(".instructor-nav .btn-link").removeClass("active-section");
var section_sel = "#" + $(this).attr("data-section"); var section_sel = "#" + $(this).attr("data-section");
$("section.idash-section").hide(); $("section.idash-section").hide();
$(section_sel).show(); $(section_sel).show();
...@@ -101,12 +101,12 @@ from openedx.core.djangolib.js_utils import ( ...@@ -101,12 +101,12 @@ from openedx.core.djangolib.js_utils import (
var url = document.URL, var url = document.URL,
hashbang = url.indexOf('#!'); hashbang = url.indexOf('#!');
if (hashbang != -1) { if (hashbang != -1) {
var selector = '.instructor-nav a[data-section=' + var selector = '.instructor-nav [data-section=' +
url.substr(hashbang + 2) + ']'; url.substr(hashbang + 2) + ']';
$(selector).click(); $(selector).click();
} }
else { else {
$(".instructor-nav a").first().click(); $(".instructor-nav .btn-link").first().click();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment