cleanup template js files

This commit is contained in:
Connor Turland 2018-03-05 13:40:03 -05:00
parent 0063c9f5d5
commit 0220874590
20 changed files with 42 additions and 125 deletions

View file

@ -1,3 +0,0 @@
<script type="text/javascript">
</script>

View file

@ -17,4 +17,3 @@ class MyComponent extends Component {
}
export default MyComponent
{ render 'script' }

View file

@ -35,4 +35,3 @@ class MyComponent extends Component {
}
export default MyComponent
{ render 'script' }

View file

@ -18,4 +18,3 @@ class MyComponent extends Component {
}
export default MyComponent
{ render 'script' }

View file

@ -44,4 +44,3 @@ class MyComponent extends Component {
}
export default MyComponent
{ render 'script' }

View file

@ -1,3 +0,0 @@
<script type="text/javascript">
</script>

View file

@ -1,11 +1,3 @@
<script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "active";
Metamaps.ServerData.Active = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "active";
Metamaps.ServerData.Active = { @maps.to_json.html_safe };

View file

@ -1,11 +1,3 @@
<script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "featured";
Metamaps.ServerData.Featured = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "featured";
Metamaps.ServerData.Featured = { @maps.to_json.html_safe };

View file

@ -1,14 +1,6 @@
<script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "mapper";
Metamaps.ServerData.Mapper = {
models: { @maps.to_json.html_safe },
mapperId: { params[:id] }
};
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentSection = "explore";
Metamaps.currentPage = "mapper";
Metamaps.ServerData.Mapper = {
models: { @maps.to_json.html_safe },
mapperId: { params[:id] }
};

View file

@ -1,11 +1,3 @@
<script>
Metamaps.currentPage = "mine";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Mine = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentPage = "mine";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Mine = { @maps.to_json.html_safe };

View file

@ -1,11 +1,3 @@
<script>
Metamaps.currentPage = "shared";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Shared = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentPage = "shared";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Shared = { @maps.to_json.html_safe };

View file

@ -1,11 +1,3 @@
<script>
Metamaps.currentPage = "starred";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Starred = { @maps.to_json.html_safe };
Metamaps.GlobalUI.Search.focus();
</script>
Metamaps.currentPage = "starred";
Metamaps.currentSection = "explore";
Metamaps.ServerData.Starred = { @maps.to_json.html_safe };

View file

@ -12,7 +12,6 @@
{ render :partial => 'maps/newtopic' }
{ end }
{ render :partial => 'maps/newsynapse' }
{ # for populating the change metacode list on the topic card }
{ render :partial => 'shared/metacodeoptions' }
{ end }
{ render :partial => 'layouts/foot' }

View file

@ -1,19 +1,13 @@
<script>
Metamaps.currentSection = "map";
Metamaps.currentPage = { @map.id.to_s };
Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveMap = { @map.to_json.html_safe };
Metamaps.ServerData.Mappers = { @allmappers.to_json.html_safe };
Metamaps.ServerData.Collaborators = { @allcollaborators.to_json.html_safe };
Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe };
Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe };
Metamaps.ServerData.Mappings = { @allmappings.to_json.html_safe };
Metamaps.ServerData.Messages = { @allmessages.to_json.html_safe };
Metamaps.ServerData.Stars = { @allstars.to_json.html_safe };
Metamaps.ServerData.requests = { @allrequests.to_json.html_safe };
Metamaps.ServerData.VisualizeType = "ForceDirected";
</script>
Metamaps.currentSection = "map";
Metamaps.currentPage = { @map.id.to_s };
Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveMap = { @map.to_json.html_safe };
Metamaps.ServerData.Mappers = { @allmappers.to_json.html_safe };
Metamaps.ServerData.Collaborators = { @allcollaborators.to_json.html_safe };
Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe };
Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe };
Metamaps.ServerData.Mappings = { @allmappings.to_json.html_safe };
Metamaps.ServerData.Messages = { @allmessages.to_json.html_safe };
Metamaps.ServerData.Stars = { @allstars.to_json.html_safe };
Metamaps.ServerData.requests = { @allrequests.to_json.html_safe };
Metamaps.ServerData.VisualizeType = "ForceDirected";

View file

@ -1,6 +1,3 @@
import React, { Component } from react
class MyComponent extends Component {

View file

@ -1,6 +1,3 @@
import React, { Component } from react
class MyComponent extends Component {

View file

@ -1,10 +1,8 @@
<script>
Metamaps.currentSection = "topic"
Metamaps.currentPage = { @topic.id.to_s }
Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveTopic = { @topic.to_json(user: current_user).html_safe }
Metamaps.ServerData.Creators = { @allcreators.to_json.html_safe }
Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe }
Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe }
Metamaps.ServerData.VisualizeType = "RGraph"
</script>
Metamaps.currentSection = "topic"
Metamaps.currentPage = { @topic.id.to_s }
Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveTopic = { @topic.to_json(user: current_user).html_safe }
Metamaps.ServerData.Creators = { @allcreators.to_json.html_safe }
Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe }
Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe }
Metamaps.ServerData.VisualizeType = "RGraph"

View file

@ -1,7 +1,3 @@
import React, { Component } from react
class MyComponent extends Component {

View file

@ -1,6 +1,3 @@
import React, { Component } from react
class MyComponent extends Component {

View file

@ -1,6 +1,3 @@
import React, { Component } from react
class MyComponent extends Component {