refactor out the cheatsheet file

This commit is contained in:
Connor Turland 2018-03-08 10:22:11 -05:00
parent ceb2420b8d
commit 3d985b6205
5 changed files with 7 additions and 17 deletions

View file

@ -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

View file

@ -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()

View file

@ -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

View file

@ -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) {

View file

@ -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