From 54bc41748281fc4c38a13448c723e9518d8cdfce Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Tue, 16 Jul 2019 16:20:26 +0200 Subject: [PATCH] Remove unused JS and cherry-picked CSS from #3033 --- .../coachreports/exercise_mastery_view.css | 158 ------------------ .../js/coachreports/exercise_mastery_view.js | 74 -------- 2 files changed, 232 deletions(-) delete mode 100644 kalite/coachreports/static/css/coachreports/exercise_mastery_view.css delete mode 100644 kalite/coachreports/static/js/coachreports/exercise_mastery_view.js diff --git a/kalite/coachreports/static/css/coachreports/exercise_mastery_view.css b/kalite/coachreports/static/css/coachreports/exercise_mastery_view.css deleted file mode 100644 index 75365e0e0f..0000000000 --- a/kalite/coachreports/static/css/coachreports/exercise_mastery_view.css +++ /dev/null @@ -1,158 +0,0 @@ -.selection { - float: left; - padding: 0 10px 10px 0; -} - -#displaygrid { - width: 100%; - padding-top: 5px; - padding-left: 2px; -} - -#displaygrid > .users { - width: 11%; - margin-right: 1px; - float: left; -} - -.userstatus { - overflow: auto; - width: 88%; -} - -.users table { - width: 100%; -} - -#displaygrid table { - table-layout: fixed; -} - -th, td { - border: 1px solid black; - padding: 2px; - vertical-align:middle; -} - -.users th { - text-align: left; -} - -.subtitle { - font-size: 1.15em; - font-weight: bold; -} - -.status { - height: 27px; - background-color: #EEE; -} - -th.username { - height: 27px; - border: 1px solid black; - padding-left: 5px; - white-space: nowrap; - text-overflow: ellipsis; -} - -th.headrow, th.headrow div { - width: 80px; - font-weight: bold; - background-color: white; - overflow: hidden; - text-overflow: ellipsis; -} - -th.headrowuser { - font-weight: bold; -} - -.complete { - background-color: #2F942F; -} - -.partial { - background-color: #94BE48; -} - -.struggle { - background-color: #CA4D4D; -} - -#displaygrid td, #displaygrid th { - min-width: 60px; - max-width: 60px; - overflow: hidden; -} - -#legend a { - height:12px; - margin:0px; - padding:0px; -} - -.student-name, .attempts, .streak_progress, .points, .total_seconds_watched { - float:left; - display:none; - overflow:hidden; - white-space:nowrap; - width:100%; - margin:0px 5px 0px 0px; - padding:0px; - text-align:right; - vertical-align:middle; -} - -.student-name { - float:none; - text-align:left; - display:block; - text-overflow: ellipsis; -} - -#legend { - float:left; - vertical-align:middle; - margin:12px 25px 2px 10px; -} - -.legend { - float:right; - width:160px; - height:20px; - text-align:center; - vertical-align:middle; - white-space:nowrap; - overflow:hidden; - border-style:solid; - border-width: 1px; - padding:2px; - margin-right: 10px; - font-weight: bold; -} - -.legend div { - float:left; - width:35px; - height:21px; -} - -#selection-bar { - overflow:hide; -} - -#disp_options { - float:right; -} - -.exercise-name { - height: 100px; - text-align: center; - vertical-align: none; - padding: 0px; -} - -#exercise-mastery { - font-size: 10px -} \ No newline at end of file diff --git a/kalite/coachreports/static/js/coachreports/exercise_mastery_view.js b/kalite/coachreports/static/js/coachreports/exercise_mastery_view.js deleted file mode 100644 index 2741185f38..0000000000 --- a/kalite/coachreports/static/js/coachreports/exercise_mastery_view.js +++ /dev/null @@ -1,74 +0,0 @@ -$(function() { - - $("#student").change(function() { - window.location.href = setGetParam(window.location.href, "user", $("#student option:selected").val()); - }); - - $("#playlist").change(function() { - window.location.href = setGetParam(window.location.href, "playlist", $("#playlist option:selected").val()); - }); - - $("#facility").change(function() { - window.location.href = setGetParamDict(window.location.href, { - "facility": $("#facility option:selected").val(), - "group": $("#" + $("#facility option:selected").val() + "_group_select").val(), - "playlist": "" - }); - }); - - $(".group_select").change(function(event) { - window.location.href = setGetParam(window.location.href, "group", $(event.target).val()); - }); - - // Selector to toggle visible elements is stored in each option value - cell_height = 27; - $("#disp_options").change(function() { - selector = $("#disp_options option:selected").val(); - - // adjust the cell height - cell_height += 50 * Math.pow(-1, 0 + $(selector).is(":visible")); - - // adjust view in data cells - $(selector).each(function() { - $(this).toggle(); - }); - $(selector).each(function() { - $(this).height(20); - $(this).parent().height(cell_height); - }); - - // Adjust student name cell heights - $("th.username").each(function() { - $(this).height(cell_height); - }); - }); - $(window).resize(function() { - $('.headrowuser').height($('.headrow.data').height()); - }).resize(); -}); - -$(function(){ - $("#tree").dynatree({ - persist: true, - expand: false, - checkbox: true, - selectMode: 3, - cookieId: "exercises", - children: null, - - onPostInit: function(isReloading, isError) { - if (window.location.href.indexOf("&playlist=") == -1) { - $("#tree").dynatree("getTree").visit(function(node){ - node.select(false); - node.expand(false); - }); - } - }, - onSelect: function(select, dtnode) { - var selKeys = $.map(dtnode.tree.getSelectedNodes(), function(dtnode){ - return dtnode.data.key; - }); - window.location.href = setGetParam(window.location.href, "playlist", selKeys); - } - }); -});