fix the carousel

This commit is contained in:
Connor Turland 2017-01-12 12:19:54 -05:00
parent b13ac98c9f
commit 38c01c4e8f
2 changed files with 10 additions and 6 deletions

View file

@ -526,8 +526,8 @@ button.button.btn-no:hover {
} }
.new_topic { .new_topic {
top: 50%; top: -10000px;
left: 50%; left: -10000px;
margin-top: -17px; margin-top: -17px;
display: block; display: block;
position: absolute; position: absolute;

View file

@ -23,9 +23,9 @@ const Create = {
newSelectedMetacodes: [], newSelectedMetacodes: [],
recentMetacodes: [], recentMetacodes: [],
mostUsedMetacodes: [], mostUsedMetacodes: [],
init: function () { init: function (serverData) {
var self = Create var self = Create
self.newTopic.init() self.newTopic.init(serverData)
self.newSynapse.init() self.newSynapse.init()
// // SWITCHING METACODE SETS // // SWITCHING METACODE SETS
@ -142,10 +142,12 @@ console.log(codesToSwitchToIds)
$('#topic_name').focus() $('#topic_name').focus()
}, },
newTopic: { newTopic: {
init: function () { init: function (serverData) {
const DOWN_ARROW = 40 const DOWN_ARROW = 40
const ESC = 27 const ESC = 27
if (!serverData.ActiveMapper) return
$('#topic_name').keyup(function (e) { $('#topic_name').keyup(function (e) {
Create.newTopic.name = $(this).val() Create.newTopic.name = $(this).val()
@ -218,7 +220,9 @@ console.log(codesToSwitchToIds)
speed: 0.3, speed: 0.3,
bringToFront: true bringToFront: true
}) })
$('#new_topic').attr('oncontextmenu', 'return false') // prevents the mouse up event from opening the default context menu on this element $('#new_topic').hide()
.css({ left: '50%', top: '50%' })
.attr('oncontextmenu', 'return false') // prevents the mouse up event from opening the default context menu on this element
}, },
name: null, name: null,
newId: 1, newId: 1,