From 2ce065a1216d69283c74e5241a90d7b77f7600db Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 7 Feb 2017 14:22:07 +0100 Subject: [PATCH] switchClass is undefined switchClass is provided by jquery-ui, not jquery, so it's not available on the tree page --- notebook/static/tree/js/notebooklist.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js index f91ecd39e..f9724c0a7 100644 --- a/notebook/static/tree/js/notebooklist.js +++ b/notebook/static/tree/js/notebooklist.js @@ -72,8 +72,8 @@ define([ NotebookList.prototype.bind_events = function () { var that = this; $('#refresh_' + this.element_name + '_list').click(function () { - $("#sort-name i").switchClass("fa-arrow-down", "fa-arrow-up"); - $("#last-modified i").switchClass("fa-arrow-down", "fa-arrow-up"); + $("#sort-name i").removeClass("fa-arrow-down").addClass("fa-arrow-up"); + $("#last-modified i").removeClass("fa-arrow-down").addClass("fa-arrow-up"); that.load_sessions(); }); this.element.bind('dragover', function () { @@ -171,11 +171,11 @@ define([ if (that.sort_state.sort_on == 0) { that.sort_list(sort_on, 1); - $("#" + sort_on + " i").switchClass("fa-arrow-up", "fa-arrow-down"); + $("#" + sort_on + " i").removeClass("fa-arrow-up").addClass("fa-arrow-down"); that.sort_state.sort_on = 1; } else { that.sort_list(sort_on, 2); - $("#" + sort_on + " i").switchClass("fa-arrow-down", "fa-arrow-up"); + $("#" + sort_on + " i").removeClass("fa-arrow-down").addClass("fa-arrow-up"); that.sort_state.sort_on = 0; } });