diff --git a/app/assets/javascripts/metamaps/Metamaps.GlobalUI.js b/app/assets/javascripts/metamaps/Metamaps.GlobalUI.js index 0dff8295..8e4ae2ae 100644 --- a/app/assets/javascripts/metamaps/Metamaps.GlobalUI.js +++ b/app/assets/javascripts/metamaps/Metamaps.GlobalUI.js @@ -75,6 +75,8 @@ Metamaps.GlobalUI = { event.preventDefault(); return false; }); + + $('#lightbox_screen, #lightbox_close').click(self.closeLightbox); // hide notices after 10 seconds $('.notice.metamaps').delay(10000).fadeOut('fast'); @@ -105,9 +107,10 @@ Metamaps.GlobalUI = { } }, - closeLightbox: function () { + closeLightbox: function (event) { var self = Metamaps.GlobalUI; + if (event) event.preventDefault(); $('#lightbox_overlay').hide(); if (self.lightbox === 'forkmap') Metamaps.GlobalUI.CreateMap.reset('fork_map'); diff --git a/app/views/in_metacode_sets/_form.html.erb b/app/views/in_metacode_sets/_form.html.erb deleted file mode 100644 index 8af37701..00000000 --- a/app/views/in_metacode_sets/_form.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -<%= form_for(@in_metacode_set) do |f| %> - <% if @in_metacode_set.errors.any? %> -
-

<%= pluralize(@in_metacode_set.errors.count, "error") %> prohibited this in_metacode_set from being saved:

- - -
- <% end %> - -
- <%= f.label :metacode %>
- <%= f.text_field :metacode %> -
-
- <%= f.label :metacode_set %>
- <%= f.text_field :metacode_set %> -
-
- <%= f.submit %> -
-<% end %> diff --git a/app/views/in_metacode_sets/edit.html.erb b/app/views/in_metacode_sets/edit.html.erb deleted file mode 100644 index c94b7b78..00000000 --- a/app/views/in_metacode_sets/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing in_metacode_set

- -<%= render 'form' %> - -<%= link_to 'Show', @in_metacode_set %> | -<%= link_to 'Back', in_metacode_sets_path %> diff --git a/app/views/in_metacode_sets/index.html.erb b/app/views/in_metacode_sets/index.html.erb deleted file mode 100644 index 57753a5d..00000000 --- a/app/views/in_metacode_sets/index.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -

Listing in_metacode_sets

- - - - - - - - - - -<% @in_metacode_sets.each do |in_metacode_set| %> - - - - - - - -<% end %> -
MetacodeMetacode set
<%= in_metacode_set.metacode %><%= in_metacode_set.metacode_set %><%= link_to 'Show', in_metacode_set %><%= link_to 'Edit', edit_in_metacode_set_path(in_metacode_set) %><%= link_to 'Destroy', in_metacode_set, method: :delete, data: { confirm: 'Are you sure?' } %>
- -
- -<%= link_to 'New In metacode set', new_in_metacode_set_path %> diff --git a/app/views/in_metacode_sets/new.html.erb b/app/views/in_metacode_sets/new.html.erb deleted file mode 100644 index 0e1d596b..00000000 --- a/app/views/in_metacode_sets/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New in_metacode_set

- -<%= render 'form' %> - -<%= link_to 'Back', in_metacode_sets_path %> diff --git a/app/views/in_metacode_sets/show.html.erb b/app/views/in_metacode_sets/show.html.erb deleted file mode 100644 index 2b69e016..00000000 --- a/app/views/in_metacode_sets/show.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

<%= notice %>

- -

- Metacode: - <%= @in_metacode_set.metacode %> -

- -

- Metacode set: - <%= @in_metacode_set.metacode_set %> -

