From 6de1d289c20ec0cdd1b80558ad16b7c5de305dd5 Mon Sep 17 00:00:00 2001 From: Kevin Nadro Date: Sat, 2 Jul 2016 17:38:14 -0700 Subject: [PATCH] sandbox container show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a way to make sure the sandbox container shows up when inside the sandbox tracers and when you aren’t in it --- css/stylesheet.css | 5 ++++- index.html | 2 +- js/dom/show_algorithm.js | 10 +++++++++- js/index.js | 1 - 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/css/stylesheet.css b/css/stylesheet.css index 3795aed..5de9e78 100644 --- a/css/stylesheet.css +++ b/css/stylesheet.css @@ -256,7 +256,6 @@ section { .editor_container { left: 50%; - display: none; } .module_container { @@ -264,6 +263,10 @@ section { border: none; } +.hide{ + display: none; +} + .tab_container { top: 30px; background: #242424; diff --git a/index.html b/index.html index 6718ebe..5d478f0 100644 --- a/index.html +++ b/index.html @@ -127,7 +127,7 @@ -
+
diff --git a/js/dom/show_algorithm.js b/js/dom/show_algorithm.js index 54474f1..9272e65 100644 --- a/js/dom/show_algorithm.js +++ b/js/dom/show_algorithm.js @@ -25,6 +25,14 @@ module.exports = (category, algorithm, data, requestedFile) => { algorithm_name = categoryObj.list[algorithm]; } + if(category_name === 'Sandbox'){ + $('.editor_container').addClass('hide'); + $('.sandbox_container').removeClass('hide'); + }else{ + $('.editor_container').removeClass('hide'); + $('.sandbox_container').addClass('hide'); + } + $('.sidemenu button').removeClass('active'); $menu.addClass('active'); @@ -45,4 +53,4 @@ module.exports = (category, algorithm, data, requestedFile) => { showDescription(data); addFiles(category, algorithm, files, requestedFile); -}; \ No newline at end of file +}; diff --git a/js/index.js b/js/index.js index a5d711b..3da725c 100644 --- a/js/index.js +++ b/js/index.js @@ -40,7 +40,6 @@ $(() => { // load modules to the global scope so they can be evaled extend(true, window, modules); - extend(true, window, Sandbox); Server.loadCategories().then((data) => { app.setCategories(data); -- GitLab