From 425f01f7e8ed81d376f2614fded8f873770a84d1 Mon Sep 17 00:00:00 2001
From: hjank <jank@uni-potsdam.de>
Date: Mon, 11 Jan 2016 16:28:39 +0100
Subject: [PATCH] ! fixed usability bug
 https://github.com/University-of-Potsdam-MM/autorensystem/issues/1

---
 .../deleteScenarioModalWindowController.js            | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/js/authoring/controllers/modalWindows/deleteScenarioModalWindowController.js b/js/authoring/controllers/modalWindows/deleteScenarioModalWindowController.js
index ebf3e0f..c6c1984 100644
--- a/js/authoring/controllers/modalWindows/deleteScenarioModalWindowController.js
+++ b/js/authoring/controllers/modalWindows/deleteScenarioModalWindowController.js
@@ -159,6 +159,17 @@ function deleteScenarios() {
     global_arrayShowSzenarioDeletion = [];
     $("#choiceDeletionScenarios > select").empty();
     $("#choiceDeletionScenarios > select").select2("val", "");
+
+    // if no scenarios left, deactivate ...
+    if(authorSystemContent.getScenarios().length == 0) {
+        // 1. learning unit drop down menu in navbar
+        $("#navbarLearningUnit").css({
+                "pointer-events": "none",
+                "color": "#aaa"}
+        );
+        // 2. tab bar
+        deactivateAllTabs();
+    }
 }
 
 /**
-- 
GitLab