- - -<%= link_to 'Edit', edit_in_metacode_set_path(@in_metacode_set) %> | -<%= link_to 'Back', in_metacode_sets_path %> diff --git a/app/views/layouts/_ga.html.erb b/app/views/layouts/_googleanalytics.html.erb similarity index 100% rename from app/views/layouts/_ga.html.erb rename to app/views/layouts/_googleanalytics.html.erb diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 0328db16..1d6d2d3e 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -6,7 +6,7 @@ diff --git a/app/views/maps/_new.html.erb b/app/views/layouts/_newmap.html.erb similarity index 100% rename from app/views/maps/_new.html.erb rename to app/views/layouts/_newmap.html.erb diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index caed06b6..4d6360f3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -93,6 +93,6 @@ BAROMETER.load('Scqak8nyHdFEkezKMNeQp'); <%= render :partial => 'layouts/lightboxes' %> - <%= render :partial => 'layouts/ga' if Rails.env.production? %> + <%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %> diff --git a/app/views/maps/_homemap.html.erb b/app/views/main/_homemap.html.erb similarity index 100% rename from app/views/maps/_homemap.html.erb rename to app/views/main/_homemap.html.erb diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index edfa02fa..b03a4843 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -64,7 +64,7 @@
<% @maps.each_with_index do |map, index| %> <% first = index == 0 ? true : false %> - <%= render :partial => 'maps/homemap', :locals => { :map => map, :first => first } %> + <%= render :partial => 'main/homemap', :locals => { :map => map, :first => first } %> <% end %>
diff --git a/app/views/mappings/create.js.erb b/app/views/mappings/create.js.erb deleted file mode 100644 index ef8b6089..00000000 --- a/app/views/mappings/create.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -/* - * @file - * This javascript is returned and executed when you create a new mapping. - */ diff --git a/app/views/mappings/destroy.js.erb b/app/views/mappings/destroy.js.erb deleted file mode 100644 index a8653340..00000000 --- a/app/views/mappings/destroy.js.erb +++ /dev/null @@ -1,5 +0,0 @@ -/* - * @file - * The javascript returned when destroy is called in the mappings controller - * Unused - */ diff --git a/app/views/mappings/edit.html.erb b/app/views/mappings/edit.html.erb deleted file mode 100644 index 0151d668..00000000 --- a/app/views/mappings/edit.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%# - # @file - # This code renders the edit form for mappings. Unused. - #%> diff --git a/app/views/mappings/index.html.erb b/app/views/mappings/index.html.erb deleted file mode 100644 index 17643309..00000000 --- a/app/views/mappings/index.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%# - # @file - # This view could show an index of all mappings, but is unused. - #%> diff --git a/app/views/mappings/new.html.erb b/app/views/mappings/new.html.erb deleted file mode 100644 index 39dd3eb1..00000000 --- a/app/views/mappings/new.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%# - # @file - # This file is a form for creating new mappings. Unused. - #%> diff --git a/app/views/mappings/show.html.erb b/app/views/mappings/show.html.erb deleted file mode 100644 index 14785fb4..00000000 --- a/app/views/mappings/show.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%# - # @file - # This would show a mapping but instead is unused. - #%> diff --git a/app/views/maps/show.html.erb b/app/views/maps/show.html.erb index 8354eb7e..d3e0ebb2 100644 --- a/app/views/maps/show.html.erb +++ b/app/views/maps/show.html.erb @@ -41,7 +41,7 @@

Filter By Metacode

allnone
- <%= render :partial => 'main/filterbymetacode' %> + <%= render :partial => 'shared/filterbymetacode' %>
@@ -72,7 +72,7 @@ <% end %> <% # for populating the change metacode list on the topic card %> - <%= render :partial => 'main/metacodeoptions' %> + <%= render :partial => 'shared/metacodeoptions' %> <% end %> diff --git a/app/views/layouts/_cheatsheet.html.erb b/app/views/shared/_cheatsheet.html.erb similarity index 100% rename from app/views/layouts/_cheatsheet.html.erb rename to app/views/shared/_cheatsheet.html.erb diff --git a/app/views/main/_filterbymetacode.html.erb b/app/views/shared/_filterbymetacode.html.erb similarity index 100% rename from app/views/main/_filterbymetacode.html.erb rename to app/views/shared/_filterbymetacode.html.erb diff --git a/app/views/maps/_fork.html.erb b/app/views/shared/_forkmap.html.erb similarity index 100% rename from app/views/maps/_fork.html.erb rename to app/views/shared/_forkmap.html.erb diff --git a/app/views/main/_metacodeoptions.html.erb b/app/views/shared/_metacodeoptions.html.erb similarity index 100% rename from app/views/main/_metacodeoptions.html.erb rename to app/views/shared/_metacodeoptions.html.erb diff --git a/app/views/layouts/_switchmetacodes.html.erb b/app/views/shared/_switchmetacodes.html.erb similarity index 100% rename from app/views/layouts/_switchmetacodes.html.erb rename to app/views/shared/_switchmetacodes.html.erb diff --git a/app/views/synapses/_new.html.erb b/app/views/synapses/_new.html.erb index 50ecc35c..e1e7d176 100644 --- a/app/views/synapses/_new.html.erb +++ b/app/views/synapses/_new.html.erb @@ -6,8 +6,5 @@
<%= form_for Synapse.new, url: synapses_url, remote: true do |form| %> <%= form.text_field :desc, :placeholder => "describe the connection..." %> - <%= form.hidden_field :topic1id, :value => 0 %> - <%= form.hidden_field :topic2id, :value => 0 %> - <%= form.hidden_field :grabSynapse, :value => "null" %> <% end %>
diff --git a/app/views/topics/_new.html.erb b/app/views/topics/_new.html.erb index e3421ec3..7aa13eb3 100644 --- a/app/views/topics/_new.html.erb +++ b/app/views/topics/_new.html.erb @@ -24,11 +24,6 @@ <% end %> <%= form.text_field :name, :maxlength => 140, :placeholder => "title..." %> - <%= form.hidden_field :metacode, :value => "Action" %> - <%= form.hidden_field :x, :value => 0 %> - <%= form.hidden_field :y, :value => 0 %> - <%= form.hidden_field :grabTopic, :value => "null" %> - <%= form.hidden_field :addSynapse, :value => false %>
<% end %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 703af0a5..9179143c 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -29,7 +29,7 @@

Filter By Metacode

allnone
- <%= render :partial => 'main/filterbymetacode' %> + <%= render :partial => 'shared/filterbymetacode' %>
@@ -51,7 +51,7 @@ <% if authenticated? %> <%= render :partial => 'topics/new' %> <%= render :partial => 'synapses/new' %> - <%= render :partial => 'main/metacodeoptions' %> + <%= render :partial => 'shared/metacodeoptions' %> <% end %>