From 3d985b62050e824cc73bcc0bb25d9f805fb8955c Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Thu, 8 Mar 2018 10:22:11 -0500 Subject: [PATCH] refactor out the cheatsheet file --- README.md | 2 +- src/Metamaps/GlobalUI/index.js | 5 +++++ src/Metamaps/Map/CheatSheet.js | 12 ------------ src/Metamaps/Map/index.js | 2 -- src/Metamaps/index.js | 3 +-- 5 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 src/Metamaps/Map/CheatSheet.js diff --git a/README.md b/README.md index 8d3ad916..bf5f7e1c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Checklist - [x] Request user object itself - [x] Load the metacodes -- [ ] create topic form +- [x] create topic form - [ ] create synapse form - [ ] move ImportDialog lightbox into main app - [ ] Notifications: make sure notifications either look nice, or redirect diff --git a/src/Metamaps/GlobalUI/index.js b/src/Metamaps/GlobalUI/index.js index 9422bbed..827e3307 100644 --- a/src/Metamaps/GlobalUI/index.js +++ b/src/Metamaps/GlobalUI/index.js @@ -32,6 +32,11 @@ const GlobalUI = { }) $('#lightbox_screen, #lightbox_close').click(self.closeLightbox) + + // tab the cheatsheet + $('#cheatSheet').tabs() + $('#quickReference').tabs().addClass('ui-tabs-vertical ui-helper-clearfix') + $('#quickReference .ui-tabs-nav li').removeClass('ui-corner-top').addClass('ui-corner-left') }, showDiv: function(selector) { $(selector).show() diff --git a/src/Metamaps/Map/CheatSheet.js b/src/Metamaps/Map/CheatSheet.js deleted file mode 100644 index 0d968b63..00000000 --- a/src/Metamaps/Map/CheatSheet.js +++ /dev/null @@ -1,12 +0,0 @@ -/* global $ */ - -const CheatSheet = { - init: function() { - // tab the cheatsheet - $('#cheatSheet').tabs() - $('#quickReference').tabs().addClass('ui-tabs-vertical ui-helper-clearfix') - $('#quickReference .ui-tabs-nav li').removeClass('ui-corner-top').addClass('ui-corner-left') - } -} - -export default CheatSheet diff --git a/src/Metamaps/Map/index.js b/src/Metamaps/Map/index.js index f337d1d0..b509ed46 100644 --- a/src/Metamaps/Map/index.js +++ b/src/Metamaps/Map/index.js @@ -20,7 +20,6 @@ import ContextMenu from '../Views/ContextMenu' import TopicCard from '../Views/TopicCard' import Visualize from '../Visualize' -import CheatSheet from './CheatSheet' import InfoBox from './InfoBox' const Map = { @@ -45,7 +44,6 @@ const Map = { InfoBox.init(serverData, function updateThumbnail() { self.uploadMapScreenshot() }) - CheatSheet.init(serverData) $(document).on(Map.events.editedByActiveMapper, self.editedByActiveMapper) }, setHasLearnedTopicCreation: function(value) { diff --git a/src/Metamaps/index.js b/src/Metamaps/index.js index 5b0c3b02..a5bae1cf 100644 --- a/src/Metamaps/index.js +++ b/src/Metamaps/index.js @@ -15,7 +15,7 @@ import Import from './Import' import JIT from './JIT' import Listeners from './Listeners' import Loading from './Loading' -import Map, { CheatSheet, InfoBox } from './Map' +import Map, { InfoBox } from './Map' import Mapper from './Mapper' import Mouse from './Mouse' import Organize from './Organize' @@ -52,7 +52,6 @@ Metamaps.JIT = JIT Metamaps.Listeners = Listeners Metamaps.Loading = Loading Metamaps.Map = Map -Metamaps.Map.CheatSheet = CheatSheet Metamaps.Map.InfoBox = InfoBox Metamaps.Maps = {} Metamaps.Mapper = Mapper