metamaps--metamaps/app/views/maps/_newtopicsecret.html.erb
Connor Turland 0441850504 Secret.convo (#1059)
* set up for using secret css/js

* testing

* add stuff

* final tweak for secret convos

* looks like its all working

* realized this change is just good all around

* minor touch ups

* only us for now

* no longer validate presence of xloc/yloc

* fix syntax issue
2017-02-05 14:30:23 -05:00

36 lines
No EOL
1.4 KiB
Text

<%= form_for Topic.new, url: topics_url, remote: true do |form| %>
<div class="openMetacodeSwitcher openLightbox" data-open="switchMetacodes">
<div class="tooltipsAbove">Switch Metacodes</div>
</div>
<div id="metacodeImg">
<% @metacodes = user_metacodes()
@metacodes.each do |m| %>
<img class="cloudcarousel" width="40" height="40" src="<%= asset_path m.icon %>" alt="<%= m.name %>" title="<%= m.name %>" data-id="<%= m.id %>" />
<% end %>
</div>
<div class="selectedMetacode">
<img src="<%= asset_path @metacodes[0].icon %>" />
<span><%= @metacodes[0].name %></span>
<div class="downArrow"></div>
</div>
<%= form.text_field :name, :maxlength => 140, :placeholder => "what are you thinking..." %>
<div class="clearfloat"></div>
<div id="metacodeSelector"></div>
<div class="clearfloat"></div>
<script>
<% @metacodes.each do |m| %>
Metamaps.Create.selectedMetacodes.push("<%= m.id %>");
Metamaps.Create.newSelectedMetacodes.push("<%= m.id %>");
Metamaps.Create.selectedMetacodeNames.push("<%= m.name %>");
Metamaps.Create.newSelectedMetacodeNames.push("<%= m.name %>");
<% end %>
Metamaps.Create.newTopic.metacode = <%= @metacodes[0].id %>
<% current_user.recent_metacodes.each do |id| %>
Metamaps.Create.recentMetacodes.push(<%= id %>);
<% end %>
<% current_user.most_used_metacodes.each do |id| %>
Metamaps.Create.mostUsedMetacodes.push(<%= id %>);
<% end %>
</script>
<% end %>