From 96f66a2f8cc759630c0d849702009e8c2520f40b Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Sat, 4 Feb 2017 04:27:08 +0000 Subject: [PATCH] fix up topic creator --- app/assets/stylesheets/application.scss.erb | 2 +- app/controllers/conversations_controller.rb | 17 +++++++++++++++++ frontend/src/Metamaps/Listeners.js | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 app/controllers/conversations_controller.rb diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index b4b5455c..3ad5f0a0 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -532,6 +532,7 @@ button.button.btn-no:hover { display: block; position: absolute; z-index: 1; + white-space: nowrap; } .selectedMetacode { @@ -572,7 +573,6 @@ button.button.btn-no:hover { z-index: 9999; width: 256px; height: 34px; - float: left; } .new_topic #topic_name, .new_topic .tt-hint { diff --git a/app/controllers/conversations_controller.rb b/app/controllers/conversations_controller.rb new file mode 100644 index 00000000..35accd64 --- /dev/null +++ b/app/controllers/conversations_controller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +class ConversationsController < ApplicationController + + def conversation + @maps = map_scope(Map.where.not(name: 'Untitled Map').where.not(permission: 'private')) + + respond_to do |format| + format.html do + # root url => main/home. main/home renders maps/activemaps view. + redirect_to(root_url) && return if authenticated? + respond_with(@maps, @user) + end + format.json { render json: @maps.to_json } + end + end + +end \ No newline at end of file diff --git a/frontend/src/Metamaps/Listeners.js b/frontend/src/Metamaps/Listeners.js index 769d36ab..c6a2cad9 100644 --- a/frontend/src/Metamaps/Listeners.js +++ b/frontend/src/Metamaps/Listeners.js @@ -2,6 +2,7 @@ import Active from './Active' import Control from './Control' +import Create from './Create' import DataModel from './DataModel' import JIT from './JIT' import Mobile from './Mobile' @@ -127,6 +128,8 @@ const Listeners = { $(window).resize(function() { if (Visualize && Visualize.mGraph) { Util.resizeCanvas(Visualize.mGraph.canvas) + Create.newSynapse.updateForm() + Create.newTopic.position() } if (Active.Map && Realtime.inConversation) Realtime.positionVideos()