2013-01-01 22:45:35 +00:00
|
|
|
<%= form_for Topic.new, url: topics_url, remote: true do |form| %>
|
2016-09-20 00:30:34 +00:00
|
|
|
<div class="openMetacodeSwitcher openLightbox" data-open="switchMetacodes">
|
|
|
|
<div class="tooltipsAbove">Switch Metacodes</div>
|
|
|
|
</div>
|
2016-09-24 04:27:34 +00:00
|
|
|
|
2013-01-26 01:49:40 +00:00
|
|
|
<div id="metacodeImg">
|
2017-02-05 06:37:37 +00:00
|
|
|
<% @metacodes = user_metacodes()
|
|
|
|
metacode = user_metacode() ? user_metacode() : user_metacodes[0]
|
|
|
|
@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 %>" />
|
2013-01-26 01:49:40 +00:00
|
|
|
<% end %>
|
2016-09-18 15:22:51 +00:00
|
|
|
</div>
|
|
|
|
<div class="selectedMetacode">
|
2017-02-05 06:37:37 +00:00
|
|
|
<img src="<%= asset_path metacode.icon %>" />
|
|
|
|
<span><%= metacode.name %></span>
|
2016-09-18 15:22:51 +00:00
|
|
|
<div class="downArrow"></div>
|
|
|
|
</div>
|
2017-01-12 05:04:49 +00:00
|
|
|
<%= form.text_field :name, :maxlength => 140, :placeholder => "what are you thinking..." %>
|
2016-09-18 15:22:51 +00:00
|
|
|
<div class="clearfloat"></div>
|
|
|
|
<div id="metacodeSelector"></div>
|
2012-12-25 23:29:20 +00:00
|
|
|
<div class="clearfloat"></div>
|
2014-06-04 19:24:16 +00:00
|
|
|
<script>
|
2017-02-05 06:37:37 +00:00
|
|
|
<% @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 %>");
|
2014-06-04 19:24:16 +00:00
|
|
|
<% end %>
|
2017-02-05 06:37:37 +00:00
|
|
|
Metamaps.Create.newTopic.metacode = <%= metacode.id %>
|
2017-02-05 05:41:29 +00:00
|
|
|
<% current_user.recent_metacodes.each do |id| %>
|
2016-09-18 15:22:51 +00:00
|
|
|
Metamaps.Create.recentMetacodes.push(<%= id %>);
|
|
|
|
<% end %>
|
2017-02-05 05:41:29 +00:00
|
|
|
<% current_user.most_used_metacodes.each do |id| %>
|
2016-09-18 15:22:51 +00:00
|
|
|
Metamaps.Create.mostUsedMetacodes.push(<%= id %>);
|
|
|
|
<% end %>
|
2014-06-04 19:24:16 +00:00
|
|
|
</script>
|
2012-10-26 10:04:52 +00:00
|
|
|
<% end %>
|