2013-01-06 23:40:48 +00:00
|
|
|
<!--<div class="focus">
|
2012-10-26 10:04:52 +00:00
|
|
|
<div class="focusleft">
|
2013-01-01 22:45:35 +00:00
|
|
|
<p># of Topics: <%= @map.topics.count %></p>
|
2012-10-26 10:04:52 +00:00
|
|
|
<p># of Synapses: <%= @map.synapses.count %></p>
|
2012-12-01 23:05:17 +00:00
|
|
|
<% if (@map.permission == "commons" && authenticated?) || @map.user == user %>
|
2012-12-21 23:07:13 +00:00
|
|
|
<%= form_for @map, :url => savelayout_path(@map), :html => { :class => "saveMapLayout", :id => "saveMapLayout"}, remote: true do |form| %>
|
2012-12-01 23:05:17 +00:00
|
|
|
<%= form.hidden_field "coordinates", :value => "" %>
|
|
|
|
<%= form.submit "Save Layout", class: "saveLayout", id: "saveLayout" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2013-01-04 21:51:37 +00:00
|
|
|
<button onclick="if (!goRealtime) { this.innerHTML = 'Stop Realtime'; $('#saveLayout').css('display','none');} else if (goRealtime) { this.innerHTML = 'Start Realtime'; $('#saveLayout').css('display','block');} goRealtime = !goRealtime;">Start Realtime</button>
|
2012-10-26 10:04:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="focusmiddle">
|
2012-12-21 23:07:13 +00:00
|
|
|
<h1 class="title"><%= @map.name %> <% if (@map.permission == "commons" && authenticated?) || @map.user == user %><%= link_to "[edit]", edit_map_path(@map) %><% end %></h1>
|
2012-10-26 10:04:52 +00:00
|
|
|
<div class="desc">
|
|
|
|
<p><%= @map.desc %></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="focusright">
|
2012-10-29 18:21:36 +00:00
|
|
|
<div class="link"><p>Permissions: <%= @map.permission %></p></div>
|
2012-10-26 10:04:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-01-06 23:40:48 +00:00
|
|
|
<div class="clearfloat nodemargin"></div>-->
|
|
|
|
|
|
|
|
<div class="headertop">
|
|
|
|
<button onclick="if (!goRealtime) { this.innerHTML = 'Stop Realtime'; $('#saveLayout').css('display','none');} else if (goRealtime) { this.innerHTML = 'Start Realtime'; $('#saveLayout').css('display','block');} goRealtime = !goRealtime;">Start Realtime</button>
|
|
|
|
<button onclick="hideSelectedEdges();">Hide Selected</button>
|
|
|
|
<% if authenticated? %>
|
|
|
|
<button onclick="removeSelectedEdges();">Remove Selected From Map</button>
|
|
|
|
<button onclick="deleteSelectedEdges();">Permanently Delete Selected</button>
|
|
|
|
<% if (@map.permission == "commons" && authenticated?) || @map.user == user %>
|
|
|
|
<%= form_for @map, :url => savelayout_path(@map), :html => { :class => "saveMapLayout", :id => "saveMapLayout"}, remote: true do |form| %>
|
|
|
|
<%= form.hidden_field "coordinates", :value => "" %>
|
|
|
|
<%= form.submit "Save Layout", class: "saveLayout", id: "saveLayout" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<button onclick="saveToMap();">Save to New Map</button>
|
|
|
|
<% end %>
|
|
|
|
<button onclick='clearCanvas();'>Clear Canvas</button>
|
|
|
|
</div>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
|
|
|
|
<h1 class="index">
|
|
|
|
<% if (@map.permission == "commons" && authenticated?) || @map.user == user %>
|
|
|
|
Editing Map:
|
|
|
|
<% else %>
|
|
|
|
Viewing Map:
|
|
|
|
<% end %>
|
|
|
|
<%= @map.name %>
|
|
|
|
</h1>
|
2012-10-26 10:04:52 +00:00
|
|
|
|
2013-01-05 02:39:16 +00:00
|
|
|
<div class="maps onMap" id="container">
|
2012-10-26 10:04:52 +00:00
|
|
|
<div id="center-container">
|
|
|
|
<div id="infovis"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
|
2013-01-05 02:39:16 +00:00
|
|
|
<% if authenticated? %>
|
|
|
|
<%= render :partial => 'newtopic' %>
|
|
|
|
<%= render :partial => 'newsynapse' %>
|
2013-01-06 23:40:48 +00:00
|
|
|
<%= render :partial => 'maps/new' %>
|
2013-01-05 02:39:16 +00:00
|
|
|
<% end %>
|
|
|
|
<%= form_for @map, :url => realtime_path(@map), :method => "GET", :html => { :id => "MapRealtime"}, remote: true do |form| %>
|
|
|
|
<%= form.hidden_field :time, :value => Time.now.to_i %>
|
|
|
|
<%= form.hidden_field :ids, :value => 0 %>
|
|
|
|
<% end %>
|
|
|
|
<script>
|
|
|
|
var dragged = 0;
|
|
|
|
mapid = <%= @map.id %>;
|
|
|
|
var int = setInterval(function(){
|
|
|
|
if (goRealtime) {
|
|
|
|
$('#MapRealtime').submit();
|
|
|
|
}
|
|
|
|
},4000);
|
|
|
|
</script>
|
|
|
|
|
2012-10-26 10:04:52 +00:00
|
|
|
<script>
|
2012-12-15 07:39:14 +00:00
|
|
|
viewMode = "graph";
|
2012-10-26 10:04:52 +00:00
|
|
|
json = <%= @mapjson %>;
|
|
|
|
if (json.length > 0) {
|
|
|
|
$(document).ready(function() {
|
2012-12-03 23:40:14 +00:00
|
|
|
<% if (@map.arranged) %>
|
2012-12-14 18:31:39 +00:00
|
|
|
initialize("arranged");
|
2012-12-03 23:40:14 +00:00
|
|
|
<% else %>
|
2012-12-14 18:31:39 +00:00
|
|
|
initialize("chaotic");
|
2012-12-03 23:40:14 +00:00
|
|
|
<% end %>
|
2012-10-26 10:04:52 +00:00
|
|
|
});
|
|
|
|
}
|
2012-12-25 23:29:20 +00:00
|
|
|
else {
|
|
|
|
$(document).ready(function() {
|
|
|
|
initialize("chaotic", true);
|
|
|
|
});
|
|
|
|
}
|
2013-01-06 23:40:48 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<%= render :partial => 'main/find' %>
|
|
|
|
<%= render :partial => 'main/analyze' %>
|
|
|
|
<%= render :partial => 'main/organize' %>
|