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 export default MyComponent
{ render 'script' }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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